diff options
author | C Neves <cn@goat.(none)> | 2007-06-19 09:15:01 (GMT) |
---|---|---|
committer | C Neves <cn@goat.(none)> | 2007-06-19 09:15:01 (GMT) |
commit | 5b1cc035f4ee0587a53b7ca2504d9e0d51921a7b (patch) | |
tree | 53f9c9b6e2ad2a9cb40748a6a15e29d07e7338d3 /SliderPuzzleActivity.py | |
parent | ee7a7e21ecba16c022a159217c65ba767066171d (diff) |
Updated the lesson plans.
Now a single digit can be used as prefix in the lesson dirs to help with sorting. It is removed before rendering.
Diffstat (limited to 'SliderPuzzleActivity.py')
-rw-r--r-- | SliderPuzzleActivity.py | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/SliderPuzzleActivity.py b/SliderPuzzleActivity.py index bc2e75c..df7e0b6 100644 --- a/SliderPuzzleActivity.py +++ b/SliderPuzzleActivity.py @@ -24,18 +24,20 @@ class SliderPuzzleActivity(Activity): toolbox = ActivityToolbox(self) self.set_toolbox(toolbox) toolbox.show() - + #if hasattr(self, '_jobject'): title_widget = toolbox._activity_toolbar.title title_widget.set_size_request(title_widget.get_layout().get_pixel_size()[0] + 20, -1) if getattr(self, 'game', None) is None: self.game = SliderPuzzleUI(self) + #self._prepare_shared() + self.set_canvas(self.game) self.game.show_all() - -# self.connect('shared', self._shared_cb) + def _prepare_shared (self): + self.connect('shared', self._shared_cb) #name, path = self._pservice.get_preferred_connection() #self.conn = telepathy.client.Connection(name, path) @@ -44,13 +46,13 @@ class SliderPuzzleActivity(Activity): #self.tp_conn_path = path # self.initiating = None # -# owner = self._pservice.get_owner() -# self.owner = owner -# -# if self._shared_activity: -# print self._shared_activity -# print dir(self._shared_activity) -# print "Joining activity with %s" % [x.get_property('nick') for x in self._shared_activity.get_joined_buddies()] + owner = self._pservice.get_owner() + self.owner = owner + + if self._shared_activity: + print self._shared_activity + print dir(self._shared_activity) + print "Joining activity with %s" % [x.get_property('nick') for x in self._shared_activity.get_joined_buddies()] # # we are joining the activity # #self.buddies_panel.add_watcher(owner) # self.connect('joined', self._joined_cb) @@ -61,9 +63,11 @@ class SliderPuzzleActivity(Activity): # self._joined_cb() # # -# def _shared_cb(self, activity): -# print 'My Connect activity was shared' -# + + + def _shared_cb(self, activity): + print 'My Connect activity was shared' + # print [x.get_property('nick') for x in self._shared_activity.get_joined_buddies()] # # self._shared_activity.connect('buddy-joined', self._buddy_joined_cb) |