Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Schampijer <simon@laptop.org>2013-02-01 16:37:44 (GMT)
committer Simon Schampijer <simon@laptop.org>2013-02-01 16:37:44 (GMT)
commitd23d46cac218d7495890904f84d4ef66de7bdb49 (patch)
tree7c39a36ea8f14c18c89fa4f83b0444b84d7ec9b1
parentf8a1f8c7a2af0405b8940b308eef5eb405deeb33 (diff)
Do not use deprecated _shared_activity member
Use the get_shared_activity method instead, change was in sugar-toolkit-gtk3 70cee44717d46129419992cd6a7e15472dc1f568
-rw-r--r--activity.py19
1 files changed, 10 insertions, 9 deletions
diff --git a/activity.py b/activity.py
index a6a5428..75c7bae 100644
--- a/activity.py
+++ b/activity.py
@@ -197,7 +197,7 @@ class MemorizeActivity(Activity):
self.connect('shared', self._shared_cb)
# Owner.props.key
- if self._shared_activity:
+ if self.get_shared_activity():
# We are joining the activity
self.connect('joined', self._joined_cb)
if self.get_shared():
@@ -351,18 +351,19 @@ class MemorizeActivity(Activity):
SERVICE, {})
def _sharing_setup(self):
- if self._shared_activity is None:
+ if self.get_shared_activity() is None:
_logger.error('Failed to share or join activity')
return
- self.conn = self._shared_activity.telepathy_conn
- self.tubes_chan = self._shared_activity.telepathy_tubes_chan
- self.text_chan = self._shared_activity.telepathy_text_chan
+ shared_activity = self.get_shared_activity()
+ self.conn = shared_activity.telepathy_conn
+ self.tubes_chan = shared_activity.telepathy_tubes_chan
+ self.text_chan = shared_activity.telepathy_text_chan
self.tubes_chan[telepathy.CHANNEL_TYPE_TUBES].connect_to_signal( \
'NewTube', self._new_tube_cb)
- self._shared_activity.connect('buddy-joined', self._buddy_joined_cb)
- self._shared_activity.connect('buddy-left', self._buddy_left_cb)
+ shared_activity.connect('buddy-joined', self._buddy_joined_cb)
+ shared_activity.connect('buddy-left', self._buddy_left_cb)
def _list_tubes_reply_cb(self, tubes):
for tube_info in tubes:
@@ -372,12 +373,12 @@ class MemorizeActivity(Activity):
_logger.error('ListTubes() failed: %s', e)
def _joined_cb(self, activity):
- if not self._shared_activity:
+ if not self.get_shared_activity():
return
_logger.debug('Joined an existing shared activity')
- for buddy in self._shared_activity.get_joined_buddies():
+ for buddy in self.get_shared_activity().get_joined_buddies():
if buddy != self.owner:
_logger.debug("buddy joined - _joined_cb: %s "
"(get buddies and add them to my list)",