Problem killing extra processes when clicking on TableBox.

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

Problem killing extra processes when clicking on TableBox.

#1 Post by sunburnt »

I have been chasing this one around for awhile. The click event happens on mouse up.
But you get multiple events triggering multiple processes with no easy way to control it.
It would be nice to nip this at the root just after the TableBox is clicked... Like this:

Code: Select all

#!/bin/sh
killPSs() { sleep 2
ps |grep $0 |egrep -v '(grep|geany|getPS)' |awk '{print $1}'
}
export -f killPSs
export DM="
<window title=\"DM\" controls=\"false\"><vbox>
  <table><variable>DRIVES</variable><label>Drives|M|B</label>
  <item>1</item><item>2</item><item>3</item>
  <action signal=\"button-release-event\">killPSs</action></table>
</vbox></window>" ; gtkdialog3 -p DM --class DM_MAIN -G 116x99+99+99 &
The code only shows the processes, I can`t find code to reliably kill: all but the last prosess.
Infact you get output when the GUI first starts! From the first TableBox item being default selected I suspect.
You`ll see a list of process IDs each time you click, and different behavior if the item is preselected or not.
So as it selects and on the next click un-selects, you get more or less processes, one or two would be normal.
<table hover-selection=\"true\"> might solve it but only the TreeBox accepts the tag.
Trying to control a simple click...

Post Reply