On Fri, 2005-11-11 at 10:26 -0700, Chris Irish wrote:
> 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?

It doesn't, that's how you know that something hasn't happened for a
while from the idle task that checks on the session timer.


> 
> Thanks for the info :)
> _______________________________________________
> pygtk mailing list   pygtk@daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
-- 
Steve McClure                                           Racemi
email: [EMAIL PROTECTED]                              75 5th St NE
voice: 404-892-5850                                     Suite 333
fax: 404-892-7215                                       Atlanta, GA 30308
                                                        http://www.racemi.com

_______________________________________________
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to