summaryrefslogtreecommitdiffstats
path: root/iw/bootloaderpassword_gui.py
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>2001-10-16 20:59:15 +0000
committerMatt Wilson <msw@redhat.com>2001-10-16 20:59:15 +0000
commitcc02a97cc308be0ae7d6e4ac6c605518103c6f22 (patch)
tree21376b7119090a57bc496a2731b7952fd465b0a9 /iw/bootloaderpassword_gui.py
parent584b653db54b96a7721cffeba67680495e59337c (diff)
downloadanaconda-cc02a97cc308be0ae7d6e4ac6c605518103c6f22.tar.gz
anaconda-cc02a97cc308be0ae7d6e4ac6c605518103c6f22.tar.xz
anaconda-cc02a97cc308be0ae7d6e4ac6c605518103c6f22.zip
merge anaconda-gtk-2-0-branch to HEAD
Diffstat (limited to 'iw/bootloaderpassword_gui.py')
-rw-r--r--iw/bootloaderpassword_gui.py62
1 files changed, 31 insertions, 31 deletions
diff --git a/iw/bootloaderpassword_gui.py b/iw/bootloaderpassword_gui.py
index eddd6f45b..91afc4598 100644
--- a/iw/bootloaderpassword_gui.py
+++ b/iw/bootloaderpassword_gui.py
@@ -11,13 +11,10 @@
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
-from iw_gui import *
-
-from gtk import *
-from gnome.ui import *
-from translate import _, N_
-import GdkImlib
+import gtk
import gui
+from translate import _, N_
+from iw_gui import *
class BootloaderPasswordWindow (InstallWindow):
@@ -50,7 +47,7 @@ class BootloaderPasswordWindow (InstallWindow):
confirm = self.confirm.get_text ()
if pw == confirm and len(pw) >= 1:
- self.ics.setNextEnabled (TRUE)
+ self.ics.setNextEnabled (gtk.TRUE)
self.rootStatus.set_text (_("Password accepted."))
else:
if not pw and not confirm:
@@ -60,44 +57,47 @@ class BootloaderPasswordWindow (InstallWindow):
else:
self.rootStatus.set_text (_("Passwords do not match."))
- self.ics.setNextEnabled (FALSE)
+ self.ics.setNextEnabled (gtk.FALSE)
def getScreen(self, bl, intf):
self.bl = bl
self.intf = intf
- box = GtkVBox(FALSE, 5)
+ box = gtk.VBox(gtk.FALSE, 5)
box.set_border_width (5)
self.forward = lambda widget, box=box: box.focus (DIR_TAB_FORWARD)
- self.passtable = GtkTable (2, 2)
+ self.passtable = gtk.Table (2, 2)
self.passtable.set_row_spacings (5)
self.passtable.set_col_spacings (5)
- grubpassinfo = GtkLabel(_("A boot loader password prevents users from passing arbitrary options to the kernel. For highest security, we recommend setting a password, but this is not necessary for more casual users."))
+ grubpassinfo = gui.WrappingLabel(
+ _("A boot loader password prevents users from "
+ "passing arbitrary options to the kernel. For "
+ "highest security, we recommend setting a "
+ "password, but this is not necessary for more "
+ "casual users."))
self.password = None
- grubpassinfo.set_line_wrap(TRUE)
- grubpassinfo.set_usize(400, -1)
grubpassinfo.set_alignment(0.0,0.0)
- box.pack_start(grubpassinfo, FALSE)
-
- self.usegrubpasscb = GtkCheckButton(_("Use a GRUB Password?"))
- box.pack_start(self.usegrubpasscb, FALSE)
-
- self.passtable.attach(GtkLabel(_("Password:")), 0, 1, 2, 3, FILL, 0, 10)
- self.pw = GtkEntry (16)
- self.pw.set_visibility (FALSE)
- self.passtable.attach(self.pw, 1, 2, 2, 3, FILL, 0, 10)
- self.passtable.attach(GtkLabel(_("Confirm:")), 0, 1, 3, 4, FILL, 0, 10)
- self.confirm = GtkEntry (16)
- self.confirm.set_visibility (FALSE)
- self.passtable.attach(self.confirm, 1, 2, 3, 4, FILL, 0, 10)
+ box.pack_start(grubpassinfo, gtk.FALSE)
+
+ self.usegrubpasscb = gtk.CheckButton(_("Use a GRUB Password?"))
+ box.pack_start(self.usegrubpasscb, gtk.FALSE)
+
+ self.passtable.attach(gtk.Label(_("Password:")), 0, 1, 2, 3, gtk.FILL, 0, 10)
+ self.pw = gtk.Entry (16)
+ self.pw.set_visibility (gtk.FALSE)
+ self.passtable.attach(self.pw, 1, 2, 2, 3, gtk.FILL, 0, 10)
+ self.passtable.attach(gtk.Label(_("Confirm:")), 0, 1, 3, 4, gtk.FILL, 0, 10)
+ self.confirm = gtk.Entry (16)
+ self.confirm.set_visibility (gtk.FALSE)
+ self.passtable.attach(self.confirm, 1, 2, 3, 4, gtk.FILL, 0, 10)
if self.bl.getPassword():
passwd = self.bl.getPassword()
self.pw.set_text(passwd)
self.confirm.set_text(passwd)
- self.usegrubpasscb.set_active(TRUE)
+ self.usegrubpasscb.set_active(gtk.TRUE)
self.pw.connect ("changed", self.rootPasswordsMatch)
self.pw.connect ("activate", self.forward)
@@ -106,11 +106,11 @@ class BootloaderPasswordWindow (InstallWindow):
self.passtable.set_sensitive(self.usegrubpasscb.get_active())
self.usegrubpasscb.connect("toggled", self.toggle)
- self.rootStatus = GtkLabel(_("Please enter password"))
- a = GtkAlignment (0.2, 0.5)
+ self.rootStatus = gtk.Label(_("Please enter password"))
+ a = gtk.Alignment (0.2, 0.5)
a.add(self.rootStatus)
- box.pack_start(self.passtable, FALSE)
- box.pack_start(a, FALSE)
+ box.pack_start(self.passtable, gtk.FALSE)
+ box.pack_start(a, gtk.FALSE)
return box