Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/activity.py
diff options
context:
space:
mode:
Diffstat (limited to 'activity.py')
-rw-r--r--activity.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/activity.py b/activity.py
index c18e5dc..87a9142 100644
--- a/activity.py
+++ b/activity.py
@@ -141,6 +141,7 @@ class MemorizeActivity(Activity):
self.connect('key-press-event', self.table.key_press_event)
self.table.connect('card-flipped', self.game.card_flipped)
self.table.connect('card-highlighted', self.game.card_highlighted)
+ self.table.connect('resize-table', self.__resize_table_cb)
self.game.connect('set-border', self.table.set_border)
self.game.connect('flop-card', self.table.flop_card)
@@ -238,6 +239,11 @@ class MemorizeActivity(Activity):
self.table.resize(width, height - style.GRID_CELL_SIZE)
self.show_all()
+ def __resize_table_cb(self, widget):
+ # need reset the game
+ # because we reload the cards in the table
+ self.game.last_flipped = -1
+
def _change_mode_bt(self, button):
if button.get_active():
self._change_mode(_MODE_CREATE)