aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-config-druid.c
diff options
context:
space:
mode:
authorFrédéric Crozat <fcrozat@src.gnome.org>2003-10-03 23:41:01 +0800
committerFrédéric Crozat <fcrozat@src.gnome.org>2003-10-03 23:41:01 +0800
commit1441c34f007cc19dc5d33c0f16eca59535c2aa77 (patch)
tree7b547f1fb2dd9fc8b9e6678e2c95352befb47a1d /mail/mail-config-druid.c
parent2ff5378ac931ee55e8a600731f266665cb033e99 (diff)
downloadgsoc2013-evolution-1441c34f007cc19dc5d33c0f16eca59535c2aa77.tar.gz
gsoc2013-evolution-1441c34f007cc19dc5d33c0f16eca59535c2aa77.tar.zst
gsoc2013-evolution-1441c34f007cc19dc5d33c0f16eca59535c2aa77.zip
Convert real name to UTF-8 if needed.
* mail-config-druid.c: (identity_prepare), (config_wizard_new): Convert real name to UTF-8 if needed. svn path=/trunk/; revision=22796
Diffstat (limited to 'mail/mail-config-druid.c')
-rw-r--r--mail/mail-config-druid.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/mail/mail-config-druid.c b/mail/mail-config-druid.c
index dc8f0b5220..b1686c9908 100644
--- a/mail/mail-config-druid.c
+++ b/mail/mail-config-druid.c
@@ -130,14 +130,15 @@ identity_changed (GtkWidget *widget, gpointer data)
static void
identity_prepare (MailConfigWizard *mcw)
{
- const char *name;
-
mcw->page = MAIL_CONFIG_WIZARD_PAGE_IDENTITY;
- name = gtk_entry_get_text (mcw->gui->full_name);
- if (!name) {
- name = g_get_real_name ();
+ name =
+ if (!gtk_entry_get_text (mcw->gui->full_name)) {
+ char *uname;
+
+ uname = g_locale_to_utf8 (g_get_real_name (), -1, NULL, NULL, NULL);
gtk_entry_set_text (mcw->gui->full_name, name ? name : "");
+ g_free (uname);
}
identity_changed (NULL, mcw);
}
@@ -465,7 +466,7 @@ static MailConfigWizard *
config_wizard_new (void)
{
MailConfigWizard *mcw;
- const char *name, *user;
+ const char *user;
EAccountService *xport;
struct utsname uts;
EAccount *account;
@@ -474,8 +475,7 @@ config_wizard_new (void)
account = e_account_new ();
account->enabled = TRUE;
- name = g_get_real_name ();
- account->id->name = g_strdup (name);
+ account->id->name = g_locale_to_utf8 (g_get_real_name (), -1, NULL, NULL, NULL);
user = g_get_user_name ();
if (user && !uname (&uts) && strchr (uts.nodename, '.'))
account->id->address = g_strdup_printf ("%s@%s", user, uts.nodename);