From 7265baa01eba83cd4cae5525c05bc9d653476cca Mon Sep 17 00:00:00 2001 From: Paul Mangan Date: Fri, 28 Feb 2003 07:27:13 +0000 Subject: [PATCH] sync with 0.8.10cvs19 --- ChangeLog | 6 ++++++ ChangeLog.claws | 5 +++++ ChangeLog.jp | 6 ++++++ configure.ac | 2 +- src/main.c | 30 +++++++++++++++++++++--------- 5 files changed, 39 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 47884ce96..ad3ee267c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-02-28 + + * src/main.c: main(): remove lock socket if sylpheed is not running + when --status command is executed. + lock_socket_remove(): new. + 2003-02-27 * src/codeconv.c: conv_codeset_strdup(): don't convert if current diff --git a/ChangeLog.claws b/ChangeLog.claws index 4a763ac99..517b367e6 100644 --- a/ChangeLog.claws +++ b/ChangeLog.claws @@ -1,3 +1,8 @@ +2003-02-28 [paul] 0.8.10claws58 + + * sync with 0.8.10cvs19 + see ChangeLog 2003-02-28 + 2003-02-27 [martin] 0.8.10claws57 * src/prefs_matcher.c diff --git a/ChangeLog.jp b/ChangeLog.jp index 2c019b25a..3a62af26b 100644 --- a/ChangeLog.jp +++ b/ChangeLog.jp @@ -1,3 +1,9 @@ +2003-02-28 + + * src/main.c: main(): --status ¥³¥Þ¥ó¥É¤¬¼Â¹Ô¤µ¤ì¤¿»þ¤Ë sylpheed + ¤¬µ¯Æ°¤·¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ï¥í¥Ã¥¯¥½¥±¥Ã¥È¤òºï½ü¡£ + lock_socket_remove(): ¿·µ¬¡£ + 2003-02-27 * src/codeconv.c: conv_codeset_strdup(): ¸½ºß¤Î¥³¡¼¥É¥»¥Ã¥È¤¬ diff --git a/configure.ac b/configure.ac index cf0eedd5a..51fccb0b8 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ MINOR_VERSION=8 MICRO_VERSION=10 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=claws57 +EXTRA_VERSION=claws58 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION dnl set $target diff --git a/src/main.c b/src/main.c index 995905876..a2465c984 100644 --- a/src/main.c +++ b/src/main.c @@ -1,6 +1,6 @@ /* * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client - * Copyright (C) 1999-2002 Hiroyuki Yamamoto + * Copyright (C) 1999-2003 Hiroyuki Yamamoto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -100,8 +100,7 @@ typedef enum ONLINE_MODE_OFFLINE } OnlineMode; - -static struct Cmd { +static struct RemoteCmd { gboolean receive; gboolean receive_all; gboolean compose; @@ -122,6 +121,7 @@ static void idle_function_for_gpgme(void); static gint prohibit_duplicate_launch (void); static gchar * get_crashfile_name (void); +static gint lock_socket_remove (void); static void lock_socket_input_cb (gpointer data, gint source, GdkInputCondition condition); @@ -193,6 +193,7 @@ int main(int argc, char *argv[]) if (cmd.status) { puts("0 Sylpheed not running."); + lock_socket_remove(); return 0; } @@ -586,16 +587,12 @@ void app_will_exit(GtkWidget *widget, gpointer data) close_log_file(); - /* delete unix domain socket */ - gdk_input_remove(lock_socket_tag); - fd_close(lock_socket); - filename = get_socket_name(); - unlink(filename); - /* delete crashfile */ if (!cmd.crash) unlink(get_crashfile_name()); + lock_socket_remove(); + gtk_main_quit(); } @@ -708,6 +705,21 @@ static gint prohibit_duplicate_launch(void) return -1; } +static gint lock_socket_remove(void) +{ + gchar *filename; + + if (lock_socket < 0) return -1; + + if (lock_socket_tag > 0) + gdk_input_remove(lock_socket_tag); + fd_close(lock_socket); + filename = get_socket_name(); + unlink(filename); + + return 0; +} + static void lock_socket_input_cb(gpointer data, gint source, GdkInputCondition condition) -- 2.25.1