diff options
author | Marco Pesenti Gritti <marco@gnome.org> | 2004-01-25 08:38:47 +0800 |
---|---|---|
committer | Marco Pesenti Gritti <marco@src.gnome.org> | 2004-01-25 08:38:47 +0800 |
commit | f7be5f2113a67ae741146181bc163e63f027297d (patch) | |
tree | 70382299467598663e02436011701a6364cbd7ce /src/prefs-dialog.c | |
parent | 8b723af53aa4bd4b45f68f4035afd08091aecee4 (diff) | |
download | gsoc2013-epiphany-f7be5f2113a67ae741146181bc163e63f027297d.tar.gz gsoc2013-epiphany-f7be5f2113a67ae741146181bc163e63f027297d.tar.zst gsoc2013-epiphany-f7be5f2113a67ae741146181bc163e63f027297d.zip |
Add a way to get the downloads dir with a comment for translators. Use dir
2004-01-25 Marco Pesenti Gritti <marco@gnome.org>
* lib/ephy-file-helpers.c: (ephy_file_tmp_dir),
(ephy_file_downloads_dir):
* lib/ephy-file-helpers.h:
Add a way to get the downloads dir with a comment
for translators.
Use dir instead of directory consistently with
the other functions.
* embed/mozilla/MozDownload.cpp:
* src/prefs-dialog.c: (get_download_button_label):
* src/window-commands.c: (save_temp_source):
Use the helper.
Diffstat (limited to 'src/prefs-dialog.c')
-rw-r--r-- | src/prefs-dialog.c | 16 |
1 files changed, 7 insertions, 9 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; } |