From: Ed Page Date: Sun, 31 Jan 2010 02:18:20 +0000 (-0600) Subject: Switching more timeouts to second resolution X-Git-Url: http://git.maemo.org/git/?p=theonering;a=commitdiff_plain;h=7ef94ca86f8728837ba08aef711118c284c3199c Switching more timeouts to second resolution --- diff --git a/src/connection_manager.py b/src/connection_manager.py index dae1f40..92a12ae 100644 --- a/src/connection_manager.py +++ b/src/connection_manager.py @@ -6,6 +6,7 @@ import telepathy import constants import tp import gtk_toolbox +import util.go_utils as gobject_utils import connection @@ -64,7 +65,7 @@ class TheOneRingConnectionManager(tp.ConnectionManager): Overrides tp.ConnectionManager """ result = tp.ConnectionManager.disconnected(self, conn) - gobject.timeout_add(5000, self._shutdown) + gobject_utils.timeout_add_seconds(5, self._shutdown) def quit(self): """ diff --git a/src/theonering.py b/src/theonering.py index a3c30d9..1bc7436 100755 --- a/src/theonering.py +++ b/src/theonering.py @@ -34,7 +34,7 @@ import constants import connection_manager -IDLE_TIMEOUT = 5000 +IDLE_TIMEOUT = 5 def run_theonering(persist): @@ -60,7 +60,7 @@ def run_theonering(persist): if persist: shutdown_callback = None else: - gobject.timeout_add(IDLE_TIMEOUT, timeout_cb) + gobject_utils.timeout_add_seconds(IDLE_TIMEOUT, timeout_cb) shutdown_callback = quit signal.signal(signal.SIGTERM, quit)