sync with 0.8.11cvs24
authorPaul Mangan <paul@claws-mail.org>
Tue, 15 Apr 2003 11:43:13 +0000 (11:43 +0000)
committerPaul Mangan <paul@claws-mail.org>
Tue, 15 Apr 2003 11:43:13 +0000 (11:43 +0000)
ChangeLog
ChangeLog.claws
ChangeLog.jp
configure.ac
src/common/utils.c
src/common/utils.h
src/prefs_actions.c
src/procmsg.c
src/textview.c

index bffd45e6c013962a6a9c6e7a01c9a2ff7606ae68..b5c145df41fce53c22d3f850dd9ac71d949d052d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2003-04-15
+
+       * src/procmsg.c: procmsg_get_filter_keyword(): unfold headers and
+         extract ID from List-Id header.
+       * src/utils.[ch]: extract_one_parenthesis_with_skip_quote(): removed.
+         extract_list_id_str(): extract ID string from List-Id header.
+
+2003-04-15
+
+       * src/prefs_actions.c: merged from the claws branch. Fixes several
+         bugs and adds some features.
+
 2003-04-14
 
        * src/compose.c: compose_parse_header(): fixed a bug that unnecessary
 2003-04-14
 
        * src/compose.c: compose_parse_header(): fixed a bug that unnecessary
index b0b4b5dd5738073b5d87cb7f20c430213857965c..d223380a323c40c87249b4be90563da03ff8a841 100644 (file)
@@ -1,3 +1,8 @@
+2003-04-15 [paul]      0.8.11claws91
+
+       * sync with 0.8.11cvs24
+               see ChangeLog 2003-04-15
+
 2003-04-14 [jens]      0.8.11claws90
 
        * updated German translation and some corrections from
 2003-04-14 [jens]      0.8.11claws90
 
        * updated German translation and some corrections from
index 631de6ca7773ade0724e45a29db2d6e5b251c031..9ba714e65fbc492ef28f440ab32f85fb935058f1 100644 (file)
@@ -1,3 +1,15 @@
+2003-04-15
+
+       * src/procmsg.c: procmsg_get_filter_keyword(): ¥Ø¥Ã¥À¤Î²þ¹Ô¤ò½üµî¤·¡¢
+         List-Id ¥Ø¥Ã¥À¤«¤é ID ¤òÃê½Ð¤¹¤ë¤è¤¦¤Ë¤·¤¿¡£
+       * src/utils.[ch]: extract_one_parenthesis_with_skip_quote(): ºï½ü¡£
+         extract_list_id_str(): List-Id ¥Ø¥Ã¥À¤«¤é ID Ê¸»úÎó¤òÃê½Ð¡£
+
+2003-04-15
+
+       * src/prefs_actions.c: claws ¥Ö¥é¥ó¥Á¤«¤é¥Þ¡¼¥¸¡£¤¤¤¯¤Ä¤«¤Î¥Ð¥°½¤Àµ
+         ¤Èµ¡Ç½Äɲá£
+
 2003-04-14
 
        * src/compose.c: compose_parse_header(): ºÆÊÔ½¸»þ¤ËÉÔÍפʲþ¹Ô¤¬´Þ¤Þ
 2003-04-14
 
        * src/compose.c: compose_parse_header(): ºÆÊÔ½¸»þ¤ËÉÔÍפʲþ¹Ô¤¬´Þ¤Þ
index 2784a38d9aeeb996d622269f3515aa49746a0ffe..955ec49cb9e36f3eb9da9b264a63fb7b1667d7ef 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 MICRO_VERSION=11
 INTERFACE_AGE=0
 BINARY_AGE=0
 MICRO_VERSION=11
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws90
+EXTRA_VERSION=claws91
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index a919d30c6847872c0d73e320f587df155ed1a88d..462e857e5b751c55634ee89a613f26899a95057f 100644 (file)
@@ -668,35 +668,6 @@ void extract_parenthesis(gchar *str, gchar op, gchar cl)
        *destp = '\0';
 }
 
        *destp = '\0';
 }
 
