From fa2c99cbdda5aa334d4d7556722c6001263e1535 Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Tue, 9 Jul 2002 15:38:29 +0000 Subject: sanitize the replacement of the next button, use the text that the install screen asked to use --- gui.py | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) (limited to 'gui.py') diff --git a/gui.py b/gui.py index 997b656d2..6082b007e 100755 --- a/gui.py +++ b/gui.py @@ -739,20 +739,28 @@ class InstallControlWindow: if ics.getNextButton(): (icon, text) = ics.getNextButton() - nextButton = gtk.Button(stock=icon) -# nextButton.set_property("label", _(text)) - nextButton.connect("clicked", self.nextClicked) - nextButton.show_all() - - children = self.buttonBox.get_children () + button = gtk.Button() + box = gtk.HBox(gtk.FALSE, 0) + image = gtk.Image() + image.set_from_stock(icon, gtk.ICON_SIZE_BUTTON) + box.pack_start(image, gtk.FALSE, gtk.FALSE) + label = gtk.Label(_(text)) + label.set_property("use-underline", gtk.TRUE) + box.pack_start(label, gtk.TRUE, gtk.TRUE) + button.add(box) + button.connect("clicked", self.nextClicked) + button.show_all() + button.label = label + nextButton = button - if not prevButton in children: - self.buttonBox.remove (children[0]) - self.buttonBox.pack_start (prevButton) + children = self.buttonBox.get_children() - if not nextButton in children: - self.buttonBox.remove (children[1]) - self.buttonBox.pack_end (nextButton) + if not nextButton in children and self.nextButtonStock in children: + pos = children.index(self.nextButtonStock) + self.buttonBox.remove(self.nextButtonStock) + self.buttonBox.pack_end(nextButton) + self.buttonBox.reorder_child(nextButton, pos) + self.nextButtonStock = nextButton prevButton.set_sensitive (ics.getPrevEnabled ()) nextButton.set_sensitive (ics.getNextEnabled ()) -- cgit