From c66533b478153295ff0eaf4630395b0914933d02 Mon Sep 17 00:00:00 2001 From: skomoroh Date: Sat, 15 Aug 2009 04:49:50 +0000 Subject: [PATCH] + option statusbar_stuck * minor fixes git-svn-id: file:///home/shlomif/Backup/svn-dumps/PySolFC/svnsync-repos/pysolfc/PySolFC/trunk@251 efabe8c0-fbe8-4139-b769-b5e6d273206e --- pysollib/app.py | 1 + pysollib/games/tournament.py | 8 +++----- pysollib/options.py | 3 +++ 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/pysollib/app.py b/pysollib/app.py index 63b4277e..e14e87ae 100644 --- a/pysollib/app.py +++ b/pysollib/app.py @@ -482,6 +482,7 @@ class Application: self.statusbar = PysolStatusbar(self.top) self.statusbar.show(self.opt.statusbar) self.statusbar.config('gamenumber', self.opt.statusbar_game_number) + self.statusbar.config('stuck', self.opt.statusbar_stuck) self.helpbar = HelpStatusbar(self.top) self.helpbar.show(self.opt.helpbar) # create the canvas diff --git a/pysollib/games/tournament.py b/pysollib/games/tournament.py index 29cbd14e..fd2246c2 100644 --- a/pysollib/games/tournament.py +++ b/pysollib/games/tournament.py @@ -53,7 +53,7 @@ class Tournament_Talon(DealRowRedealTalonStack): for i in range(4): if not self.cards: break - num_cards += self.dealRow([r], sound=False) + num_cards += self.dealRow([r], sound=False, frames=4) if sound: self.game.stopSamples() return num_cards @@ -125,10 +125,8 @@ class Tournament(Game): def startGame(self): self.startDealSample() - self.s.talon.dealRow(self.s.reserves) - for r in self.s.rows: - for i in range(4): - self.s.talon.dealRow([r]) + self.s.talon.dealRow(self.s.reserves, frames=4) + self.s.talon.dealCards() def fillStack(self, stack): if stack in self.s.rows and not stack.cards: diff --git a/pysollib/options.py b/pysollib/options.py index 6ff7e8f0..55f15a25 100644 --- a/pysollib/options.py +++ b/pysollib/options.py @@ -80,6 +80,7 @@ toolbar_compound = string toolbar_size = integer(0, 1) statusbar = boolean statusbar_game_number = boolean +statusbar_stuck = boolean num_cards = boolean helpbar = boolean num_recent_games = integer(10, 100) @@ -209,6 +210,7 @@ class Options: ('toolbar_size', 'int'), ('statusbar', 'bool'), ('statusbar_game_number', 'bool'), + ('statusbar_stuck', 'bool'), ('num_cards', 'bool'), ('helpbar', 'bool'), ('num_recent_games', 'int'), @@ -285,6 +287,7 @@ class Options: self.toolbar_vars[w] = True # show all buttons self.statusbar = True self.statusbar_game_number = False # show game number in statusbar + self.statusbar_stuck = False # show stuck indicator self.num_cards = False self.helpbar = False self.splashscreen = True