-void extract_one_parenthesis_with_skip_quote(gchar *str, gchar quote_chr,
-                                            gchar op, gchar cl)
-{
-       register gchar *srcp, *destp;
-       gint in_brace;
-       gboolean in_quote = FALSE;
-
-       srcp = destp = str;
-
-       if ((srcp = strchr_with_skip_quote(destp, quote_chr, op))) {
-               memmove(destp, srcp + 1, strlen(srcp));
-               in_brace = 1;
-               while(*destp) {
-                       if (*destp == op && !in_quote)
-                               in_brace++;
-                       else if (*destp == cl && !in_quote)
-                               in_brace--;
-                       else if (*destp == quote_chr)
-                               in_quote ^= TRUE;
-
-                       if (in_brace == 0)
-                               break;
-
-                       destp++;
-               }
-       }
-       *destp = '\0';
-}
-
 void extract_parenthesis_with_skip_quote(gchar *str, gchar quote_chr,
                                         gchar op, gchar cl)
 {
 void extract_parenthesis_with_skip_quote(gchar *str, gchar quote_chr,
                                         gchar op, gchar cl)
 {
@@ -844,6 +815,13 @@ void extract_address(gchar *str)
        g_strstrip(str);
 }
 
        g_strstrip(str);
 }
 
+void extract_list_id_str(gchar *str)
+{
+       if (strchr_with_skip_quote(str, '"', '<'))
+               extract_parenthesis_with_skip_quote(str, '"', '<', '>');
+       g_strstrip(str);
+}
+
 static GSList *address_list_append_real(GSList *addr_list, const gchar *str, gboolean removecomments)
 {
        gchar *work;
 static GSList *address_list_append_real(GSList *addr_list, const gchar *str, gboolean removecomments)
 {
        gchar *work;
index f88a86ed7a7b5e2d6dd1b23298dab24834a1bc84..95c6c717f3d1648252edc4f6ff5051555ef36d73 100644 (file)
@@ -232,10 +232,6 @@ void extract_parenthesis           (gchar          *str,
                                         gchar           op,
                                         gchar           cl);
 
                                         gchar           op,
                                         gchar           cl);
 
-void extract_one_parenthesis_with_skip_quote   (gchar          *str,
-                                                gchar           quote_chr,
-                                                gchar           op,
-                                                gchar           cl);
 void extract_parenthesis_with_skip_quote       (gchar          *str,
                                                 gchar           quote_chr,
                                                 gchar           op,
 void extract_parenthesis_with_skip_quote       (gchar          *str,
                                                 gchar           quote_chr,
                                                 gchar           op,
@@ -253,6 +249,7 @@ gchar *strrchr_with_skip_quote              (const gchar    *str,
                                         gint            quote_chr,
                                         gint            c);
 void extract_address                   (gchar          *str);
                                         gint            quote_chr,
                                         gint            c);
 void extract_address                   (gchar          *str);
+void extract_list_id_str               (gchar          *str);
 
 GSList *slist_concat_unique            (GSList         *first,
                                         GSList         *second);
 
 GSList *slist_concat_unique            (GSList         *first,
                                         GSList         *second);
index d19d390babfca885712c59ecb2f774d2738ded75..bb025dd8087457b7bc50e8c0808b1511f40af164 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
 /*
  * 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
  *
  * 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
@@ -63,7 +63,7 @@ typedef enum
        ACTION_ASYNC            = 1 << 5,
        ACTION_USER_IN          = 1 << 6,
        ACTION_USER_HIDDEN_IN   = 1 << 7,
        ACTION_ASYNC            = 1 << 5,
        ACTION_USER_IN          = 1 << 6,
        ACTION_USER_HIDDEN_IN   = 1 << 7,
-       ACTION_INSERT           = 1 << 8,
+       ACTION_INSERT           = 1 << 8,
        ACTION_USER_STR         = 1 << 9,
        ACTION_USER_HIDDEN_STR  = 1 << 10,
        ACTION_SELECTION_STR    = 1 << 11,
        ACTION_USER_STR         = 1 << 9,
        ACTION_USER_HIDDEN_STR  = 1 << 10,
        ACTION_SELECTION_STR    = 1 << 11,
@@ -123,7 +123,8 @@ struct _ChildInfo
        GdkFont         *msgfont;
 };
 
        GdkFont         *msgfont;
 };
 
-struct _UserStringDialog {
+struct _UserStringDialog
+{
        GtkWidget       *dialog;
        GtkWidget       *entry;
        gchar           *user_str;
        GtkWidget       *dialog;
        GtkWidget       *entry;
        gchar           *user_str;
@@ -174,18 +175,18 @@ static void compose_actions_execute_cb    (Compose        *compose,
 static void mainwin_actions_execute_cb         (MainWindow     *mainwin,
                                         guint           action_nb,
                                         GtkWidget      *widget);
 static void mainwin_actions_execute_cb         (MainWindow     *mainwin,
                                         guint           action_nb,
                                         GtkWidget      *widget);
-static void msgview_actions_execute_cb (MessageView    *msgview, 
+static void msgview_actions_execute_cb (MessageView    *msgview,
                                         guint           action_nb,
                                         guint           action_nb,
-                                        GtkWidget      *widget);
+                                        GtkWidget      *widget);
 static void message_actions_execute    (MessageView    *msgview,
                                         guint           action_nb,
 static void message_actions_execute    (MessageView    *msgview,
                                         guint           action_nb,
-                                        GtkCTree       *ctree);
+                                        GtkCTree       *ctree);
 static guint get_action_type           (gchar          *action);
 
 static gboolean execute_actions                (gchar          *action, 
                                         GtkCTree       *ctree, 
                                         GtkWidget      *text,
 static guint get_action_type           (gchar          *action);
 
 static gboolean execute_actions                (gchar          *action, 
                                         GtkCTree       *ctree, 
                                         GtkWidget      *text,
-                                        GdkFont        *msgfont,
+                                        GdkFont        *msgfont,
                                         gint            body_pos,
                                         MimeView       *mimeview);
 
                                         gint            body_pos,
                                         MimeView       *mimeview);
 
@@ -193,9 +194,9 @@ static gchar *parse_action_cmd              (gchar          *action,
                                         MsgInfo        *msginfo,
                                         GtkCTree       *ctree,
                                         MimeView       *mimeview,
                                         MsgInfo        *msginfo,
                                         GtkCTree       *ctree,
                                         MimeView       *mimeview,
-                                        const gchar    *user_str,
-                                        const gchar    *user_hidden_str,
-                                        const gchar    *sel_str);
+                                        const gchar    *user_str,
+                                        const gchar    *user_hidden_str,
+                                        const gchar    *sel_str);
 static gboolean parse_append_filename  (GString        **cmd,
                                         MsgInfo        *msginfo);
 
 static gboolean parse_append_filename  (GString        **cmd,
                                         MsgInfo        *msginfo);
 
@@ -206,8 +207,8 @@ static gboolean parse_append_msgpart        (GString        **cmd,
 ChildInfo *fork_child                  (gchar          *cmd,
                                         gint            action_type,
                                         GtkWidget      *text,
 ChildInfo *fork_child                  (gchar          *cmd,
                                         gint            action_type,
                                         GtkWidget      *text,
-                                        GdkFont        *msgfont,
-                                        gint            body_pos,
+                                        GdkFont        *msgfont,
+                                        gint            body_pos,
                                         Children       *children);
 
 static gint wait_for_children          (gpointer        data);
                                         Children       *children);
 
 static gint wait_for_children          (gpointer        data);
@@ -224,6 +225,7 @@ static void hide_io_dialog_cb               (GtkWidget      *widget,
 static gint io_dialog_key_pressed_cb   (GtkWidget      *widget,
                                         GdkEventKey    *event,
                                         gpointer        data);
 static gint io_dialog_key_pressed_cb   (GtkWidget      *widget,
                                         GdkEventKey    *event,
                                         gpointer        data);
+
 static void catch_output               (gpointer                data,
                                         gint                    source,
                                         GdkInputCondition       cond);
 static void catch_output               (gpointer                data,
                                         gint                    source,
                                         GdkInputCondition       cond);
@@ -235,27 +237,22 @@ static void catch_status          (gpointer                data,
                                         GdkInputCondition       cond);
 
 static gboolean user_string_dialog_delete_cb
                                         GdkInputCondition       cond);
 
 static gboolean user_string_dialog_delete_cb
-                                       (GtkWidget              *widget,
-                                        GdkEvent               *event,
-                                        gpointer                data);
+                                       (GtkWidget      *widget,
+                                        GdkEvent       *event,
+                                        gpointer        data);
 static void user_string_dialog_destroy_cb
 static void user_string_dialog_destroy_cb
-                                       (GtkWidget              *widget,
-                                        gpointer                data);
-
-
+                                       (GtkWidget      *widget,
+                                        gpointer        data);
 static void user_string_dialog_activate_cb
 static void user_string_dialog_activate_cb
-                                       (GtkWidget              *widget,
-                                        gpointer                data);
+                                       (GtkWidget      *widget,
+                                        gpointer        data);
+
+static gchar *get_user_string          (const gchar    *action,
+                                        ActionType      type);
 
 
-static gchar *get_user_string          (const gchar            *action,
-                                        ActionType              type);
 
 void prefs_actions_open(MainWindow *mainwin)
 {
 
 void prefs_actions_open(MainWindow *mainwin)
 {
-#if 0
-       if (prefs_rc_is_readonly(ACTIONS_RC))
-               return;
-#endif
        inc_lock();
 
        if (!actions.window)
        inc_lock();
 
        if (!actions.window)
@@ -385,7 +382,7 @@ static void prefs_actions_create(MainWindow *mainwin)
        gtk_signal_connect(GTK_OBJECT(reg_btn), "clicked",
                           GTK_SIGNAL_FUNC(prefs_actions_register_cb), NULL);
 
        gtk_signal_connect(GTK_OBJECT(reg_btn), "clicked",
                           GTK_SIGNAL_FUNC(prefs_actions_register_cb), NULL);
 
-       subst_btn = gtk_button_new_with_label(_("  Replace  "));
+       subst_btn = gtk_button_new_with_label(_(" Replace "));
        gtk_widget_show(subst_btn);
        gtk_box_pack_start(GTK_BOX(btn_hbox), subst_btn, FALSE, TRUE, 0);
        gtk_signal_connect(GTK_OBJECT(subst_btn), "clicked",
        gtk_widget_show(subst_btn);
        gtk_box_pack_start(GTK_BOX(btn_hbox), subst_btn, FALSE, TRUE, 0);
        gtk_signal_connect(GTK_OBJECT(subst_btn), "clicked",
@@ -597,7 +594,7 @@ static guint get_action_type(gchar *action)
 
 static gchar *parse_action_cmd(gchar *action, MsgInfo *msginfo,
                               GtkCTree *ctree, MimeView *mimeview,
 
 static gchar *parse_action_cmd(gchar *action, MsgInfo *msginfo,
                               GtkCTree *ctree, MimeView *mimeview,
-                              const gchar *user_str, 
+                              const gchar *user_str,
                               const gchar *user_hidden_str,
                               const gchar *sel_str)
 {
                               const gchar *user_hidden_str,
                               const gchar *sel_str)
 {
@@ -636,7 +633,6 @@ static gchar *parse_action_cmd(gchar *action, MsgInfo *msginfo,
                                        if (cur->next)
                                                cmd = g_string_append_c(cmd, ' ');
                                }
                                        if (cur->next)
                                                cmd = g_string_append_c(cmd, ' ');
                                }
-
                                p++;
                                break;
                        case 'p':
                                p++;
                                break;
                        case 'p':
@@ -652,7 +648,6 @@ static gchar *parse_action_cmd(gchar *action, MsgInfo *msginfo,
                                        cmd = g_string_append(cmd, sel_str);
                                p++;
                                break;
                                        cmd = g_string_append(cmd, sel_str);
                                p++;
                                break;
-
                        case 'u':
                                if (user_str)
                                        cmd = g_string_append(cmd, user_str);
                        case 'u':
                                if (user_str)
                                        cmd = g_string_append(cmd, user_str);
@@ -664,7 +659,6 @@ static gchar *parse_action_cmd(gchar *action, MsgInfo *msginfo,
                                                              user_hidden_str);
                                p++;
                                break;
                                                              user_hidden_str);
                                p++;
                                break;
-
                        default:
                                cmd = g_string_append_c(cmd, p[0]);
                                cmd = g_string_append_c(cmd, p[1]);
                        default:
                                cmd = g_string_append_c(cmd, p[0]);
                                cmd = g_string_append_c(cmd, p[1]);
@@ -698,7 +692,7 @@ static gboolean parse_append_filename(GString **cmd, MsgInfo *msginfo)
                g_free(filename);
        } else {
                alertpanel_error(_("Could not get message file %d"),
                g_free(filename);
        } else {
                alertpanel_error(_("Could not get message file %d"),
-                               msginfo->msgnum);
+                                msginfo->msgnum);
                return FALSE;
        }
 
                return FALSE;
        }
 
@@ -1148,19 +1142,18 @@ static void msgview_actions_execute_cb(MessageView *msgview, guint action_nb,
                                       GtkWidget *widget)
 {
        message_actions_execute(msgview, action_nb, NULL);
                                       GtkWidget *widget)
 {
        message_actions_execute(msgview, action_nb, NULL);
-       
 }
 
 static void message_actions_execute(MessageView *msgview, guint action_nb,
                                    GtkCTree *ctree)
 {
 }
 
 static void message_actions_execute(MessageView *msgview, guint action_nb,
                                    GtkCTree *ctree)
 {
-       TextView    *textview = NULL;
-       gchar       *buf,
-                   *action;
-       MimeView    *mimeview = NULL;
-       GdkFont     *msgfont  = NULL;
-       guint        body_pos = 0;
-       GtkWidget   *text     = NULL;
+       TextView *textview = NULL;
+       MimeView *mimeview = NULL;
+       gchar *buf;
+       gchar *action;
+       GtkWidget *text = NULL;
+       GdkFont *msgfont = NULL;
+       guint body_pos = 0;
 
        g_return_if_fail(action_nb < g_slist_length(prefs_common.actions_list));
 
 
        g_return_if_fail(action_nb < g_slist_length(prefs_common.actions_list));
 
@@ -1184,7 +1177,7 @@ static void message_actions_execute(MessageView *msgview, guint action_nb,
                            msgview->mimeview->textview &&
                            msgview->mimeview->textview->text)
                                textview = msgview->mimeview->textview;
                            msgview->mimeview->textview &&
                            msgview->mimeview->textview->text)
                                textview = msgview->mimeview->textview;
-               } 
+               }
                break;
        }
 
                break;
        }
 
@@ -1193,16 +1186,13 @@ static void message_actions_execute(MessageView *msgview, guint action_nb,
                msgfont  = textview->msgfont;
                body_pos = textview->body_pos;
        }
                msgfont  = textview->msgfont;
                body_pos = textview->body_pos;
        }
-       
+
        execute_actions(action, ctree, text, msgfont, body_pos, mimeview);
 }
 
        execute_actions(action, ctree, text, msgfont, body_pos, mimeview);
 }
 
-static gboolean execute_actions(gchar    *action, 
-                               GtkCTree  *ctree,
-                               GtkWidget *text, 
-                               GdkFont   *msgfont,
-                               gint       body_pos,
-                               MimeView  *mimeview)
+static gboolean execute_actions(gchar *action, GtkCTree *ctree,
+                               GtkWidget *text, GdkFont *msgfont,
+                               gint body_pos, MimeView *mimeview)
 {
        GList *cur, *selection = NULL;
        GSList *children_list = NULL;
 {
        GList *cur, *selection = NULL;
        GSList *children_list = NULL;
@@ -1239,7 +1229,7 @@ static gboolean execute_actions(gchar       *action,
                if (!text)
                        return FALSE; /* ERR: pipe and no displayed text */
        }
                if (!text)
                        return FALSE; /* ERR: pipe and no displayed text */
        }
