From 3fbaa0b0fba7f4538911d9d5830bec0372d7f094 Mon Sep 17 00:00:00 2001 From: Eratosthenes Date: Tue, 7 Dec 2010 10:20:20 -0500 Subject: [PATCH 1/4] Don't try to close HUD mw twice. --- pyfpdb/HUD_main.pyw | 1 - 1 file changed, 1 deletion(-) 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 47cdfae0..a2aefc0f --- a/pyfpdb/HUD_main.pyw +++ b/pyfpdb/HUD_main.pyw @@ -312,7 +312,6 @@ def idle_kill(hud_main, table): try: if table in hud_main.hud_dict: hud_main.hud_dict[table].kill() - hud_main.hud_dict[table].main_window.destroy() hud_main.vb.remove(hud_main.hud_dict[table].tablehudlabel) del(hud_main.hud_dict[table]) hud_main.main_window.resize(1, 1) From a4dff38c9f38973c53a9f8e7dbda52090dc6994c Mon Sep 17 00:00:00 2001 From: Eratosthenes Date: Tue, 7 Dec 2010 10:24:06 -0500 Subject: [PATCH 2/4] Ensure table.key is always temp_key calculated in HUD_main. --- pyfpdb/HUD_main.pyw | 1 + pyfpdb/TableWindow.py | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/pyfpdb/HUD_main.pyw b/pyfpdb/HUD_main.pyw index a2aefc0f..38d435bc 100644 --- a/pyfpdb/HUD_main.pyw +++ b/pyfpdb/HUD_main.pyw @@ -270,6 +270,7 @@ class HUD_main(object): table_name = "%s %s" % (tour_number, tab_number) log.error("HUD create: table name %s not found, skipping." % table_name) else: + tablewindow.key = temp_key tablewindow.max = max tablewindow.site = site_name # Test that the table window still exists diff --git a/pyfpdb/TableWindow.py b/pyfpdb/TableWindow.py index ea2596de..1ee51650 100644 --- a/pyfpdb/TableWindow.py +++ b/pyfpdb/TableWindow.py @@ -126,13 +126,11 @@ 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 = "%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 # used as key for the hud_dict in HUD_main else: return None From f0a5864bf4699822066d872f019c93b298754f23 Mon Sep 17 00:00:00 2001 From: Eratosthenes Date: Fri, 10 Dec 2010 13:41:04 -0500 Subject: [PATCH 3/4] Fix autoclose on tourney table change. --- pyfpdb/HUD_main.pyw | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyfpdb/HUD_main.pyw b/pyfpdb/HUD_main.pyw index 38d435bc..e58260c8 100644 --- a/pyfpdb/HUD_main.pyw +++ b/pyfpdb/HUD_main.pyw @@ -312,8 +312,9 @@ def idle_kill(hud_main, table): gtk.gdk.threads_enter() try: if table in hud_main.hud_dict: - hud_main.hud_dict[table].kill() hud_main.vb.remove(hud_main.hud_dict[table].tablehudlabel) + hud_main.hud_dict[table].main_window.destroy() + hud_main.hud_dict[table].kill() del(hud_main.hud_dict[table]) hud_main.main_window.resize(1, 1) except: From f023527595a4c7726217bea6c51f274dc8a7a660 Mon Sep 17 00:00:00 2001 From: Eratosthenes Date: Fri, 10 Dec 2010 19:35:43 -0500 Subject: [PATCH 4/4] Make HUD_main executable (again). --- pyfpdb/HUD_main.pyw | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 pyfpdb/HUD_main.pyw diff --git a/pyfpdb/HUD_main.pyw b/pyfpdb/HUD_main.pyw old mode 100644 new mode 100755