diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-10-15 05:17:17 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-10-15 05:17:17 +0800 |
commit | b277e14a6a814e21f78ca72dfe302a5a8bed79c6 (patch) | |
tree | 7dff2bc4579748efcc790ee08297961d40ef980e /modules | |
parent | d4e5485e0237d1ff38b74083c304336d86cbca33 (diff) | |
download | gsoc2013-evolution-b277e14a6a814e21f78ca72dfe302a5a8bed79c6.tar.gz gsoc2013-evolution-b277e14a6a814e21f78ca72dfe302a5a8bed79c6.tar.zst gsoc2013-evolution-b277e14a6a814e21f78ca72dfe302a5a8bed79c6.zip |
Bug 632171 - "New Address Book" dialog accepts whitespace for name
Diffstat (limited to 'modules')
-rw-r--r-- | modules/addressbook/addressbook-config.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/modules/addressbook/addressbook-config.c b/modules/addressbook/addressbook-config.c index 0c0bda4753..b6a80519d5 100644 --- a/modules/addressbook/addressbook-config.c +++ b/modules/addressbook/addressbook-config.c @@ -544,7 +544,14 @@ eabc_general_type (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget static void name_changed_cb (GtkWidget *w, AddressbookSourceDialog *sdialog) { - e_source_set_name (sdialog->source, gtk_entry_get_text (GTK_ENTRY (sdialog->display_name))); + const gchar *text; + gchar *stripped_name; + + text = gtk_entry_get_text (GTK_ENTRY (sdialog->display_name)); + + stripped_name = g_strstrip (g_strdup (text)); + e_source_set_name (sdialog->source, stripped_name); + g_free (stripped_name); } static GtkWidget * |