Author: js Date: 2008-10-02 21:56:00 +0200 (Thu, 02 Oct 2008) New Revision: 10468
Modified: trunk/src/gajim.py Log: Better checking for which IdleQueue we use. It's a bad idea to check against NT everywhere. Someone might just change the creation of the IdleQueue, but forget to change the other two places. With this, it's safe to only change the creation.
Modified: trunk/src/gajim.py =================================================================== --- trunk/src/gajim.py 2008-10-02 19:49:05 UTC (rev 10467) +++ trunk/src/gajim.py 2008-10-02 19:56:00 UTC (rev 10468) @@ -2861,12 +2861,10 @@ gajim.idlequeue.process() except: # Otherwise, an exception will stop our loop - if os.name == 'nt': - gobject.timeout_add(200, - self.process_connections) + if gajim.idlequeue.__class__ == GlibIdleQueue: + gobject.timeout_add_seconds(2, self.process_connections) else: - gobject.timeout_add_seconds(2, - self.process_connections) + gobject.timeout_add(200, self.process_connections) raise return True # renew timeout (loop for ever)
@@ -3279,10 +3277,10 @@ self.last_ftwindow_update = 0
gobject.timeout_add(100, self.autoconnect) - if os.name == 'nt': - gobject.timeout_add(200, self.process_connections) - else: + if gajim.idlequeue.__class__ == GlibIdleQueue: gobject.timeout_add_seconds(2, self.process_connections) + else: + gobject.timeout_add(200, self.process_connections) gobject.timeout_add_seconds(gajim.config.get( 'check_idle_every_foo_seconds'), self.read_sleepy)