Author: post
Date: 2010-04-01 16:41:20 +0200 (Thu, 01 Apr 2010)
New Revision: 3291
Modified:
trunk/src/rs-library.c
trunk/src/rs-store.c
trunk/src/rs-store.h
Log:
Remove hack that disables image counting while loading. Not much of a speedup,
and ugly code.
Modified: trunk/src/rs-library.c
===================================================================
--- trunk/src/rs-library.c 2010-04-01 14:31:12 UTC (rev 3290)
+++ trunk/src/rs-library.c 2010-04-01 14:41:20 UTC (rev 3291)
@@ -933,18 +933,11 @@
GList *tags = rs_split_string(text, " ");
GList *photos = rs_library_search(carrier->library, tags);
-/*
- printf("photos: %d\n",g_list_length(photos));
- g_list_foreach(photos, list_photos, NULL);
- g_list_foreach(tags, list_photos, NULL);
-*/
+
/* FIXME: deselect all photos in store */
rs_store_remove(carrier->store, NULL, NULL);
g_list_foreach(photos, load_photos, carrier->store);
- /* Add task to re-enable priority count, and update after last
thumbnail */
- rs_store_load_file(carrier->store, NULL);
-
/* Fix size of iconview */
rs_store_set_iconview_size(carrier->store, g_list_length(photos));
Modified: trunk/src/rs-store.c
===================================================================
--- trunk/src/rs-store.c 2010-04-01 14:31:12 UTC (rev 3290)
+++ trunk/src/rs-store.c 2010-04-01 14:41:20 UTC (rev 3291)
@@ -1042,15 +1042,7 @@
WORKER_JOB *job;
if (!fullname)
- {
- /* Build dummy job to signal re-enable priority count */
- job = g_new(WORKER_JOB, 1);
- job->last_icon = TRUE;
- job->store = g_object_ref(store);
- job->filename =
g_strdup("796f7577696c6c6e6576657266696e646d65");
- rs_io_idle_read_metadata(job->filename, METADATA_CLASS,
got_metadata, job);
return;
- }
gchar *name = g_path_get_basename(fullname);
@@ -1236,9 +1228,6 @@
if (!rs_conf_get_string(CONF_LWD))
load_recursive = FALSE;
- /* Block the priority count */
- g_signal_handler_block(store->store, store->counthandler);
-
/* 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);
@@ -2424,26 +2413,6 @@
GtkTreeIter iter;
GtkTreePath *treepath;
- /* unblock the priority count */
- if (job->last_icon)
- {
- gdk_threads_enter();
- g_signal_handler_unblock(job->store->store,
job->store->counthandler);
-
- /* count'em by sending a "row-changed"-signal */
- treepath = gtk_tree_path_new_first();
- if (gtk_tree_model_get_iter(GTK_TREE_MODEL(job->store->store),
&iter, treepath))
- g_signal_emit_by_name(job->store->store, "row-changed",
treepath, &iter);
- gtk_tree_path_free(treepath);
-
- g_free(job->filename);
- g_object_unref(job->store);
- g_free(job);
- GTK_CATCHUP();
- gdk_threads_leave();
-
- return;
- }
pixbuf = rs_metadata_get_thumbnail(metadata);
if (pixbuf==NULL)
Modified: trunk/src/rs-store.h
===================================================================
--- trunk/src/rs-store.h 2010-04-01 14:31:12 UTC (rev 3290)
+++ trunk/src/rs-store.h 2010-04-01 14:41:20 UTC (rev 3291)
@@ -222,7 +222,6 @@
/**
* Add a single image to the image store.
- * Add an image with NULL as filename to update the iconview
* @param store A RSStore
* @param fullname Full filename including path to the file.
*/
_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit