diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/prefs-dialog.c | 16 | ||||
-rw-r--r-- | src/window-commands.c | 3 |
2 files changed, 9 insertions, 10 deletions
diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c index 18d4dd1c4..f92910b07 100644 --- a/src/prefs-dialog.c +++ b/src/prefs-dialog.c @@ -1087,40 +1087,38 @@ get_download_button_label () char *key, *label, *downloads_path; key = eel_gconf_get_string (CONF_STATE_DOWNLOAD_DIR); - downloads_path = g_build_path (g_get_home_dir (), "Desktop", - _("Downloads"), NULL); + downloads_path = ephy_file_downloads_dir (); - /* fallback to Home directory */ + /* fallback to default downloads directory */ if (key == NULL) { - key = g_strdup ("~"); + key = ephy_file_downloads_dir (); } if (g_utf8_collate (key, "~/Desktop") == 0) { - g_free (key); label = g_strdup (_("Desktop")); } else if (g_utf8_collate (key, "~") == 0) { - g_free (key); /* Note that this does NOT refer to the home page but to a * user's home folder. It should be translated by the same * term as GTK+'s "Home" string to be consistent with the * filechooser */ label = g_strdup (_("Home")); } - else if (g_utf8_collate (key, downloads_path) == 0) + else if (g_utf8_collate (key, downloads_path) == 0 || + g_utf8_collate (key, "Downloads") == 0) { - g_free (key); label = g_strdup (_("Downloads")); } else { - label = key; + label = g_strdup (key); } g_free (downloads_path); + g_free (key); return label; } diff --git a/src/window-commands.c b/src/window-commands.c index 4714edfcb..8ab797c55 100644 --- a/src/window-commands.c +++ b/src/window-commands.c @@ -739,11 +739,12 @@ save_temp_source (EphyEmbed *embed) const char *static_temp_dir; - static_temp_dir = ephy_file_tmp_directory (); + static_temp_dir = ephy_file_tmp_dir (); if (static_temp_dir == NULL) { return; } + base = g_build_filename (static_temp_dir, "viewsourceXXXXXX", NULL); tmp = ephy_file_tmp_filename (base, "html"); g_free (base); |