-       
+
        if (action_type & ACTION_SELECTION_STR) {
                if (!text)
                        return FALSE; /* ERR: selection string but no text */
        if (action_type & ACTION_SELECTION_STR) {
                if (!text)
                        return FALSE; /* ERR: selection string but no text */
@@ -1256,21 +1246,19 @@ static gboolean execute_actions(gchar     *action,
                                }
                        }
                        sel_str = gtk_editable_get_chars(GTK_EDITABLE(text),
                                }
                        }
                        sel_str = gtk_editable_get_chars(GTK_EDITABLE(text),
-                                       start, end);
+                                                        start, end);
                }
                }
-                       
        }
        }
-       
 
        if (action_type & (ACTION_USER_STR))
                if (!(user_str = get_user_string(action, ACTION_USER_STR)))
                        return FALSE;
 
        if (action_type & (ACTION_USER_STR))
                if (!(user_str = get_user_string(action, ACTION_USER_STR)))
                        return FALSE;
-                               
+
        if (action_type & (ACTION_USER_HIDDEN_STR))
        if (action_type & (ACTION_USER_HIDDEN_STR))
-               if (!(user_hidden_str = get_user_string(action,
-                                                 ACTION_USER_HIDDEN_STR)))
+               if (!(user_hidden_str =
+                       get_user_string(action, ACTION_USER_HIDDEN_STR)))
                        return FALSE;
                        return FALSE;
