diff options
author | Rafael Ortiz <rafael@activitycentral.com> | 2012-09-18 19:17:25 (GMT) |
---|---|---|
committer | Rafael Ortiz <rafael@activitycentral.com> | 2012-09-18 19:17:25 (GMT) |
commit | 0f27401833b6339d29e2aca9cc9d6d5c23e40aa4 (patch) | |
tree | 8c2017cd724181d6342ca08f1447119846928f6f | |
parent | 05b67e3708cd8869cce54e68365029b1e4660002 (diff) | |
parent | 11e8e42c6deda09309037ce42cfb58c7f82b928a (diff) |
Merge branch 'gtk3' of git.sugarlabs.org:distance/distance into gtk3
Conflicts:
activity/activity.info
-rw-r--r-- | activity.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/activity.py b/activity.py index 77c60ae..4fe73c6 100644 --- a/activity.py +++ b/activity.py @@ -22,8 +22,8 @@ import telepathy.client import locale from gi.repository import Gtk -from gi.repository import Gdk -from gi.repository import GObject +from gi.repository import Gdk +from gi.repository import GObject from gi.repository import Pango from gi.repository import GdkPixbuf @@ -84,7 +84,7 @@ class AcousticMeasureActivity(activity.Activity): self._logger = logging.getLogger('acousticmeasure-activity') GObject.threads_init() - + try: self._logger.debug("locale: " + locale.setlocale(locale.LC_ALL, '')) @@ -396,12 +396,12 @@ participants, so you cannot join.") self.tubes_chan[telepathy.CHANNEL_TYPE_TUBES].connect_to_signal( 'TubeStateChanged', self._tube_state_cb) - self._shared_activity.connect('buddy-joined', self._buddy_joined_cb) - self._shared_activity.connect('buddy-left', self._buddy_left_cb) + self.shared_activity.connect('buddy-joined', self._buddy_joined_cb) + self.shared_activity.connect('buddy-left', self._buddy_left_cb) # Optional - included for example: # Find out who's already in the shared activity: - for buddy in self._shared_activity.get_joined_buddies(): + for buddy in self.shared_activity.get_joined_buddies(): self._logger.debug('Buddy %s is already in the activity', buddy.props.nick) @@ -413,12 +413,12 @@ participants, so you cannot join.") self._logger.error('ListTubes() failed: %s', e) def _joined_cb(self, activity): - if not self._shared_activity: + if not self.shared_activity: return # Find out who's already in the shared activity: n = 0 - for buddy in self._shared_activity.get_joined_buddies(): + for buddy in self.shared_activity.get_joined_buddies(): n += 1 self._logger.debug('Buddy %s is already in the activity' % \ buddy.props.nick) @@ -435,7 +435,7 @@ participants, so you cannot join.") error_handler=self._list_tubes_error_cb) else: self._logger.debug("There are already two people, not joining") - self._shared_activity.leave() + self.shared_activity.leave() thread.start_new_thread(self._change_message, ('full',)) def _new_tube_cb(self, id, initiator, type, service, params, state): |