From issue 8.
Example:
Code: Select all
#!/bin/sh
# NOTE: This example requires at least gtkdialog-0.7.21 (please visit
# http://code.google.com/p/gtkdialog/). Additionally if you are using
# Puppy Linux then you may find that an historical version of gtkdialog
# already exists in /usr/sbin, and if that is the case then you should
# modify the shell variable below to point to the new gtkdialog binary.
GTKDIALOG=gtkdialog
inputfilestockCreate() {
echo "gtk-dialog-authentication | | gtk-dialog-authentication | 2
gtk-dialog-error | | gtk-dialog-error | 2
gtk-dialog-info | | gtk-dialog-info | 2
gtk-dialog-question | | gtk-dialog-question | 2
gtk-dialog-warning | | gtk-dialog-warning | 2
gtk-info | | gtk-info | 2
gtk-new | | gtk-new | 2
gtk-save | | gtk-save | 2
gtk-undo | | gtk-undo | 2
gtk-redo | | gtk-redo | 2
gtk-open | | gtk-open | 2
gtk-about | | gtk-about | 2
gtk-add | | gtk-add | 2
gtk-apply | | gtk-apply | 2
gtk-bold | | gtk-bold | 2 " > inputfilestock
}
# NOTE: The following image names should hopefully represent physical
# files that exist upon your computer minus their paths and extensions,
# but if you find them to be missing then substitute them with something
# that you do have within /usr/share/icons or /usr/share/pixmaps.
inputfileiconCreate() {
echo "gimp | | gimp | 2
gnumeric | | gnumeric | 2
geany | | geany | 2
glade-3 | | glade-3 | 2
uget-icon | | uget-icon | 2
viewnior | | viewnior | 2
xarchive | | xarchive | 2
scribus | | scribus | 2
inkscape | | inkscape | 2
html | | html | 2
gz | | gz | 2
top | | top | 2
midori | | midori | 2
adblock | | adblock | 2
abiword | | abiword | 2 " > inputfileicon
}
inputfilestockCreate
inputfileiconCreate
export MAIN_DIALOG='
<window title="tree widget icons from input files" resizable="false">
<vbox>
<hbox>
<frame Stock icons from input file>
<tree>
<variable>tre0</variable>
<label>0 | 1 | 2</label>
<height>400</height><width>250</width>
<input file stock_column="0">inputfilestock</input>
</tree>
</frame>
<frame Theme icons from input file>
<tree>
<variable>tre1</variable>
<label>0 | 1 | 2</label>
<height>400</height><width>250</width>
<input file icon_column="0">inputfileicon</input>
</tree>
</frame>
</hbox>
<hbox homogeneous="true">
<button ok></button>
</hbox>
</vbox>
<action signal="hide">exit:Exit</action>
</window>
'
$GTKDIALOG --program=MAIN_DIALOG
Thunor