#!/bin/sh

GTKDIALOG=gtkdialog

MAIN_DIALOG='
<window>
	<vbox>
		<hbox>
			<text>
				<label>activates_default:</label>
			</text>
			<entry activates_default="true">
				<default>Default value</default>
				<variable>ENTRY1</variable>
			</entry>
		</hbox>
		<hbox>
			<text>
				<label>editable:</label>
			</text>
			<entry editable="false">
				<default>Default value</default>
				<variable>ENTRY2</variable>
			</entry>
		</hbox>
		<hbox>
			<text>
				<label>has_frame:</label>
			</text>
			<entry has_frame="false">
				<default>Default value</default>
				<variable>ENTRY3</variable>
			</entry>
		</hbox>
		<hbox>
			<text>
				<label>invisible_char:</label>
			</text>
			<entry invisible_char="120" visibility="false">
				<default>Default value</default>
				<variable>ENTRY4</variable>
			</entry>
		</hbox>
		<hbox>
			<text>
				<label>max_length:</label>
			</text>
			<entry max_length="5">
				<default>Default value</default>
				<variable>ENTRY5</variable>
			</entry>
		</hbox>
		<hbox>
			<text>
				<label>width_chars:</label>
			</text>
			<entry width_chars="35">
				<default>Default value</default>
				<variable>ENTRY6</variable>
			</entry>
		</hbox>
		<hbox>
			<button can-default="true" has-default="true">
				<label>OK</label>
				<input file stock="gtk-ok"></input>
			</button>
			<button cancel></button>
		</hbox>
	</vbox>
</window>
'
export MAIN_DIALOG

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