What I said was 0.8.15 was really 0.8.16
[theonering] / src / autogv.py
index 9f4bafa..fee55f4 100644 (file)
@@ -65,6 +65,7 @@ class NewGVConversations(object):
                        # Just let the TextChannel decide whether it should be reported to the user or not
                        props = self._connRef().generate_props(telepathy.CHANNEL_TYPE_TEXT, h, False)
                        if self._connRef()._channel_manager.channel_exists(props):
+                               _moduleLogger.debug("Chat box already open for texting conversation with %s" % phoneNumber)
                                continue
 
                        # Maemo 4.1's RTComm opens a window for a chat regardless if a
@@ -75,6 +76,7 @@ class NewGVConversations(object):
                        newConversations = gvoice.conversations.filter_out_self(newConversations)
                        newConversations = list(newConversations)
                        if not newConversations:
+                               _moduleLogger.debug("Not opening chat box for %s, all new messages are either read or from yourself" % phoneNumber)
                                continue
 
                        chan = self._connRef()._channel_manager.channel_for_props(props, signal=True)
@@ -108,6 +110,7 @@ class RefreshVoicemail(object):
 
                self._isStarted = False
 
+       @misc_utils.log_exception(_moduleLogger)
        def _on_new_channel(self, bus, serviceName, connObjectPath, channelObjectPath, channelType):
                if channelType != telepathy.interfaces.CHANNEL_TYPE_STREAMED_MEDIA:
                        return
@@ -147,11 +150,12 @@ class TimedDisconnect(object):
                self.__delayedDisconnect = gobject_utils.Timeout(self._on_delayed_disconnect)
 
        def start(self):
-               self.__delayedDisconnect.start(seconds=10)
+               self.__delayedDisconnect.start(seconds=60)
 
        def stop(self):
                self.__delayedDisconnect.cancel()
 
+       @misc_utils.log_exception(_moduleLogger)
        def _on_delayed_disconnect(self):
                _moduleLogger.info("Timed disconnect occurred")
                self._connRef().disconnect(telepathy.CONNECTION_STATUS_REASON_NETWORK_ERROR)
@@ -195,6 +199,7 @@ class AutoDisconnect(object):
                else:
                        _moduleLogger.info("Other status: %r" % (status, ))
 
+       @misc_utils.log_exception(_moduleLogger)
        def _cancel_delayed_disconnect(self):
                _moduleLogger.info("Cancelling auto-log off")
                self.__delayedDisconnect.cancel()
@@ -251,3 +256,25 @@ class DisconnectOnShutdown(object):
                        self._connRef().disconnect(telepathy.CONNECTION_STATUS_REASON_REQUESTED)
                except Exception:
                        _moduleLogger.exception("Error durring disconnect")
+
+
+class DelayEnableContactIntegration(object):
+
+       def __init__(self, protocolName):
+               self.__enableSystemContactSupport = telepathy_utils.EnableSystemContactIntegration(
+                       protocolName
+               )
+               self.__delayedEnable = gobject_utils.Async(self._on_delayed_enable)
+
+       def start(self):
+               self.__delayedEnable.start()
+
+       def stop(self):
+               self.__delayedEnable.cancel()
+
+       @misc_utils.log_exception(_moduleLogger)
+       def _on_delayed_enable(self):
+               try:
+                       self.__enableSystemContactSupport.start()
+               except dbus.DBusException, e:
+                       _moduleLogger.info("Contact integration seems to not be supported (%s)" % e)