Example 30. File 09.01-tree_items
#! /bin/bash # # The <item> tag can hold the following attributes: # o stock or stock_id # o icon or icon_name # export MAIN_DIALOG=' <vbox> <tree> <input file>tmp.text</input> <label>Device | Directory | File</label> <item stock_id="gtk-floppy">Floppy Disk | /floppy/ | ak.tex</item> <item stock="gtk-floppy">Floppy Disk | /floppy/ | ak.dvi</item> <item icon="pdf">Floppy Disk | /floppy/ | ak.ps</item> <item icon_name="rpm">Floppy Disk | /floppy/ | ak.pdf</item> <item stock="gtk-cdrom">CD_ROM Drive | /cdrom/ | </item> <height>100</height><width>400</width> <variable>TREE2</variable> </tree> <hbox> <button cancel></button> <button ok></button> </hbox> </vbox> ' GTKDIALOG=gtkdialog if [ -x "$HOME/bin/gtkdialog" ]; then GTKDIALOG="$HOME/bin/gtkdialog" fi $GTKDIALOG --program=MAIN_DIALOG