Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/jarabe/model/invites.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/jarabe/model/invites.py')
-rw-r--r--src/jarabe/model/invites.py22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/jarabe/model/invites.py b/src/jarabe/model/invites.py
index e5a4d9d..d2a2e0c 100644
--- a/src/jarabe/model/invites.py
+++ b/src/jarabe/model/invites.py
@@ -38,9 +38,12 @@ from jarabe.model import bundleregistry
from jarabe.model import neighborhood
from jarabe.journal import misc
+
CONNECTION_INTERFACE_ACTIVITY_PROPERTIES = \
'org.laptop.Telepathy.ActivityProperties'
+_instance = None
+
class ActivityInvite(object):
"""Invitation to a shared activity."""
@@ -96,8 +99,8 @@ class ActivityInvite(object):
obj = bus.get_object(CHANNEL_DISPATCHER, self.dispatch_operation_path)
dispatch_operation = dbus.Interface(obj, CHANNEL_DISPATCH_OPERATION)
dispatch_operation.HandleWith(self._handler,
- reply_handler=self.__handle_with_reply_cb,
- error_handler=self.__handle_with_reply_cb)
+ reply_handler=self.__handle_with_reply_cb,
+ error_handler=self.__handle_with_reply_cb)
def __handle_with_reply_cb(self, error=None):
if error is not None:
@@ -105,12 +108,13 @@ class ActivityInvite(object):
else:
logging.debug('__handle_with_reply_cb')
+
class Invites(gobject.GObject):
__gsignals__ = {
- 'invite-added': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([object])),
- 'invite-removed': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([object]))
+ 'invite-added': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ ([object])),
+ 'invite-removed': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ ([object])),
}
def __init__(self):
@@ -199,8 +203,8 @@ class Invites(gobject.GObject):
obj = bus.get_object(CHANNEL_DISPATCHER, dispatch_operation_path)
dispatch_operation = dbus.Interface(obj, CHANNEL_DISPATCH_OPERATION)
dispatch_operation.HandleWith(handler,
- reply_handler=self.__handle_with_reply_cb,
- error_handler=self.__handle_with_reply_cb)
+ reply_handler=self.__handle_with_reply_cb,
+ error_handler=self.__handle_with_reply_cb)
def __handle_with_reply_cb(self, error=None):
if error is not None:
@@ -230,8 +234,6 @@ class Invites(gobject.GObject):
return self._dispatch_operations.values().__iter__()
-_instance = None
-
def get_instance():
global _instance
if not _instance: