Greetings
I have been further developing gtkdialog and I've had a look at your Frisbee code and have noticed something that would benefit from modification and I'd like to recommend a tweak:
You are using progressbars as timers in two places. The problem is that gtkdialog runs these processes in another thread and although it will sever communication with them when it exits, it's down to the application developer to make sure that the processes exit because currently they remain ticking in memory after Frisbee has exited.
Since you are using gtkdialog3 (on newer Puppies that will likely be a symlink to gtkdialog4 (gtkdialog-0.8.0) I recommend this:
At line 280, change this:
Code: Select all
<input>for i in \$(seq 0 1 10000); do if ((i\%2==1)) ; then echo 100 ; else echo 99; fi; sleep 10; done </input>
to this:
Code: Select all
<input>i=0; while [ -f /tmp/frisbee-active ]; do echo \$((i * 100)); i=\$((i ^ 1)); sleep 10; done</input>
At line 418, change this:
Code: Select all
<input>for i in \$(seq 0 1 10000); do if ((i\%2==1)) ; then echo 100 ; else echo 99; fi; sleep 15; done </input>
to this:
Code: Select all
<input>i=0; while [ -f /tmp/frisbee-active ]; do echo \$((i * 100)); i=\$((i ^ 1)); sleep 15; done</input>
At line 608, change this:
Code: Select all
RETVALS=`gtkdialog3 --program=MAIN_DIALOG --center`
to this:
Code: Select all
echo > /tmp/frisbee-active
RETVALS=`gtkdialog3 --program=MAIN_DIALOG --center`
rm /tmp/frisbee-active
That's just one way of doing it, but you get the idea -- the process exits when /tmp/frisbee-active no longer exists.
Things are much less complicated in gtkdialog4 (gtkdialog-0.8.0) because there exists a timer widget for this, so I'll show you how that's done:
At line 279, change this:
Code: Select all
<hbox><progressbar height-request=\"1\" width-request=\"1\">
<input>for i in \$(seq 0 1 10000); do if ((i\%2==1)) ; then echo 100 ; else echo 99; fi; sleep 10; done </input>
<action>get-status</action>
<action>refresh:STATUS</action>
</progressbar></hbox>
to this:
Code: Select all
<hbox><timer interval=\"10\" visible=\"false\">
<action>get-status</action>
<action>refresh:STATUS</action>
</timer></hbox>
At line 417, change this:
Code: Select all
<hbox><progressbar height-request=\"1\" width-request=\"1\">
<input>for i in \$(seq 0 1 10000); do if ((i\%2==1)) ; then echo 100 ; else echo 99; fi; sleep 15; done </input>
<action>clear:TABLE</action>
<action>refresh:TABLE</action>
<action>refresh:CURSTAT</action>
<action>refresh:CURIP</action>
<action>refresh:ENWIRE</action>
</progressbar></hbox>
to this:
Code: Select all
<hbox><timer interval=\"15\" visible=\"false\">
<action>clear:TABLE</action>
<action>refresh:TABLE</action>
<action>refresh:CURSTAT</action>
<action>refresh:CURIP</action>
<action>refresh:ENWIRE</action>
</timer></hbox>
Anyway, hope you find this useful.
Regards,
Thunor