aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/ephy-file-helpers.c14
-rw-r--r--lib/ephy-file-helpers.h5
2 files changed, 17 insertions, 2 deletions
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)
{
@@ -60,6 +60,18 @@ ephy_file_tmp_directory (void)
}
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);