From 7ff2c1327e2bba4b88e8d37107a06cc5da7fd78b Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Wed, 10 Mar 2010 15:22:08 -0500 Subject: Strip whitespace off email addresses in contact editor. --- addressbook/gui/contact-editor/e-contact-editor.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c index f7c308009a..2807b9e149 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/contact-editor/e-contact-editor.c @@ -775,7 +775,8 @@ extract_email_record (EContactEditor *editor, gint record, gchar **address, gint { GtkWidget *location_combo_box; GtkWidget *email_entry; - gchar *widget_name; + gchar *widget_name; + const gchar *text; widget_name = g_strdup_printf ("combobox-email-%d", record); location_combo_box = e_builder_get_widget (editor->builder, widget_name); @@ -785,7 +786,8 @@ extract_email_record (EContactEditor *editor, gint record, gchar **address, gint email_entry = e_builder_get_widget (editor->builder, widget_name); g_free (widget_name); - *address = g_strdup (gtk_entry_get_text (GTK_ENTRY (email_entry))); + text = gtk_entry_get_text (GTK_ENTRY (email_entry)); + *address = g_strstrip (g_strdup (text)); *location = gtk_combo_box_get_active (GTK_COMBO_BOX (location_combo_box)); } -- cgit v1.2.3