Fix untranslatable concatenated strings (i.e. "Default "+"To:"),
[claws.git] / src / messageview.c
index fc69035605c6295608bcb2270098792f13c30d2e..05bf9565ab163f23527958130b701d34c4e436a5 100644 (file)
@@ -849,7 +849,7 @@ static gint disposition_notification_send(MsgInfo *msginfo)
                    "to be sent does not correspond to the return path:\n"
                    "Notification address: %s\n"
                    "Return path: %s\n"
-                   "It is advised to not to send the return receipt."),
+                   "It is advised to not send the return receipt."),
                  to, buf);
                val = alertpanel_full(_("Warning"), message,
                                _("_Don't Send"), _("_Send"), NULL, FALSE,
@@ -866,9 +866,9 @@ static gint disposition_notification_send(MsgInfo *msginfo)
                AlertValue val = 
                alertpanel_full(_("Warning"),
                  _("This message is asking for a return receipt notification\n"
-                   "but according to its 'To:' and 'CC:' headers it was not\n"
+                   "but according to its 'To' and 'Cc' headers it was not\n"
                    "officially addressed to you.\n"
-                   "It is advised to not to send the return receipt."),
+                   "It is advised to not send the return receipt."),
                  _("_Don't Send"), _("_Send"), NULL, FALSE,
                  NULL, ALERT_WARNING, G_ALERTDEFAULT);
                if (val != G_ALERTALTERNATE)
@@ -976,26 +976,13 @@ static gint disposition_notification_send(MsgInfo *msginfo)
                goto FILE_ERROR;
 
        /* Message ID */
-       if (account->set_domain && account->domain) {
-               g_snprintf(buf, sizeof(buf), "%s", account->domain); 
-       } else if (!strncmp(get_domain_name(), "localhost", strlen("localhost"))) {
-               g_snprintf(buf, sizeof(buf), "%s", 
-                       strchr(account->address, '@') ?
-                               strchr(account->address, '@')+1 :
-                               account->address);
-       } else {
-               g_snprintf(buf, sizeof(buf), "%s", "");
-       }
-       
        if (account->gen_msgid) {
-               gchar *addr = NULL;
-               if (account->msgid_with_addr) {
-                       addr = account->address;
-               }
-               generate_msgid(buf, sizeof(buf), addr);
-
-               if (fprintf(fp, "Message-ID: <%s>\n", buf) < 0)
+               gchar *addr = prefs_account_generate_msgid(account);
+               if (fprintf(fp, "Message-ID: <%s>\n", addr) < 0) {
+                       g_free(addr);
                        goto FILE_ERROR;
+               }
+               g_free(addr);
        }
 
        boundary = generate_mime_boundary("DN");
@@ -1300,7 +1287,10 @@ static void messageview_find_part_depth_first(MimeInfoSearch *context, MimeMedia
 
        debug_print("found part %d/%s\n", mimeinfo->type, mimeinfo->subtype);
 
-       if (mimeinfo->type == MIMETYPE_MULTIPART) {
+       if (mimeinfo->type == type
+                       && !strcasecmp(mimeinfo->subtype, subtype)) {
+               context->found = mimeinfo;
+       } else if (mimeinfo->type == MIMETYPE_MULTIPART) {
                if (!strcasecmp(mimeinfo->subtype, "alternative")
                                || !strcasecmp(mimeinfo->subtype, "related")) {
                        context->found = procmime_mimeinfo_next(mimeinfo);
@@ -2303,7 +2293,7 @@ static void prev_cb(GtkAction *action, gpointer data)
 {
        MessageView *messageview = (MessageView *)data;
        messageview->updating = TRUE;
-       summary_step(messageview->mainwin->summaryview, GTK_SCROLL_STEP_BACKWARD);
+       summary_select_prev(messageview->mainwin->summaryview);
        messageview->updating = FALSE;
 
        if (messageview->deferred_destroy) {
@@ -2328,7 +2318,7 @@ static void next_cb(GtkAction *action, gpointer data)
 {
        MessageView *messageview = (MessageView *)data;
        messageview->updating = TRUE;
-       summary_step(messageview->mainwin->summaryview, GTK_SCROLL_STEP_FORWARD);
+       summary_select_next(messageview->mainwin->summaryview);
        messageview->updating = FALSE;
 
        if (messageview->deferred_destroy) {
@@ -2615,7 +2605,7 @@ static void goto_unread_folder_cb(GtkAction *action, gpointer data)
        MessageView *messageview = (MessageView *)data;
 
        messageview->updating = TRUE;
-       folderview_select_next_with_flag(messageview->mainwin->folderview, MSG_UNREAD, FALSE);
+       folderview_select_next_with_flag(messageview->mainwin->folderview, MSG_UNREAD);
        messageview->updating = FALSE;
 
        if (messageview->deferred_destroy) {
@@ -2639,9 +2629,7 @@ static void goto_unread_folder_cb(GtkAction *action, gpointer data)
 static void goto_folder_cb(GtkAction *action, gpointer data)
 {
        MessageView *messageview = (MessageView *)data;
-       messageview->updating = TRUE;
        FolderItem *to_folder;
-       messageview->updating = FALSE;
 
        to_folder = foldersel_folder_sel(NULL, FOLDER_SEL_ALL, NULL, FALSE);