-               
+
        children = g_new0(Children, 1);
 
        if (action_type & ACTION_SINGLE) {
        children = g_new0(Children, 1);
 
        if (action_type & ACTION_SINGLE) {
@@ -1282,7 +1270,7 @@ static gboolean execute_actions(gchar       *action,
                                break;
                        }
                        cmd = parse_action_cmd(action, msginfo, ctree,
                                break;
                        }
                        cmd = parse_action_cmd(action, msginfo, ctree,
-                                              mimeview, user_str, 
+                                              mimeview, user_str,
                                               user_hidden_str, sel_str);
                        if (!cmd) {
                                debug_print("Action command error\n");
                                               user_hidden_str, sel_str);
                        if (!cmd) {
                                debug_print("Action command error\n");
@@ -1319,10 +1307,8 @@ static gboolean execute_actions(gchar      *action,
                        is_ok  = FALSE;         /* ERR: incorrect command */
        }
 
                        is_ok  = FALSE;         /* ERR: incorrect command */
        }
 
-       if (user_str)
-               g_free(user_str);
-       if (user_hidden_str)
-               g_free(user_hidden_str);
+       g_free(user_str);
+       g_free(user_hidden_str);
 
        if (!children_list) {
                 /* If not waiting for children, return */
 
        if (!children_list) {
                 /* If not waiting for children, return */
@@ -1434,7 +1420,7 @@ ChildInfo *fork_child(gchar *cmd, gint action_type, GtkWidget *text,
                                write(chld_status[1], "1\n", 2);
                        perror("fork");
                        _exit(1);
                                write(chld_status[1], "1\n", 2);
                        perror("fork");
                        _exit(1);
-               } else {/* Child */
+               } else { /* Child */
                        if (sync) {
                                close(chld_in[0]);
                                close(chld_in[1]);
                        if (sync) {
                                close(chld_in[0]);
                                close(chld_in[1]);
@@ -1624,13 +1610,12 @@ static void hide_io_dialog_cb(GtkWidget *w, gpointer data)
        }
 }
 
        }
 }
 
-static gint io_dialog_key_pressed_cb(GtkWidget *widget,
-                                    GdkEventKey        *event,
-                                    gpointer    data)
+static gint io_dialog_key_pressed_cb(GtkWidget *widget, GdkEventKey *event,
+                                    gpointer data)
 {
        if (event && event->keyval == GDK_Escape)
                hide_io_dialog_cb(widget, data);
 {
        if (event && event->keyval == GDK_Escape)
                hide_io_dialog_cb(widget, data);
-       return TRUE;    
+       return TRUE;
 }
 
 static void childinfo_close_pipes(ChildInfo *child_info)
 }
 
 static void childinfo_close_pipes(ChildInfo *child_info)
@@ -1678,9 +1663,9 @@ static void update_io_dialog(Children *children)
                if (children->input_hbox)
                        gtk_widget_set_sensitive(children->input_hbox, FALSE);
                gtk_widget_grab_focus(children->close_btn);
                if (children->input_hbox)
                        gtk_widget_set_sensitive(children->input_hbox, FALSE);
                gtk_widget_grab_focus(children->close_btn);
-               gtk_signal_connect(GTK_OBJECT(children->dialog), 
+               gtk_signal_connect(GTK_OBJECT(children->dialog),
                                   "key_press_event",
                                   "key_press_event",
-                                  GTK_SIGNAL_FUNC(io_dialog_key_pressed_cb),
+                                  GTK_SIGNAL_FUNC(io_dialog_key_pressed_cb),
                                   children);
        }
 
                                   children);
        }
 
@@ -1853,12 +1838,11 @@ static void catch_input(gpointer data, gint source, GdkInputCondition cond)
                                       0, -1);
        len = strlen(input);
        count = 0;
                                       0, -1);
        len = strlen(input);
        count = 0;
