#!/bin/sh

#
# Some action function types are still missing.
# See execute_action() for more information.
#

GTKDIALOG=gtkdialog

MAIN_DIALOG='
<window>
	<vbox>
		<frame Button signals>
			<hbox>
				<button>
					<label>All Default</label>
				</button>
				<button>
					<label>Enter/Leave/Clicked</label>
					<action signal="clicked">echo Signal: clicked /default/</action>
					<action signal="enter">echo Signal: enter</action>
					<action signal="leave">echo Signal: leave</action>
				</button>
				<button>
					<label>Pressed/Released/Clicked</label>
					<action signal="clicked">echo Signal: clicked /default/</action>
					<action signal="pressed">echo Signal: pressed</action>
					<action signal="released">echo Signal: released</action>
				</button>
			</hbox>
		</frame>
		<hbox>
			<button cancel>
				<action signal="enter">echo Do you really want to exit?</action>
				<action function="exit">Cancel</action>
			</button>
			<button ok>
				<action signal="enter">echo Do you really want to exit?</action>
				<action function="exit">OK</action>
			</button>
		</hbox>
	</vbox>
</window>
'
export MAIN_DIALOG

case $1 in
	-d | --dump) echo "$MAIN_DIALOG" ;;
	*) $GTKDIALOG --program=MAIN_DIALOG ;;
esac
