Revision: 1757
          http://geeqie.svn.sourceforge.net/geeqie/?rev=1757&view=rev
Author:   nadvornik
Date:     2009-06-21 12:39:58 +0000 (Sun, 21 Jun 2009)

Log Message:
-----------
fixed updating of marks in sidecars

Modified Paths:
--------------
    trunk/src/view_file_list.c

Modified: trunk/src/view_file_list.c
===================================================================
--- trunk/src/view_file_list.c  2009-06-20 23:15:11 UTC (rev 1756)
+++ trunk/src/view_file_list.c  2009-06-21 12:39:58 UTC (rev 1757)
@@ -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);
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
_______________________________________________
Geeqie-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geeqie-svn

Reply via email to