summaryrefslogtreecommitdiffstats
path: root/gui.py
diff options
context:
space:
mode:
authorpnfisher <pnfisher>1999-09-10 01:24:54 +0000
committerpnfisher <pnfisher>1999-09-10 01:24:54 +0000
commit27f87f7d10262cd91e88f8de19a33d7e07dabbaf (patch)
tree8a9f6a2ebd2b7fe67a7c426cdf9adc3fd24a6e07 /gui.py
parentb79a8c289c88d943c6a86847a05ea9595ed743f0 (diff)
downloadanaconda-27f87f7d10262cd91e88f8de19a33d7e07dabbaf.tar.gz
anaconda-27f87f7d10262cd91e88f8de19a33d7e07dabbaf.tar.xz
anaconda-27f87f7d10262cd91e88f8de19a33d7e07dabbaf.zip
Make button changing code stop flickering.
Diffstat (limited to 'gui.py')
-rwxr-xr-xgui.py17
1 files changed, 14 insertions, 3 deletions
diff --git a/gui.py b/gui.py
index ce0b20ad7..cadaa7a7e 100755
--- a/gui.py
+++ b/gui.py
@@ -261,9 +261,20 @@ class InstallControlWindow (Thread):
elif name == "next": buttons[name].connect ("clicked", self.nextClicked)
buttons[name].show ()
- self.buttonBox.foreach (lambda x, b=self.buttonBox: b.remove (x))
- self.buttonBox.pack_start (buttons["prev"])
- self.buttonBox.pack_start (buttons["next"])
+ children = self.buttonBox.children ()
+ if not buttons["prev"] in children:
+ self.buttonBox.remove (children[0])
+ self.buttonBox.pack_start (buttons["prev"])
+ if not buttons["next"] in children:
+ self.buttonBox.remove (children[1])
+ self.buttonBox.pack_end (buttons["next"])
+
+# old flickery button changing code
+# if not (buttons["prev"] in children and buttons["next"] in children):
+# self.buttonBox.foreach (lambda x, b=self.buttonBox: b.remove (x))
+# self.buttonBox.pack_start (buttons["prev"])
+# self.buttonBox.pack_start (buttons["next"])
+
buttons["prev"].set_sensitive (ics.getPrevEnabled ())
buttons["next"].set_sensitive (ics.getNextEnabled ())