2005-10-21 [paul] 1.9.15cvs88
authorPaul Mangan <paul@claws-mail.org>
Fri, 21 Oct 2005 09:34:53 +0000 (09:34 +0000)
committerPaul Mangan <paul@claws-mail.org>
Fri, 21 Oct 2005 09:34:53 +0000 (09:34 +0000)
* src/compose.c
* src/prefs_folder_item.c
* src/toolbar.c
fix news folder Folder Properties
(thanks to Colin)
* src/folderview.c
update folderview after Themes change
keep selected folder selected
(thanks to Colin)

ChangeLog-gtk2.claws
PATCHSETS
configure.ac
src/compose.c
src/folderview.c
src/prefs_folder_item.c
src/toolbar.c

index 9f439f7245993bf7a1793a7ff4717b9ecb72e36e..0c77574fc07ea1456ba141b55404b17e4ad37f2d 100644 (file)
@@ -1,3 +1,15 @@
+2005-10-21 [paul]      1.9.15cvs88
+
+       * src/compose.c
+       * src/prefs_folder_item.c
+       * src/toolbar.c
+               fix news folder Folder Properties
+               (thanks to Colin)
+       * src/folderview.c
+               update folderview after Themes change
+               keep selected folder selected
+               (thanks to Colin)
+
 2005-10-21 [paul]      1.9.15cvs87
 
        * tools/Makefile.am
index 6fd02026f158d4bd997cad7a3ad1c173289caeca..09eedec63517bae24d35d1cd97b20d13750a92b5 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.96.2.80 -r 1.96.2.81 src/textview.c;  ) > 1.9.15cvs85.patchset
 ( cvs diff -u -r 1.149.2.37 -r 1.149.2.38 src/inc.c;  ) > 1.9.15cvs86.patchset
 ( cvs diff -u -r 1.25.2.6 -r 1.25.2.7 tools/Makefile.am;  cvs diff -u -r 1.3.2.1 -r 1.3.2.2 tools/OOo2sylpheed.pl;  cvs diff -u -r 1.30.2.5 -r 1.30.2.6 tools/README;  cvs diff -u -r 1.1 -r 1.2 tools/README.sylprint;  cvs diff -u -r -1.1.2.2 -r -1.1.2.3 tools/asus_mailled.sh;  cvs diff -u -r 1.16.2.2 -r 1.16.2.3 tools/filter_conv.pl;  cvs diff -u -r 1.3.2.1 -r 1.3.2.2 tools/freshmeat_search.pl;  cvs diff -u -r 1.3.2.1 -r 1.3.2.2 tools/google_search.pl;  cvs diff -u -r -1.1 -r -1.2 tools/gpg-sign-syl;  cvs diff -u -r 1.1.14.1 -r 1.1.14.2 tools/kmail2sylpheed.pl;  cvs diff -u -r 1.3.4.1 -r 1.3.4.2 tools/kmail2sylpheed_v2.pl;  cvs diff -u -r 1.3.2.1 -r 1.3.2.2 tools/multiwebsearch.pl;  cvs diff -u -r 1.2.2.1 -r 1.2.2.2 tools/nautilus2sylpheed.sh;  cvs diff -u -r 1.2.14.1 -r 1.2.14.2 tools/newscache_clean.pl;  cvs diff -u -r 1.2.2.1 -r 1.2.2.2 tools/outlook2sylpheed.pl;  cvs diff -u -r -1.1.14.1 -r -1.1.14.2 tools/sylpheed-switcher;  cvs diff -u -r 1.2 -r 1.3 tools/sylprint.pl;  cvs diff -u -r 1.1 -r 1.2 tools/sylprint.rc;  cvs diff -u -r 1.2.2.1 -r 1.2.2.2 tools/tb2sylpheed;  cvs diff -u -r 1.1.4.2 -r 1.1.4.3 tools/vcard2xml.py;  cvs diff -u -r 1.5.2.2 -r 1.5.2.3 tools/kdeservicemenu/sylpheed-kdeservicemenu.pl;  ) > 1.9.15cvs87.patchset
