commit 0694d8570ab60aabc2b8ba3f07b77c96e034bb20
parent c064ef0fde6e2d1f01f0bf023f52c122b6db46f1
Author: Colin Leroy <colin@colino.net>
Date: Tue, 17 Mar 2009 17:54:56 +0000
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
Diffstat:
4 files changed, 31 insertions(+), 3 deletions(-)
diff --git 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
diff --git a/PATCHSETS b/PATCHSETS
@@ -3758,3 +3758,4 @@
( 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
diff --git a/configure.ac b/configure.ac
@@ -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=
diff --git a/src/compose.c b/src/compose.c
@@ -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) {