[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[rhel6-branch 2/2] metacity, fix a displaying problem with WaitWindow and ProgressWindow (#520146)



---
 gui.py |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/gui.py b/gui.py
index 1a4344c..d8bb9d8 100755
--- a/gui.py
+++ b/gui.py
@@ -394,7 +394,6 @@ class WaitWindow:
                 self.window.set_transient_for(parent)
         else:
             self.window = gtk.Window()
-
         self.window.set_modal(True)
         self.window.set_type_hint (gtk.gdk.WINDOW_TYPE_HINT_DIALOG)
         self.window.set_title(title)
@@ -405,8 +404,13 @@ class WaitWindow:
         box.add(label)
         box.set_shadow_type(gtk.SHADOW_NONE)
         self.window.add(box)
+        box.show_all()
         addFrame(self.window)
-        self.window.show_all()
+        # Displaying windows should not be done outside of the gtk
+        # mainloop. With metacity this bites us and we have to do
+        # window.show_now() AND refresh() to correctly display the window and
+        # its contents:
+        self.window.show_now()
         rootPushBusyCursor()
         self.refresh()
 
@@ -444,10 +448,11 @@ class ProgressWindow:
         self.updpct = updpct
         self.progress = gtk.ProgressBar ()
         box.pack_start (self.progress, True)
+        box.show_all()
         self.window.add(box)
-
         addFrame(self.window)
-        self.window.show_all ()
+        # see comment at WaitWindow.__init__():
+        self.window.show_now ()
         rootPushBusyCursor()
         self.refresh()
 
-- 
1.6.6


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]