2010-09-17 [pawel] 3.7.6cvs37
[claws.git] / src / compose.c
index aa3c6c5f662a08b4cae9b4088d33e8ca00d45125..db19a222a67acd72bd595367eed455a8c97b681f 100644 (file)
@@ -2999,15 +2999,6 @@ static gchar *compose_quote_fmt(Compose *compose, MsgInfo *msginfo,
 
        gtk_text_buffer_get_start_iter(buffer, &iter);
        gtk_text_buffer_get_iter_at_offset(buffer, &iter, cursor_pos);
-       
-       /* Some quotes may not end with new line - when replying with
-        * quote from GtkTextBuffer selection for example. Add new
-        * line character so cursor is at the beginning of the line */
-       if (!gtk_text_iter_starts_line(&iter)) {
-               gtk_text_buffer_insert(buffer, &iter, "\n", 1);
-               gtk_text_buffer_get_end_iter(buffer, &iter);
-               compose->set_cursor_pos = gtk_text_iter_get_offset(&iter);
-       }
        gtk_text_buffer_place_cursor(buffer, &iter);
 
        compose->autowrap = prev_autowrap;
@@ -3203,6 +3194,9 @@ static void compose_reply_set_entry(Compose *compose, MsgInfo *msginfo,
                        }
                }
        } else {
+               if ((to_sender || to_ml) && prefs_common.reply_account_autosel)
+                       compose_check_for_email_account(compose);
+
                if (to_sender || (compose->followup_to && 
                        !strncmp(compose->followup_to, "poster", 6)))
                        compose_entry_append
@@ -3223,8 +3217,10 @@ static void compose_reply_set_entry(Compose *compose, MsgInfo *msginfo,
                                 compose->followup_to ? compose->followup_to :
                                 compose->newsgroups ? compose->newsgroups : "",
                                 COMPOSE_NEWSGROUPS, PREF_NONE);
-               } 
-               else 
+               } else if (reply_to_ml) {
+                       compose_entry_append(compose,
+                                  compose->ml_post, COMPOSE_TO, PREF_ML); 
+               } else 
                        compose_entry_append
                                (compose,
                                 compose->followup_to ? compose->followup_to :
@@ -3234,7 +3230,7 @@ static void compose_reply_set_entry(Compose *compose, MsgInfo *msginfo,
        compose_reply_set_subject(compose, msginfo);
 
        if (to_ml && compose->ml_post) return;
-       if (!to_all || compose->account->protocol == A_NNTP) return;
+       if (!to_all) return;
 
        if (compose->replyto) {
                Xstrdup_a(replyto, compose->replyto, return);
@@ -7407,8 +7403,10 @@ static Compose *compose_create(PrefsAccount *account,
        gtk_widget_set_size_request(scrolledwin, prefs_common.compose_width, -1);
 
        text = gtk_text_view_new();
-       gtk_text_view_set_left_margin(GTK_TEXT_VIEW(text), 6);
-       gtk_text_view_set_right_margin(GTK_TEXT_VIEW(text), 6);
+       if (prefs_common.show_compose_margin) {
+               gtk_text_view_set_left_margin(GTK_TEXT_VIEW(text), 6);
+               gtk_text_view_set_right_margin(GTK_TEXT_VIEW(text), 6);
+       }
        buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text));
        gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(text), GTK_WRAP_WORD_CHAR);
        gtk_text_view_set_editable(GTK_TEXT_VIEW(text), TRUE);
@@ -11184,7 +11182,10 @@ void compose_reply_to_address(MessageView *msgview, MsgInfo *msginfo,
        msginfo_list = g_slist_prepend(msginfo_list, msginfo);
        
        compose = compose_reply_mode(COMPOSE_REPLY_TO_ADDRESS, msginfo_list, body);
-       compose_check_for_email_account(compose);
+
+       if (prefs_common.reply_account_autosel)
+               compose_check_for_email_account(compose);
+
        compose_set_folder_prefs(compose, msginfo->folder, FALSE);
        compose_entry_append(compose, address, COMPOSE_TO, PREF_NONE);
        compose_reply_set_subject(compose, msginfo);