Example 32. File 09.02-tree_default_pixmaps
#! /bin/bash # # The <tree> tag can hold the following attributes for using as a default icon: # o stock or stock_id # o icon or icon_name # export MAIN_DIALOG=' <vbox> <tree stock="gtk-apply"> <input file>tmp.text</input> <label>Device | Directory | File</label> <item>Floppy Disk | /floppy/ | ak.tex</item> <item>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> <tree icon_name="file-devel-cpp"> <input file>tmp.text</input> <label>Device | Directory | File</label> <item>Floppy Disk | /floppy/ | ak.tex</item> <item>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