2009-03-17 [colin] 3.7.1cvs19
authorColin Leroy <colin@colino.net>
Tue, 17 Mar 2009 17:54:56 +0000 (17:54 +0000)
committerColin Leroy <colin@colino.net>
Tue, 17 Mar 2009 17:54:56 +0000 (17:54 +0000)
* src/compose.c
Fix bug 1735, 'Change To: and Newsgroups:
recipient field according account type'
Patch by Pawel

ChangeLog
PATCHSETS
configure.ac
src/compose.c

index 19a84fa31ea5edee2e429ed9cfae51689f0ada54..88c856e1f804e8a78f1f423a5f1c682d00a4b098 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-03-17 [colin]     3.7.1cvs19
+
+       * src/compose.c
+               Fix bug 1735, 'Change To: and Newsgroups: 
+               recipient field according account type'
+               Patch by Pawel
+
 2009-03-17 [colin]     3.7.1cvs18
 
        * src/msgcache.c
index 97c7ac74232e9a28eedd7f6dfc65688d83f28c9a..d436d614285cecb2053e9a7321c91ba7d189d9a6 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.16.2.35 -r 1.16.2.36 src/prefs_customheader.c;  ) > 3.7.1cvs16.patchset
 ( cvs diff -u -r 1.16.2.36 -r 1.16.2.37 src/prefs_customheader.c;  ) > 3.7.1cvs17.patchset
 ( cvs diff -u -r 1.16.2.66 -r 1.16.2.67 src/msgcache.c;  cvs diff -u -r 1.204.2.188 -r 1.204.2.189 src/prefs_common.c;  cvs diff -u -r 1.103.2.122 -r 1.103.2.123 src/prefs_common.h;  cvs diff -u -r 1.1.2.36 -r 1.1.2.37 src/prefs_other.c;  cvs diff -u -r 1.5.2.16 -r 1.5.2.17 src/common/prefs.c;  ) > 3.7.1cvs18.patchset
+( cvs diff -u -r 1.382.2.504 -r 1.382.2.505 src/compose.c;  ) > 3.7.1cvs19.patchset
index ae8239747f0055d54aecfb632caafdccddbc7277..973f925a1488d439106355a09c460812e5923a1b 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=7
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=18
+EXTRA_VERSION=19
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 76cacd72f56c4e7f38251ef78e2fc20ddad96de5..9fa239abf57160cbef7bdf9c8669e1ac7c4bdcd0 100644 (file)
@@ -4540,7 +4540,8 @@ compose_current_mail_account(void)
 static void compose_select_account(Compose *compose, PrefsAccount *account,
                                   gboolean init)
 {
-       gchar *from = NULL;
+       gchar *from = NULL, *header;
+       ComposeHeaderEntry *header_entry;
 
        cm_return_if_fail(account != NULL);
 
@@ -4578,7 +4579,26 @@ static void compose_select_account(Compose *compose, PrefsAccount *account,
                compose_insert_sig(compose, TRUE);
                undo_unblock(compose->undostruct);
        }
-
+       
+       header_entry = (ComposeHeaderEntry *) compose->header_list->data;
+       header = gtk_combo_box_get_active_text(GTK_COMBO_BOX(header_entry->combo));
+       
+       if (header && !strlen(gtk_entry_get_text(GTK_ENTRY(header_entry->entry)))) {
+               if (account->protocol == A_NNTP) {
+                       if (!strcmp(header, _("To:")))
+                               combobox_select_by_text(
+                                       GTK_COMBO_BOX(header_entry->combo),
+                                       _("Newsgroups:"));
+               } else {
+                       if (!strcmp(header, _("Newsgroups:")))
+                               combobox_select_by_text(
+                                       GTK_COMBO_BOX(header_entry->combo),
+                                       _("To:"));
+               }
+               
+       }
+       g_free(header);
+       
 #ifdef USE_ENCHANT
        /* use account's dict info if set */
        if (compose->gtkaspell) {