From 0e89adc1db2465940250774836f500edb42b4e02 Mon Sep 17 00:00:00 2001 From: eblade Date: Thu, 19 Mar 2009 04:12:42 -0400 Subject: [PATCH] clean up some more ugly --- pyfpdb/HUD_main.py | 5 ++--- pyfpdb/Hud.py | 8 +++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/pyfpdb/HUD_main.py b/pyfpdb/HUD_main.py index 666cf836..30a72096 100755 --- a/pyfpdb/HUD_main.py +++ b/pyfpdb/HUD_main.py @@ -123,7 +123,7 @@ class HUD_main(object): gtk.gdk.threads_enter() try: self.hud_dict[table_name].update(new_hand_id, config) - map(lambda aw: aw.update_gui(new_hand_id), self.hud_dict[table_name].aux_windows) + [aw.update_gui(new_hand_id) for aw in self.hud_dict[table_name].aux_windows] return False finally: gtk.gdk.threads_leave() @@ -172,8 +172,7 @@ class HUD_main(object): if temp_key in self.hud_dict: self.hud_dict[temp_key].stat_dict = stat_dict self.hud_dict[temp_key].cards = cards - for aw in self.hud_dict[temp_key].aux_windows: - aw.update_data(new_hand_id, self.db_connection) + [aw.update_data(new_hand_id, self.db_connection) for aw in self.hud_dict[temp_key].aux_windows] self.update_HUD(new_hand_id, temp_key, self.config) # Or create a new HUD diff --git a/pyfpdb/Hud.py b/pyfpdb/Hud.py index 6d594b5b..20750b96 100644 --- a/pyfpdb/Hud.py +++ b/pyfpdb/Hud.py @@ -196,7 +196,7 @@ class Hud: s.window.destroy() self.stat_windows = {} # also kill any aux windows - map(lambda m: m.destroy(), self.aux_windows) + [aux.destroy() for aux in self.aux_windows] self.aux_windows = [] def reposition_windows(self, *args): @@ -217,8 +217,7 @@ class Hud: new_layout[self.stat_windows[sw].adj - 1] = new_loc self.config.edit_layout(self.table.site, self.max, locations = new_layout) # ask each aux to save its layout back to the config object - for aux in self.aux_windows: - aux.save_layout() + [aux.save_layout() for aux in self.aux_windows] # save the config object back to the file print "saving new xml file" self.config.save() @@ -351,6 +350,8 @@ class Hud: style = win32gui.GetWindowLong(self.table.number, win32con.GWL_EXSTYLE) style |= win32con.WS_CLIPCHILDREN win32gui.SetWindowLong(self.table.number, win32con.GWL_EXSTYLE, style) + break + window.set_title(real_name) class Stat_Window: @@ -575,6 +576,7 @@ class Popup_window: style = win32gui.GetWindowLong(self.table.number, win32con.GWL_EXSTYLE) style |= win32con.WS_CLIPCHILDREN win32gui.SetWindowLong(self.table.number, win32con.GWL_EXSTYLE, style) + break window.set_title(real_name)