talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 2484a4d4a370a320f1254410d3968098dc68888b
parent c946e952f540192fca77ee990f341c35074948de
Author: Paweł Pękala <c0rn@gazeta.pl>
Date:   Wed, 10 Feb 2010 17:33:13 +0000

2010-02-10 [pawel]	3.7.5cvs18

	* src/compose.c
		- fix headers filtering when prefs_common.trans_hdr is on
		- fix headers setting when changing composing account
		- plug memleak
	* src/prefs_template.c
		Re-add template's name for translation

Diffstat:
MChangeLog | 9+++++++++
MPATCHSETS | 1+
Mconfigure.ac | 2+-
Msrc/compose.c | 27++++++++++++++++++---------
Msrc/prefs_template.c | 7++++---
5 files changed, 33 insertions(+), 13 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,12 @@ +2010-02-10 [pawel] 3.7.5cvs18 + + * src/compose.c + - fix headers filtering when prefs_common.trans_hdr is on + - fix headers setting when changing composing account + - plug memleak + * src/prefs_template.c + Re-add template's name for translation + 2010-02-10 [colin] 3.7.5cvs17 * src/prefs_matcher.c diff --git a/PATCHSETS b/PATCHSETS @@ -3958,3 +3958,4 @@ ( cvs diff -u -r 1.654.2.4027 -r 1.654.2.4028 configure.ac; ) > 3.7.5cvs15.patchset ( cvs diff -u -r 1.65.2.69 -r 1.65.2.70 src/codeconv.c; cvs diff -u -r 1.15.2.23 -r 1.15.2.24 src/codeconv.h; cvs diff -u -r 1.382.2.544 -r 1.382.2.545 src/compose.c; cvs diff -u -r 1.274.2.305 -r 1.274.2.306 src/mainwindow.c; cvs diff -u -r 1.94.2.209 -r 1.94.2.210 src/messageview.c; cvs diff -u -r 1.1.2.26 -r 1.1.2.27 src/prefs_send.c; cvs diff -u -r 1.49.2.131 -r 1.49.2.132 src/procmime.c; cvs diff -u -r 1.96.2.221 -r 1.96.2.222 src/textview.c; ) > 3.7.5cvs16.patchset ( cvs diff -u -r 1.43.2.83 -r 1.43.2.84 src/prefs_matcher.c; ) > 3.7.5cvs17.patchset +( cvs diff -u -r 1.382.2.545 -r 1.382.2.546 src/compose.c; cvs diff -u -r 1.12.2.73 -r 1.12.2.74 src/prefs_template.c; ) > 3.7.5cvs18.patchset diff --git a/configure.ac b/configure.ac @@ -12,7 +12,7 @@ MINOR_VERSION=7 MICRO_VERSION=5 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=17 +EXTRA_VERSION=18 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/src/compose.c b/src/compose.c @@ -6568,8 +6568,15 @@ static void compose_add_header_entry(Compose *compose, const gchar *header, { ComposeHeaderEntry *last_header = compose->header_last; gchar *tmp = g_strdup(text), *email; - gboolean replyto_hdr = g_str_has_suffix(header, "-To:"); - + gboolean replyto_hdr; + + replyto_hdr = (!strcasecmp(header, + prefs_common_translated_header_name("Reply-To:")) || + !strcasecmp(header, + prefs_common_translated_header_name("Followup-To:")) || + !strcasecmp(header, + prefs_common_translated_header_name("In-Reply-To:"))); + extract_address(tmp); email = g_utf8_strdown(tmp, -1); @@ -6583,7 +6590,7 @@ static void compose_add_header_entry(Compose *compose, const gchar *header, return; } - if (!strcmp(header, prefs_common_translated_header_name("In-Reply-To:"))) + if (!strcasecmp(header, prefs_common_translated_header_name("In-Reply-To:"))) gtk_entry_set_text(GTK_ENTRY( gtk_bin_get_child(GTK_BIN(last_header->combo))), header); else @@ -9072,7 +9079,7 @@ static gboolean compose_edit_size_alloc(GtkEditable *widget, } typedef struct { - ComposeEntryType header; + gchar *header; gchar *entry; ComposePrefType type; gboolean entry_marked; @@ -9113,8 +9120,8 @@ static void account_activated(GtkComboBox *optmenu, gpointer data) } state = g_malloc0(sizeof(HeaderEntryState)); - state->header = combobox_get_active_data( - GTK_COMBO_BOX(hentry->combo)); + state->header = gtk_editable_get_chars(GTK_EDITABLE( + gtk_bin_get_child(GTK_BIN(hentry->combo))), 0, -1); state->entry = gtk_editable_get_chars( GTK_EDITABLE(hentry->entry), 0, -1); state->type = hentry->type; @@ -9155,12 +9162,14 @@ static void account_activated(GtkComboBox *optmenu, gpointer data) for (list = saved_list; list; list = list->next) { state = (HeaderEntryState *) list->data; - compose_entry_append(compose, state->entry, - state->header, state->type); + compose_add_header_entry(compose, state->header, + state->entry, state->type); if (state->entry_marked) compose_entry_mark_default_to(compose, state->entry); - + + g_free(state->header); g_free(state->entry); + g_free(state); } g_slist_free(saved_list); diff --git a/src/prefs_template.c b/src/prefs_template.c @@ -74,7 +74,7 @@ static struct gboolean compl; gchar *tooltips; } widgets_table[] = { - {"Name", &templates.entry_name, FALSE, + {N_("Name"), &templates.entry_name, FALSE, N_("This name is used as the Menu item")}, {"From", &templates.entry_from, TRUE, N_("Override composing account's From header. This doesn't change the composing account.")}, @@ -229,8 +229,9 @@ static void prefs_template_window_create(void) GtkWidget *label; - label = gtk_label_new(prefs_common_translated_header_name( - widgets_table[i].label)); + label = gtk_label_new( (i != 0) ? + prefs_common_translated_header_name(widgets_table[i].label) : + widgets_table[i].label); gtk_widget_show(label); gtk_table_attach(GTK_TABLE(table), label, 0, 1, i, (i + 1), (GtkAttachOptions) (GTK_FILL),