From 0aba4b1126e519fb27f9546d3e04480f402ae927 Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Mon, 21 Oct 2002 19:37:51 +0000 Subject: [ fixes #32144 ] convert the name to the gtk locale before saving. 2002-10-20 Chris Toshok [ fixes #32144 ] * gui/contact-editor/e-contact-save-as.c (e_contact_save_as): convert the name to the gtk locale before saving. (e_contact_list_save_as): same. svn path=/trunk/; revision=18403 --- addressbook/gui/contact-editor/e-contact-save-as.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'addressbook/gui') diff --git a/addressbook/gui/contact-editor/e-contact-save-as.c b/addressbook/gui/contact-editor/e-contact-save-as.c index f2251ee233..2772569b47 100644 --- a/addressbook/gui/contact-editor/e-contact-save-as.c +++ b/addressbook/gui/contact-editor/e-contact-save-as.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -125,6 +126,7 @@ e_contact_save_as(char *title, ECard *card, GtkWindow *parent_window) GtkFileSelection *filesel; char *file; char *name; + char *locale_name; SaveAsInfo *info = g_new(SaveAsInfo, 1); filesel = GTK_FILE_SELECTION(gtk_file_selection_new(title)); @@ -132,9 +134,11 @@ e_contact_save_as(char *title, ECard *card, GtkWindow *parent_window) gtk_object_get (GTK_OBJECT (card), "file_as", &name, NULL); - file = make_safe_filename (g_get_home_dir(), name); + locale_name = e_utf8_to_locale_string (name); + file = make_safe_filename (g_get_home_dir(), locale_name); gtk_file_selection_set_filename (filesel, file); g_free (file); + g_free (locale_name); info->filesel = filesel; info->vcard = e_card_get_vcard(card); @@ -165,13 +169,15 @@ e_contact_list_save_as(char *title, GList *list, GtkWindow *parent_window) /* This is a filename. Translators take note. */ if (list && list->data && list->next == NULL) { - char *name, *file; + char *name, *locale_name, *file; gtk_object_get (GTK_OBJECT (list->data), "file_as", &name, NULL); - file = make_safe_filename (g_get_home_dir(), name); + locale_name = e_utf8_to_locale_string (name); + file = make_safe_filename (g_get_home_dir(), locale_name); gtk_file_selection_set_filename (filesel, file); g_free (file); + g_free (locale_name); } else { char *file; file = make_safe_filename (g_get_home_dir(), _("list")); -- cgit