From 9a60859203bc5ce6fd7bf8f7a5a1d1461cf4c724 Mon Sep 17 00:00:00 2001 From: Frédéric Crozat Date: Wed, 25 Aug 2004 10:59:53 +0000 Subject: Convert filename to UTF-8 from local encoding before displaying it. * importers/evolution-mbox-importer.c: (load_file_fn): * importers/evolution-outlook-importer.c: (load_file_fn): * importers/mail-importer.c: (import_folders_rec): Convert filename to UTF-8 from local encoding before displaying it. svn path=/trunk/; revision=27019 --- mail/ChangeLog | 7 +++++++ mail/importers/evolution-mbox-importer.c | 7 +++++-- mail/importers/evolution-outlook-importer.c | 5 ++++- mail/importers/mail-importer.c | 6 ++++-- 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/mail/ChangeLog b/mail/ChangeLog index 29ebcc8609..47b6864f27 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,10 @@ +2004-08-25 Frederic Crozat + + * importers/evolution-mbox-importer.c: (load_file_fn): + * importers/evolution-outlook-importer.c: (load_file_fn): + * importers/mail-importer.c: (import_folders_rec): + Convert filename to UTF-8 from local encoding before displaying it. + 2004-08-23 Not Zed * em-folder-tree.c (em_folder_tree_set_selected): store the diff --git a/mail/importers/evolution-mbox-importer.c b/mail/importers/evolution-mbox-importer.c index 94b8403e28..78b6c7d27b 100644 --- a/mail/importers/evolution-mbox-importer.c +++ b/mail/importers/evolution-mbox-importer.c @@ -214,10 +214,13 @@ static gboolean load_file_fn(EvolutionImporter *eimporter, const char *filename, void *data) { MboxImporter *importer = data; - + char *utf8_filename; + + utf8_filename = g_filename_to_utf8 (filename, -1, NULL, NULL, NULL); importer->dialog = gtk_message_dialog_new(NULL, 0/*GTK_DIALOG_NO_SEPARATOR*/, GTK_MESSAGE_INFO, GTK_BUTTONS_CANCEL, - _("Importing `%s'"), filename); + _("Importing `%s'"), utf8_filename); + g_free (utf8_filename); gtk_window_set_title (GTK_WINDOW (importer->dialog), _("Importing...")); importer->label = gtk_label_new (_("Please wait")); diff --git a/mail/importers/evolution-outlook-importer.c b/mail/importers/evolution-outlook-importer.c index 83f5c241a2..bf05c6316d 100644 --- a/mail/importers/evolution-outlook-importer.c +++ b/mail/importers/evolution-outlook-importer.c @@ -248,10 +248,13 @@ static gboolean load_file_fn(EvolutionImporter *eimporter, const char *filename, void *data) { OutlookImporter *importer = data; + char *utf8_filename; + utf8_filename = g_filename_to_utf8 (filename, -1, NULL, NULL, NULL); importer->dialog = gtk_message_dialog_new(NULL, 0/*GTK_DIALOG_NO_SEPARATOR*/, GTK_MESSAGE_INFO, GTK_BUTTONS_CANCEL, - _("Importing `%s'"), filename); + _("Importing `%s'"), utf8_filename); + g_free (utf8_filename); gtk_window_set_title (GTK_WINDOW (importer->dialog), _("Importing...")); importer->label = gtk_label_new (_("Please wait")); diff --git a/mail/importers/mail-importer.c b/mail/importers/mail-importer.c index 937b53f937..080ce36491 100644 --- a/mail/importers/mail-importer.c +++ b/mail/importers/mail-importer.c @@ -350,14 +350,16 @@ import_folders_rec(struct _import_folders_data *m, const char *filepath, const c DIR *dir; struct dirent *d; struct stat st; - char *filefull, *foldersub, *uri; + char *filefull, *foldersub, *uri, utf8_filename; const char *folder; dir = opendir(filepath); if (dir == NULL) return; - camel_operation_start(NULL, _("Scanning %s"), filepath); + utf8_filename = g_filename_to_utf8 (filepath, -1, NULL, NULL, NULL); + camel_operation_start(NULL, _("Scanning %s"), utf8_filename); + g_free (utf8_filename); while ( (d=readdir(dir)) ) { if (d->d_name[0] == '.') -- cgit