fix timeout callbacks for tracking table position
This commit is contained in:
parent
5e23b55361
commit
efc3e591ea
|
@ -133,6 +133,8 @@ class Hud:
|
||||||
(x, y) = loc[adj[i]]
|
(x, y) = loc[adj[i]]
|
||||||
if self.stat_windows.has_key(i):
|
if self.stat_windows.has_key(i):
|
||||||
self.stat_windows[i].relocate(x, y)
|
self.stat_windows[i].relocate(x, y)
|
||||||
|
|
||||||
|
return True
|
||||||
|
|
||||||
def on_button_press(self, widget, event):
|
def on_button_press(self, widget, event):
|
||||||
if event.button == 1:
|
if event.button == 1:
|
||||||
|
@ -151,6 +153,7 @@ class Hud:
|
||||||
|
|
||||||
def reposition_windows(self, *args):
|
def reposition_windows(self, *args):
|
||||||
self.update_table_position()
|
self.update_table_position()
|
||||||
|
return True
|
||||||
|
|
||||||
def debug_stat_windows(self, *args):
|
def debug_stat_windows(self, *args):
|
||||||
print self.table, "\n", self.main_window.window.get_transient_for()
|
print self.table, "\n", self.main_window.window.get_transient_for()
|
||||||
|
@ -225,7 +228,7 @@ class Hud:
|
||||||
aux_params = config.get_aux_parameters(game_params['aux'])
|
aux_params = config.get_aux_parameters(game_params['aux'])
|
||||||
self.aux_windows.append(eval("%s.%s(gtk.Window(), config, 'fpdb')" % (aux_params['module'], aux_params['class'])))
|
self.aux_windows.append(eval("%s.%s(gtk.Window(), config, 'fpdb')" % (aux_params['module'], aux_params['class'])))
|
||||||
|
|
||||||
gobject.timeout_add(0.5, self.update_table_position)
|
gobject.timeout_add(500, self.update_table_position)
|
||||||
|
|
||||||
def update(self, hand, config, stat_dict):
|
def update(self, hand, config, stat_dict):
|
||||||
self.hand = hand # this is the last hand, so it is available later
|
self.hand = hand # this is the last hand, so it is available later
|
||||||
|
|
Loading…
Reference in New Issue
Block a user