diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ephy-file-chooser.c | 13 | ||||
-rw-r--r-- | lib/ephy-file-helpers.c | 10 |
2 files changed, 15 insertions, 8 deletions
diff --git a/lib/ephy-file-chooser.c b/lib/ephy-file-chooser.c index 6a59bff5a..15e57b7b9 100644 --- a/lib/ephy-file-chooser.c +++ b/lib/ephy-file-chooser.c @@ -24,6 +24,7 @@ #endif #include "ephy-file-chooser.h" +#include "ephy-file-helpers.h" #include "eel-gconf-extensions.h" #include "ephy-state.h" #include "ephy-debug.h" @@ -132,22 +133,22 @@ ephy_file_chooser_set_persist_key (EphyFileChooser *dialog, const char *key) converted = g_filename_from_utf8 (dir, -1, NULL, NULL, NULL); - expanded = gnome_vfs_expand_initial_tilde (converted); - - if (expanded != NULL) + if (converted != NULL) { + expanded = gnome_vfs_expand_initial_tilde (converted); + gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), expanded); + + g_free (expanded); + g_free (converted); } - g_free (expanded); - g_free (converted); g_free (dir); } g_signal_connect (dialog, "current-folder-changed", G_CALLBACK (current_folder_changed_cb), dialog); - } const char * 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 * |