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 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" + diff --git a/pyfpdb/HUD_main.pyw b/pyfpdb/HUD_main.pyw index 56e5abb5..7d433a1c 100644 --- a/pyfpdb/HUD_main.pyw +++ b/pyfpdb/HUD_main.pyw @@ -122,8 +122,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]): diff --git a/pyfpdb/WinamaxToFpdb.py b/pyfpdb/WinamaxToFpdb.py index cb2c8d2a..ba565609 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')) @@ -280,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) 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()