aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2012-03-17 01:50:32 +0800
committerMilan Crha <mcrha@redhat.com>2012-03-17 01:51:05 +0800
commit87c027f51847aa95515cff780a11839923dd0716 (patch)
tree4ee8193b2f35c997aeaabba9829b4d7c856e8e34 /addressbook
parent960a7c60019c102c2da5979702ba41c9fc6700de (diff)
downloadgsoc2013-evolution-87c027f51847aa95515cff780a11839923dd0716.tar
gsoc2013-evolution-87c027f51847aa95515cff780a11839923dd0716.tar.gz
gsoc2013-evolution-87c027f51847aa95515cff780a11839923dd0716.tar.bz2
gsoc2013-evolution-87c027f51847aa95515cff780a11839923dd0716.tar.lz
gsoc2013-evolution-87c027f51847aa95515cff780a11839923dd0716.tar.xz
gsoc2013-evolution-87c027f51847aa95515cff780a11839923dd0716.tar.zst
gsoc2013-evolution-87c027f51847aa95515cff780a11839923dd0716.zip
Bug #665399 - Cannot change File Under to custom value
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c
index 0022c4bb39..7676d62f5e 100644
--- a/addressbook/gui/contact-editor/e-contact-editor.c
+++ b/addressbook/gui/contact-editor/e-contact-editor.c
@@ -2662,7 +2662,16 @@ extract_simple_field (EContactEditor *editor,
e_contact_set (contact, field_id, (gchar *) text);
} else if (GTK_IS_COMBO_BOX_TEXT (widget)) {
- gchar *text = gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT (widget));
+ gchar *text = NULL;
+
+ if (gtk_combo_box_get_has_entry (GTK_COMBO_BOX (widget))) {
+ GtkWidget *entry = gtk_bin_get_child (GTK_BIN (widget));
+
+ text = g_strdup (gtk_entry_get_text (GTK_ENTRY (entry)));
+ }
+
+ if (!text)
+ text = gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT (widget));
e_contact_set (contact, field_id, text);
@@ -2671,7 +2680,13 @@ extract_simple_field (EContactEditor *editor,
GtkTreeIter iter;
gchar *text = NULL;
- if (gtk_combo_box_get_active_iter (GTK_COMBO_BOX (widget), &iter)) {
+ if (gtk_combo_box_get_has_entry (GTK_COMBO_BOX (widget))) {
+ GtkWidget *entry = gtk_bin_get_child (GTK_BIN (widget));
+
+ text = g_strdup (gtk_entry_get_text (GTK_ENTRY (entry)));
+ }
+
+ if (!text && gtk_combo_box_get_active_iter (GTK_COMBO_BOX (widget), &iter)) {
GtkListStore *store;
store = GTK_LIST_STORE (