diff options
author | Mike Fulbright <msf@redhat.com> | 2002-01-30 21:55:16 +0000 |
---|---|---|
committer | Mike Fulbright <msf@redhat.com> | 2002-01-30 21:55:16 +0000 |
commit | aeb57775dab060183820d37bb7b110abc3b5157b (patch) | |
tree | ee49f5803506e881701805abbb811ea246c7e353 /iw | |
parent | 7c71f4c0c3ee9938a2f352ecba1d8c079b492b0e (diff) | |
download | anaconda-aeb57775dab060183820d37bb7b110abc3b5157b.tar.gz anaconda-aeb57775dab060183820d37bb7b110abc3b5157b.tar.xz anaconda-aeb57775dab060183820d37bb7b110abc3b5157b.zip |
handle fact if you have logical partitions treeview goes to depth > 1
Diffstat (limited to 'iw')
-rw-r--r-- | iw/partition_gui.py | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/iw/partition_gui.py b/iw/partition_gui.py index f51c24ed7..d6fa7725f 100644 --- a/iw/partition_gui.py +++ b/iw/partition_gui.py @@ -201,6 +201,9 @@ class DiskStripe: slice.select() # update selection of the tree + + print "selectSlice: updateTree = ", updateTree + print "selectSlice: partition = ", partition if updateTree: self.tree.selectPartition(partition) self.selected = slice @@ -362,11 +365,14 @@ class DiskTreeModel(gtk.TreeStore): pyobject = self.titleSlot['PyObject'] iter = self.get_iter_root() next = 1 + parentstack = [] + parent = None # iterate over the list, looking for the current mouse selection while next: # if this is a parent node, get the first child and iter over them if self.iter_has_child(iter): - parent = iter + parent = iter + parentstack.append(parent) iter = self.iter_children(parent) continue # if it's not a parent node and the mouse matches, select it. @@ -386,8 +392,11 @@ class DiskTreeModel(gtk.TreeStore): # if there isn't a next row and we had a parent, go to the node # after the parent we've just gotten the children of. if not next and parent: - next = self.iter_next(parent) - iter = parent + while not next and parent: + next = self.iter_next(parent) + iter = parent + if len(parentstack) > 0: + parent = parentstack.pop() def getCurrentPartition(self): selection = self.view.get_selection() |