Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 25 Oct 2014, 18:26
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
Problem killing extra processes when clicking on TableBox.
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count_1  
Author Message
sunburnt


Joined: 08 Jun 2005
Posts: 5037
Location: Arizona, U.S.A.

PostPosted: Sat 08 May 2010, 05:14    Post_subject:  Problem killing extra processes when clicking on TableBox.  

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:
#!/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...
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count_1  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Off-Topic Area » Programming
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0379s ][ Queries: 12 (0.0038s) ][ GZIP on ]