aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorParthasarathi Susarla <sparthasarathi@novell.com>2005-09-29 16:35:57 +0800
committerParthasarathi Susarla <saps@src.gnome.org>2005-09-29 16:35:57 +0800
commit4dddf579f7e114957c38a8df0903c1476e79c267 (patch)
tree24fcf6b75ed3027b8fe2c515348eee63e79912ec
parentb6598269918cc76b20365945fb7a645f6925d4a4 (diff)
downloadgsoc2013-evolution-4dddf579f7e114957c38a8df0903c1476e79c267.tar.gz
gsoc2013-evolution-4dddf579f7e114957c38a8df0903c1476e79c267.tar.zst
gsoc2013-evolution-4dddf579f7e114957c38a8df0903c1476e79c267.zip
** See bug 317284
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 svn path=/trunk/; revision=30415
-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