FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 02-01-2008, 06:04 PM
David Lehman
 
Default Add GUI dialog code for passphrase prompting.

---
gui.py | 38 ++++++++++++++++++++++++++++++++++++++
1 files changed, 38 insertions(+), 0 deletions(-)

diff --git a/gui.py b/gui.py
index 6405748..0df3ef5 100755
--- a/gui.py
+++ b/gui.py
@@ -683,6 +683,38 @@ class luksPassphraseWindow:
def destroy(self):
self.win.destroy()

+class PassphraseEntryWindow:
+ def __init__(self, device):
+ xml = gtk.glade.XML(findGladeFile("lukspassphrase.glade" ), domain="anaconda")
+ self.txt = _("Partition %s is encrypted. In order to "
+ "access the partition's contents during "
+ "installation you must enter the device's "
+ "passphrase below.") % (device,)
+ self.win = xml.get_widget("passphraseEntryDialog")
+ self.passphraseLabel = xml.get_widget("passphraseLabel")
+ self.passphraseEntry = xml.get_widget("passphraseEntry")
+ self.globalcheckbox = xml.get_widget("globalcheckbox")
+
+ def run(self):
+ self.win.show()
+ self.passphraseLabel.set_text(txt)
+ self.passphraseEntry.grab_focus()
+ rc = self.win.run()
+ passphrase = None
+ isglobal = False
+ if rc == gtk.RESPONSE_OK:
+ passphrase = self.passphraseEntry.get_text().strip()
+ isglobal = self.globalcheckbox.get_active()
+
+ self.rc = (passphrase, isglobal)
+ return self.rc
+
+ def getrc(self):
+ return self.rc
+
+ def destroy(self):
+ self.win.destroy()
+
class SaveExceptionWindow:
def __init__(self, anaconda, longTracebackFile=None, screen=None):
exnxml = gtk.glade.XML(findGladeFile("exnSave.glade"), domain="anaconda")
@@ -1122,6 +1154,12 @@ class InstallInterface:
d.destroy()
return passphrase

+ def passphraseEntryWindow(self, device):
+ d = PassphraseEntryWindow(device)
+ rc = d.run()
+ d.destroy()
+ return rc
+
def beep(self):
gtk.gdk.beep()

--
1.5.3.7

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 07:29 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org