HUD_main:
Add site name to list of windows being HUDed, fix weird call convention to the "del" operator, which is not a function. call clean_title() on hud titles being killed, so we actually kill (deep) tables and such HUD: Add function "kill_hud_menu", which is now called from the Kill This HUD menu option, to avoid a potential loop in kill_hud() Record the handle of the HUD's destroy signal, use it to un-register, before performing a kill, also avoiding potential loop there Do not allow kill_hud() to be called twice in the same HUD object, return doing nothing if deleted is already set on it (that should totally solve the loop problem)
This commit is contained in:
+5
-2
@@ -65,7 +65,7 @@ def create_HUD(new_hand_id, table, db_name, table_name, max, poker_game, db_conn
|
||||
|
||||
gtk.gdk.threads_enter()
|
||||
try:
|
||||
newlabel = gtk.Label(table_name)
|
||||
newlabel = gtk.Label(table.site + " - " + table_name)
|
||||
eb.add(newlabel)
|
||||
newlabel.show()
|
||||
|
||||
@@ -98,9 +98,12 @@ def update_HUD(new_hand_id, table_name, config, stat_dict):
|
||||
def HUD_removed(tablename):
|
||||
global hud_dict, eb
|
||||
|
||||
tablename = Tables.clean_title(tablename)
|
||||
# TODO: There's a potential problem here somewhere, that this hacks around .. the table_name as being passed to HUD_create is cleaned,
|
||||
# but the table.name as being passed here is not cleaned. I don't know why. -eric
|
||||
if tablename in hud_dict and hud_dict[tablename].deleted:
|
||||
eb.remove(hud_dict[tablename].tablehudlabel)
|
||||
del(hud_dict[tablename])
|
||||
del hud_dict[tablename]
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user