-       
+
        do {
                c = write(child_info->chld_in, input + count, len - count);
                if (c >= 0)
                        count += c;
        do {
                c = write(child_info->chld_in, input + count, len - count);
                if (c >= 0)
                        count += c;
-
        } while (c >= 0 && count < len);
 
        if (c >= 0)
        } while (c >= 0 && count < len);
 
        if (c >= 0)
@@ -1914,9 +1898,8 @@ static void catch_output(gpointer data, gint source, GdkInputCondition cond)
        wait_for_children(child_info->children);
 }
 
        wait_for_children(child_info->children);
 }
 
-static gboolean user_string_dialog_delete_cb(GtkWidget *widget,
-                                            GdkEvent   *event,
-                                            gpointer    data)
+static gboolean user_string_dialog_delete_cb(GtkWidget *widget,
+                                            GdkEvent *event, gpointer data)
 {
        return FALSE;
 }
 {
        return FALSE;
 }
@@ -1929,66 +1912,66 @@ static void user_string_dialog_destroy_cb(GtkWidget *widget, gpointer data)
 static void user_string_dialog_activate_cb(GtkWidget *widget, gpointer data)
 {
        UserStringDialog *user_dialog = (UserStringDialog *) data;
 static void user_string_dialog_activate_cb(GtkWidget *widget, gpointer data)
 {
        UserStringDialog *user_dialog = (UserStringDialog *) data;
-       if (user_dialog->user_str)
-               g_free(user_dialog->user_str);
+
+       g_free(user_dialog->user_str);
        user_dialog->user_str =
                gtk_editable_get_chars(GTK_EDITABLE(user_dialog->entry), 0, -1);
        gtk_widget_destroy(user_dialog->dialog);
 }
 
        user_dialog->user_str =
                gtk_editable_get_chars(GTK_EDITABLE(user_dialog->entry), 0, -1);
        gtk_widget_destroy(user_dialog->dialog);
 }
 
