diff options
author | David Lehman <dlehman@redhat.com> | 2008-08-13 20:45:21 -0500 |
---|---|---|
committer | David Lehman <dlehman@redhat.com> | 2008-08-13 20:57:10 -0500 |
commit | 942a25d86a034df1700d6d00e040fdc727b42d6c (patch) | |
tree | 498e6851944b4847e48e50f350a7c88683950102 /gui.py | |
parent | 093e40e281d27360fdfd1b7b7e8ef037e2e90591 (diff) | |
download | anaconda-942a25d86a034df1700d6d00e040fdc727b42d6c.tar.gz anaconda-942a25d86a034df1700d6d00e040fdc727b42d6c.tar.xz anaconda-942a25d86a034df1700d6d00e040fdc727b42d6c.zip |
Allow specification of a device string for display in passphrase dialog.
Diffstat (limited to 'gui.py')
-rwxr-xr-x | gui.py | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -623,7 +623,7 @@ class InstallKeyWindow: self.win.destroy() class luksPassphraseWindow: - def __init__(self, passphrase=None, parent = None): + def __init__(self, passphrase=None, device = "", parent = None): luksxml = gtk.glade.XML(findGladeFile("lukspassphrase.glade"), domain="anaconda", root="luksPassphraseDialog") @@ -641,6 +641,15 @@ class luksPassphraseWindow: else: self.initialPassphrase = "" + if device: + deviceStr = " (%s)" % (device,) + else: + deviceStr = "" + txt = _("Choose a passphrase for this encrypted device%s. " + "You will be prompted for the passphrase during system " + "boot.") % (deviceStr,) + luksxml.get_widget("mainLabel").set_text(txt) + if parent: self.win.set_transient_for(parent) @@ -1221,13 +1230,13 @@ class InstallInterface: d.destroy() return ret - def getLuksPassphrase(self, passphrase = ""): + def getLuksPassphrase(self, passphrase = "", device = ""): if self.icw: parent = self.icw.window else: parent = None - d = luksPassphraseWindow(passphrase, parent = parent) + d = luksPassphraseWindow(passphrase, device = device, parent = parent) rc = d.run() passphrase = d.getPassphrase() d.destroy() |