remove try..finally block in HUD_update idle_func function, move return to after the threads_leave() call, HUD now works in Win 7
This commit is contained in:
parent
3b54fab9e0
commit
0a084d1110
|
@ -127,7 +127,7 @@ class HUD_main(object):
|
||||||
def idle_func():
|
def idle_func():
|
||||||
|
|
||||||
gtk.gdk.threads_enter()
|
gtk.gdk.threads_enter()
|
||||||
try:
|
try: # TODO: seriously need to decrease the scope of this block.. what are we expecting to error?
|
||||||
newlabel = gtk.Label("%s - %s" % (table.site, table_name))
|
newlabel = gtk.Label("%s - %s" % (table.site, table_name))
|
||||||
self.vb.add(newlabel)
|
self.vb.add(newlabel)
|
||||||
newlabel.show()
|
newlabel.show()
|
||||||
|
@ -170,12 +170,13 @@ class HUD_main(object):
|
||||||
# function idle_func() to be run by the gui thread, at its leisure.
|
# function idle_func() to be run by the gui thread, at its leisure.
|
||||||
def idle_func():
|
def idle_func():
|
||||||
gtk.gdk.threads_enter()
|
gtk.gdk.threads_enter()
|
||||||
try:
|
# try:
|
||||||
self.hud_dict[table_name].update(new_hand_id, config)
|
self.hud_dict[table_name].update(new_hand_id, config)
|
||||||
[aw.update_gui(new_hand_id) for aw in 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:
|
||||||
finally:
|
|
||||||
gtk.gdk.threads_leave()
|
gtk.gdk.threads_leave()
|
||||||
|
return False
|
||||||
|
|
||||||
gobject.idle_add(idle_func)
|
gobject.idle_add(idle_func)
|
||||||
|
|
||||||
def read_stdin(self): # This is the thread function
|
def read_stdin(self): # This is the thread function
|
||||||
|
|
Loading…
Reference in New Issue
Block a user