Revision: 1563
          http://geeqie.svn.sourceforge.net/geeqie/?rev=1563&view=rev
Author:   nadvornik
Date:     2009-03-20 16:28:43 +0000 (Fri, 20 Mar 2009)

Log Message:
-----------
added "load config" command to remote control

Modified Paths:
--------------
    trunk/src/remote.c

Modified: trunk/src/remote.c
===================================================================
--- trunk/src/remote.c  2009-03-20 14:36:59 UTC (rev 1562)
+++ trunk/src/remote.c  2009-03-20 16:28:43 UTC (rev 1563)
@@ -22,6 +22,7 @@
 #include "misc.h"
 #include "slideshow.h"
 #include "ui_fileops.h"
+#include "rcfile.h"
 
 #include <sys/socket.h>
 #include <sys/un.h>
@@ -499,6 +500,22 @@
        g_free(filename);
 }
 
+static void gr_config_load(const gchar *text, gpointer data)
+{
+       gchar *filename = expand_tilde(text);
+
+       if (isfile(filename))
+               {
+               load_options_from(filename, options, FALSE);
+               }
+       else
+               {
+               log_printf("remote sent filename that does not exist:\"%s\"\n", 
filename);
+               }
+
+       g_free(filename);
+}
+
 static void gr_file_view(const gchar *text, gpointer data)
 {
        gchar *filename = expand_tilde(text);
@@ -585,6 +602,7 @@
        { "+t", "--tools-show",         gr_tools_show,          FALSE, TRUE,  
N_("show tools") },
        { "-t", "--tools-hide",         gr_tools_hide,          FALSE, TRUE,  
N_("hide tools") },
        { "-q", "--quit",               gr_quit,                FALSE, FALSE, 
N_("quit") },
+       { "-cl","--config-load",        gr_config_load,         TRUE,  FALSE, 
N_("load config file") },
        { NULL, "file:",                gr_file_load,           TRUE,  FALSE, 
N_("open file") },
        { NULL, "view:",                gr_file_view,           TRUE,  FALSE, 
N_("open file in new window") },
        { NULL, "--list-clear",         gr_list_clear,          FALSE, FALSE, 
NULL },


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Geeqie-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geeqie-svn

Reply via email to