diff options
Diffstat (limited to 'addressbook/gui')
-rw-r--r-- | addressbook/gui/contact-editor/e-contact-save-as.c | 12 |
1 files changed, 9 insertions, 3 deletions
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 <gtk/gtk.h> #include <libgnomeui/gnome-dialog.h> #include <gal/util/e-util.h> +#include <gal/widgets/e-unicode.h> #include <libgnome/gnome-i18n.h> #include <errno.h> #include <string.h> @@ -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")); |