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.
This commit is contained in:
parent
6f7a0dbbae
commit
da6638d44b
14
src/gajim.py
14
src/gajim.py
|
@ -2861,12 +2861,10 @@ class Interface:
|
||||||
gajim.idlequeue.process()
|
gajim.idlequeue.process()
|
||||||
except:
|
except:
|
||||||
# Otherwise, an exception will stop our loop
|
# Otherwise, an exception will stop our loop
|
||||||
if os.name == 'nt':
|
if gajim.idlequeue.__class__ == GlibIdleQueue:
|
||||||
gobject.timeout_add(200,
|
gobject.timeout_add_seconds(2, self.process_connections)
|
||||||
self.process_connections)
|
|
||||||
else:
|
else:
|
||||||
gobject.timeout_add_seconds(2,
|
gobject.timeout_add(200, self.process_connections)
|
||||||
self.process_connections)
|
|
||||||
raise
|
raise
|
||||||
return True # renew timeout (loop for ever)
|
return True # renew timeout (loop for ever)
|
||||||
|
|
||||||
|
@ -3279,10 +3277,10 @@ class Interface:
|
||||||
self.last_ftwindow_update = 0
|
self.last_ftwindow_update = 0
|
||||||
|
|
||||||
gobject.timeout_add(100, self.autoconnect)
|
gobject.timeout_add(100, self.autoconnect)
|
||||||
if os.name == 'nt':
|
if gajim.idlequeue.__class__ == GlibIdleQueue:
|
||||||
gobject.timeout_add(200, self.process_connections)
|
|
||||||
else:
|
|
||||||
gobject.timeout_add_seconds(2, self.process_connections)
|
gobject.timeout_add_seconds(2, self.process_connections)
|
||||||
|
else:
|
||||||
|
gobject.timeout_add(200, self.process_connections)
|
||||||
gobject.timeout_add_seconds(gajim.config.get(
|
gobject.timeout_add_seconds(gajim.config.get(
|
||||||
'check_idle_every_foo_seconds'), self.read_sleepy)
|
'check_idle_every_foo_seconds'), self.read_sleepy)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue