sync with 0.8.3cvs7
authorPaul Mangan <paul@claws-mail.org>
Thu, 26 Sep 2002 10:26:16 +0000 (10:26 +0000)
committerPaul Mangan <paul@claws-mail.org>
Thu, 26 Sep 2002 10:26:16 +0000 (10:26 +0000)
ChangeLog
ChangeLog.claws
ChangeLog.jp
configure.in
src/compose.c
src/compose.h
src/mainwindow.c
src/prefs_common.c
src/summaryview.c
src/utils.c
src/utils.h

index 5196b27..19a8a57 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2002-09-26
+
+       * src/compose.[ch]: compose_reply(): added a flag for reply-to-ML.
+         compose_parse_header(): parse also List-Post header.
+         compose_reply_set_entry(): support reply-to-ML (fall back to
+         normal reply if ML address is not found).
+       * src/mainwindow.c
+         src/prefs_common.c
+         src/summaryview.c: reorganized Reply menu and added 'Reply to
+         mailing list'.
+       * src/utils.[ch]: scan_mailto_url(): new. It scans mailto URL and
+         returns newly allocated parameters.
+
 2002-09-25
 
        * src/account.c: account_read_config_all(): set account information
index c42e31e..c4f716e 100644 (file)
@@ -1,3 +1,8 @@
+2002-09-26 [paul]      0.8.3claws25
+
+       * sync with 0.8.3cvs7
+               see ChangeLog 2002-09-26
+
 2002-09-26 [paul]      0.8.3claws24
 
        * sync with 0.8.3cvs6
index a34a3ea..7ad23ac 100644 (file)
@@ -1,3 +1,16 @@
+2002-09-26
+
+       * src/compose.[ch]: compose_reply(): ML ¤Ø¤ÎÊÖ¿®ÍѤΥե饰¤òÄɲá£
+         compose_parse_header(): List-Post ¥Ø¥Ã¥À¤â¥Ñ¡¼¥¹¡£
+         compose_reply_set_entry(): ML ¤Ø¤ÎÊÖ¿®¤ËÂбþ(ML ¤Î¥¢¥É¥ì¥¹¤¬
+         ¸«¤Ä¤«¤é¤Ê¤±¤ì¤ÐÄ̾ï¤ÎÊÖ¿®¤Ë fallback ¤¹¤ë)¡£
+       * src/mainwindow.c
+         src/prefs_common.c
+         src/summaryview.c: ÊÖ¿®¥á¥Ë¥å¡¼¤òºÆ¹½À®¤·¡¢¡Ö¥á¡¼¥ê¥ó¥°¥ê¥¹¥È¤Ë
+         ÊÖ¿®¡×¤òÄɲá£
+       * src/utils.[ch]: scan_mailto_url(): ¿·µ¬¡£ mailto URL ¤ò¥¹¥­¥ã¥ó¤·¡¢
+         ¿·µ¬¤Ë³ÎÊݤ·¤¿¥Ñ¥é¥á¡¼¥¿¤òÊÖ¤¹¡£
+
 2002-09-25
 
        * src/account.c: account_read_config_all(): ¥¢¥«¥¦¥ó¥È¾ðÊó¤òÀßÄê
index 4b6fcbe..012e634 100644 (file)
@@ -10,7 +10,7 @@ MINOR_VERSION=8
 MICRO_VERSION=3
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws24
+EXTRA_VERSION=claws25
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index 5805df0..8cd94d2 100644 (file)
@@ -194,6 +194,7 @@ static gchar *compose_quote_fmt                     (Compose        *compose,
 static void compose_reply_set_entry            (Compose        *compose,
                                                 MsgInfo        *msginfo,
                                                 gboolean        to_all,
+                                                gboolean        to_ml,
                                                 gboolean        to_sender,
                                                 gboolean
                                                 followup_and_reply_to);
@@ -476,7 +477,7 @@ static void text_inserted           (GtkWidget      *widget,
                                         gint           *position,
                                         Compose        *compose);
 static void compose_generic_reply(MsgInfo *msginfo, gboolean quote,
-                                 gboolean to_all,
+                                 gboolean to_all, gboolean to_ml,
                                  gboolean ignore_replyto,
                                  gboolean followup_and_reply_to,
                                  const gchar *body);
@@ -817,10 +818,11 @@ Compose *compose_new_followup_and_replyto(PrefsAccount *account,
 */
 
 void compose_reply(MsgInfo *msginfo, gboolean quote, gboolean to_all,
-                  gboolean ignore_replyto, const gchar *body)
+                  gboolean to_ml, gboolean ignore_replyto, 
+                  const gchar *body)
 {
-       compose_generic_reply(msginfo, quote, to_all, ignore_replyto, FALSE,
-                             body);
+       compose_generic_reply(msginfo, quote, to_all, to_ml, 
+                             ignore_replyto, FALSE, body);
 }
 
 void compose_followup_and_reply_to(MsgInfo *msginfo, gboolean quote,
@@ -828,12 +830,12 @@ void compose_followup_and_reply_to(MsgInfo *msginfo, gboolean quote,
                                   gboolean ignore_replyto,
                                   const gchar *body)
 {
-       compose_generic_reply(msginfo, quote, to_all, ignore_replyto, TRUE,
-                             body);
+       compose_generic_reply(msginfo, quote, to_all, FALSE, 
+                             ignore_replyto, TRUE, body);
 }
 
 static void compose_generic_reply(MsgInfo *msginfo, gboolean quote,
-                                 gboolean to_all,
+                                 gboolean to_all, gboolean to_ml,
                                  gboolean ignore_replyto,
                                  gboolean followup_and_reply_to,
                                  const gchar *body)
@@ -919,8 +921,8 @@ static void compose_generic_reply(MsgInfo *msginfo, gboolean quote,
        }
 
        if (compose_parse_header(compose, msginfo) < 0) return;
-       compose_reply_set_entry(compose, msginfo, to_all, ignore_replyto,
-                               followup_and_reply_to);
+       compose_reply_set_entry(compose, msginfo, to_all, to_ml, 
+                               ignore_replyto, followup_and_reply_to);
        compose_show_first_last_header(compose, TRUE);
 
        text = GTK_STEXT(compose->text);
@@ -1363,97 +1365,58 @@ void compose_entry_select (Compose *compose, const gchar *mailto)
 
 static void compose_entries_set(Compose *compose, const gchar *mailto)
 {
-       gchar *subject = NULL;
        gchar *to = NULL;
        gchar *cc = NULL;
        gchar *bcc = NULL;
+       gchar *subject = NULL;
        gchar *body = NULL;
-       gchar *p;
-       gchar *tmp_mailto;
-
-       Xstrdup_a(tmp_mailto, mailto, return);
-
-       to = tmp_mailto;
-
-       p = strchr(tmp_mailto, '?');
-       if (p) {
-               *p = '\0';
-               p++;
-       }
-
-       while (p) {
-               gchar *field, *value;
-
-               field = p;
-
-               p = strchr(p, '=');
-               if (!p) break;
-               *p = '\0';
-               p++;
 
-               value = p;
-
-               p = strchr(p, '&');
-               if (p) {
-                       *p = '\0';
-                       p++;
-               }
-
-               if (*value == '\0') continue;
-
-               if (!g_strcasecmp(field, "subject")) {
-                       Xalloca(subject, strlen(value) + 1, return);
-                       decode_uri(subject, value);
-               } else if (!g_strcasecmp(field, "cc")) {
-                       cc = value;
-               } else if (!g_strcasecmp(field, "bcc")) {
-                       bcc = value;
-               } else if (!g_strcasecmp(field, "body")) {
-                       Xalloca(body, strlen(value) + 1, return);
-                       decode_uri(body, value);
-               }
-       }
+       scan_mailto_url(mailto, &to, &cc, &bcc, &subject, &body);
 
        if (to)
                compose_entry_append(compose, to, COMPOSE_TO);
-       if (subject)
-               gtk_entry_set_text(GTK_ENTRY(compose->subject_entry), subject);
        if (cc)
                compose_entry_append(compose, cc, COMPOSE_CC);
        if (bcc)
                compose_entry_append(compose, bcc, COMPOSE_BCC);
+       if (subject)
+               gtk_entry_set_text(GTK_ENTRY(compose->subject_entry), subject);
        if (body) {
                gtk_stext_insert(GTK_STEXT(compose->text),
                                NULL, NULL, NULL, body, -1);
                gtk_stext_insert(GTK_STEXT(compose->text),
                                NULL, NULL, NULL, "\n", 1);
        }
+
+       g_free(to);
+       g_free(cc);
+       g_free(bcc);
+       g_free(subject);
+       g_free(body);
 }
 
 static gint compose_parse_header(Compose *compose, MsgInfo *msginfo)
 {
-       static HeaderEntry hentry[] = {{"Reply-To:",       NULL, TRUE},
-                                      {"Cc:",             NULL, FALSE},
-                                      {"References:",     NULL, FALSE},
-                                      {"Bcc:",            NULL, FALSE},
-                                      {"Newsgroups:",     NULL, FALSE},
-                                      {"Followup-To:",    NULL, FALSE},
-                                      {"X-Mailing-List:", NULL, FALSE},
-                                      {"X-BeenThere:",    NULL, FALSE},
-                                      {"X-Priority:",     NULL, FALSE},
-                                      {NULL,              NULL, FALSE}};
+       static HeaderEntry hentry[] = {{"Reply-To:",    NULL, TRUE},
+                                      {"Cc:",          NULL, FALSE},
+                                      {"References:",  NULL, FALSE},
+                                      {"Bcc:",         NULL, FALSE},
+                                      {"Newsgroups:",  NULL, FALSE},
+                                      {"Followup-To:", NULL, FALSE},
+                                      {"List-Post:",   NULL, FALSE},
+                                      {"X-Priority:",  NULL, FALSE},
+                                      {NULL,           NULL, FALSE}};
 
        enum
        {
-               H_REPLY_TO       = 0,
-               H_CC             = 1,
-               H_REFERENCES     = 2,
-               H_BCC            = 3,
-               H_NEWSGROUPS     = 4,
-               H_FOLLOWUP_TO    = 5,
-               H_X_MAILING_LIST = 6,
-               H_X_BEENTHERE    = 7,
-               H_X_PRIORITY     = 8
+               H_REPLY_TO      = 0,
+               H_CC            = 1,
+               H_REFERENCES    = 2,
+               H_BCC           = 3,
+               H_NEWSGROUPS    = 4,
+               H_FOLLOWUP_TO   = 5,
+               H_LIST_POST     = 6,
+               H_X_PRIORITY    = 7
        };
 
        FILE *fp;
@@ -1474,26 +1437,6 @@ static gint compose_parse_header(Compose *compose, MsgInfo *msginfo)
                compose->cc = hentry[H_CC].body;
                hentry[H_CC].body = NULL;
        }
-       if (hentry[H_X_MAILING_LIST].body != NULL) {
-               /* this is good enough to parse debian-devel */
-               gchar *buf = g_malloc(strlen(hentry[H_X_MAILING_LIST].body) + 1);
-               g_return_val_if_fail(buf != NULL, -1 );
-               if (1 == sscanf(hentry[H_X_MAILING_LIST].body, "<%[^>]>", buf))
-                       compose->mailinglist = g_strdup(buf);
-               g_free(buf);
-               g_free(hentry[H_X_MAILING_LIST].body);
-               hentry[H_X_MAILING_LIST].body = NULL ;
-       }
-       if (hentry[H_X_BEENTHERE].body != NULL) {
-               /* this is good enough to parse the sylpheed-claws lists */
-               gchar *buf = g_malloc(strlen(hentry[H_X_BEENTHERE].body) + 1);
-               g_return_val_if_fail(buf != NULL, -1 );
-               if (1 == sscanf(hentry[H_X_BEENTHERE].body, "%[^>]", buf))
-                       compose->mailinglist = g_strdup(buf);
-               g_free(buf);
-               g_free(hentry[H_X_BEENTHERE].body);
-               hentry[H_X_BEENTHERE].body = NULL ;
-       }
        if (hentry[H_REFERENCES].body != NULL) {
                if (compose->mode == COMPOSE_REEDIT)
                        compose->references = hentry[H_REFERENCES].body;
@@ -1521,6 +1464,21 @@ static gint compose_parse_header(Compose *compose, MsgInfo *msginfo)
                compose->followup_to = hentry[H_FOLLOWUP_TO].body;
                hentry[H_FOLLOWUP_TO].body = NULL;
        }
+       if (hentry[H_LIST_POST].body != NULL) {
+               gchar *to = NULL;
+
+               extract_address(hentry[H_LIST_POST].body);
+               if (hentry[H_LIST_POST].body[0] != '\0') {
+                       scan_mailto_url(hentry[H_LIST_POST].body,
+                                       &to, NULL, NULL, NULL, NULL);
+                       if (to) {
+                               g_free(compose->ml_post);
+                               compose->ml_post = to;
+                       }
+               }
+               g_free(hentry[H_LIST_POST].body);
+               hentry[H_LIST_POST].body = NULL;
+       }
 
        if (compose->mode == COMPOSE_REEDIT)
                if (hentry[H_X_PRIORITY].body != NULL) {
@@ -1667,7 +1625,8 @@ static gchar *compose_quote_fmt(Compose *compose, MsgInfo *msginfo,
 }
 
 static void compose_reply_set_entry(Compose *compose, MsgInfo *msginfo,
-                                   gboolean to_all, gboolean ignore_replyto,
+                                   gboolean to_all, gboolean to_ml,
+                                   gboolean ignore_replyto,
                                    gboolean followup_and_reply_to)
 {
        GSList *cc_list = NULL;
@@ -1679,16 +1638,16 @@ static void compose_reply_set_entry(Compose *compose, MsgInfo *msginfo,
        g_return_if_fail(compose->account != NULL);
        g_return_if_fail(msginfo != NULL);
 
-       if ((compose->account->protocol != A_NNTP) || followup_and_reply_to)
+       if (to_ml && compose->ml_post) {
+               compose_entry_append(compose, compose->ml_post,
+                                    COMPOSE_TO);
+       } else if ((compose->account->protocol != A_NNTP) || followup_and_reply_to) {
                compose_entry_append(compose,
                                    ((compose->replyto && !ignore_replyto)
                                     ? compose->replyto
-                                    : (compose->mailinglist && !ignore_replyto)
-                                    ? compose->mailinglist
                                     : msginfo->from ? msginfo->from : ""),
                                     COMPOSE_TO);
-
-       if (compose->account->protocol == A_NNTP) {
+       } else {
                if (ignore_replyto)
                        compose_entry_append
                                (compose, msginfo->from ? msginfo->from : "",
@@ -1699,8 +1658,6 @@ static void compose_reply_set_entry(Compose *compose, MsgInfo *msginfo,
                                        (compose,
                                        ((compose->replyto && !ignore_replyto)
                                        ? compose->replyto
-                                       : (compose->mailinglist && !ignore_replyto)
-                                       ? compose->mailinglist
                                        : msginfo->from ? msginfo->from : ""),
                                        COMPOSE_TO);                            
                        } else {
@@ -1731,6 +1688,7 @@ static void compose_reply_set_entry(Compose *compose, MsgInfo *msginfo,
        } else
                gtk_entry_set_text(GTK_ENTRY(compose->subject_entry), "Re: ");
 
+       if (to_ml && compose->ml_post) return;
        if (!to_all || compose->account->protocol == A_NNTP) return;
 
        if (compose->replyto) {
@@ -1742,16 +1700,9 @@ static void compose_reply_set_entry(Compose *compose, MsgInfo *msginfo,
                extract_address(from);
        }
 
-       if (compose->mailinglist && from) {
-               cc_list = address_list_append(cc_list, from);
-       }
-
        if (replyto && from)
                cc_list = address_list_append(cc_list, from);
-
-       if (!compose->mailinglist)
-               cc_list = address_list_append(cc_list, msginfo->to);
-
+       cc_list = address_list_append(cc_list, msginfo->to);
        cc_list = address_list_append(cc_list, compose->cc);
 
        to_table = g_hash_table_new(g_str_hash, g_str_equal);
@@ -4918,10 +4869,12 @@ static Compose *compose_create(PrefsAccount *account, ComposeMode mode)
        compose->replyinfo  = NULL;
 
        compose->replyto     = NULL;
-       compose->mailinglist = NULL;
        compose->cc          = NULL;
        compose->bcc         = NULL;
        compose->followup_to = NULL;
+
+       compose->ml_post     = NULL;
+
        compose->inreplyto   = NULL;
        compose->references  = NULL;
        compose->msgid       = NULL;
@@ -5442,6 +5395,8 @@ static void compose_destroy(Compose *compose)
        g_free(compose->newsgroups);
        g_free(compose->followup_to);
 
+       g_free(compose->ml_post);
+
        g_free(compose->inreplyto);
        g_free(compose->references);
        g_free(compose->msgid);
index ae330be..b76c66a 100644 (file)
@@ -60,6 +60,9 @@ typedef enum
        COMPOSE_REPLY_TO_ALL,
        COMPOSE_REPLY_TO_ALL_WITH_QUOTE,
        COMPOSE_REPLY_TO_ALL_WITHOUT_QUOTE,
+       COMPOSE_REPLY_TO_LIST,
+       COMPOSE_REPLY_TO_LIST_WITH_QUOTE,
+       COMPOSE_REPLY_TO_LIST_WITHOUT_QUOTE,
        COMPOSE_FORWARD,
        COMPOSE_FORWARD_AS_ATTACH,
        COMPOSE_FORWARD_INLINE,
@@ -147,7 +150,8 @@ struct _Compose
        gchar   *bcc;
        gchar   *newsgroups;
        gchar   *followup_to;
-       gchar   *mailinglist;
+
+       gchar   *ml_post;
 
        gchar   *inreplyto;
        gchar   *references;
@@ -159,7 +163,6 @@ struct _Compose
        gboolean use_bcc;
        gboolean use_replyto;
        gboolean use_followupto;
-       gboolean use_mailinglist;
        gboolean use_attach;
 
        /* privacy settings */
@@ -240,6 +243,7 @@ void compose_followup_and_reply_to  (MsgInfo        *msginfo,
 void compose_reply                     (MsgInfo        *msginfo,
                                         gboolean        quote,
                                         gboolean        to_all,
+                                        gboolean        to_ml,
                                         gboolean        ignore_replyto,
                                         const gchar    *body);
 Compose *compose_forward               (PrefsAccount *account,
index 5525102..6c9ff37 100644 (file)
@@ -706,9 +706,13 @@ static GtkItemFactoryEntry mainwin_entries[] =
        {N_("/_Message/Compose a_n email message"),     "<control>M", compose_mail_cb, 0, NULL},
        {N_("/_Message/Compose a news message"),        NULL,   compose_news_cb, 0, NULL},
        {N_("/_Message/_Reply"),                "<control>R",   reply_cb, COMPOSE_REPLY, NULL},
-       {N_("/_Message/Repl_y to sender"),      "<control><alt>R", reply_cb, COMPOSE_REPLY_TO_SENDER, NULL},
-       {N_("/_Message/Follow-up and reply to"), NULL, reply_cb, COMPOSE_FOLLOWUP_AND_REPLY_TO, NULL},
-       {N_("/_Message/Reply to a_ll"),         "<shift><control>R", reply_cb, COMPOSE_REPLY_TO_ALL, NULL},
+       {N_("/_Message/Repl_y to"),             NULL, NULL, 0, "<Branch>"},
+       {N_("/_Message/Repl_y to/_all"),        "<shift><control>R", reply_cb, COMPOSE_REPLY_TO_ALL, NULL},
+       {N_("/_Message/Repl_y to/_sender"),     NULL, reply_cb, COMPOSE_REPLY_TO_SENDER, NULL},
+       {N_("/_Message/Repl_y to/mailing _list"),
+                                               "<control>L", reply_cb, COMPOSE_REPLY_TO_LIST, NULL},
+       {N_("/_Message/Follow-up and reply to"),NULL, reply_cb, COMPOSE_FOLLOWUP_AND_REPLY_TO, NULL},
+       {N_("/_Message/---"),                   NULL, NULL, 0, "<Separator>"},
        {N_("/_Message/_Forward"),              "<control><alt>F", reply_cb, COMPOSE_FORWARD, NULL},
        {N_("/_Message/Redirect"),              NULL, reply_cb, COMPOSE_REDIRECT, NULL},
        {N_("/_Message/---"),                   NULL, NULL, 0, "<Separator>"},
@@ -758,7 +762,7 @@ static GtkItemFactoryEntry mainwin_entries[] =
        {N_("/_Tools/---"),                     NULL, NULL, 0, "<Separator>"},
        {N_("/_Tools/E_xecute"),                "X", execute_summary_cb, 0, NULL},
        {N_("/_Tools/---"),                     NULL, NULL, 0, "<Separator>"},
-       {N_("/_Tools/_Log window"),             "<control>L", log_window_show_cb, 0, NULL},
+       {N_("/_Tools/_Log window"),             "<shift><control>L", log_window_show_cb, 0, NULL},
 
        {N_("/_Configuration"),                 NULL, NULL, 0, "<Branch>"},
        {N_("/_Configuration/_Common preferences..."),
@@ -1651,8 +1655,7 @@ void main_window_set_menu_sensitive(MainWindow *mainwin)
                {"/Message/Cancel receiving"      , M_INC_ACTIVE},
                {"/Message/Compose a news message", M_HAVE_NEWS_ACCOUNT},
                {"/Message/Reply"                 , M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST},
-               {"/Message/Reply to sender"       , M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST},
-               {"/Message/Reply to all"          , M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST},
+               {"/Message/Reply to"             , M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST},
                {"/Message/Follow-up and reply to", M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST|M_NEWS},
                {"/Message/Forward"               , M_HAVE_ACCOUNT|M_TARGET_EXIST},
                {"/Message/Redirect"              , M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST},
index c0b54c4..37f7c20 100644 (file)
@@ -3811,8 +3811,9 @@ static void prefs_keybind_apply_clicked(GtkWidget *widget)
                "(menu-path \"<Main>/Message/Get from all accounts\" \"<shift><control>I\")\n"
                "(menu-path \"<Main>/Message/Compose an email message\" \"<control>M\")\n"
                "(menu-path \"<Main>/Message/Reply\" \"<control>R\")\n"
-               "(menu-path \"<Main>/Message/Reply to sender\" \"\")\n"
-               "(menu-path \"<Main>/Message/Reply to all\" \"<shift><control>R\")\n"
+               "(menu-path \"<Main>/Message/Reply to/all\" \"<shift><control>R\")\n"
+               "(menu-path \"<Main>/Message/Reply to/sender\" \"\")\n"
+               "(menu-path \"<Main>/Message/Reply to/mailing list\" \"<control>L\")\n"
                "(menu-path \"<Main>/Message/Forward\" \"<control><alt>F\")\n"
                /* "(menu-path \"<Main>/Message/Forward as attachment\" \"\")\n" */
                "(menu-path \"<Main>/Message/Move...\" \"<control>O\")\n"
@@ -3825,7 +3826,7 @@ static void prefs_keybind_apply_clicked(GtkWidget *widget)
 
                "(menu-path \"<Main>/Tools/Address book\" \"<shift><control>A\")\n"
                "(menu-path \"<Main>/Tools/Execute\" \"X\")\n"
-               "(menu-path \"<Main>/Tools/Log window\" \"<control>L\")\n"
+               "(menu-path \"<Main>/Tools/Log window\" \"<shift><control>L\")\n"
 
                "(menu-path \"<Compose>/File/Close\" \"<control>W\")\n"
                "(menu-path \"<Compose>/Edit/Select all\" \"<control>A\")\n"
@@ -3863,8 +3864,9 @@ static void prefs_keybind_apply_clicked(GtkWidget *widget)
                "(menu-path \"<Main>/Message/Get from all accounts\" \"<shift><control>I\")\n"
                "(menu-path \"<Main>/Message/Compose an email message\" \"W\")\n"
                "(menu-path \"<Main>/Message/Reply\" \"<control>R\")\n"
-               "(menu-path \"<Main>/Message/Reply to sender\" \"\")\n"
-               "(menu-path \"<Main>/Message/Reply to all\" \"<shift>A\")\n"
+               "(menu-path \"<Main>/Message/Reply to/all\" \"<shift>A\")\n"
+               "(menu-path \"<Main>/Message/Reply to/sender\" \"\")\n"
+               "(menu-path \"<Main>/Message/Reply to/mailing list\" \"<control>L\")\n"
                "(menu-path \"<Main>/Message/Forward\" \"F\")\n"
                /* "(menu-path \"<Main>/Message/Forward as attachment\" \"<shift>F\")\n" */
                "(menu-path \"<Main>/Message/Move...\" \"O\")\n"
@@ -3877,7 +3879,7 @@ static void prefs_keybind_apply_clicked(GtkWidget *widget)
 
                "(menu-path \"<Main>/Tools/Address book\" \"<shift><control>A\")\n"
                "(menu-path \"<Main>/Tools/Execute\" \"X\")\n"
-               "(menu-path \"<Main>/Tools/Log window\" \"<control>L\")\n"
+               "(menu-path \"<Main>/Tools/Log window\" \"<shift><control>L\")\n"
 
                "(menu-path \"<Compose>/File/Close\" \"<alt>W\")\n"
                "(menu-path \"<Compose>/Edit/Select all\" \"\")\n"
@@ -3914,8 +3916,9 @@ static void prefs_keybind_apply_clicked(GtkWidget *widget)
                "(menu-path \"<Main>/Message/Get from all accounts\" \"<shift><control>I\")\n"
                "(menu-path \"<Main>/Message/Compose new message\" \"M\")\n"
                "(menu-path \"<Main>/Message/Reply\" \"R\")\n"
-               "(menu-path \"<Main>/Message/Reply to all\" \"G\")\n"
-               "(menu-path \"<Main>/Message/Reply to sender\" \"\")\n"
+               "(menu-path \"<Main>/Message/Reply to/all\" \"G\")\n"
+               "(menu-path \"<Main>/Message/Reply to/sender\" \"\")\n"
+               "(menu-path \"<Main>/Message/Reply to/mailing list\" \"<control>L\")\n"
                "(menu-path \"<Main>/Message/Forward\" \"F\")\n"
                "(menu-path \"<Main>/Message/Forward as attachment\" \"\")\n"
                "(menu-path \"<Main>/Message/Move...\" \"<control>O\")\n"
@@ -3928,7 +3931,7 @@ static void prefs_keybind_apply_clicked(GtkWidget *widget)
 
                "(menu-path \"<Main>/Tools/Address book\" \"<shift><control>A\")\n"
                "(menu-path \"<Main>/Tools/Execute\" \"X\")\n"
-               "(menu-path \"<Main>/Tools/Log window\" \"<control>L\")\n"
+               "(menu-path \"<Main>/Tools/Log window\" \"<shift><control>L\")\n"
 
                "(menu-path \"<Compose>/File/Close\" \"<alt>W\")\n"
                "(menu-path \"<Compose>/Edit/Select all\" \"\")\n"
@@ -3966,8 +3969,9 @@ static void prefs_keybind_apply_clicked(GtkWidget *widget)
                "(menu-path \"<Main>/Message/Get from all accounts\" \"<shift><alt>I\")\n"
                "(menu-path \"<Main>/Message/Compose an email message\" \"<alt>N\")\n"
                "(menu-path \"<Main>/Message/Reply\" \"<alt>R\")\n"
-               "(menu-path \"<Main>/Message/Reply to sender\" \"<control><alt>R\")\n"
-               "(menu-path \"<Main>/Message/Reply to all\" \"<shift><alt>R\")\n"
+               "(menu-path \"<Main>/Message/Reply to/all\" \"<shift><alt>R\")\n"
+               "(menu-path \"<Main>/Message/Reply to/sender\" \"<control><alt>R\")\n"
+               "(menu-path \"<Main>/Message/Reply to/mailing list\" \"<control>L\")\n"
                "(menu-path \"<Main>/Message/Forward\" \"<shift><alt>F\")\n"
                /* "(menu-path \"<Main>/Message/Forward as attachment\" \"<shift><control>F\")\n" */
                "(menu-path \"<Main>/Message/Move...\" \"<alt>O\")\n"
@@ -4018,8 +4022,9 @@ static void prefs_keybind_apply_clicked(GtkWidget *widget)
                "(menu-path \"<Main>/Message/Get from all accounts\" \"\")\n"
                "(menu-path \"<Main>/Message/Compose an email message\" \"\")\n"
                "(menu-path \"<Main>/Message/Reply\" \"\")\n"
-               "(menu-path \"<Main>/Message/Reply to sender\" \"\")\n"
-               "(menu-path \"<Main>/Message/Reply to all\" \"\")\n"
+               "(menu-path \"<Main>/Message/Reply to/all\" \"\")\n"
+               "(menu-path \"<Main>/Message/Reply to/sender\" \"\")\n"
+               "(menu-path \"<Main>/Message/Reply to/mailing list\" \"\")\n"
                "(menu-path \"<Main>/Message/Forward\" \"\")\n"
                /* "(menu-path \"<Main>/Message/Forward as attachment\" \"\")\n" */
                "(menu-path \"<Main>/Message/Move...\" \"\")\n"
index 826a3be..465e59d 100644 (file)
@@ -387,9 +387,13 @@ GtkTargetEntry summary_drag_types[1] =
 static GtkItemFactoryEntry summary_popup_entries[] =
 {
        {N_("/_Reply"),                 NULL, summary_reply_cb, COMPOSE_REPLY, NULL},
-       {N_("/Repl_y to sender"),       NULL, summary_reply_cb, COMPOSE_REPLY_TO_SENDER, NULL},
+       {N_("/Repl_y to"),              NULL, NULL,             0, "<Branch>"},
+       {N_("/Repl_y to/_all"),         NULL, summary_reply_cb, COMPOSE_REPLY_TO_ALL, NULL},
+       {N_("/Repl_y to/_sender"),      NULL, summary_reply_cb, COMPOSE_REPLY_TO_SENDER, NULL},
+       {N_("/Repl_y to/mailing _list"),
+                                       NULL, summary_reply_cb, COMPOSE_REPLY_TO_LIST, NULL},
        {N_("/Follow-up and reply to"), NULL, summary_reply_cb, COMPOSE_FOLLOWUP_AND_REPLY_TO, NULL},
-       {N_("/Reply to a_ll"),          NULL, summary_reply_cb, COMPOSE_REPLY_TO_ALL, NULL},
+       {N_("/---"),                    NULL, NULL,             0, "<Separator>"},
        {N_("/_Forward"),               NULL, summary_reply_cb, COMPOSE_FORWARD, NULL},
        {N_("/Redirect"),               NULL, summary_reply_cb, COMPOSE_REDIRECT, NULL},
        {N_("/---"),                    NULL, NULL,             0, "<Separator>"},
@@ -1155,8 +1159,10 @@ static void summary_set_menu_sensitive(SummaryView *summaryview)
 
        sens = (selection == SUMMARY_SELECTED_MULTIPLE) ? FALSE : TRUE;
        menu_set_sensitive(ifactory, "/Reply",                    sens);
-       menu_set_sensitive(ifactory, "/Reply to sender",          sens);
-       menu_set_sensitive(ifactory, "/Reply to all",             sens);
+       menu_set_sensitive(ifactory, "/Reply to",                 sens);
+       menu_set_sensitive(ifactory, "/Reply to/all",             sens);
+       menu_set_sensitive(ifactory, "/Reply to/sender",          sens);
+       menu_set_sensitive(ifactory, "/Reply to/mailing list",    sens);
        menu_set_sensitive(ifactory, "/Forward",                  TRUE);
        menu_set_sensitive(ifactory, "/Redirect",                 sens);
 
@@ -4035,17 +4041,17 @@ void summary_reply(SummaryView *summaryview, ComposeMode mode)
        switch (mode) {
        case COMPOSE_REPLY:
                compose_reply(msginfo, prefs_common.reply_with_quote,
-                             FALSE, FALSE, text);
+                             FALSE, FALSE, FALSE, text);
                break;
        case COMPOSE_REPLY_WITH_QUOTE:
-               compose_reply(msginfo, TRUE, FALSE, FALSE, text);
+               compose_reply(msginfo, TRUE, FALSE, FALSE, FALSE, text);
                break;
        case COMPOSE_REPLY_WITHOUT_QUOTE:
-               compose_reply(msginfo, FALSE, FALSE, FALSE, NULL);
+               compose_reply(msginfo, FALSE, FALSE, FALSE, FALSE, NULL);
                break;
        case COMPOSE_REPLY_TO_SENDER:
                compose_reply(msginfo, prefs_common.reply_with_quote,
-                             FALSE, TRUE, text);
+                             FALSE, FALSE, TRUE, text);
                break;
        case COMPOSE_FOLLOWUP_AND_REPLY_TO:
                compose_followup_and_reply_to(msginfo,
@@ -4053,20 +4059,30 @@ void summary_reply(SummaryView *summaryview, ComposeMode mode)
                                              FALSE, TRUE, text);
                break;
        case COMPOSE_REPLY_TO_SENDER_WITH_QUOTE:
-               compose_reply(msginfo, TRUE, FALSE, TRUE, text);
+               compose_reply(msginfo, TRUE, FALSE, FALSE, TRUE, text);
                break;
        case COMPOSE_REPLY_TO_SENDER_WITHOUT_QUOTE:
-               compose_reply(msginfo, FALSE, FALSE, TRUE, NULL);
+               compose_reply(msginfo, FALSE, FALSE, FALSE, TRUE, NULL);
                break;
        case COMPOSE_REPLY_TO_ALL:
                compose_reply(msginfo, prefs_common.reply_with_quote,
-                             TRUE, FALSE, text);
+                             TRUE, FALSE, FALSE, text);
                break;
        case COMPOSE_REPLY_TO_ALL_WITH_QUOTE:
-               compose_reply(msginfo, TRUE, TRUE, FALSE, text);
+               compose_reply(msginfo, TRUE, TRUE, FALSE, FALSE, text);
                break;
        case COMPOSE_REPLY_TO_ALL_WITHOUT_QUOTE:
-               compose_reply(msginfo, FALSE, TRUE, FALSE, NULL);
+               compose_reply(msginfo, FALSE, TRUE, FALSE, FALSE, NULL);
+               break;
+       case COMPOSE_REPLY_TO_LIST:
+               compose_reply(msginfo, prefs_common.reply_with_quote,
+                             FALSE, TRUE, FALSE, text);
+               break;
+       case COMPOSE_REPLY_TO_LIST_WITH_QUOTE:
+               compose_reply(msginfo, TRUE, FALSE, TRUE, FALSE, text);
+               break;
+       case COMPOSE_REPLY_TO_LIST_WITHOUT_QUOTE:
+               compose_reply(msginfo, FALSE, FALSE, TRUE, FALSE, NULL);
                break;
        case COMPOSE_FORWARD:
                if (prefs_common.forward_as_attachment) {
index df158ec..bd6331d 100644 (file)
@@ -1349,6 +1349,63 @@ GList *uri_list_extract_filenames(const gchar *uri_list)
        } \
 }
 
+gint scan_mailto_url(const gchar *mailto, gchar **to, gchar **cc, gchar **bcc,
+                    gchar **subject, gchar **body)
+{
+       gchar *tmp_mailto;
+       gchar *p;
+
+       Xstrdup_a(tmp_mailto, mailto, return -1);
+
+       if (!strncmp(tmp_mailto, "mailto:", 7))
+               tmp_mailto += 7;
+
+       p = strchr(tmp_mailto, '?');
+       if (p) {
+               *p = '\0';
+               p++;
+       }
+
+       if (to && !*to)
+               *to = g_strdup(tmp_mailto);
+
+       while (p) {
+               gchar *field, *value;
+
+               field = p;
+
+               p = strchr(p, '=');
+               if (!p) break;
+               *p = '\0';
+               p++;
+
+               value = p;
+
+               p = strchr(p, '&');
+               if (p) {
+                       *p = '\0';
+                       p++;
+               }
+
+               if (*value == '\0') continue;
+
+               if (cc && !*cc && !g_strcasecmp(field, "cc")) {
+                       *cc = g_strdup(value);
+               } else if (bcc && !*bcc && !g_strcasecmp(field, "bcc")) {
+                       *bcc = g_strdup(value);
+               } else if (subject && !*subject &&
+                          !g_strcasecmp(field, "subject")) {
+                       *subject = g_malloc(strlen(value) + 1);
+                       decode_uri(*subject, value);
+               } else if (body && !*body && !g_strcasecmp(field, "body")) {
+                       *body = g_malloc(strlen(value) + 1);
+                       decode_uri(*body, value);
+               }
+       }
+
+       return 0;
+}
+
 /*
  * We need this wrapper around g_get_home_dir(), so that
  * we can fix some Windoze things here.  Should be done in glibc of course
index d2344d5..85cd4ce 100644 (file)
@@ -292,6 +292,12 @@ gchar *trim_string                 (const gchar    *str,
 GList *uri_list_extract_filenames      (const gchar    *uri_list);
 void decode_uri                                (gchar          *decoded_uri,
                                         const gchar    *encoded_uri);
+gint scan_mailto_url                   (const gchar    *mailto,
+                                        gchar         **to,
+                                        gchar         **cc,
+                                        gchar         **bcc,
+                                        gchar         **subject,
+                                        gchar         **body);
 
 /* return static strings */
 gchar *get_home_dir            (void);