* iw/partition_gui.py (treeActivateCB): When we are sure that the tree view has a "free row" selected, use the parent of that row to display a create screen. So, if one double clicks on a VG free space, a create LV window will pop up. --- iw/partition_gui.py | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/iw/partition_gui.py b/iw/partition_gui.py index 11fdd09..a05c8f0 100644 --- a/iw/partition_gui.py +++ b/iw/partition_gui.py @@ -1166,6 +1166,27 @@ class PartitionWindow(InstallWindow): or isinstance(curr_dev, storage.MDRaidArrayDevice): self.editCB() + elif curr_dev == None: + # Its probably a free space + iparent = self.tree.getCurrentDeviceParent() + if iparent == None: + # it was not free space, it is a root row. + return + + # We execute a create function given the type of parent that was + # found. + # FIXME: This code might repeat itself. might be a good idea to + # put it in a function. + curr_parent = self.tree[iparent]["PyObject"] + if isinstance(curr_parent, storage.DiskDevice): + tempformat = self.storage.defaultFSType + device = self.storage.newPartition(fmt_type=tempformat, size=200) + self.editPartition(device, isNew = True) + + elif isinstance(curr_parent, storage.LVMVolumeGroupDevice): + self.editLVMLogicalVolume(vg = curr_parent) + return + def treeSelectCB(self, selection, *args): # The edit and create buttons will be enabled if the user has chosen # something editable and/or deletable. -- 1.6.4.3 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list