add site config option "use_frames", set to "True" to get frames

This commit is contained in:
eblade 2009-02-25 15:25:58 -05:00
parent 3c9f5537ea
commit 7ebf27c07e
3 changed files with 24 additions and 7 deletions

View File

@ -62,6 +62,7 @@ class Site:
self.aux_window = node.getAttribute("aux_window") self.aux_window = node.getAttribute("aux_window")
self.font = node.getAttribute("font") self.font = node.getAttribute("font")
self.font_size = node.getAttribute("font_size") self.font_size = node.getAttribute("font_size")
self.use_frames = node.getAttribute("use_frames")
self.layout = {} self.layout = {}
for layout_node in node.getElementsByTagName('layout'): for layout_node in node.getElementsByTagName('layout'):
@ -466,6 +467,9 @@ class Config:
paths['bulkImport-defaultPath'] = "default" paths['bulkImport-defaultPath'] = "default"
return paths return paths
def get_frames(self, site = "PokerStars"):
return self.supported_sites[site].use_frames == "True"
def get_default_colors(self, site = "PokerStars"): def get_default_colors(self, site = "PokerStars"):
colors = {} colors = {}
if self.supported_sites[site].hudopacity == "": if self.supported_sites[site].hudopacity == "":

View File

@ -65,6 +65,13 @@ class Everleaf(HandHistoryConverter):
# Blinds $0.50/$1 PL Omaha - 2008/12/07 - 21:59:48 # 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 # 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 # $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 structure = "" # nl, pl, cn, cp, fl
game = "" game = ""

View File

@ -285,7 +285,7 @@ class Hud:
self.stat_windows[stat_dict[s]['seat']].player_id = stat_dict[s]['player_id'] 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 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.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'] 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): 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.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.player_id = player_id # looks like this isn't used ;)
self.sb_click = 0 # used to figure out button clicks self.sb_click = 0 # used to figure out button clicks
self.useframes = parent.config.get_frames(parent.site)
self.window = gtk.Window() self.window = gtk.Window()
self.window.set_decorated(0) self.window.set_decorated(0)
@ -382,23 +383,28 @@ class Stat_Window:
self.frame = [] self.frame = []
self.label = [] self.label = []
for r in range(self.game.rows): for r in range(self.game.rows):
self.frame.append([]) if self.useframes:
self.frame.append([])
self.e_box.append([]) self.e_box.append([])
self.label.append([]) self.label.append([])
for c in range(self.game.cols): 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].append( gtk.EventBox() )
self.e_box[r][c].modify_bg(gtk.STATE_NORMAL, parent.backgroundcolor) self.e_box[r][c].modify_bg(gtk.STATE_NORMAL, parent.backgroundcolor)
self.e_box[r][c].modify_fg(gtk.STATE_NORMAL, parent.foregroundcolor) self.e_box[r][c].modify_fg(gtk.STATE_NORMAL, parent.foregroundcolor)
Stats.do_tip(self.e_box[r][c], 'stuff') 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) if self.useframes:
self.grid.attach(self.frame[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]) 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.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_bg(gtk.STATE_NORMAL, parent.backgroundcolor)
self.label[r][c].modify_fg(gtk.STATE_NORMAL, parent.foregroundcolor) self.label[r][c].modify_fg(gtk.STATE_NORMAL, parent.foregroundcolor)