2005-11-08 [wwp] 1.9.100cvs1
authorTristan Chabredier <wwp@claws-mail.org>
Tue, 8 Nov 2005 15:07:53 +0000 (15:07 +0000)
committerTristan Chabredier <wwp@claws-mail.org>
Tue, 8 Nov 2005 15:07:53 +0000 (15:07 +0000)
* src/main.c
allow exiting Sylpheed-Claws from command-line

ChangeLog
PATCHSETS
configure.ac
src/main.c

index 048eff5..9fd90e1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-11-08 [wwp]       1.9.100cvs1
+
+       * src/main.c
+               allow exiting Sylpheed-Claws from command-line
+
 2005-11-08 [paul]      1.9.100
 
        1.9.100 released
index 73c950e..fbe8dd7 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.6.10.5 -r 1.6.10.6 src/mutt.c;  cvs diff -u -r 1.6.2.4 -r 1.6.2.5 src/pine.c;  ) > 1.9.99cvs15.patchset
 ( cvs diff -u -r 1.17.2.21 -r 1.17.2.22 src/send_message.c;  ) > 1.9.99cvs16.patchset
 ( cvs diff -u -r 1.13.2.3 -r 1.13.2.4 src/addritem.c;  cvs diff -u -r 1.12.2.5 -r 1.12.2.6 src/ldif.c;  ) > 1.9.99cvs17.patchset
+( cvs diff -u -r 1.115.2.65 -r 1.115.2.66 src/main.c;  ) > 1.9.100cvs1.patchset
index 4eb2db5..a91d643 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=100
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=0
+EXTRA_VERSION=1
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index a778dea..3b35b58 100644 (file)
@@ -138,6 +138,7 @@ static struct RemoteCmd {
        gboolean crash;
        int online_mode;
        gchar   *crash_params;
+       gboolean exit;
 } cmd;
 
 static void parse_cmd_opt(int argc, char *argv[]);
@@ -722,6 +723,7 @@ static void parse_cmd_opt(int argc, char *argv[])
                               "                         show the status of each folder"));
                        g_print("%s\n", _("  --online               switch to online mode"));
                        g_print("%s\n", _("  --offline              switch to offline mode"));
+                       g_print("%s\n", _("  --exit                 exit Sylpheed-Claws"));
                        g_print("%s\n", _("  --debug                debug mode"));
                        g_print("%s\n", _("  --help                 display this help and exit"));
                        g_print("%s\n", _("  --version              output version information and exit"));
@@ -736,6 +738,8 @@ static void parse_cmd_opt(int argc, char *argv[])
                } else if (!strncmp(argv[i], "--config-dir", sizeof "--config-dir" - 1)) {
                        puts(RC_DIR);
                        exit(0);
+               } else if (!strncmp(argv[i], "--exit", 6)) {
+                       cmd.exit = TRUE;
                }
                
        }
@@ -969,6 +973,8 @@ static gint prohibit_duplicate_launch(void)
                        if (!strncmp(buf, ".\n", 2)) break;
                        fputs(buf, stdout);
                }
+       } else if (cmd.exit) {
+               fd_write_all(uxsock, "exit\n", 5);
        } else
                fd_write_all(uxsock, "popup\n", 6);
 
@@ -1067,6 +1073,8 @@ static void lock_socket_input_cb(gpointer data,
                fd_write_all(sock, ".\n", 2);
                g_free(status);
                if (folders) g_ptr_array_free(folders, TRUE);
+       } else if (!strncmp(buf, "exit", 4)) {
+               app_will_exit(NULL, mainwin);
        }
 
        fd_close(sock);