more fixes for Go To actions not obeying 'always_show_msg' option
[claws.git] / src / messageview.c
index e0c0d30202a241108dd23ee476826dfe9fa4e0d6..6a35e3f4fa8b601085d6db886e25b2205a1e517f 100644 (file)
@@ -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");
@@ -2306,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) {
@@ -2331,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) {
@@ -2618,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) {