Merge branch 'master' of git://git.assembla.com/fpdb-eric
This commit is contained in:
commit
7f1fd2ca38
|
@ -62,6 +62,7 @@ class Site:
|
|||
self.aux_window = node.getAttribute("aux_window")
|
||||
self.font = node.getAttribute("font")
|
||||
self.font_size = node.getAttribute("font_size")
|
||||
self.use_frames = node.getAttribute("use_frames")
|
||||
self.layout = {}
|
||||
|
||||
for layout_node in node.getElementsByTagName('layout'):
|
||||
|
@ -465,6 +466,9 @@ class Config:
|
|||
paths['hud-defaultPath'] = "default"
|
||||
paths['bulkImport-defaultPath'] = "default"
|
||||
return paths
|
||||
|
||||
def get_frames(self, site = "PokerStars"):
|
||||
return self.supported_sites[site].use_frames == "True"
|
||||
|
||||
def get_default_colors(self, site = "PokerStars"):
|
||||
colors = {}
|
||||
|
|
|
@ -70,6 +70,13 @@ class Everleaf(HandHistoryConverter):
|
|||
# Blinds $0.50/$1 PL Omaha - 2008/12/07 - 21:59:48
|
||||
# Blinds $0.05/$0.10 NL Hold'em - 2009/02/21 - 11:21:57
|
||||
# $0.25/$0.50 7 Card Stud - 2008/12/05 - 21:43:59
|
||||
|
||||
# Tourney:
|
||||
# Everleaf Gaming Game #75065769
|
||||
# ***** Hand history for game #75065769 *****
|
||||
# Blinds 10/20 NL Hold'em - 2009/02/25 - 17:30:32
|
||||
# Table 2
|
||||
|
||||
structure = "" # nl, pl, cn, cp, fl
|
||||
game = ""
|
||||
|
||||
|
|
|
@ -285,7 +285,7 @@ class Hud:
|
|||
self.stat_windows[stat_dict[s]['seat']].player_id = stat_dict[s]['player_id']
|
||||
except: # omg, we have more seats than stat windows .. damn poker sites with incorrect max seating info .. let's force 10 here
|
||||
self.max = 10
|
||||
self.create(hand, config)
|
||||
self.create(hand, config, stat_dict)
|
||||
self.stat_windows[stat_dict[s]['seat']].player_id = stat_dict[s]['player_id']
|
||||
|
||||
for r in range(0, config.supported_games[self.poker_game].rows):
|
||||
|
@ -365,6 +365,7 @@ class Stat_Window:
|
|||
self.y = y + table.y # x and y are the location relative to table.x & y
|
||||
self.player_id = player_id # looks like this isn't used ;)
|
||||
self.sb_click = 0 # used to figure out button clicks
|
||||
self.useframes = parent.config.get_frames(parent.site)
|
||||
|
||||
self.window = gtk.Window()
|
||||
self.window.set_decorated(0)
|
||||
|
@ -382,23 +383,28 @@ class Stat_Window:
|
|||
self.frame = []
|
||||
self.label = []
|
||||
for r in range(self.game.rows):
|
||||
self.frame.append([])
|
||||
if self.useframes:
|
||||
self.frame.append([])
|
||||
self.e_box.append([])
|
||||
self.label.append([])
|
||||
for c in range(self.game.cols):
|
||||
self.frame[r].append( gtk.Frame() )
|
||||
if self.useframes:
|
||||
self.frame[r].append( gtk.Frame() )
|
||||
self.e_box[r].append( gtk.EventBox() )
|
||||
|
||||
self.e_box[r][c].modify_bg(gtk.STATE_NORMAL, parent.backgroundcolor)
|
||||
self.e_box[r][c].modify_fg(gtk.STATE_NORMAL, parent.foregroundcolor)
|
||||
|
||||
Stats.do_tip(self.e_box[r][c], 'stuff')
|
||||
# self.grid.attach(self.e_box[r][c], c, c+1, r, r+1, xpadding = 0, ypadding = 0)
|
||||
self.grid.attach(self.frame[r][c], c, c+1, r, r+1, xpadding = 0, ypadding = 0)
|
||||
self.frame[r][c].add(self.e_box[r][c])
|
||||
if self.useframes:
|
||||
self.grid.attach(self.frame[r][c], c, c+1, r, r+1, xpadding = 0, ypadding = 0)
|
||||
self.frame[r][c].add(self.e_box[r][c])
|
||||
else:
|
||||
self.grid.attach(self.e_box[r][c], c, c+1, r, r+1, xpadding = 0, ypadding = 0)
|
||||
self.label[r].append( gtk.Label('xxx') )
|
||||
|
||||
self.frame[r][c].modify_bg(gtk.STATE_NORMAL, parent.backgroundcolor)
|
||||
if self.useframes:
|
||||
self.frame[r][c].modify_bg(gtk.STATE_NORMAL, parent.backgroundcolor)
|
||||
self.label[r][c].modify_bg(gtk.STATE_NORMAL, parent.backgroundcolor)
|
||||
self.label[r][c].modify_fg(gtk.STATE_NORMAL, parent.foregroundcolor)
|
||||
|
||||
|
|
|
@ -70,6 +70,13 @@ def do_stat(stat_dict, player = 24, stat = 'vpip'):
|
|||
###########################################
|
||||
# functions that return individual stats
|
||||
|
||||
def totalprofit(stat_dict, player):
|
||||
""" Total Profit."""
|
||||
if stat_dict[player]['net'] != 0:
|
||||
stat = float(stat_dict[player]['net']) / 100
|
||||
return (stat, '$%.2f' % stat, 'tp=$%.2f' % stat, 'totalprofit=$%.2f' % stat, str(stat), 'Total Profit')
|
||||
return ('0', '0', '0', '0', 'Total Profit')
|
||||
|
||||
def playername(stat_dict, player):
|
||||
""" Player Name."""
|
||||
return (stat_dict[player]['screen_name'],
|
||||
|
|
|
@ -61,6 +61,7 @@ class Importer:
|
|||
self.filelist = {}
|
||||
self.dirlist = {}
|
||||
self.addToDirList = {}
|
||||
self.removeFromFileList = {} # to remove deleted files
|
||||
self.monitor = False
|
||||
self.updated = {} #Time last import was run {file:mtime}
|
||||
self.lines = None
|
||||
|
@ -203,8 +204,13 @@ class Importer:
|
|||
|
||||
for dir in self.addToDirList:
|
||||
self.addImportDirectory(dir, True, self.addToDirList[dir][0], self.addToDirList[dir][1])
|
||||
|
||||
for file in self.removeFromFileList:
|
||||
if file in self.filelist:
|
||||
del self.filelist[file]
|
||||
|
||||
self.addToDirList = {}
|
||||
self.removeFromFileList = {}
|
||||
|
||||
# This is now an internal function that should not be called directly.
|
||||
def import_file_dict(self, file, site, filter):
|
||||
|
@ -251,9 +257,15 @@ class Importer:
|
|||
if (file=="stdin"):
|
||||
inputFile=sys.stdin
|
||||
else:
|
||||
inputFile=open(file, "rU")
|
||||
try: loc = self.pos_in_file[file]
|
||||
except: pass
|
||||
if os.path.exists(file):
|
||||
inputFile = open(file, "rU")
|
||||
else:
|
||||
self.removeFromFileList[file] = True
|
||||
return (0, 0, 0, 1, 0)
|
||||
try:
|
||||
loc = self.pos_in_file[file]
|
||||
except:
|
||||
pass
|
||||
|
||||
# Read input file into class and close file
|
||||
inputFile.seek(loc)
|
||||
|
|
Loading…
Reference in New Issue
Block a user