[evolution] Bug 632171 - "New Address Book" dialog accepts whitespace for name
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug 632171 - "New Address Book" dialog accepts whitespace for name
- Date: Thu, 14 Oct 2010 21:17:42 +0000 (UTC)
commit b277e14a6a814e21f78ca72dfe302a5a8bed79c6
Author: Matthew Barnes <mbarnes redhat com>
Date: Thu Oct 14 17:17:17 2010 -0400
Bug 632171 - "New Address Book" dialog accepts whitespace for name
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 0c0bda4..b6a8051 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 *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]