Process all pending events when calling main_iteration for issue1571

(transplanted from dac9e96ee7aa7579db1fe33c1f31e0092325da15)
This commit is contained in:
Cédric Krier committed 2010-06-03 20:08:54 +02:00
1 parent 6d83a23f52
commit 0dab4c5082
2 files changed
+6 -3

No files matched your search

+2 -1
View File
@@ -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
+4 -2
View File
@@ -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