Imitiating buttfly in being explicitly typed
[theonering] / src / connection_manager.py
index d21c8a7..b9a8e37 100644 (file)
@@ -14,6 +14,8 @@ _moduleLogger = logging.getLogger(__name__)
 
 class TheOneRingConnectionManager(tp.ConnectionManager):
 
+       IDLE_TIMEOUT = 10
+
        def __init__(self, shutdown_func=None):
                tp.ConnectionManager.__init__(self, constants._telepathy_implementation_name_)
 
@@ -59,12 +61,8 @@ class TheOneRingConnectionManager(tp.ConnectionManager):
 
                return result
 
-       def disconnected(self, conn):
-               """
-               Overrides tp.ConnectionManager
-               """
-               result = tp.ConnectionManager.disconnected(self, conn)
-               gobject_utils.timeout_add_seconds(5, self._shutdown)
+       def disconnect_completed(self):
+               gobject_utils.timeout_add_seconds(self.IDLE_TIMEOUT, self._shutdown)
 
        def quit(self):
                """