#!/bin/bash
$APPDIR/func -reset_gtk
export TEXTDOMAIN=pmusic

[ -z "$FRAME" ] && FRAME="Info"
DEFAULT_NO=''; DEFAULT_YES=''
[ "$DEFAULT" = "no" ] && DEFAULT_NO=' has-focus="true"'
[ "$DEFAULT" = "yes" ] && DEFAULT_YES=' has-focus="true"'

export pmusic_yesno_box="
<window title=\"pMusic\" icon-name=\"pmusic\" window_position=\"2\" allow-grow=\"false\">
 <vbox>
  <frame $FRAME>
   <pixmap icon_size=\"6\"><input file stock=\"gtk-$IMG\"></input></pixmap>
   <text use-markup=\"true\" selectable=\"true\" can-focus=\"false\"><label>\"$TXT1\"</label></text>
   <text use-markup=\"true\" selectable=\"true\" can-focus=\"false\"><label>\"$TXT2\"</label></text>
  </frame>
  <hbox>
   <button$DEFAULT_NO>
    <input file stock=\"gtk-no\"></input>
    <label>$(gettext 'No')</label>
    <action type=\"exit\">no</action>
   </button>
   <button$DEFAULT_YES>
    <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 pmusic_yesno_box --center); do
	eval $STATEMENTS
done
IFS=$I
TXT1=""; TXT2=""; IMG=""; FRAME="" #reset to avoid alien values in next box