Sophie

Sophie

distrib > Mageia > 5 > x86_64 > media > core-release > by-pkgid > 13f5dcef5358e9d5a2a5a1ae6baf28fc > files > 10

gtkdialog-0.8.3-1.mga5.x86_64.rpm

#!/bin/sh

GTKDIALOG=gtkdialog

IMAGEFILE="`find /usr/share/pixmaps -maxdepth 1 -type f | head -1`"

MAIN_DIALOG='
<window>
	<vbox>
		<hbox>
			<button>
				<label>Label</label>
				<action>echo You pressed the button with the label.</action>
			</button>
			<button>
				<width>16</width>
				<input file>'"$IMAGEFILE"'</input>
				<action>echo You pressed the button with the pixmap.</action>
			</button>
		</hbox>
		<hbox>
			<button yes>
				<action>echo You pressed the Yes button.</action>
			</button>
			<button no>
				<action>echo You pressed the No button.</action>
			</button>
		</hbox>
		<hbox>
			<button ok>
				<action>echo You pressed the OK button.</action>
			</button>
			<button cancel>
				<action>echo You pressed the Cancel button.</action>
			</button>
			<button help>
				<action>echo You pressed the Help button.</action>
			</button>
		</hbox>
		<hbox>
			<button ok></button>
			<button cancel></button>
		</hbox>
	</vbox>
</window>
'
export MAIN_DIALOG

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