Author: post
Date: 2010-12-29 18:40:54 +0100 (Wed, 29 Dec 2010)
New Revision: 3713
Modified:
trunk/src/rs-store.c
Log:
Don't cancel preloads&thumbnails when removing a single image from the store.
Try to do thumbnail visuals without locking gdk.
More agressive locking of GDK when removing an image, so iter doesn't become
invalid.
Modified: trunk/src/rs-store.c
===================================================================
--- trunk/src/rs-store.c 2010-12-29 17:37:39 UTC (rev 3712)
+++ trunk/src/rs-store.c 2010-12-29 17:40:54 UTC (rev 3713)
@@ -1230,8 +1230,11 @@
GtkTreeIter i;
/* Empty the loader queue */
- rs_io_idle_cancel_class(METADATA_CLASS);
- rs_io_idle_cancel_class(PRELOAD_CLASS);
+ if (!filename && !iter)
+ {
+ rs_io_idle_cancel_class(METADATA_CLASS);
+ rs_io_idle_cancel_class(PRELOAD_CLASS);
+ }
/* If we got no store, iterate though all */
if (!store)
@@ -1244,13 +1247,13 @@
/* By now we should have a valid store */
g_return_if_fail (RS_IS_STORE(store));
+ gdk_threads_enter();
/* If we got filename, but no iter, try to find correct iter */
if (filename && (!iter))
if (tree_find_filename(GTK_TREE_MODEL(store->store), filename,
&i, NULL))
iter = &i;
- gdk_threads_enter();
/* We got iter, just remove it */
if (iter)
gtk_list_store_remove(GTK_LIST_STORE(GTK_TREE_MODEL(store->store)), iter);
@@ -2762,13 +2765,13 @@
rs_cache_load_quick(job->filename, &priority, &exported);
/* Update thumbnail */
- gdk_threads_enter();
thumbnail_update(pixbuf, pixbuf_clean, priority, exported);
g_assert(pixbuf != NULL);
g_assert(pixbuf_clean != NULL);
/* Add the new thumbnail to the store */
+ gdk_threads_enter();
gtk_list_store_set(GTK_LIST_STORE(job->model), &job->iter,
METADATA_COLUMN, metadata,
PIXBUF_COLUMN, pixbuf,
_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit