meld r995 - trunk
- From: stevek svn gnome org
- To: svn-commits-list gnome org
- Subject: meld r995 - trunk
- Date: Wed, 21 May 2008 21:23:23 +0000 (UTC)
Author: stevek
Date: Wed May 21 21:23:23 2008
New Revision: 995
URL: http://svn.gnome.org/viewvc/meld?rev=995&view=rev
Log:
Speed. Wait until end to expand folder with changes. Bug 534006
Modified:
trunk/dirdiff.py
Modified: trunk/dirdiff.py
==============================================================================
--- trunk/dirdiff.py (original)
+++ trunk/dirdiff.py Wed May 21 21:23:23 2008
@@ -365,6 +365,7 @@
prefixlen = 1 + len( self.model.value_path( self.model.get_iter(rootpath), 0 ) )
symlinks_followed = {} # only follow symlinks once
todo = [ rootpath ]
+ expanded = {}
while len(todo):
todo.sort() # depth first
path = todo.pop(0)
@@ -472,13 +473,17 @@
else: # directory is empty, add a placeholder
self.model.add_empty(it)
if differences[0]:
- start = path[:]
- while len(start) and not self.treeview[0].row_expanded(start):
- start = start[:-1]
- level = len(start)
- while level < len(path):
- level += 1
- self.treeview[0].expand_row( path[:level], 0)
+ expanded[path] = False
+ for path in sorted(expanded.keys()):
+ start = path[:]
+ while len(start) and not expanded.get(start,False):
+ start = start[:-1]
+ level = len(start)
+ while level < len(path):
+ level += 1
+ cur = path[:level]
+ expanded[cur] = True
+ self.treeview[0].expand_row( cur, 0)
yield _("[%s] Done") % self.label_text
self.filter_hide_current.set_sensitive(True)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]