aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/addressbook/addressbook-config.c9
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 *