clean up some more ugly

This commit is contained in:
eblade 2009-03-19 04:12:42 -04:00
parent f552ab2470
commit 0e89adc1db
2 changed files with 7 additions and 6 deletions

View File

@ -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

View File

@ -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)