Author: akv
Date: 2011-01-09 23:39:18 +0100 (Sun, 09 Jan 2011)
New Revision: 3793

Modified:
   trunk/src/gtk-interface.c
Log:
Make Rawstudio remember if tagsearch were the last used and use the same search.

Modified: trunk/src/gtk-interface.c
===================================================================
--- trunk/src/gtk-interface.c   2011-01-08 23:12:10 UTC (rev 3792)
+++ trunk/src/gtk-interface.c   2011-01-09 22:39:18 UTC (rev 3793)
@@ -1561,22 +1561,36 @@
        }
        else
        {
-               gchar *lwd;
+               gchar *lwd, *tags;
                lwd = rs_conf_get_string(CONF_LWD);
-               if (!lwd)
+               tags = rs_conf_get_string(CONF_LIBRARY_TAG_SEARCH);
+
+               if (tags && !lwd)
+               {
+                       rs_library_set_tag_search(tags);
+                       g_free(tags);
+               }
+               else if (lwd)
+               {
+                       rs_window_set_title(lwd);
+                       rs_open_directory_delayed(rs, lwd);
+                       
rs_dir_selector_expand_path(RS_DIR_SELECTOR(dir_selector), lwd);
+                       g_free(lwd);
+               }
+               else
+               {
                        lwd = g_get_current_dir();
+                       rs_window_set_title(lwd);
+                       rs_open_directory_delayed(rs, lwd);
+                       
rs_dir_selector_expand_path(RS_DIR_SELECTOR(dir_selector), lwd);
+                       g_free(lwd);
+               }
 
                gint last_priority_page = 0;
                if (!rs_conf_get_integer(CONF_LAST_PRIORITY_PAGE, 
&last_priority_page))
                        rs_conf_set_integer(CONF_LAST_PRIORITY_PAGE, 0);
                rs_store_set_current_page(rs->store, last_priority_page);
 
-               rs_window_set_title(lwd);
-               rs_open_directory_delayed(rs, lwd);
-               
-               rs_dir_selector_expand_path(RS_DIR_SELECTOR(dir_selector), lwd);
-
-               g_free(lwd);
        }
        /* Construct this to load dcp profiles early */
        RSProfileFactory *factory = rs_profile_factory_new_default();


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

Reply via email to