Merge branch 'master' of git://git.assembla.com/fpdboz.git

This commit is contained in:
Eric Blade 2010-10-05 20:23:12 -04:00
commit c894e5e478
7 changed files with 21 additions and 7 deletions

View File

@ -35,8 +35,10 @@ import Filters
import Charset import Charset
try: try:
calluse = not 'matplotlib' in sys.modules
import matplotlib import matplotlib
matplotlib.use('GTKCairo') if calluse:
matplotlib.use('GTKCairo')
from matplotlib.figure import Figure from matplotlib.figure import Figure
from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas
from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg as NavigationToolbar from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg as NavigationToolbar

2
pyfpdb/GuiSessionViewer.py Executable file → Normal file
View File

@ -30,7 +30,7 @@ try:
calluse = not 'matplotlib' in sys.modules calluse = not 'matplotlib' in sys.modules
import matplotlib import matplotlib
if calluse: if calluse:
matplotlib.use('GTK') matplotlib.use('GTKCairo')
from matplotlib.figure import Figure from matplotlib.figure import Figure
from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas
from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg as NavigationToolbar from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg as NavigationToolbar

View File

@ -35,8 +35,10 @@ import Filters
import Charset import Charset
try: try:
calluse = not 'matplotlib' in sys.modules
import matplotlib import matplotlib
matplotlib.use('GTKCairo') if calluse:
matplotlib.use('GTKCairo')
from matplotlib.figure import Figure from matplotlib.figure import Figure
from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas
from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg as NavigationToolbar from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg as NavigationToolbar

View File

@ -578,6 +578,7 @@ Left-Drag to Move"
<hhc site="Carbon" converter="CarbonToFpdb"/> <hhc site="Carbon" converter="CarbonToFpdb"/>
<hhc site="PKR" converter="PkrToFpdb"/> <hhc site="PKR" converter="PkrToFpdb"/>
<hhc site="iPoker" converter="iPokerToFpdb"/> <hhc site="iPoker" converter="iPokerToFpdb"/>
<hhc site="Winamax" converter="WinamaxToFpdb"/>
</hhcs> </hhcs>
<supported_databases> <supported_databases>

View File

@ -122,8 +122,16 @@ class HUD_main(object):
self.vb.add(self.label) self.vb.add(self.label)
self.main_window.add(self.vb) self.main_window.add(self.vb)
self.main_window.set_title(_("HUD Main Window")) 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() self.main_window.show_all()
gobject.timeout_add(100, self.check_tables) gobject.timeout_add(100, self.check_tables)
except: except:
log.error("*** Exception in HUD_main.init() *** ") log.error("*** Exception in HUD_main.init() *** ")
for e in traceback.format_tb(sys.exc_info()[2]): for e in traceback.format_tb(sys.exc_info()[2]):

View File

@ -152,7 +152,6 @@ class Winamax(HandHistoryConverter):
["ring", "hold", "fl"], ["ring", "hold", "fl"],
["ring", "hold", "nl"], ["ring", "hold", "nl"],
["ring", "hold", "pl"], ["ring", "hold", "pl"],
["ring", "stud", "fl"],
] ]
def determineGameType(self, handText): def determineGameType(self, handText):
@ -233,7 +232,6 @@ class Winamax(HandHistoryConverter):
log.info("readplayerstacks: re is '%s'" % self.re_PlayerInfo) log.info("readplayerstacks: re is '%s'" % self.re_PlayerInfo)
m = self.re_PlayerInfo.finditer(hand.handText) m = self.re_PlayerInfo.finditer(hand.handText)
for a in m: 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')) 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€ # Total pot 0.71€ | Rake 0.04€
m = re.search(r"\*\*\* ANTE\/BLINDS \*\*\*(?P<PREFLOP>.+(?=\*\*\* FLOP \*\*\*)|.+)" m = re.search(r"\*\*\* ANTE\/BLINDS \*\*\*(?P<PREFLOP>.+(?=\*\*\* FLOP \*\*\*)|.+)"
r"(\*\*\* FLOP \*\*\*(?P<FLOP> \[\S\S \S\S \S\S\].+(?=\*\*\* TURN \*\*\*)|.+))?" r"(\*\*\* FLOP \*\*\*(?P<FLOP> \[\S\S \S\S \S\S\].+(?=\*\*\* TURN \*\*\*)|.+))?"
r"(\*\*\* TURN \*\*\* \[\S\S \S\S \S\S] (?P<TURN>\[\S\S\].+(?=\*\*\* RIVER \*\*\*)|.+))?" r"(\*\*\* TURN \*\*\* \[\S\S \S\S \S\S](?P<TURN>\[\S\S\].+(?=\*\*\* RIVER \*\*\*)|.+))?"
r"(\*\*\* RIVER \*\*\* \[\S\S \S\S \S\S \S\S] (?P<RIVER>\[\S\S\].+))?", hand.handText,re.DOTALL) r"(\*\*\* RIVER \*\*\* \[\S\S \S\S \S\S \S\S](?P<RIVER>\[\S\S\].+))?", hand.handText,re.DOTALL)
try: try:
hand.addStreets(m) hand.addStreets(m)

View File

@ -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') cards = os.path.join(os.getcwd(), '..','gfx','fpdb-cards.png')
if os.path.exists(cards): if os.path.exists(cards):
self.statusIcon.set_from_file(cards) self.statusIcon.set_from_file(cards)
self.window.set_icon_from_file(cards)
elif os.path.exists('/usr/share/pixmaps/fpdb-cards.png'): elif os.path.exists('/usr/share/pixmaps/fpdb-cards.png'):
self.statusIcon.set_from_file('/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: else:
self.statusIcon.set_from_stock(gtk.STOCK_HOME) 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.set_tooltip("Free Poker Database")
self.statusIcon.connect('activate', self.statusicon_activate) self.statusIcon.connect('activate', self.statusicon_activate)
self.statusMenu = gtk.Menu() self.statusMenu = gtk.Menu()