diff options
-rw-r--r-- | mail/ChangeLog | 5 | ||||
-rw-r--r-- | mail/mail-config-druid.c | 16 |
2 files changed, 13 insertions, 8 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 94d67ef908..36ae6a0ae5 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,8 @@ +2003-10-03 Frederic Crozat <fcrozat@mandrakesoft.com> + + * mail-config-druid.c: (identity_prepare), (config_wizard_new): + Convert real name to UTF-8 if needed. + 2003-10-03 Jeffrey Stedfast <fejj@ximian.com> * em-folder-browser.c (emfb_set_folder): Disable the selection of 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); |