-static gchar *get_user_string(const gchar *action, ActionType type )
+static gchar *get_user_string(const gchar *action, ActionType type)
 {
 {
-       GtkWidget       *dialog;
-       GtkWidget       *label;
-       GtkWidget       *entry;
-       GtkWidget       *ok_button;
-       GtkWidget       *cancel_button;
-       gchar           *label_text;
+       GtkWidget *dialog;
+       GtkWidget *label;
+       GtkWidget *entry;
+       GtkWidget *ok_button;
+       GtkWidget *cancel_button;
+       gchar *label_text;
        UserStringDialog user_dialog;
        UserStringDialog user_dialog;
-       
+
        dialog = gtk_dialog_new();
        gtk_window_set_policy(GTK_WINDOW(dialog), FALSE, FALSE, FALSE);
        dialog = gtk_dialog_new();
        gtk_window_set_policy(GTK_WINDOW(dialog), FALSE, FALSE, FALSE);
-       gtk_container_set_border_width(
-                       GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), 8);
-       gtk_container_set_border_width(
-                       GTK_CONTAINER(GTK_DIALOG(dialog)->action_area), 5);
+       gtk_container_set_border_width
+               (GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), 8);
+       gtk_container_set_border_width
+               (GTK_CONTAINER(GTK_DIALOG(dialog)->action_area), 5);
        gtk_window_position(GTK_WINDOW(dialog), GTK_WIN_POS_CENTER);
 
        switch (type) {
        gtk_window_position(GTK_WINDOW(dialog), GTK_WIN_POS_CENTER);
 
        switch (type) {
-               case ACTION_USER_HIDDEN_STR:
-                       gtk_window_set_title(GTK_WINDOW(dialog),
-                                       _("Action's user hidden argument"));
-                       label_text = g_strdup_printf(_("Enter the '%%h' " 
-                                               "argument for the following "
-                                               "action:\n%s"), action);
-                       break;
-               case ACTION_USER_STR:
-                       gtk_window_set_title(GTK_WINDOW(dialog),
-                                       _("Action's user argument"));
-                       label_text = g_strdup_printf(_("Enter the '%%u' " 
-                                               "argument for the following "
-                                               "action:\n%s"), action);
-                       break;
-               default:
-                       label_text = NULL;
-                       debug_print("Unsupported action type %d", type);
+       case ACTION_USER_HIDDEN_STR:
+               gtk_window_set_title(GTK_WINDOW(dialog),
+                                    _("Action's hidden user argument"));
+               label_text = g_strdup_printf(_("Enter the '%%h' "
+                                            "argument for the following "
+                                            "action:\n%s"), action);
+               break;
+       case ACTION_USER_STR:
+               gtk_window_set_title(GTK_WINDOW(dialog),
+                                    _("Action's user argument"));
+               label_text = g_strdup_printf(_("Enter the '%%u' "
+                                            "argument for the following "
+                                            "action:\n%s"), action);
+               break;
+       default:
+               label_text = NULL;
+               debug_print("Unsupported action type %d", type);
        }
 
        label = gtk_label_new(label_text);
        g_free(label_text);
        gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), label,
                           TRUE, TRUE, 0);
        }
 
        label = gtk_label_new(label_text);
        g_free(label_text);
        gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), label,
                           TRUE, TRUE, 0);
