Sophie

Sophie

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

gtkdialog-0.8.3-1.mga5.x86_64.rpm

#!/bin/sh

# Thunor: It looks like work on insert and append was started several years ago
# but there's not much code so I wouldn't expect it to work. It would be nice
# to fully add support for inserting and appending data in the future but this
# example was probably written to test some initial code that wasn't finished.

GTKDIALOG=gtkdialog

MAIN_DIALOG='
<window>
	<vbox>
		<frame Insert and Remove>
			<tree rules-hint="true" headers-visible="false">
				<label>This label is invisible but required</label>
				<height>100</height>
				<width>400</width>
				<variable>TREE1</variable>
			</tree>
			<hbox>
				<entry>
					<variable>ENTRY</variable>
				</entry>
				<button>
					<input file stock="gtk-add"></input>
					<action function="insert">ENTRY,TREE</action>
				</button>
				<button>
					<input file stock="gtk-remove"></input>
					<action function="removeselected">TREE</action>
				</button>
			</hbox>    
		</frame>
		<hbox>
			<button cancel></button>
			<button ok></button>
		</hbox>
	</vbox>
</window>
'
export MAIN_DIALOG

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