Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/activity.py
diff options
context:
space:
mode:
authorGonzalo Odiard <godiard@gmail.com>2011-09-21 15:19:34 (GMT)
committer Gonzalo Odiard <godiard@gmail.com>2011-09-21 15:19:34 (GMT)
commitc413bcbd418db59b81f685b257f165cfb638bf01 (patch)
treeb3dd0282b42c77b6cf49e6226d9b815dae9ab447 /activity.py
parentb4e316cd8bd72a7b0e83976cb77fe955b47a5455 (diff)
Avoid adding two times the owner like player in a collaborative game.
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
Diffstat (limited to 'activity.py')
-rw-r--r--activity.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/activity.py b/activity.py
index f484c27..f6d822e 100644
--- a/activity.py
+++ b/activity.py
@@ -202,7 +202,7 @@ class MemorizeActivity(Activity):
self.connect('joined', self._joined_cb)
if self.get_shared():
# We've already joined
- self._joined_cb()
+ self._joined_cb(self)
elif not self._jobject.file_path:
_logger.debug('buddy joined - __init__: %s', self.owner.props.nick)
game_file = os.path.join(os.path.dirname(__file__), 'demos',
@@ -210,7 +210,9 @@ class MemorizeActivity(Activity):
self.game.load_game(game_file, 4, 'demo')
self.cardlist.load_game(self.game)
_logger.debug('loading conventional')
- self.game.add_buddy(self.owner)
+ self.game.add_buddy(self.owner)
+ else:
+ self.game.add_buddy(self.owner)
self.show_all()
def _change_mode_bt(self, button):