changeset 943:b483d8cdedb6

improved updating of view_dir_tree
author nadvornik
date Sun, 27 Jul 2008 08:57:12 +0000
parents 0f243d361ed2
children e73552743bda
files src/view_dir.c src/view_dir_tree.c
diffstat 2 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/view_dir.c	Sun Jul 27 08:40:47 2008 +0000
+++ b/src/view_dir.c	Sun Jul 27 08:57:12 2008 +0000
@@ -1081,7 +1081,7 @@
 
 		if (vd_find_row(vd, base_fd, &iter))
 			{
-			vdtree_populate_path_by_iter(vd, &iter, FALSE, vd->dir_fd);
+			vdtree_populate_path_by_iter(vd, &iter, TRUE, vd->dir_fd);
 			} 
 
 		file_data_unref(base_fd);
--- a/src/view_dir_tree.c	Sun Jul 27 08:40:47 2008 +0000
+++ b/src/view_dir_tree.c	Sun Jul 27 08:57:12 2008 +0000
@@ -436,7 +436,6 @@
 
 	if (nd->expanded)
 		{
-		if (!force && current_time - nd->last_update < 10) return TRUE;
 		if (!isdir(nd->fd->path))
 			{
 			if (vd->click_fd == nd->fd) vd->click_fd = NULL;
@@ -445,7 +444,12 @@
 			vdtree_node_free(nd);
 			return FALSE;
 			}
-		if (!force && nd->fd->version == nd->version) return TRUE;
+		if (!force && current_time - nd->last_update < 2) 
+			{
+			DEBUG_1("Too frequent update of %s", nd->fd->path);
+			return TRUE;
+			}
+		if (nd->fd->version == nd->version) return TRUE;
 		}
 
 	vdtree_busy_push(vd);