Author: post
Date: 2010-08-24 20:08:25 +0200 (Tue, 24 Aug 2010)
New Revision: 3507
Modified:
trunk/src/gtk-interface.c
trunk/src/rs-store.c
trunk/src/rs-store.h
Log:
Add parameter, to indicate whether existing files should become de-selected.
Modified: trunk/src/gtk-interface.c
===================================================================
--- trunk/src/gtk-interface.c 2010-08-24 18:04:33 UTC (rev 3506)
+++ trunk/src/gtk-interface.c 2010-08-24 18:08:25 UTC (rev 3507)
@@ -1000,7 +1000,7 @@
rs_store_remove(rs->store, NULL, NULL);
if (rs_store_load_directory(rs->store, lwd) >= 0)
rs_conf_set_string(CONF_LWD, lwd);
- rs_store_set_selected_name(rs->store, abspath);
+ rs_store_set_selected_name(rs->store, abspath, FALSE);
g_free(lwd);
}
else
Modified: trunk/src/rs-store.c
===================================================================
--- trunk/src/rs-store.c 2010-08-24 18:04:33 UTC (rev 3506)
+++ trunk/src/rs-store.c 2010-08-24 18:08:25 UTC (rev 3507)
@@ -1360,9 +1360,10 @@
* Select a image
* @param store A RSStore
* @param name The filename to select
+ * @param deselect_others Should other images be de-selected.
*/
gboolean
-rs_store_set_selected_name(RSStore *store, const gchar *filename)
+rs_store_set_selected_name(RSStore *store, const gchar *filename, gboolean
deselect_others)
{
gboolean ret = FALSE;
GtkTreePath *path = NULL;
@@ -1370,6 +1371,9 @@
g_return_val_if_fail(RS_IS_STORE(store), FALSE);
g_return_val_if_fail(filename, FALSE);
+ if (deselect_others)
+
gtk_icon_view_unselect_all(GTK_ICON_VIEW(store->current_iconview));
+
tree_find_filename(GTK_TREE_MODEL(store->store), filename, NULL, &path);
if (path)
Modified: trunk/src/rs-store.h
===================================================================
--- trunk/src/rs-store.h 2010-08-24 18:04:33 UTC (rev 3506)
+++ trunk/src/rs-store.h 2010-08-24 18:08:25 UTC (rev 3507)
@@ -80,9 +80,10 @@
* Select one image
* @param store A RSStore
* @param name The filename to select
+ * @param deselect_others Should other images be de-selected.
*/
extern gboolean
-rs_store_set_selected_name(RSStore *store, const gchar *filename);
+rs_store_set_selected_name(RSStore* store, const gchar* filename, gboolean
deselect_others);
/**
* Remove thumbnail(s) from store
_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit