aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog7
-rw-r--r--mail/em-mailer-prefs.c29
2 files changed, 23 insertions, 13 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 330e466e0a..ed4f77c765 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,10 @@
+2005-09-29 Parthasarathi Susarla <sparthasarathi@novell.com>
+
+ ** See bug 317284
+
+ * em-mailer-prefs.c: (emmp_header_add_header):
+ Check if its a valid header and only then add it
+
2005-09-28 Tor Lillqvist <tml@novell.com>
* em-composer-utils.c (reply_get_composer, get_reply_list,
diff --git a/mail/em-mailer-prefs.c b/mail/em-mailer-prefs.c
index ff2f68713d..f956d9ce84 100644
--- a/mail/em-mailer-prefs.c
+++ b/mail/em-mailer-prefs.c
@@ -384,19 +384,22 @@ emmp_header_add_header (GtkWidget *widget, EMMailerPrefs *prefs)
{
GtkTreeModel *model = GTK_TREE_MODEL (prefs->header_list_store);
GtkTreeIter iter;
-
- gtk_list_store_append (GTK_LIST_STORE (model), &iter);
- gtk_list_store_set (GTK_LIST_STORE (model), &iter,
- HEADER_LIST_NAME_COLUMN, gtk_entry_get_text (prefs->entry_header),
- HEADER_LIST_ENABLED_COLUMN, TRUE,
- HEADER_LIST_HEADER_COLUMN, gtk_entry_get_text (prefs->entry_header),
- HEADER_LIST_IS_DEFAULT_COLUMN, FALSE,
- -1);
- gtk_entry_set_text (prefs->entry_header, "");
- emmp_header_remove_sensitivity (prefs);
- emmp_header_add_sensitivity (prefs);
-
- emmp_save_headers (prefs);
+ const gchar *text = gtk_entry_get_text (prefs->entry_header);
+
+ if (text && (strlen (text)>0)) {
+ gtk_list_store_append (GTK_LIST_STORE (model), &iter);
+ gtk_list_store_set (GTK_LIST_STORE (model), &iter,
+ HEADER_LIST_NAME_COLUMN, text,
+ HEADER_LIST_ENABLED_COLUMN, TRUE,
+ HEADER_LIST_HEADER_COLUMN, text,
+ HEADER_LIST_IS_DEFAULT_COLUMN, FALSE,
+ -1);
+ gtk_entry_set_text (prefs->entry_header, "");
+ emmp_header_remove_sensitivity (prefs);
+ emmp_header_add_sensitivity (prefs);
+
+ emmp_save_headers (prefs);
+ }
}
static void