Steve McClure wrote:
On Fri, 2005-11-11 at 09:36 -0700, Chris Irish wrote:
  
If I have a pygtk app and I want it to do something if its been sitting 
idle for a few minutes.  What is the best way to go about this?  It 
seems to me that I would need a timer that would be reset everytime a 
signal was emitted or something?  Any ideas..... or has anyone done 
this.  Would I need every signal emitted to call a timer reset method 
AND the method to perform its usual action?  How would i keep the timer 
incrementing after I left the method? 
    

I created a base class that most of my dialogs inherit.  Then is has a
setup method that goes through every widget in the dialog and connects
to the key_press_event and button_press_event.  That event handler
updates my session timer. Then a timeout runs that checks that session
timer and does the appropriate stuff.

  
Thanks,
Chris

    

How does your session timer get updated when there are no events happening?  Are you using the system clock or something?

Thanks for the info :)
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to