From f7be5f2113a67ae741146181bc163e63f027297d Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Sun, 25 Jan 2004 00:38:47 +0000 Subject: Add a way to get the downloads dir with a comment for translators. Use dir 2004-01-25 Marco Pesenti Gritti * 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. --- lib/ephy-file-helpers.c | 14 +++++++++++++- lib/ephy-file-helpers.h | 5 ++++- 2 files changed, 17 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/ephy-file-helpers.c b/lib/ephy-file-helpers.c index f58ac40e0..7bb1fbeae 100644 --- a/lib/ephy-file-helpers.c +++ b/lib/ephy-file-helpers.c @@ -39,7 +39,7 @@ static char *tmp_dir = NULL; static GList *del_on_exit = NULL; const char * -ephy_file_tmp_directory (void) +ephy_file_tmp_dir (void) { if (tmp_dir == NULL) { @@ -59,6 +59,18 @@ ephy_file_tmp_directory (void) return tmp_dir; } +char * +ephy_file_downloads_dir (void) +{ + const char *translated_folder; + + /* The name of the default downloads folder */ + translated_folder = _("Downloads"); + + return g_build_filename (g_get_home_dir (), "Desktop", + translated_folder, NULL); +} + char * ephy_file_tmp_filename (const char *base, const char *extension) diff --git a/lib/ephy-file-helpers.h b/lib/ephy-file-helpers.h index 2785b6cfa..63ab458de 100644 --- a/lib/ephy-file-helpers.h +++ b/lib/ephy-file-helpers.h @@ -34,7 +34,10 @@ void ephy_file_helpers_init (void); void ephy_file_helpers_shutdown (void); -const char *ephy_file_tmp_directory (void); +char *ephy_file_downloads_dir (void); + +const char *ephy_file_tmp_dir (void); + char *ephy_file_tmp_filename (const char *base, const char *extension); -- cgit v1.2.3