-       
+
        entry = gtk_entry_new();
        entry = gtk_entry_new();
-       gtk_entry_set_visibility(GTK_ENTRY(entry), 
+       gtk_entry_set_visibility(GTK_ENTRY(entry),
                                 type != ACTION_USER_HIDDEN_STR);
        gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), entry,
                           TRUE, TRUE, 0);
 
                                 type != ACTION_USER_HIDDEN_STR);
        gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), entry,
                           TRUE, TRUE, 0);
 
-       ok_button     = gtk_button_new_with_label(_("OK"));
+       ok_button = gtk_button_new_with_label(_("OK"));
        gtk_box_pack_end(GTK_BOX(GTK_DIALOG(dialog)->action_area),
                         ok_button, TRUE, TRUE, 0);
        gtk_box_pack_end(GTK_BOX(GTK_DIALOG(dialog)->action_area),
                         ok_button, TRUE, TRUE, 0);
-                               
+
        cancel_button = gtk_button_new_with_label(_("Cancel"));
        gtk_box_pack_end(GTK_BOX(GTK_DIALOG(dialog)->action_area),
                         cancel_button, TRUE, TRUE, 0);
        cancel_button = gtk_button_new_with_label(_("Cancel"));
        gtk_box_pack_end(GTK_BOX(GTK_DIALOG(dialog)->action_area),
                         cancel_button, TRUE, TRUE, 0);