+( cvs diff -u -r 1.382.2.185 -r 1.382.2.186 src/compose.c;  cvs diff -u -r 1.207.2.77 -r 1.207.2.78 src/folderview.c;  cvs diff -u -r 1.52.2.15 -r 1.52.2.16 src/prefs_folder_item.c;  cvs diff -u -r 1.43.2.31 -r 1.43.2.32 src/toolbar.c;  ) > 1.9.15cvs88.patchset
index 03955418ecc6ae7bcf8cc3d2d10632c67073640d..8a71bd278217e954e12b992b3f089e54467f717b 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=15
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=87
+EXTRA_VERSION=88
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 3aad20a38134408e29b02c326e4bcd50df1ab478..878f8a6f6fbc625e40f3aacfb6a1374a4c6d1d63 100644 (file)
@@ -887,6 +887,8 @@ Compose *compose_generic_new(PrefsAccount *account, const gchar *mailto, FolderI
        } else {
                if (mailto) {
                        compose_entry_append(compose, mailto, COMPOSE_NEWSGROUPS);
+               } else if (item) {
+                       compose_entry_append(compose, item->path, COMPOSE_NEWSGROUPS);
                }
                /*
                 * CLAWS: just don't allow return receipt request, even if the user
index 702980efc6b9042efa35af1d89ed869a7881399c..3415cfdec4837b36b437800c072d1be91440c39e 100644 (file)
@@ -2251,13 +2251,18 @@ void folderview_set_target_folder_color(gint color_op)
        }
 }
 
+static gchar *last_font = NULL;
 void folderview_reflect_prefs_pixmap_theme(FolderView *folderview)
 {
+       /* force reinit */
+       if (last_font) 
+               g_free(last_font);
+       last_font = NULL;
+       
 }
 
 void folderview_reflect_prefs(void)
 {
-       static gchar *last_font = NULL;
        gboolean update_font = TRUE;
        FolderView *folderview = mainwindow_get_mainwindow()->folderview;
        FolderItem *item = folderview_get_selected_item(folderview);
@@ -2287,8 +2292,13 @@ void folderview_reflect_prefs(void)
                (G_OBJECT(folderview->ctree),
                 G_CALLBACK(folderview_selected), folderview);
 
-       if (item)
+       if (item) {
+               GtkCTreeNode *node = gtk_ctree_find_by_row_data(
+                       GTK_CTREE(folderview->ctree), NULL, item);
+
                folderview_select(folderview, item);
+               folderview->selected = node;
+       }
 
        g_signal_handlers_unblock_by_func
                (G_OBJECT(folderview->ctree),
index 1e298b4f85bc1f1424dbe7e232420cb79d2d0c12..e5a201d672ec6a73db7dcbdbce31285fa57943a2 100644 (file)
@@ -418,6 +418,16 @@ void prefs_folder_item_general_save_func(PrefsPage *page_)
 
 }
 
+static RecvProtocol item_protocol(FolderItem *item)
+{
+       if (!item)
+               return A_NONE;
+       if (!item->folder)
+               return A_NONE;
+       if (!item->folder->account)
+               return A_NONE;
+       return item->folder->account->protocol;
+}
 void prefs_folder_item_compose_create_widget_func(PrefsPage * page_,
                                                   GtkWindow * window,
                                                   gpointer data)
@@ -429,27 +439,27 @@ void prefs_folder_item_compose_create_widget_func(PrefsPage * page_,
        GtkWidget *table;
        GtkWidget *label;
        
-       GtkWidget *checkbtn_request_return_receipt;
-       GtkWidget *checkbtn_save_copy_to_folder;
-       GtkWidget *checkbtn_default_to;
-       GtkWidget *entry_default_to;
-       GtkWidget *checkbtn_default_reply_to;
-       GtkWidget *entry_default_reply_to;
-       GtkWidget *checkbtn_enable_default_account;
-       GtkWidget *optmenu_default_account;
-       GtkWidget *optmenu_default_account_menu;
-       GtkWidget *optmenu_default_account_menuitem;
+       GtkWidget *checkbtn_request_return_receipt = NULL;
+       GtkWidget *checkbtn_save_copy_to_folder = NULL;
+       GtkWidget *checkbtn_default_to = NULL;
+       GtkWidget *entry_default_to = NULL;
+       GtkWidget *checkbtn_default_reply_to = NULL;
+       GtkWidget *entry_default_reply_to = NULL;
+       GtkWidget *checkbtn_enable_default_account = NULL;
+       GtkWidget *optmenu_default_account = NULL;
+       GtkWidget *optmenu_default_account_menu = NULL;
+       GtkWidget *optmenu_default_account_menuitem = NULL;
 #if USE_ASPELL
-       GtkWidget *checkbtn_enable_default_dictionary;
-       GtkWidget *optmenu_default_dictionary;
+       GtkWidget *checkbtn_enable_default_dictionary = NULL;
+       GtkWidget *optmenu_default_dictionary = NULL;
 #endif
-       GtkWidget *request_return_receipt_rec_checkbtn;
-       GtkWidget *save_copy_to_folder_rec_checkbtn;
-       GtkWidget *default_to_rec_checkbtn;
-       GtkWidget *default_reply_to_rec_checkbtn;
-       GtkWidget *default_account_rec_checkbtn;
+       GtkWidget *request_return_receipt_rec_checkbtn = NULL;
+       GtkWidget *save_copy_to_folder_rec_checkbtn = NULL;
+       GtkWidget *default_to_rec_checkbtn = NULL;
+       GtkWidget *default_reply_to_rec_checkbtn = NULL;
+       GtkWidget *default_account_rec_checkbtn = NULL;
 #if USE_ASPELL
-       GtkWidget *default_dictionary_rec_checkbtn;
+       GtkWidget *default_dictionary_rec_checkbtn = NULL;
 #endif
 
        GList *cur_ac;
@@ -483,75 +493,76 @@ void prefs_folder_item_compose_create_widget_func(PrefsPage * page_,
                         rowcount, rowcount + 1, GTK_SHRINK, GTK_SHRINK, 0, 0);
        rowcount++;
 
-       /* Request Return Receipt */
-       checkbtn_request_return_receipt = gtk_check_button_new_with_label
-               (_("Request Return Receipt"));
-       gtk_table_attach(GTK_TABLE(table), checkbtn_request_return_receipt, 
-                        0, 2, rowcount, rowcount + 1, GTK_SHRINK | GTK_FILL, 
-                        GTK_FILL, 0, 0);
-       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_request_return_receipt),
-                                    item->ret_rcpt ? TRUE : FALSE);
-
-       request_return_receipt_rec_checkbtn = gtk_check_button_new();
-       gtk_table_attach(GTK_TABLE(table), request_return_receipt_rec_checkbtn, 2, 3, 
-                        rowcount, rowcount + 1, GTK_SHRINK, GTK_SHRINK, 0, 0);
-       
-       rowcount++;
-
-       /* Save Copy to Folder */
-       checkbtn_save_copy_to_folder = gtk_check_button_new_with_label
-               (_("Save copy of outgoing messages to this folder instead of Sent"));
-       gtk_table_attach(GTK_TABLE(table), checkbtn_save_copy_to_folder, 0, 2, 
-                        rowcount, rowcount + 1, GTK_SHRINK | GTK_FILL, GTK_FILL, 0, 0);
-       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_save_copy_to_folder),
-                                    item->prefs->save_copy_to_folder ? TRUE : FALSE);
-
-       save_copy_to_folder_rec_checkbtn = gtk_check_button_new();
-       gtk_table_attach(GTK_TABLE(table), save_copy_to_folder_rec_checkbtn, 2, 3, 
-                        rowcount, rowcount + 1, GTK_SHRINK, GTK_SHRINK, 0, 0);
-       
-       rowcount++;
-
-       /* Default To */
-       checkbtn_default_to = gtk_check_button_new_with_label(_("Default To: "));
-       gtk_table_attach(GTK_TABLE(table), checkbtn_default_to, 0, 1, 
-                        rowcount, rowcount + 1, GTK_SHRINK | GTK_FILL, GTK_SHRINK, 0, 0);
-       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_default_to), 
-                                    item->prefs->enable_default_to);
-
-       entry_default_to = gtk_entry_new();
-       gtk_table_attach(GTK_TABLE(table), entry_default_to, 1, 2,
-                        rowcount, rowcount + 1, GTK_EXPAND | GTK_FILL, GTK_SHRINK, 0, 0);
-       SET_TOGGLE_SENSITIVITY(checkbtn_default_to, entry_default_to);
-       gtk_entry_set_text(GTK_ENTRY(entry_default_to), SAFE_STRING(item->prefs->default_to));
-       address_completion_register_entry(GTK_ENTRY(entry_default_to));
-
-       default_to_rec_checkbtn = gtk_check_button_new();
-       gtk_table_attach(GTK_TABLE(table), default_to_rec_checkbtn, 2, 3, 
-                        rowcount, rowcount + 1, GTK_SHRINK, GTK_SHRINK, 0, 0);
-       
-       rowcount++;
-
-       /* Default address to reply to */
-       checkbtn_default_reply_to = gtk_check_button_new_with_label(_("Send replies to: "));
-       gtk_table_attach(GTK_TABLE(table), checkbtn_default_reply_to, 0, 1, 
-                        rowcount, rowcount + 1, GTK_SHRINK | GTK_FILL, GTK_SHRINK, 0, 0);
-       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_default_reply_to), 
-                                    item->prefs->enable_default_reply_to);
-
-       entry_default_reply_to = gtk_entry_new();
-       gtk_table_attach(GTK_TABLE(table), entry_default_reply_to, 1, 2,
-                        rowcount, rowcount + 1, GTK_EXPAND | GTK_FILL, GTK_SHRINK, 0, 0);
-       SET_TOGGLE_SENSITIVITY(checkbtn_default_reply_to, entry_default_reply_to);
-       gtk_entry_set_text(GTK_ENTRY(entry_default_reply_to), SAFE_STRING(item->prefs->default_reply_to));
-       address_completion_register_entry(GTK_ENTRY(entry_default_reply_to));
-
-       default_reply_to_rec_checkbtn = gtk_check_button_new();
-       gtk_table_attach(GTK_TABLE(table), default_reply_to_rec_checkbtn, 2, 3, 
-                        rowcount, rowcount + 1, GTK_SHRINK, GTK_SHRINK, 0, 0);
-       
-       rowcount++;
-
+       if (item_protocol(item) != A_NNTP) {
+               /* Request Return Receipt */
+               checkbtn_request_return_receipt = gtk_check_button_new_with_label
+                       (_("Request Return Receipt"));
+               gtk_table_attach(GTK_TABLE(table), checkbtn_request_return_receipt, 
+                                0, 2, rowcount, rowcount + 1, GTK_SHRINK | GTK_FILL, 
+                                GTK_FILL, 0, 0);
+               gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_request_return_receipt),
+                                            item->ret_rcpt ? TRUE : FALSE);
+
+               request_return_receipt_rec_checkbtn = gtk_check_button_new();
+               gtk_table_attach(GTK_TABLE(table), request_return_receipt_rec_checkbtn, 2, 3, 
+                                rowcount, rowcount + 1, GTK_SHRINK, GTK_SHRINK, 0, 0);
+
+               rowcount++;
+
+               /* Save Copy to Folder */
+               checkbtn_save_copy_to_folder = gtk_check_button_new_with_label
+                       (_("Save copy of outgoing messages to this folder instead of Sent"));
+               gtk_table_attach(GTK_TABLE(table), checkbtn_save_copy_to_folder, 0, 2, 
+                                rowcount, rowcount + 1, GTK_SHRINK | GTK_FILL, GTK_FILL, 0, 0);
+               gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_save_copy_to_folder),
+                                            item->prefs->save_copy_to_folder ? TRUE : FALSE);
+
+               save_copy_to_folder_rec_checkbtn = gtk_check_button_new();
+               gtk_table_attach(GTK_TABLE(table), save_copy_to_folder_rec_checkbtn, 2, 3, 
+                                rowcount, rowcount + 1, GTK_SHRINK, GTK_SHRINK, 0, 0);
+
+               rowcount++;
+
+               /* Default To */
+               checkbtn_default_to = gtk_check_button_new_with_label(_("Default To: "));
+               gtk_table_attach(GTK_TABLE(table), checkbtn_default_to, 0, 1, 
+                                rowcount, rowcount + 1, GTK_SHRINK | GTK_FILL, GTK_SHRINK, 0, 0);
+               gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_default_to), 
+                                            item->prefs->enable_default_to);
+
+               entry_default_to = gtk_entry_new();
+               gtk_table_attach(GTK_TABLE(table), entry_default_to, 1, 2,
+                                rowcount, rowcount + 1, GTK_EXPAND | GTK_FILL, GTK_SHRINK, 0, 0);
+               SET_TOGGLE_SENSITIVITY(checkbtn_default_to, entry_default_to);
+               gtk_entry_set_text(GTK_ENTRY(entry_default_to), SAFE_STRING(item->prefs->default_to));
+               address_completion_register_entry(GTK_ENTRY(entry_default_to));
+
+               default_to_rec_checkbtn = gtk_check_button_new();
+               gtk_table_attach(GTK_TABLE(table), default_to_rec_checkbtn, 2, 3, 
+                                rowcount, rowcount + 1, GTK_SHRINK, GTK_SHRINK, 0, 0);
+
+               rowcount++;
+
+               /* Default address to reply to */
+               checkbtn_default_reply_to = gtk_check_button_new_with_label(_("Default To for replies: "));
+               gtk_table_attach(GTK_TABLE(table), checkbtn_default_reply_to, 0, 1, 
+                                rowcount, rowcount + 1, GTK_SHRINK | GTK_FILL, GTK_SHRINK, 0, 0);
+               gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_default_reply_to), 
+                                            item->prefs->enable_default_reply_to);
+
+               entry_default_reply_to = gtk_entry_new();
+               gtk_table_attach(GTK_TABLE(table), entry_default_reply_to, 1, 2,
+                                rowcount, rowcount + 1, GTK_EXPAND | GTK_FILL, GTK_SHRINK, 0, 0);
+               SET_TOGGLE_SENSITIVITY(checkbtn_default_reply_to, entry_default_reply_to);
+               gtk_entry_set_text(GTK_ENTRY(entry_default_reply_to), SAFE_STRING(item->prefs->default_reply_to));
+               address_completion_register_entry(GTK_ENTRY(entry_default_reply_to));
+
+               default_reply_to_rec_checkbtn = gtk_check_button_new();
+               gtk_table_attach(GTK_TABLE(table), default_reply_to_rec_checkbtn, 2, 3, 
+                                rowcount, rowcount + 1, GTK_SHRINK, GTK_SHRINK, 0, 0);
+
+               rowcount++;
+       }
        /* Default account */
        checkbtn_enable_default_account = gtk_check_button_new_with_label(_("Default account: "));
        gtk_table_attach(GTK_TABLE(table), checkbtn_enable_default_account, 0, 1, 
@@ -569,6 +580,14 @@ void prefs_folder_item_compose_create_widget_func(PrefsPage * page_,
        index = 0;
        for (cur_ac = account_list; cur_ac != NULL; cur_ac = cur_ac->next) {
                ac_prefs = (PrefsAccount *)cur_ac->data;
+               if (item->folder->account &&
+                   ( (item_protocol(item) == A_NNTP && ac_prefs->protocol != A_NNTP)
+                   ||(item_protocol(item) != A_NNTP && ac_prefs->protocol == A_NNTP))) 
+                       continue;
+
+               if (item->folder->klass->type != F_NEWS && ac_prefs->protocol == A_NNTP)
+                       continue;
+
                MENUITEM_ADD (optmenu_default_account_menu, optmenu_default_account_menuitem,
                                        ac_prefs->account_name?ac_prefs->account_name : _("Untitled"),
                                        ac_prefs->account_id);
@@ -592,7 +611,6 @@ void prefs_folder_item_compose_create_widget_func(PrefsPage * page_,
        default_account_rec_checkbtn = gtk_check_button_new();
        gtk_table_attach(GTK_TABLE(table), default_account_rec_checkbtn, 2, 3, 
                         rowcount, rowcount + 1, GTK_SHRINK, GTK_SHRINK, 0, 0);
-       
        rowcount++;
 
 #if USE_ASPELL
@@ -665,8 +683,10 @@ void prefs_folder_item_compose_destroy_widget_func(PrefsPage *page_)
 {
        FolderItemComposePage *page = (FolderItemComposePage *) page_;
 
-       address_completion_unregister_entry(GTK_ENTRY(page->entry_default_to));
-       address_completion_unregister_entry(GTK_ENTRY(page->entry_default_reply_to));
+       if (page->entry_default_to)
+               address_completion_unregister_entry(GTK_ENTRY(page->entry_default_to));
+       if (page->entry_default_reply_to)
+               address_completion_unregister_entry(GTK_ENTRY(page->entry_default_reply_to));
        address_completion_end(page->window);
 }
 
@@ -687,33 +707,39 @@ static void compose_save_folder_prefs(FolderItem *folder, FolderItemComposePage
 
        g_return_if_fail(prefs != NULL);
 
-       if (all || gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->request_return_receipt_rec_checkbtn))) {
-               prefs->request_return_receipt = 
-                       gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->checkbtn_request_return_receipt));
-               /* MIGRATION */    
-               folder->ret_rcpt = prefs->request_return_receipt;
-       }
-
-       if (all || gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->save_copy_to_folder_rec_checkbtn))) {
-               prefs->save_copy_to_folder = 
-                       gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->checkbtn_save_copy_to_folder));
-       }
-
-       if (all || gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->default_to_rec_checkbtn))) {
-
-               prefs->enable_default_to = 
-                       gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->checkbtn_default_to));
-               ASSIGN_STRING(prefs->default_to,
-                             gtk_editable_get_chars(GTK_EDITABLE(page->entry_default_to), 0, -1));
+       if (item_protocol(folder) != A_NNTP) {
+               if (all || gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->request_return_receipt_rec_checkbtn))) {
+                       prefs->request_return_receipt = 
+                               gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->checkbtn_request_return_receipt));
+                       /* MIGRATION */    
+                       folder->ret_rcpt = prefs->request_return_receipt;
+               }
+
+               if (all || gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->save_copy_to_folder_rec_checkbtn))) {
+                       prefs->save_copy_to_folder = 
+                               gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->checkbtn_save_copy_to_folder));
+               }
+
+               if (all || gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->default_to_rec_checkbtn))) {
+
+                       prefs->enable_default_to = 
+                               gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->checkbtn_default_to));
+                       ASSIGN_STRING(prefs->default_to,
+                                     gtk_editable_get_chars(GTK_EDITABLE(page->entry_default_to), 0, -1));
+               }
+
+               if (all || gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->default_reply_to_rec_checkbtn))) {
+                       prefs->enable_default_reply_to = 
+                               gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->checkbtn_default_reply_to));
+                       ASSIGN_STRING(prefs->default_reply_to,
+                                     gtk_editable_get_chars(GTK_EDITABLE(page->entry_default_reply_to), 0, -1));
+               }
+       } else {
+               prefs->request_return_receipt = FALSE;
+               prefs->save_copy_to_folder = FALSE;
+               prefs->enable_default_to = FALSE;
+               prefs->enable_default_reply_to = FALSE;
        }
