diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2004-02-13 04:08:25 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2004-02-13 04:08:25 +0800 |
commit | daf9595797776944cc11626c7ac0c444a0602090 (patch) | |
tree | e28958cb51da73f2c8d41de7fc1087f3c82946c8 | |
parent | fe1419fe5d8f024214f008cf7cf2af61cf7b241f (diff) | |
download | gsoc2013-epiphany-daf9595797776944cc11626c7ac0c444a0602090.tar.gz gsoc2013-epiphany-daf9595797776944cc11626c7ac0c444a0602090.tar.zst gsoc2013-epiphany-daf9595797776944cc11626c7ac0c444a0602090.zip |
Unify fallback downloads dir to get the home directory.
2004-02-12 Christian Persch <chpe@cvs.gnome.org>
* embed/mozilla/MozDownload.cpp:
* src/prefs-dialog.c: (get_download_button_label):
Unify fallback downloads dir to get the home directory.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | embed/mozilla/MozDownload.cpp | 4 | ||||
-rw-r--r-- | src/prefs-dialog.c | 21 |
3 files changed, 17 insertions, 15 deletions
@@ -1,5 +1,12 @@ 2004-02-12 Christian Persch <chpe@cvs.gnome.org> + * embed/mozilla/MozDownload.cpp: + * src/prefs-dialog.c: (get_download_button_label): + + Unify fallback downloads dir to get the home directory. + +2004-02-12 Christian Persch <chpe@cvs.gnome.org> + * embed/mozilla/GtkNSSDialogs.cpp: Don't insist on a parent for the dialogue; because there isn't one diff --git a/embed/mozilla/MozDownload.cpp b/embed/mozilla/MozDownload.cpp index 4be00f301..6261b40af 100644 --- a/embed/mozilla/MozDownload.cpp +++ b/embed/mozilla/MozDownload.cpp @@ -548,10 +548,6 @@ GetFilePath (const char *filename) if (!download_dir) { /* Emergency download destination */ - /* FIXME !! prefs-dialog.c::get_download_button_label() - * claims that fallback for key == NULL is the - * downloads dir, not the home dir ! - */ return g_build_filename (g_get_home_dir (), filename, NULL); } diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c index 9b0a228a4..398b90a89 100644 --- a/src/prefs-dialog.c +++ b/src/prefs-dialog.c @@ -1093,17 +1093,7 @@ get_download_button_label () downloads_path = ephy_file_downloads_dir (); converted_dp = g_filename_to_utf8 (downloads_path, -1, NULL, NULL, NULL); - if (key == NULL || - g_utf8_collate (key, converted_dp) == 0 || - g_utf8_collate (key, "Downloads") == 0) - { - label = g_strdup (_("Downloads")); - } - else if (g_utf8_collate (key, "~/Desktop") == 0) - { - label = g_strdup (_("Desktop")); - } - else if (g_utf8_collate (key, "~") == 0) + if (key == NULL || g_utf8_collate (key, "~") == 0) { /* Note that this does NOT refer to the home page but to a * user's home folder. It should be translated by the same @@ -1111,6 +1101,15 @@ get_download_button_label () * filechooser */ label = g_strdup (_("Home")); } + else if ((converted_dp != NULL && g_utf8_collate (key, converted_dp) == 0) || + g_utf8_collate (key, "Downloads") == 0) + { + label = g_strdup (_("Downloads")); + } + else if (g_utf8_collate (key, "~/Desktop") == 0) + { + label = g_strdup (_("Desktop")); + } else { label = g_strdup (key); |