diff options
-rw-r--r-- | addressbook/ChangeLog | 7 | ||||
-rw-r--r-- | addressbook/gui/contact-editor/e-contact-save-as.c | 12 |
2 files changed, 16 insertions, 3 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index a5945c9e3c..98b7f657aa 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,10 @@ +2002-10-20 Chris Toshok <toshok@ximian.com> + + [ 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. + 2002-10-19 Chris Toshok <toshok@ximian.com> [ probable fix for #25477, and memory leak fix ] 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")); |