-
-       if (all || gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->default_reply_to_rec_checkbtn))) {
-               prefs->enable_default_reply_to = 
-                       gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->checkbtn_default_reply_to));
-               ASSIGN_STRING(prefs->default_reply_to,
-                             gtk_editable_get_chars(GTK_EDITABLE(page->entry_default_reply_to), 0, -1));
-       }
-
        if (all || gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->default_account_rec_checkbtn))) {
                prefs->enable_default_account = 
                        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->checkbtn_enable_default_account));
@@ -748,12 +774,15 @@ static gboolean compose_save_recurse_func(GNode *node, gpointer data)
        /* optimise by not continuing if none of the 'apply to sub folders'
           check boxes are selected - and optimise the checking by only doing
           it once */
-       if ((node == page->item->node) &&
+       if ((node == page->item->node) && item_protocol(item) != A_NNTP &&
            !(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->request_return_receipt_rec_checkbtn)) ||
              gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->save_copy_to_folder_rec_checkbtn)) ||
              gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->default_to_rec_checkbtn)) ||
-             gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->default_reply_to_rec_checkbtn)) ||
-             gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->default_account_rec_checkbtn)) 
+             gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->default_reply_to_rec_checkbtn))))
+               return TRUE;
+
+       if ((node == page->item->node) &&
+           !(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->default_account_rec_checkbtn)) 
 #if USE_ASPELL
              || gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->default_dictionary_rec_checkbtn))
 #endif