@@ -2006,17 +1989,15 @@ static gchar *get_user_string(const gchar *action, ActionType type )
        gtk_signal_connect(GTK_OBJECT(entry), "activate",
                           GTK_SIGNAL_FUNC(user_string_dialog_activate_cb),
                           &user_dialog);
        gtk_signal_connect(GTK_OBJECT(entry), "activate",
                           GTK_SIGNAL_FUNC(user_string_dialog_activate_cb),
                           &user_dialog);
-       gtk_signal_connect(GTK_OBJECT(ok_button),     "clicked",
+       gtk_signal_connect(GTK_OBJECT(ok_button), "clicked",
                           GTK_SIGNAL_FUNC(user_string_dialog_activate_cb),
                           &user_dialog);
        gtk_signal_connect_object(GTK_OBJECT(cancel_button), "clicked",
                           GTK_SIGNAL_FUNC(user_string_dialog_activate_cb),
                           &user_dialog);
        gtk_signal_connect_object(GTK_OBJECT(cancel_button), "clicked",
-                          GTK_SIGNAL_FUNC(gtk_widget_destroy),
-                          GTK_OBJECT(dialog));
-       
-       gtk_widget_grab_focus(entry);
+                                 GTK_SIGNAL_FUNC(gtk_widget_destroy),
+                                 GTK_OBJECT(dialog));
 
 
+       gtk_widget_grab_focus(entry);
        gtk_widget_show_all(dialog);
        gtk_widget_show_all(dialog);
-
        gtk_main();
 
        return user_dialog.user_str;
        gtk_main();
 
        return user_dialog.user_str;
index 291ffcbeb6163b3b803068e4f88b59644e113f4b..cc13c72f6726bb6e561dbb0744f75dd02ef05b4b 100644 (file)
@@ -457,11 +457,11 @@ gboolean procmsg_msg_exist(MsgInfo *msginfo)
 void procmsg_get_filter_keyword(MsgInfo *msginfo, gchar **header, gchar **key,
                                PrefsFilterType type)
 {
 void procmsg_get_filter_keyword(MsgInfo *msginfo, gchar **header, gchar **key,
                                PrefsFilterType type)
 {
-       static HeaderEntry hentry[] = {{"X-BeenThere:",    NULL, FALSE},
-                                      {"X-ML-Name:",      NULL, FALSE},
-                                      {"X-List:",         NULL, FALSE},
-                                      {"X-Mailing-list:", NULL, FALSE},
-                                      {"List-Id:",        NULL, FALSE},
+       static HeaderEntry hentry[] = {{"X-BeenThere:",    NULL, TRUE},
+                                      {"X-ML-Name:",      NULL, TRUE},
+                                      {"X-List:",         NULL, TRUE},
+                                      {"X-Mailing-list:", NULL, TRUE},
+                                      {"List-Id:",        NULL, TRUE},
                                       {NULL,              NULL, FALSE}};
 
        enum
                                       {NULL,              NULL, FALSE}};
 
        enum
@@ -510,6 +510,7 @@ void procmsg_get_filter_keyword(MsgInfo *msginfo, gchar **header, gchar **key,
                } else if (hentry[H_LIST_ID].body != NULL) {
                        *header = g_strdup("header \"List-Id\"");
                        *key = hentry[H_LIST_ID].body;
                } else if (hentry[H_LIST_ID].body != NULL) {
                        *header = g_strdup("header \"List-Id\"");
                        *key = hentry[H_LIST_ID].body;
+                       extract_list_id_str(*key);
                        hentry[H_LIST_ID].body = NULL;
                } else if (msginfo->subject) {
                        *header = g_strdup("subject");
                        hentry[H_LIST_ID].body = NULL;
                } else if (msginfo->subject) {
                        *header = g_strdup("subject");
index 58deb03db1154bcc568bbaa4513a44e2ffa0dd88..d9157015ce627fbc2f840ce949b8863f7e626a79 100644 (file)
@@ -1496,7 +1496,6 @@ gboolean textview_search_string(TextView *textview, const gchar *str,
 {
        GtkSText *text = GTK_STEXT(textview->text);
        gint pos;
 {
        GtkSText *text = GTK_STEXT(textview->text);
        gint pos;
-       wchar_t *wcs;
        gint len;
 
        g_return_val_if_fail(str != NULL, FALSE);
        gint len;
 
        g_return_val_if_fail(str != NULL, FALSE);