aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/contact-editor/e-contact-quick-add.c
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook/contact-editor/e-contact-quick-add.c')
-rw-r--r--addressbook/contact-editor/e-contact-quick-add.c26
1 files changed, 20 insertions, 6 deletions
diff --git a/addressbook/contact-editor/e-contact-quick-add.c b/addressbook/contact-editor/e-contact-quick-add.c
index 0ab39701d3..f9556f6758 100644
--- a/addressbook/contact-editor/e-contact-quick-add.c
+++ b/addressbook/contact-editor/e-contact-quick-add.c
@@ -36,6 +36,7 @@
#include <libgnomeui/gnome-app.h>
#include <libgnomeui/gnome-dialog.h>
#include <libgnomeui/gnome-stock.h>
+#include <gal/widgets/e-unicode.h>
#include <addressbook/backend/ebook/e-book.h>
#include <addressbook/backend/ebook/e-book-util.h>
#include <addressbook/backend/ebook/e-card.h>
@@ -179,10 +180,19 @@ clicked_cb (GtkWidget *w, gint button, gpointer user_data)
name_entry = gtk_object_get_data (GTK_OBJECT (card), "e-contact-quick-add-name-entry");
email_entry = gtk_object_get_data (GTK_OBJECT (card), "e-contact-quick-add-email-entry");
- if (name_entry)
- name = gtk_editable_get_chars (GTK_EDITABLE (name_entry), 0, -1);
- if (email_entry)
- email = gtk_editable_get_chars (GTK_EDITABLE (email_entry), 0, -1);
+ if (name_entry) {
+ gchar *tmp;
+ tmp = gtk_editable_get_chars (GTK_EDITABLE (name_entry), 0, -1);
+ name = e_utf8_from_gtk_string (name_entry, tmp);
+ g_free (tmp);
+ }
+
+ if (email_entry) {
+ gchar *tmp;
+ tmp = gtk_editable_get_chars (GTK_EDITABLE (email_entry), 0, -1);
+ email = e_utf8_from_gtk_string (email_entry, tmp);
+ g_free (tmp);
+ }
e_card_quick_set_name (card, name);
e_card_quick_set_email (card, email);
@@ -235,8 +245,10 @@ build_quick_add_dialog (ECard *new_card, EContactQuickAddCallback cb, gpointer u
if (new_card->name) {
gchar *str = e_card_name_to_string (new_card->name);
- gtk_entry_set_text (GTK_ENTRY (name_entry), str);
+ gchar *s2 = e_utf8_to_gtk_string (name_entry, str);
+ gtk_entry_set_text (GTK_ENTRY (name_entry), s2);
g_free (str);
+ g_free (s2);
}
@@ -248,7 +260,9 @@ build_quick_add_dialog (ECard *new_card, EContactQuickAddCallback cb, gpointer u
e_iterator_reset (iterator);
if (e_iterator_is_valid (iterator)) {
const gchar *str = e_iterator_get (iterator);
- gtk_entry_set_text (GTK_ENTRY (email_entry), str);
+ gchar *s2 = e_utf8_to_gtk_string (email_entry, str);
+ gtk_entry_set_text (GTK_ENTRY (email_entry), s2);
+ g_free (s2);
}
}
}