aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--embed/mozilla/MozDownload.cpp5
-rw-r--r--lib/ephy-file-helpers.c25
-rw-r--r--lib/ephy-file-helpers.h2
-rw-r--r--src/prefs-dialog.c4
5 files changed, 39 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 8df73620a..d3687ad50 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
2004-10-02 Christian Persch <chpe@cvs.gnome.org>
+ * embed/mozilla/MozDownload.cpp:
+ * lib/ephy-file-helpers.c: (ephy_file_downloads_dir),
+ (ephy_file_desktop_dir):
+ * lib/ephy-file-helpers.h:
+ * src/prefs-dialog.c: (get_download_button_label):
+
+ Recognise "Desktop" special downloads directory. Fixes bug #152926.
+
+2004-10-02 Christian Persch <chpe@cvs.gnome.org>
+
* Makefile.am:
Add --with-mozilla to distcheck's configure arguments.
diff --git a/embed/mozilla/MozDownload.cpp b/embed/mozilla/MozDownload.cpp
index c615f8be1..a70daf0c8 100644
--- a/embed/mozilla/MozDownload.cpp
+++ b/embed/mozilla/MozDownload.cpp
@@ -600,6 +600,11 @@ GetFilePath (const char *filename)
g_free (download_dir);
download_dir = ephy_file_downloads_dir ();
}
+ else if (download_dir && strcmp (download_dir, "Desktop") == 0)
+ {
+ g_free (download_dir);
+ download_dir = ephy_file_desktop_dir ();
+ }
else if (download_dir)
{
char *converted_dp;
diff --git a/lib/ephy-file-helpers.c b/lib/ephy-file-helpers.c
index 138d8719f..49f4c487d 100644
--- a/lib/ephy-file-helpers.c
+++ b/lib/ephy-file-helpers.c
@@ -72,8 +72,7 @@ char *
ephy_file_downloads_dir (void)
{
const char *translated_folder;
- char *converted, *downloads_dir;
- gboolean desktop_is_home;
+ char *desktop_dir, *converted, *downloads_dir;
/* The name of the default downloads folder */
translated_folder = _("Downloads");
@@ -81,21 +80,33 @@ ephy_file_downloads_dir (void)
converted = g_filename_from_utf8 (translated_folder, -1, NULL,
NULL, NULL);
+ desktop_dir = ephy_file_desktop_dir ();
+ downloads_dir = g_build_filename (desktop_dir, converted, NULL);
+
+ g_free (desktop_dir);
+ g_free (converted);
+
+ return downloads_dir;
+}
+
+char *
+ephy_file_desktop_dir (void)
+{
+ char *downloads_dir;
+ gboolean desktop_is_home;
+
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);
+ downloads_dir = g_strdup (g_get_home_dir ());
}
else
{
downloads_dir = g_build_filename
- (g_get_home_dir (), "Desktop", converted, NULL);
+ (g_get_home_dir (), "Desktop", NULL);
}
- g_free (converted);
-
return downloads_dir;
}
diff --git a/lib/ephy-file-helpers.h b/lib/ephy-file-helpers.h
index bfb7e1b6c..6beb2951a 100644
--- a/lib/ephy-file-helpers.h
+++ b/lib/ephy-file-helpers.h
@@ -35,6 +35,8 @@ void ephy_file_helpers_shutdown (void);
char *ephy_file_downloads_dir (void);
+char *ephy_file_desktop_dir (void);
+
const char *ephy_file_tmp_dir (void);
char *ephy_file_tmp_filename (const char *base,
diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c
index 35155f4e9..abd0d7da6 100644
--- a/src/prefs-dialog.c
+++ b/src/prefs-dialog.c
@@ -1112,6 +1112,10 @@ get_download_button_label ()
{
label = g_strdup (_("Desktop"));
}
+ else if (g_utf8_collate (key, "Desktop") == 0)
+ {
+ label = g_strdup (_("Desktop"));
+ }
else
{
label = g_strdup (key);