From fa32ed8c46bd8c6bae3053941e8cd6d410d6c042 Mon Sep 17 00:00:00 2001 From: Eratosthenes Date: Tue, 30 Nov 2010 18:33:44 -0500 Subject: [PATCH] Fix problem with multiple tables from same tournament. --- pyfpdb/HUD_main.pyw | 3 ++- pyfpdb/TableWindow.py | 18 ++++++++++-------- 2 files changed, 12 insertions(+), 9 deletions(-) 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 f7403d54..922a4885 --- a/pyfpdb/HUD_main.pyw +++ b/pyfpdb/HUD_main.pyw @@ -297,7 +297,8 @@ class HUD_main(object): t1 = time.time() if type == "tour": # hand is from a tournament - temp_key = tour_number +# temp_key = tour_number + temp_key = "%s Table %s" % (tour_number, tab_number) else: temp_key = table_name diff --git a/pyfpdb/TableWindow.py b/pyfpdb/TableWindow.py index 43910317..c9e04800 100644 --- a/pyfpdb/TableWindow.py +++ b/pyfpdb/TableWindow.py @@ -104,12 +104,14 @@ gobject.signal_new("table_changed", gtk.Window, # title bar and window borders. To put it another way, this is the # screen location of (0, 0) in the working window. # tournament = Tournament number for a tournament or None for a cash game. -# table = Table number for a tournament. -# gdkhandle = -# window = -# parent = -# game = -# search_string = +# tw.table = tournament: Table number for the tournament. +# cash: full Table name as given by the poker site +# tw.gdkhandle = gdk handle for the poker client window - used to nail the hud to the window +# tw.window = is this still used? +# tw.parent = window object of the parent of the client window, only used in Linux +# tw.game = the poker game being played at the table, only used in mixed games +# tw.search_string = regular expression used to find the table, supplied by XToFpdb.py +# tw.key = a string formulated to be a unique id for this table window, used in the hud main window class Table_Window(object): def __init__(self, config, site, table_name = None, tournament = None, table_number = None): @@ -124,13 +126,13 @@ class Table_Window(object): self.type = "tour" table_kwargs = dict(tournament = self.tournament, table_number = self.table) self.tableno_re = getTableNoRe(self.config, self.site, tournament = self.tournament) - self.key = tournament # used as key for the hud_dict in HUD_main + self.key = "%s Table %s" % (tournament, str(self.table)) elif table_name is not None: self.name = table_name self.type = "cash" self.tournament = None table_kwargs = dict(table_name = table_name) - self.key = table_name + self.key = table_name # used as key for the hud_dict in HUD_main else: return None