From d69a2c4df46315313ff5e7a76c30f8729fb931d5 Mon Sep 17 00:00:00 2001 From: lastpoet Date: Mon, 4 Oct 2010 12:04:52 +0100 Subject: [PATCH 1/6] fix main window and taskbar icon --- pyfpdb/fpdb.pyw | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyfpdb/fpdb.pyw b/pyfpdb/fpdb.pyw index c81b7f16..ec10bd9f 100755 --- a/pyfpdb/fpdb.pyw +++ b/pyfpdb/fpdb.pyw @@ -1127,10 +1127,13 @@ You can find the full license texts in agpl-3.0.txt, gpl-2.0.txt, gpl-3.0.txt an cards = os.path.join(os.getcwd(), '..','gfx','fpdb-cards.png') if os.path.exists(cards): self.statusIcon.set_from_file(cards) + self.window.set_icon_from_file(cards) elif os.path.exists('/usr/share/pixmaps/fpdb-cards.png'): self.statusIcon.set_from_file('/usr/share/pixmaps/fpdb-cards.png') + self.window.set_icon_from_file('/usr/share/pixmaps/fpdb-cards.png') else: self.statusIcon.set_from_stock(gtk.STOCK_HOME) + self.window.set_icon_stock(gtk.STOCK_HOME) self.statusIcon.set_tooltip("Free Poker Database") self.statusIcon.connect('activate', self.statusicon_activate) self.statusMenu = gtk.Menu() From 21b6108345e2274deeca9285068521e088d50105 Mon Sep 17 00:00:00 2001 From: lastpoet Date: Mon, 4 Oct 2010 20:39:34 +0100 Subject: [PATCH 2/6] Fix matplotlib warning Harmonise matplotlib backend --- pyfpdb/GuiGraphViewer.py | 4 +++- pyfpdb/GuiSessionViewer.py | 2 +- pyfpdb/GuiTourneyGraphViewer.py | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) mode change 100755 => 100644 pyfpdb/GuiSessionViewer.py diff --git a/pyfpdb/GuiGraphViewer.py b/pyfpdb/GuiGraphViewer.py index e6e783a6..df584d11 100644 --- a/pyfpdb/GuiGraphViewer.py +++ b/pyfpdb/GuiGraphViewer.py @@ -35,8 +35,10 @@ import Filters import Charset try: + calluse = not 'matplotlib' in sys.modules import matplotlib - matplotlib.use('GTKCairo') + if calluse: + matplotlib.use('GTKCairo') from matplotlib.figure import Figure from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg as NavigationToolbar diff --git a/pyfpdb/GuiSessionViewer.py b/pyfpdb/GuiSessionViewer.py old mode 100755 new mode 100644 index 53360680..d12f1d10 --- a/pyfpdb/GuiSessionViewer.py +++ b/pyfpdb/GuiSessionViewer.py @@ -30,7 +30,7 @@ try: calluse = not 'matplotlib' in sys.modules import matplotlib if calluse: - matplotlib.use('GTK') + matplotlib.use('GTKCairo') from matplotlib.figure import Figure from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg as NavigationToolbar diff --git a/pyfpdb/GuiTourneyGraphViewer.py b/pyfpdb/GuiTourneyGraphViewer.py index a1a5cc7d..04f3b626 100644 --- a/pyfpdb/GuiTourneyGraphViewer.py +++ b/pyfpdb/GuiTourneyGraphViewer.py @@ -35,8 +35,10 @@ import Filters import Charset try: + calluse = not 'matplotlib' in sys.modules import matplotlib - matplotlib.use('GTKCairo') + if calluse: + matplotlib.use('GTKCairo') from matplotlib.figure import Figure from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg as NavigationToolbar From 88756b517b26d41e465d03c0b2dba684ec060c22 Mon Sep 17 00:00:00 2001 From: lastpoet Date: Mon, 4 Oct 2010 21:35:34 +0100 Subject: [PATCH 3/6] Add nice icon --- pyfpdb/HUD_main.pyw | 8 ++++++++ 1 file changed, 8 insertions(+) mode change 100755 => 100644 pyfpdb/HUD_main.pyw diff --git a/pyfpdb/HUD_main.pyw b/pyfpdb/HUD_main.pyw old mode 100755 new mode 100644 index a32665f1..4852e930 --- a/pyfpdb/HUD_main.pyw +++ b/pyfpdb/HUD_main.pyw @@ -111,8 +111,16 @@ class HUD_main(object): self.vb.add(self.label) self.main_window.add(self.vb) self.main_window.set_title(_("HUD Main Window")) + cards = os.path.join(os.getcwd(), '..','gfx','fpdb-cards.png') + if os.path.exists(cards): + self.main_window.set_icon_from_file(cards) + elif os.path.exists('/usr/share/pixmaps/fpdb-cards.png'): + self.main_window.set_icon_from_file('/usr/share/pixmaps/fpdb-cards.png') + else: + self.main_window.set_icon_stock(gtk.STOCK_HOME) self.main_window.show_all() gobject.timeout_add(100, self.check_tables) + except: log.error("*** Exception in HUD_main.init() *** ") for e in traceback.format_tb(sys.exc_info()[2]): From a4fedd22d891110149a4e317985c1d473de62b4d Mon Sep 17 00:00:00 2001 From: Worros Date: Tue, 5 Oct 2010 11:33:16 +0800 Subject: [PATCH 4/6] Test config: add Winamax --- pyfpdb/HUD_config.test.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyfpdb/HUD_config.test.xml b/pyfpdb/HUD_config.test.xml index 5ec16a56..5f9c62cf 100644 --- a/pyfpdb/HUD_config.test.xml +++ b/pyfpdb/HUD_config.test.xml @@ -578,6 +578,7 @@ Left-Drag to Move" + From 65d986d5704f3d0291b54bb286ff0da6d6cd3c8c Mon Sep 17 00:00:00 2001 From: Worros Date: Tue, 5 Oct 2010 16:44:34 +0800 Subject: [PATCH 5/6] Winamax: Remove stud from supported list, remove debug --- pyfpdb/WinamaxToFpdb.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/pyfpdb/WinamaxToFpdb.py b/pyfpdb/WinamaxToFpdb.py index cb2c8d2a..14ec847a 100755 --- a/pyfpdb/WinamaxToFpdb.py +++ b/pyfpdb/WinamaxToFpdb.py @@ -152,7 +152,6 @@ class Winamax(HandHistoryConverter): ["ring", "hold", "fl"], ["ring", "hold", "nl"], ["ring", "hold", "pl"], - ["ring", "stud", "fl"], ] def determineGameType(self, handText): @@ -233,7 +232,6 @@ class Winamax(HandHistoryConverter): log.info("readplayerstacks: re is '%s'" % self.re_PlayerInfo) m = self.re_PlayerInfo.finditer(hand.handText) for a in m: - print "DEBUG: found '%s' with '%s'" %(a.group('PNAME'), a.group('CASH')) hand.addPlayer(int(a.group('SEAT')), a.group('PNAME'), a.group('CASH')) From a34b0fab18965a99313abd70a45bac4741a3b560 Mon Sep 17 00:00:00 2001 From: Worros Date: Tue, 5 Oct 2010 17:17:39 +0800 Subject: [PATCH 6/6] Winamax: Fix markStreets regex --- pyfpdb/WinamaxToFpdb.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyfpdb/WinamaxToFpdb.py b/pyfpdb/WinamaxToFpdb.py index 14ec847a..ba565609 100755 --- a/pyfpdb/WinamaxToFpdb.py +++ b/pyfpdb/WinamaxToFpdb.py @@ -278,8 +278,8 @@ class Winamax(HandHistoryConverter): # Total pot 0.71€ | Rake 0.04€ m = re.search(r"\*\*\* ANTE\/BLINDS \*\*\*(?P.+(?=\*\*\* FLOP \*\*\*)|.+)" r"(\*\*\* FLOP \*\*\*(?P \[\S\S \S\S \S\S\].+(?=\*\*\* TURN \*\*\*)|.+))?" - r"(\*\*\* TURN \*\*\* \[\S\S \S\S \S\S] (?P\[\S\S\].+(?=\*\*\* RIVER \*\*\*)|.+))?" - r"(\*\*\* RIVER \*\*\* \[\S\S \S\S \S\S \S\S] (?P\[\S\S\].+))?", hand.handText,re.DOTALL) + r"(\*\*\* TURN \*\*\* \[\S\S \S\S \S\S](?P\[\S\S\].+(?=\*\*\* RIVER \*\*\*)|.+))?" + r"(\*\*\* RIVER \*\*\* \[\S\S \S\S \S\S \S\S](?P\[\S\S\].+))?", hand.handText,re.DOTALL) try: hand.addStreets(m)