Fix regression in naming HUDs that caused inconsistent killing.

This commit is contained in:
Ray 2009-04-06 23:42:36 -04:00
parent 87efd2cc8d
commit a1b2874878
2 changed files with 2 additions and 3 deletions

View File

@ -108,9 +108,9 @@ class HUD_main(object):
gtk.gdk.threads_leave() gtk.gdk.threads_leave()
self.hud_dict[table_name] = Hud.Hud(self, table, max, poker_game, self.config, self.db_connection) self.hud_dict[table_name] = Hud.Hud(self, table, max, poker_game, self.config, self.db_connection)
self.hud_dict[table_name].table_name = table_name
self.hud_dict[table_name].stat_dict = stat_dict self.hud_dict[table_name].stat_dict = stat_dict
self.hud_dict[table_name].cards = cards self.hud_dict[table_name].cards = cards
[aw.update_data(new_hand_id, self.db_connection) for aw in self.hud_dict[table_name].aux_windows] [aw.update_data(new_hand_id, self.db_connection) for aw in self.hud_dict[table_name].aux_windows]
gobject.idle_add(idle_func) gobject.idle_add(idle_func)
@ -184,7 +184,6 @@ class HUD_main(object):
tablewindow = Tables.discover_tournament_table(self.config, tour_number, tab_number) tablewindow = Tables.discover_tournament_table(self.config, tour_number, tab_number)
else: else:
tablewindow = Tables.discover_table_by_name(self.config, table_name) tablewindow = Tables.discover_table_by_name(self.config, table_name)
if tablewindow == None: if tablewindow == None:
# If no client window is found on the screen, complain and continue # If no client window is found on the screen, complain and continue
if is_tournament: if is_tournament:

View File

@ -125,7 +125,7 @@ class Hud:
self.menu = gtk.Menu() self.menu = gtk.Menu()
self.item1 = gtk.MenuItem('Kill this HUD') self.item1 = gtk.MenuItem('Kill this HUD')
self.menu.append(self.item1) self.menu.append(self.item1)
self.item1.connect("activate", self.parent.kill_hud, self.table.name) self.item1.connect("activate", self.parent.kill_hud, self.table_name)
self.item1.show() self.item1.show()
self.item2 = gtk.MenuItem('Save Layout') self.item2 = gtk.MenuItem('Save Layout')