45 works as a better timeout for silvermountain
[theonering] / src / simple_presence.py
index 9c7f64e..bda9fed 100644 (file)
@@ -2,13 +2,13 @@ import logging
 
 import telepathy
 
-import gtk_toolbox
+import util.misc as misc_utils
 import tp
 import handle
 import gvoice.state_machine as state_machine
 
 
-_moduleLogger = logging.getLogger("simple_presence")
+_moduleLogger = logging.getLogger(__name__)
 
 
 class TheOneRingPresence(object):
@@ -66,7 +66,7 @@ class TheOneRingPresence(object):
                                                raise telepathy.errors.InvalidArgument("Unsupported state on the state machine: %s" % state)
                                presenceType = TheOneRingPresence.TO_PRESENCE_TYPE[presence]
                        else:
-                               presence = TheOneRingPresence.ONLINE
+                               presence = TheOneRingPresence.AWAY
                                presenceType = TheOneRingPresence.TO_PRESENCE_TYPE[presence]
 
                        presences[h] = (presenceType, presence)
@@ -98,7 +98,7 @@ class SimplePresenceMixin(tp.ConnectionInterfaceSimplePresence, TheOneRingPresen
                        {'Statuses' : self._get_statuses}
                )
 
-       @gtk_toolbox.log_exception(_moduleLogger)
+       @misc_utils.log_exception(_moduleLogger)
        def GetPresences(self, contacts):
                """
                @return {ContactHandle: (Status, Presence Type, Message)}
@@ -109,7 +109,7 @@ class SimplePresenceMixin(tp.ConnectionInterfaceSimplePresence, TheOneRingPresen
                        for (h, (presenceType, presence)) in self.get_presences(contacts).iteritems()
                )
 
-       @gtk_toolbox.log_exception(_moduleLogger)
+       @misc_utils.log_exception(_moduleLogger)
        def SetPresence(self, status, message):
                if message:
                        raise telepathy.errors.InvalidArgument("Messages aren't supported")