The function is run as a background process, but still it prevents the code to reach the end (gxmessage).
How can I get the Exit-value from the main gui while the function-gui shows? I can not use the launch/close commands in gtkdialog.
Thanks for any help
Code: Select all
#!/bin/bash
myfunc(){
echo '<vbox><button ok></button></vbox>' | gtkdialog -s
}
export -f myfunc
export XML='
<vbox>
<text><label>Exit value is correct if pressing the button below. Opening another window corrupts the Exit value</label></text>
<button>
<label>My exit value is: Button1</label>
<action type="exit">Button1</action>
</button>
<button>
<label>Open another window corrupts the exit value</label>
<action>myfunc &</action>
</button>
</vbox>
'
I=$IFS; IFS=""
for STATEMENTS in $(gtkdialog -p XML); do
eval $STATEMENTS
done
IFS=$I
gxmessage "Exit value is: $EXIT"