diff options
author | flavio <fdanesse@gmail.com> | 2012-09-09 23:25:00 (GMT) |
---|---|---|
committer | flavio <fdanesse@gmail.com> | 2012-09-09 23:25:00 (GMT) |
commit | 3940d00df13672c59c34d5bf177c6c536313762a (patch) | |
tree | 1fd4ca4c0df12008b5709a117abdc9d32e0c6f13 /groupthink | |
parent | 40f862b07b3b26449a7b3260bc7c00739fb081f7 (diff) |
Change _shared_activity by shared_activity
Diffstat (limited to 'groupthink')
-rw-r--r-- | groupthink/sugar_tools.py | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/groupthink/sugar_tools.py b/groupthink/sugar_tools.py index 1b2bee8..049974a 100644 --- a/groupthink/sugar_tools.py +++ b/groupthink/sugar_tools.py @@ -61,16 +61,13 @@ class GroupActivity(Activity): self.logger = logging.getLogger(self.dbus_name) self._handle = handle - - # HACK = self._shared_activity: attribute does not exist - self._shared_activity = None ##GObject.threads_init() - self._sharing_completed = not self._shared_activity + self._sharing_completed = not self.shared_activity self._readfile_completed = not handle.object_id - if self._shared_activity: + if self.shared_activity: self.message = self.message_joining elif handle.object_id: self.message = self.message_loading @@ -126,7 +123,7 @@ class GroupActivity(Activity): if not self._readfile_completed: self.read_file(self._jobject.file_path) - elif not self._shared_activity: + elif not self.shared_activity: GObject.idle_add(self._initialize_cleanstart) def _initialize_cleanstart(self): @@ -150,7 +147,7 @@ class GroupActivity(Activity): Window.set_canvas(self, main_widget) self.initialized = True - if self._shared_activity and not self._processed_share: + if self.shared_activity and not self._processed_share: # We are joining a shared activity, but when_shared has not yet # been called self.when_shared() @@ -188,13 +185,13 @@ class GroupActivity(Activity): self.dbus_name, {}) def _sharing_setup(self): - if self._shared_activity is None: + if self.shared_activity is None: self.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 + 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 self.tubes_chan[telepathy.CHANNEL_TYPE_TUBES].connect_to_signal('NewTube', self._new_tube_cb) @@ -208,7 +205,7 @@ class GroupActivity(Activity): self.logger.error('ListTubes() failed: %s', e) def _joined_cb(self, activity): - if not self._shared_activity: + if not self.shared_activity: return self.logger.debug('Joined an existing shared activity') |