From 4c401b884b4e4529e470346dd9d0e834661b3823 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Thu, 12 Feb 2004 19:13:54 +0000 Subject: Fix numerous places where we weren't properly converting between UTF-8 and 2004-02-12 Christian Persch * embed/ephy-embed-popup-control.c: (save_url), (embed_popup_set_image_as_background_cmd): * embed/ephy-favicon-cache.c: (ephy_favicon_cache_get_type), (ephy_favicon_cache_class_init), (favicon_name_build), (favicon_download_completed_cb), (ephy_favicon_cache_get): * embed/mozilla/FilePicker.cpp: * embed/mozilla/MozDownload.cpp: * lib/ephy-file-chooser.c: (ephy_file_chooser_set_persist_key): * lib/ephy-file-helpers.c: (ephy_file_downloads_dir): * src/popup-commands.c: (popup_cmd_set_image_as_background): * src/prefs-dialog.c: (get_download_button_label), (download_path_response_cb): Fix numerous places where we weren't properly converting between UTF-8 and filename encoding. * embed/ephy-favicon-cache.c: Bump favicon cache xml version. * embed/mozilla/EphyHeaderSniffer.cpp: Fix mem leak, and use CONF_STATE_SAVE_DIR instead of the download dir key for directory persistence. --- lib/ephy-file-helpers.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'lib/ephy-file-helpers.c') diff --git a/lib/ephy-file-helpers.c b/lib/ephy-file-helpers.c index 1c316f8f4..dd69fdb60 100644 --- a/lib/ephy-file-helpers.c +++ b/lib/ephy-file-helpers.c @@ -66,12 +66,18 @@ char * ephy_file_downloads_dir (void) { const char *translated_folder; + char *converted, *downloads_dir; /* The name of the default downloads folder */ translated_folder = _("Downloads"); - return g_build_filename (g_get_home_dir (), "Desktop", - translated_folder, NULL); + converted = g_filename_from_utf8 (translated_folder, -1, NULL, + NULL, NULL); + downloads_dir = g_build_filename (g_get_home_dir (), "Desktop", + converted, NULL); + g_free (converted); + + return downloads_dir; } char * -- cgit v1.2.3