[PATCH 1/8] Reorganize the tree view related to lvm.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch separates actions done with the storage object and puts them
before the actions done with the treeview gtk object.
---
 iw/partition_gui.py |   34 +++++++++++++++++++---------------
 1 files changed, 19 insertions(+), 15 deletions(-)

diff --git a/iw/partition_gui.py b/iw/partition_gui.py
index 94b9461..9448884 100644
--- a/iw/partition_gui.py
+++ b/iw/partition_gui.py
@@ -901,26 +901,30 @@ class PartitionWindow(InstallWindow):
                             format = dm_dev.format
                     else:
                         format = lv.format
-		    iter = self.tree.append(vgparent)
-		    self.tree[iter]['Device'] = lv.lvname
-		    if format.mountable and format.mountpoint:
-                            self.tree[iter]['Mount Point'] = format.mountpoint
-		    else:
-			self.tree[iter]['Mount Point'] = ""
-		    self.tree[iter]['Size (MB)'] = "%Ld" % lv.size
-		    self.tree[iter]['PyObject'] = lv
-		
+
+                    # icon for the format column
                     if lv.format.type == "luks" and not lv.format.exists:
                         # we're creating the LUKS header
-			self.tree[iter]['Format'] = self.lock_pixbuf
+                        format_icon = self.lock_pixbuf
                     elif not format.exists:
                         # we're creating a format on the device
-			self.tree[iter]['Format'] = self.checkmark_pixbuf
+                        format_icon = self.checkmark_pixbuf
+
+                    # mount point string
+                    if format.mountable and format.mountpoint:
+                        mnt_str = format.mountpoint
+                    else:
+                        mnt_str = ""
+
+                    iter = self.tree.append(vgparent)
+                    self.tree[iter]['Device'] = lv.lvname
+                    self.tree[iter]['Size (MB)'] = "%Ld" % lv.size
+                    self.tree[iter]['PyObject'] = lv
                     self.tree[iter]['IsFormattable'] = format.formattable
-		    self.tree[iter]['IsLeaf'] = True
-		    self.tree[iter]['Type'] = format.name
-		    #self.tree[iter]['Start'] = ""
-		    #self.tree[iter]['End'] = ""
+                    self.tree[iter]['Format'] = format_icon
+                    self.tree[iter]['Mount Point'] = mnt_str
+                    self.tree[iter]['IsLeaf'] = True
+                    self.tree[iter]['Type'] = format.name
 
         # handle RAID next
         mdarrays = self.storage.mdarrays
-- 
1.6.4.3

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

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux