aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-03-05 08:31:06 +0800
committerChristian Persch <chpe@src.gnome.org>2004-03-05 08:31:06 +0800
commitefbcfccc35fffe945d517716db426730b7da3c6b (patch)
tree22a97100dc04caf2e6d913ff5c01d56fac8a96b4
parenta6a3257ce715d1e88f656b29def443829af1967d (diff)
downloadgsoc2013-epiphany-efbcfccc35fffe945d517716db426730b7da3c6b.tar.gz
gsoc2013-epiphany-efbcfccc35fffe945d517716db426730b7da3c6b.tar.zst
gsoc2013-epiphany-efbcfccc35fffe945d517716db426730b7da3c6b.zip
Don't assume Desktop directory location, check the gconf key if it's
2004-03-05 Christian Persch <chpe@cvs.gnome.org> * lib/ephy-file-helpers.c: (ephy_file_downloads_dir): Don't assume Desktop directory location, check the gconf key if it's $HOME/Desktop or $HOME. Fixes bug #134951.
-rw-r--r--ChangeLog7
-rw-r--r--lib/ephy-file-helpers.c19
2 files changed, 24 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index d944a0226..2d602ce0d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2004-03-05 Christian Persch <chpe@cvs.gnome.org>
+ * lib/ephy-file-helpers.c: (ephy_file_downloads_dir):
+
+ Don't assume Desktop directory location, check the gconf key if it's
+ $HOME/Desktop or $HOME. Fixes bug #134951.
+
+2004-03-05 Christian Persch <chpe@cvs.gnome.org>
+
* embed/mozilla/EphyHeaderSniffer.cpp:
Replace filename validity check, it was making the filename invalid
diff --git a/lib/ephy-file-helpers.c b/lib/ephy-file-helpers.c
index 543559acd..c8ce0ce08 100644
--- a/lib/ephy-file-helpers.c
+++ b/lib/ephy-file-helpers.c
@@ -31,6 +31,8 @@
#include <libgnome/gnome-init.h>
#include "ephy-file-helpers.h"
+#include "ephy-prefs.h"
+#include "eel-gconf-extensions.h"
static GHashTable *files = NULL;
@@ -67,14 +69,27 @@ ephy_file_downloads_dir (void)
{
const char *translated_folder;
char *converted, *downloads_dir;
+ gboolean desktop_is_home;
/* The name of the default downloads folder */
translated_folder = _("Downloads");
converted = g_filename_from_utf8 (translated_folder, -1, NULL,
NULL, NULL);
- downloads_dir = g_build_filename (g_get_home_dir (), "Desktop",
- converted, NULL);
+
+ desktop_is_home = eel_gconf_get_boolean (CONF_DESKTOP_IS_HOME_DIR);
+
+ if (desktop_is_home)
+ {
+ downloads_dir = g_build_filename
+ (g_get_home_dir (), converted, NULL);
+ }
+ else
+ {
+ downloads_dir = g_build_filename
+ (g_get_home_dir (), "Desktop", converted, NULL);
+ }
+
g_free (converted);
return downloads_dir;