[meld] Remove custom implementation and use expand_to_path instead



commit 41161a1f189cbcdfd0c6a0c442bb78f971a756d6
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Wed Oct 20 18:31:01 2010 +1000

    Remove custom implementation and use expand_to_path instead

 meld/vcview.py |   12 +-----------
 1 files changed, 1 insertions(+), 11 deletions(-)
---
diff --git a/meld/vcview.py b/meld/vcview.py
index 212104c..c9d66e0 100644
--- a/meld/vcview.py
+++ b/meld/vcview.py
@@ -34,16 +34,6 @@ import vc
 #
 ################################################################################
 
-def _expand_to_root( treeview, path ):
-    """Expand rows from path up to root"""
-    start = path[:]
-    while len(start) and not treeview.row_expanded(start):
-        start = start[:-1]
-    level = len(start)
-    while level < len(path):
-        level += 1
-        treeview.expand_row( path[:level], 0)
-
 def _commonprefix(files):
     if len(files) != 1:
         workdir = misc.commonprefix(files)
@@ -352,7 +342,7 @@ class VcView(melddoc.MeldDoc, gnomeglade.Component):
                 if len(entries) == 0:
                     self.model.add_empty(it, _("(Empty)"))
                 if differences or len(path)==1:
-                    _expand_to_root( self.treeview, path )
+                    self.treeview.expand_to_path(path)
             else: # just the root
                 self.treeview.expand_row( (0,), 0)
         self.vc.uncache_inventory()



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