Mercurial > geeqie
comparison src/remote.c @ 1467:2b95dbb20a87
added "load config" command to remote control
author | nadvornik |
---|---|
date | Fri, 20 Mar 2009 16:28:43 +0000 |
parents | a005287bffc7 |
children | f43e4ee8fb2d |
comparison
equal
deleted
inserted
replaced
1466:6e020d3ab168 | 1467:2b95dbb20a87 |
---|---|
20 #include "layout.h" | 20 #include "layout.h" |
21 #include "layout_image.h" | 21 #include "layout_image.h" |
22 #include "misc.h" | 22 #include "misc.h" |
23 #include "slideshow.h" | 23 #include "slideshow.h" |
24 #include "ui_fileops.h" | 24 #include "ui_fileops.h" |
25 #include "rcfile.h" | |
25 | 26 |
26 #include <sys/socket.h> | 27 #include <sys/socket.h> |
27 #include <sys/un.h> | 28 #include <sys/un.h> |
28 #include <signal.h> | 29 #include <signal.h> |
29 #include <errno.h> | 30 #include <errno.h> |
488 } | 489 } |
489 } | 490 } |
490 else if (isdir(filename)) | 491 else if (isdir(filename)) |
491 { | 492 { |
492 layout_set_path(NULL, filename); | 493 layout_set_path(NULL, filename); |
494 } | |
495 else | |
496 { | |
497 log_printf("remote sent filename that does not exist:\"%s\"\n", filename); | |
498 } | |
499 | |
500 g_free(filename); | |
501 } | |
502 | |
503 static void gr_config_load(const gchar *text, gpointer data) | |
504 { | |
505 gchar *filename = expand_tilde(text); | |
506 | |
507 if (isfile(filename)) | |
508 { | |
509 load_options_from(filename, options, FALSE); | |
493 } | 510 } |
494 else | 511 else |
495 { | 512 { |
496 log_printf("remote sent filename that does not exist:\"%s\"\n", filename); | 513 log_printf("remote sent filename that does not exist:\"%s\"\n", filename); |
497 } | 514 } |
583 { "-sr","--slideshow-recurse", gr_slideshow_start_rec, TRUE, FALSE, N_("start recursive slide show") }, | 600 { "-sr","--slideshow-recurse", gr_slideshow_start_rec, TRUE, FALSE, N_("start recursive slide show") }, |
584 { "-d", "--delay=", gr_slideshow_delay, TRUE, FALSE, N_("set slide show delay in seconds") }, | 601 { "-d", "--delay=", gr_slideshow_delay, TRUE, FALSE, N_("set slide show delay in seconds") }, |
585 { "+t", "--tools-show", gr_tools_show, FALSE, TRUE, N_("show tools") }, | 602 { "+t", "--tools-show", gr_tools_show, FALSE, TRUE, N_("show tools") }, |
586 { "-t", "--tools-hide", gr_tools_hide, FALSE, TRUE, N_("hide tools") }, | 603 { "-t", "--tools-hide", gr_tools_hide, FALSE, TRUE, N_("hide tools") }, |
587 { "-q", "--quit", gr_quit, FALSE, FALSE, N_("quit") }, | 604 { "-q", "--quit", gr_quit, FALSE, FALSE, N_("quit") }, |
605 { "-cl","--config-load", gr_config_load, TRUE, FALSE, N_("load config file") }, | |
588 { NULL, "file:", gr_file_load, TRUE, FALSE, N_("open file") }, | 606 { NULL, "file:", gr_file_load, TRUE, FALSE, N_("open file") }, |
589 { NULL, "view:", gr_file_view, TRUE, FALSE, N_("open file in new window") }, | 607 { NULL, "view:", gr_file_view, TRUE, FALSE, N_("open file in new window") }, |
590 { NULL, "--list-clear", gr_list_clear, FALSE, FALSE, NULL }, | 608 { NULL, "--list-clear", gr_list_clear, FALSE, FALSE, NULL }, |
591 { NULL, "--list-add:", gr_list_add, TRUE, FALSE, NULL }, | 609 { NULL, "--list-add:", gr_list_add, TRUE, FALSE, NULL }, |
592 { NULL, "raise", gr_raise, FALSE, FALSE, NULL }, | 610 { NULL, "raise", gr_raise, FALSE, FALSE, NULL }, |