#!/bin/bash
#gettext
export TEXTDOMAIN=ptiming
export OUTPUT_CHARSET=UTF-8

if [ -z "$FRAME" ]; then FRAME="$(gettext 'Info')"; fi
export yesno_box="
<window title=\"pTiming\" window_position=\"2\" icon-name=\"ptiming\">
 <vbox>
  <frame $FRAME>
   <pixmap icon_size=\"6\"><input file stock=\"gtk-$IMG\"></input></pixmap>
   <text use-markup=\"true\"><label>\"$TXT1\"</label></text>
   <text use-markup=\"true\"><label>\"$TXT2\"</label></text>
  </frame>
  <hbox>
   <button>
    <input file stock=\"gtk-no\"></input>
    <label>$(gettext 'No')</label>
    <action type=\"exit\">no</action>
   </button>
   <button>
    <input file stock=\"gtk-yes\"></input>
    <label>$(gettext 'Yes')</label>
    <action type=\"exit\">yes</action>
   </button>
  </hbox>
 </vbox>
</window>"
I=$IFS; IFS=""
for STATEMENTS in  $(gtkdialog -p yesno_box --center); do
	eval $STATEMENTS
done
IFS=$I
TXT1=""; TXT2=""; IMG=""; FRAME="" #reset to avoid alien values in next box