aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-03-11 04:22:08 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-03-11 04:23:04 +0800
commit7ff2c1327e2bba4b88e8d37107a06cc5da7fd78b (patch)
treee45545a4ae2c92f3746c63c48f80e33db5b0668d /addressbook/gui
parenta5466d7c239959859af03939b390c9f6f101e407 (diff)
downloadgsoc2013-evolution-7ff2c1327e2bba4b88e8d37107a06cc5da7fd78b.tar
gsoc2013-evolution-7ff2c1327e2bba4b88e8d37107a06cc5da7fd78b.tar.gz
gsoc2013-evolution-7ff2c1327e2bba4b88e8d37107a06cc5da7fd78b.tar.bz2
gsoc2013-evolution-7ff2c1327e2bba4b88e8d37107a06cc5da7fd78b.tar.lz
gsoc2013-evolution-7ff2c1327e2bba4b88e8d37107a06cc5da7fd78b.tar.xz
gsoc2013-evolution-7ff2c1327e2bba4b88e8d37107a06cc5da7fd78b.tar.zst
gsoc2013-evolution-7ff2c1327e2bba4b88e8d37107a06cc5da7fd78b.zip
Strip whitespace off email addresses in contact editor.
Diffstat (limited to 'addressbook/gui')
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c6
1 files 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));
}