#!/bin/bash

export TEXTDOMAIN=peasygraphics
export OUTPUT_CHARSET=UTF-8
ICONDIR=/usr/share/pixmaps

[ ! -f /usr/share/icons/hicolor/48x48/apps/button.svg ] && \
ln -sf /usr/share/pixmaps/puppy/button.svg /usr/share/icons/hicolor/48x48/apps && gtk-update-icon-cache -f -i /usr/share/icons/hicolor 2>/dev/null

export peasygraphics='
<window title="'$(gettext 'Peasy Graphics')'" icon-name="button" resizable="false">
<vbox width-request="300" space-expand="true" space-fill="true">
  <vbox margin="2" spacing="10" space-expand="true" space-fill="true">
    <hbox spacing="10" homogeneous="true" space-expand="true" space-fill="true">
      <button image-position="2" tooltip-text=" '$(gettext 'Manipulate PDF documents')' ">
        <label>'$(gettext 'PeasyPDF')'</label>
        <input file>'$ICONDIR'/peasypdf.png</input><height>42</height><width>42</width>
        <action>peasypdf &</action>
      </button>
      <button image-position="2" tooltip-text=" '$(gettext 'Graphic/photo printing')' ">
        <label>'$(gettext 'PeasyPrint')'</label>
        <input file>'$ICONDIR'/peasyprint.png</input><height>42</height><width>42</width>
        <action>peasyprint &</action>
      </button>
    </hbox>

    <hbox spacing="10" homogeneous="true" space-expand="true" space-fill="true">
       <button image-position="2" tooltip-text=" '$(gettext 'Image joiner')' ">
        <label>'$(gettext 'PeasyGlue')'</label>
        <input file>'$ICONDIR'/peasyglue48.png</input><height>42</height><width>42</width>
        <action>peasyglue &</action>
      </button>
      <button image-position="2" tooltip-text=" '$(gettext 'Graphic resizer')' ">
        <label>'$(gettext 'PeasyScale')'</label>
        <input file>'$ICONDIR'/peasyscale.png</input><height>42</height><width>42</width>
        <action>peasyscale &</action>
      </button>
    </hbox>

  </vbox>
</vbox>
<action signal="key-press-event" condition="command_is_true([ $KEY_SYM = Escape ] && echo true )">exit:EXIT</action>
</window>'

gtkdialog -p peasygraphics --center
unset frugalpup
