It is possible to change the value of external variable ?
In this example, i try change AD=1 to AD=-1
And make the negative button work.
Thanks.
Code: Select all
#!/bin/bash
GTKDIALOG=gtkdialog
export AD
AD=1
MAIN_DIALOG='
<window title="compute" decorated="true" icon_name="gtk-media-record" >
<vbox>
<hbox>
<button can-focus="no" relief="2">
<input file stock="gtk-add"></input>
<action function="refresh">'RESULT'</action>
</button>
<button can-focus="no" relief="2">
<input file stock="gtk-remove"></input>
</button>
<entry>
<variable>RESULT</variable>
<input>echo $(( (RESULT + AD) ))</input>
</entry>
</hbox>
</vbox>
</window>
'
export MAIN_DIALOG
gtkdialog --program=MAIN_DIALOG