#!/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.

[ -z $GTKDIALOG ] && 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
