Sophie

Sophie

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

gtkdialog-0.8.3-1.mga5.x86_64.rpm

#!/bin/sh

GTKDIALOG=gtkdialog

MAIN_DIALOG='
<window>
	<vbox>
		<frame Checkbox example>
			<checkbox>
				<label>This is a checkbox...</label>
				<variable>CHECKBOX</variable>
				<action>echo Checkbox is $CHECKBOX now.</action>
				<action>if true enable:ENTRY</action>
				<action>if false disable:ENTRY</action>
			</checkbox>
			<entry>
				<default>Text in the entry</default>
				<variable>ENTRY</variable>
				<sensitive>false</sensitive>
			</entry>
			<checkbox>
				<label>I want an OK button NOW!</label>
				<default>true</default>
				<variable>ANOTHER_CHECKBOX</variable>
				<action>if true enable:OKBUTTON</action>
				<action>if false disable:OKBUTTON</action>
			</checkbox>
		</frame>
		<hbox>
			<button ok>
				<variable>OKBUTTON</variable>
			</button>
			<button cancel></button>
		</hbox>
	</vbox>
</window>
'
export MAIN_DIALOG

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