# HG changeset patch # User nadvornik # Date 1245587998 0 # Node ID 3968a763e2b18092934aaf639ae4fb166c7210ef # Parent 65ebc00c3780fa5361ea4f61d340e1299e99a68d fixed updating of marks in sidecars diff -r 65ebc00c3780 -r 3968a763e2b1 src/view_file_list.c --- a/src/view_file_list.c Sat Jun 20 23:15:11 2009 +0000 +++ b/src/view_file_list.c Sun Jun 21 12:39:58 2009 +0000 @@ -1571,6 +1571,8 @@ gtk_tree_model_get_iter(store, &iter, tpath); gtk_tree_model_get(store, &iter, FILE_COLUMN_POINTER, &fd, -1); + /* the change has a very limited range and the standard notification would trigger + complete re-read of the directory - try to do only minimal update instead */ file_data_unregister_notify_func(vf_notify_cb, vf); /* we don't need the notification */ switch (mode) @@ -1591,6 +1593,8 @@ { /* mark functions can have various side effects - update all columns to be sure */ vflist_setup_iter(vf, GTK_TREE_STORE(store), &iter, fd); + /* mark functions can change sidecars too */ + vflist_setup_iter_recursive(vf, GTK_TREE_STORE(store), &iter, fd->sidecar_files, NULL); } @@ -1871,7 +1875,10 @@ gtk_tree_model_get(GTK_TREE_MODEL(store), &iter, FILE_COLUMN_POINTER, &fd, col_idx, &marked, -1); marked = !marked; - file_data_unregister_notify_func(vf_notify_cb, vf); /* we don't need the notification */ + + /* the change has a very limited range and the standard notification would trigger + complete re-read of the directory - try to do only minimal update instead */ + file_data_unregister_notify_func(vf_notify_cb, vf); file_data_set_mark(fd, col_idx - FILE_COLUMN_MARKS, marked); if (!file_data_filter_marks(fd, vf_marks_get_filter(vf))) /* file no longer matches the filter -> remove it */ { @@ -1881,6 +1888,8 @@ { /* mark functions can have various side effects - update all columns to be sure */ vflist_setup_iter(vf, GTK_TREE_STORE(store), &iter, fd); + /* mark functions can change sidecars too */ + vflist_setup_iter_recursive(vf, GTK_TREE_STORE(store), &iter, fd->sidecar_files, NULL); } file_data_register_notify_func(vf_notify_cb, vf, NOTIFY_PRIORITY_MEDIUM);