index f0c53f352bc1a239d84fa627e6ec2aad4c9c6ec0..5c1fb447d4f409b3c6d57a0909730c15f7c8add4 100644 (file)
@@ -1995,7 +1995,7 @@ void compose_mail_cb(gpointer data, guint action, GtkWidget *widget)
        FolderItem *item = mainwin->summaryview->folder_item;   
         GList * list;
         GList * cur;
-
+       
        if (item) {
                ac = account_find_from_item(item);
                if (ac && ac->protocol != A_NNTP) {
@@ -2035,9 +2035,8 @@ void compose_news_cb(gpointer data, guint action, GtkWidget *widget)
        if (mainwin->summaryview->folder_item) {
                ac = mainwin->summaryview->folder_item->folder->account;
                if (ac && ac->protocol == A_NNTP) {
-                       compose_new(ac,
-                                   mainwin->summaryview->folder_item->path,
-                                   NULL);
+                       compose_new_with_folderitem(ac,
+                                   mainwin->summaryview->folder_item);
                        return;
                }
        }
@@ -2046,7 +2045,8 @@ void compose_news_cb(gpointer data, guint action, GtkWidget *widget)
        for(cur = list ; cur != NULL ; cur = g_list_next(cur)) {
                ac = (PrefsAccount *) cur->data;
                if (ac->protocol == A_NNTP) {
-                       compose_new(ac, NULL, NULL);
+                       compose_new_with_folderitem(ac,
+                                   mainwin->summaryview->folder_item);
                        return;
                }
        }