diff options
author | Jeremy Katz <katzj@redhat.com> | 2007-12-31 13:18:41 -0500 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2007-12-31 13:18:56 -0500 |
commit | ed77402e3fe550b01b58610e4175150c01d14ae6 (patch) | |
tree | 362df04ada667100f53534d672fcd62790474244 | |
parent | b46a1c57625a4185a6d25b786c84cabefb501e47 (diff) | |
download | anaconda-ed77402e3fe550b01b58610e4175150c01d14ae6.tar.gz anaconda-ed77402e3fe550b01b58610e4175150c01d14ae6.tar.xz anaconda-ed77402e3fe550b01b58610e4175150c01d14ae6.zip |
Make it obvious which partitions are being formatted and encrypted
Add a lock icon in the format column for partitions which are to be formatted
and encrypted. Only use the specific partition and don't go into child
requests for things like RAID and LVM. Pixmap is from the Bluecurve icon theme
-rw-r--r-- | iw/partition_gui.py | 19 | ||||
-rw-r--r-- | partRequests.py | 14 | ||||
-rw-r--r-- | pixmaps/gnome-lock.png | bin | 0 -> 857 bytes |
3 files changed, 24 insertions, 9 deletions
diff --git a/iw/partition_gui.py b/iw/partition_gui.py index dc99a4660..0b84eac8c 100644 --- a/iw/partition_gui.py +++ b/iw/partition_gui.py @@ -747,7 +747,9 @@ class PartitionWindow(InstallWindow): self.tree[iter]['PyObject'] = str(lvrequest.uniqueID) ptype = lvrequest.fstype.getName() - if lvrequest.format: + if lvrequest.isEncrypted(self.partitions, True) and lvrequest.format: + self.tree[iter]['Format'] = self.lock_pixbuf + elif lvrequest.format: self.tree[iter]['Format'] = self.checkmark_pixbuf self.tree[iter]['IsFormattable'] = lvrequest.fstype.isFormattable() self.tree[iter]['IsLeaf'] = True @@ -783,8 +785,10 @@ class PartitionWindow(InstallWindow): if request.fstype: ptype = self.getShortFSTypeName(request.fstype.getName()) - if request.format: - self.tree[iter]['Format'] = self.checkmark_pixbuf + if request.isEncrypted(self.partitions, True) and request.format: + self.tree[iter]['Format'] = self.lock_pixbuf + elif request.format: + self.tree[iter]['Format'] = self.checkmark_pixbuf self.tree[iter]['IsFormattable'] = request.fstype.isFormattable() else: ptype = _("None") @@ -872,7 +876,9 @@ class PartitionWindow(InstallWindow): else: self.tree[iter]['Mount Point'] = "" - if request.format: + if request.isEncrypted(self.partitions, True) and request.format: + self.tree[iter]['Format'] = self.lock_pixbuf + elif request.format: self.tree[iter]['Format'] = self.checkmark_pixbuf @@ -908,7 +914,9 @@ class PartitionWindow(InstallWindow): else: ptype = part.fs_type.name - if request.format: + if request.isEncrypted(self.partitions, True) and request.format: + self.tree[iter]['Format'] = self.lock_pixbuf + elif request.format: self.tree[iter]['Format'] = self.checkmark_pixbuf else: if request and request.fstype != None: @@ -1361,6 +1369,7 @@ class PartitionWindow(InstallWindow): # load up checkmark self.checkmark_pixbuf = gtk.gdk.pixbuf_new_from_inline(len(new_checkmark), new_checkmark, False) + self.lock_pixbuf = gui.getPixbuf("gnome-lock.png") # operational buttons buttonBox = gtk.HButtonBox() diff --git a/partRequests.py b/partRequests.py index 104a07068..5ef4f804d 100644 --- a/partRequests.py +++ b/partRequests.py @@ -206,7 +206,7 @@ class RequestSpec: return False return self.resizable and self.fstype.isResizable() - def isEncrypted(self, partitions): + def isEncrypted(self, partitions, parentOnly = False): if self.encryption and self.encryption.getScheme() is not None: return True return False @@ -695,9 +695,11 @@ class RaidRequestSpec(RequestSpec): encryption = self.encryption) return self.dev - def isEncrypted(self, partitions): + def isEncrypted(self, partitions, parentOnly = False): if RequestSpec.isEncrypted(self, partitions) is True: return True + if parentOnly: + return False for member in self.raidmembers: if partitions.getRequestByID(member).isEncrypted(partitions): return True @@ -841,9 +843,11 @@ class VolumeGroupRequestSpec(RequestSpec): existing = self.preexist) return self.dev - def isEncrypted(self, partitions): + def isEncrypted(self, partitions, parentOnly = False): if RequestSpec.isEncrypted(self, partitions) is True: return True + if parentOnly: + return False for pvid in self.physicalVolumes: pv = partitions.getRequestByID(pvid) if pv.isEncrypted(partitions): @@ -969,9 +973,11 @@ class LogicalVolumeRequestSpec(RequestSpec): existing = self.preexist) return self.dev - def isEncrypted(self, partitions): + def isEncrypted(self, partitions, parentOnly = False): if RequestSpec.isEncrypted(self, partitions) is True: return True + if parentOnly: + return False vg = partitions.getRequestByID(self.volumeGroup) if vg.isEncrypted(partitions): return True diff --git a/pixmaps/gnome-lock.png b/pixmaps/gnome-lock.png Binary files differnew file mode 100644 index 000000000..e71e03f52 --- /dev/null +++ b/pixmaps/gnome-lock.png |