diff --git a/tryton/common/cellrendererbutton.py b/tryton/common/cellrendererbutton.py index 4ea797c3b5..f57f83b468 100644 --- a/tryton/common/cellrendererbutton.py +++ b/tryton/common/cellrendererbutton.py @@ -77,7 +77,8 @@ class CellRendererButton(gtk.GenericCellRenderer): and event.keyval == gtk.keysyms.space)): self.clicking = True widget.queue_draw() - gtk.main_iteration() + while gtk.events_pending(): + gtk.main_iteration() self.emit("clicked", path) def timeout(self, widget): self.clicking = False diff --git a/tryton/common/common.py b/tryton/common/common.py index 9f5c16c6d7..5be244f904 100644 --- a/tryton/common/common.py +++ b/tryton/common/common.py @@ -1004,10 +1004,12 @@ class RPCProgress(object): win.set_modal(True) win.show_all() progressbar.pulse() - gtk.main_iteration() + while gtk.events_pending(): + gtk.main_iteration() if win: win.destroy() - gtk.main_iteration() + while gtk.events_pending(): + gtk.main_iteration() if self.exception: raise self.exception return self.res