diff options
author | Matt Wilson <msw@redhat.com> | 2002-07-09 15:38:29 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 2002-07-09 15:38:29 +0000 |
commit | fa2c99cbdda5aa334d4d7556722c6001263e1535 (patch) | |
tree | 55c32ad4816e055918c0668ccc136f49f841d053 /gui.py | |
parent | ece9e1f8e8cce7df506aed08f17429b0a21b0199 (diff) | |
download | anaconda-fa2c99cbdda5aa334d4d7556722c6001263e1535.tar.gz anaconda-fa2c99cbdda5aa334d4d7556722c6001263e1535.tar.xz anaconda-fa2c99cbdda5aa334d4d7556722c6001263e1535.zip |
sanitize the replacement of the next button, use the text that the install screen asked to use
Diffstat (limited to 'gui.py')
-rwxr-xr-x | gui.py | 32 |
1 files changed, 20 insertions, 12 deletions
@@ -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 ()) |