#!/bin/sh

GTKDIALOG=gtkdialog

export TMPDIR=/tmp/gtkdialog/examples/"$(basename $0)"
mkdir -p "$TMPDIR"

cat <<EOF > "$TMPDIR"/list.txt
gtk-cdrom    | CD_ROM Drive  | /cdrom/    | ak.tex
gtk-floppy   | Floppy Disk   | /floppy/   | ak.dvi
gtk-harddisk | Hard Disk     | /harddisk/ | ak.ps
gtk-network  | Network Drive | /network/  | ak.pdf
gtk-delete   | Trash         | /trash/    | 
EOF

export MAIN_DIALOG='
<vbox>
  <notebook labels="Checkbox|Radiobutton|Tree">
    <vbox>
      <checkbox>
        <label>This is a checkbox</label>
      </checkbox>
      <checkbox>
        <label>Another checkbox</label>
      </checkbox>
      <checkbox>
        <label>The third checkbox</label>
      </checkbox>
    </vbox>
    <vbox>
      <radiobutton>
        <label>First radiobutton in the group</label>
      </radiobutton>
      <radiobutton>
        <label>The second radiobutton</label>
      </radiobutton>
      <radiobutton>
        <label>Third radiobutton</label>
        <default>true</default>
      </radiobutton>
    </vbox>
    <tree>
      <input file>'"$TMPDIR"'/list.txt</input>
      <label>First</label>
      <item stock="gtk-floppy">This is a floppy</item>
      <item stock="gtk-cdrom">This is a CD-ROM</item>
      <item>This line has no icon</item>
      <variable>EDITOR</variable>
    </tree>
  </notebook>
  <hbox>
    <button cancel></button>
    <button ok></button>
  </hbox>
</vbox>
'

$GTKDIALOG --program=MAIN_DIALOG
