Author: post
Date: 2010-04-10 23:17:11 +0200 (Sat, 10 Apr 2010)
New Revision: 3353

Modified:
   trunk/src/rs-store.c
Log:
Set iconview to unsorted, while loading individual pictures, and enable only 
after all pictures has been loaded; reducing the change of triggering a GTK 
sort bug significantly. Confirmed on test-case. Tag search still vulnerable.

Modified: trunk/src/rs-store.c
===================================================================
--- trunk/src/rs-store.c        2010-04-10 09:18:15 UTC (rev 3352)
+++ trunk/src/rs-store.c        2010-04-10 21:17:11 UTC (rev 3353)
@@ -1229,14 +1229,15 @@
        if (!rs_conf_get_string(CONF_LWD))
                load_recursive = FALSE;
 
+       /* Disable sort while loading - this greatly reduces the change of 
triggering a GTK crash bug */
+       sortable = GTK_TREE_SORTABLE(store->store);
+       gtk_tree_sortable_set_sort_column_id(sortable, 
GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID, GTK_SORT_ASCENDING);
+
        /* While we're loading, we keep the IO lock to ourself. We need to read 
very basic meta and directory data */
        rs_io_lock();
        items = load_directory(store, path, library, load_8bit, load_recursive);
        rs_io_unlock();
 
-       /* Add a final entry to re-enable the priority count */
-       rs_store_load_file(store, NULL);
-
        /* unset model and make sure we have enough columns */
        gdk_threads_enter();
        for (n=0;n<NUM_VIEWS;n++)
@@ -1247,11 +1248,7 @@
 
        /* Sort the store */
        sortable = GTK_TREE_SORTABLE(store->store);
-       gtk_tree_sortable_set_sort_func(sortable,
-               TEXT_COLUMN,
-               model_sort_name,
-               NULL,
-               NULL);
+       gtk_tree_sortable_set_sort_func(sortable, TEXT_COLUMN, model_sort_name, 
NULL,NULL);
        gtk_tree_sortable_set_sort_column_id(sortable, TEXT_COLUMN, 
GTK_SORT_ASCENDING);
 
        /* set model for all 6 iconviews */


_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit

Reply via email to