These two patches make F12 work as expected in LUKS passphrase entry and iSCSI discovery UI. There may be more cases needing this, but these have bugs.
Patches are for master and RHEL6 (might need small manipulation to get them on RHEL6). Tested with an updates.img to F17.
-jlk
snack/newt returns None for a button if F12 is pressed which is a global default. There can be passphrase data in the box when this happens and we should read it. The only time we should ignore anything in the box is if the user has explicitely pressed the cancel button. If the passphrase box is empty but the user pressed F12 we still handle that correctly as an implicit cancel. --- pyanaconda/text.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/text.py b/pyanaconda/text.py index 1b201c1..c397d9e 100644 --- a/pyanaconda/text.py +++ b/pyanaconda/text.py @@ -241,7 +241,7 @@ class PassphraseEntryWindow: res = buttons.buttonPressed(rc)
passphrase = None - if res == TEXT_OK_CHECK: + if res == TEXT_OK_CHECK or rc == "F12": passphrase = passphraseentry.value().strip()
self.rc = passphrase
When F12 (the global default continue hotkey) is pressed the button value is None. But we still want to process the details when this happens. The use of bool here makes it a little easier to read. --- pyanaconda/textw/add_drive_text.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/textw/add_drive_text.py b/pyanaconda/textw/add_drive_text.py index b28af4f..e27230b 100644 --- a/pyanaconda/textw/add_drive_text.py +++ b/pyanaconda/textw/add_drive_text.py @@ -172,7 +172,7 @@ class iSCSITextWizard(pih.iSCSIWizard): result = grid.run() button = grid.buttons.buttonPressed(result) self.screen.popWindow() - return True if button == TEXT_OK_CHECK else False + return bool(button == TEXT_OK_CHECK or result == "F12")
def destroy_dialogs(self): pass
On Fri, Jul 06, 2012 at 09:35:06AM -0700, Jesse Keating wrote:
These two patches make F12 work as expected in LUKS passphrase entry and iSCSI discovery UI. There may be more cases needing this, but these have bugs.
Patches are for master and RHEL6 (might need small manipulation to get them on RHEL6). Tested with an updates.img to F17.
Ack to both of these.
anaconda-patches@lists.fedorahosted.org