so variables can`t be passed into the dialog`s code because of: <action type="clear">.
I modded the code so the GUI should run by itself, hard coded all the paths and data.
Variables are definately the best way to pass data. It`s hard to know how to get it to work.
Code: Select all
#! /bin/sh
probepart |sed 's#^/dev/##' |sed 's/|.*$//' |sed 's/$/||/' > /tmp/drvinfo # make tablebox input file
export DRIVEMAN='
<window title=\"DM\" default_width=\"96\" default_height=\"150\">
<vbox>
<table><variable>DRIVES</variable><label>Drive|M|B</label>
<input>cat /tmp/drvinfo</input></table>
<hbox>
<button><label>ROX-file</label><action>/root/my-applications/driveman/driveman btnMNT \$DRIVES rox</action>
<action type="clear">DRIVES</action><action type="refresh">DRIVES</action></button>
<button><label>Boot</label><action>/root/my-applications/driveman/driveman btnBOOT \$DRIVES</action>
<action type="clear">DRIVES</action><action type="refresh">DRIVES</action></button>
</hbox><hbox>
<button><label>Mt-UnM</label><action>/root/my-applications/driveman/driveman btnMNT \$DRIVES</action>
<action type="clear">DRIVES</action><action type="refresh">DRIVES</action></button>
<button><label>CkFs</label><action>/root/my-applications/driveman/driveman ckDRV \$DRIVES</action></button>
</hbox><hbox>
<button><label>Settings</label><action>/root/my-applications/driveman/driveman btnSET</action></button>
<button><label>Exit</label><action>/root/my-applications/driveman/driveman cancel</action></button>
</hbox><hbox>
<button>
<label>launch</label>
<action>driveman btnSET</action>
</button>
<button>
<label>Exit</label>
<action>$appPATH/driveman cancel</action>
</button>
</hbox>
</vbox>
'
gtkdialog3 -p -geometry +20+30 --program=DRIVEMAN
#gtkdialog3 -p -geometry ${sizeX}x${sizeY}+${posX}+${posY} --program=DRIVEMAN