2009-05-22 15:35:15 +02:00
|
|
|
From: Wolfgang Rosenauer
|
|
|
|
Subject: Don't use localized Downloads unless XDG is set up
|
|
|
|
References:
|
|
|
|
https://bugzilla.novell.com/show_bug.cgi?id=501724
|
|
|
|
|
|
|
|
diff --git a/browser/components/preferences/main.js b/browser/components/preferences/main.js
|
|
|
|
--- a/browser/components/preferences/main.js
|
|
|
|
+++ b/browser/components/preferences/main.js
|
2014-04-27 18:09:32 +02:00
|
|
|
@@ -290,17 +290,17 @@ var gMainPane = {
|
|
|
|
// and was available as an option in the 1.5 drop down. On XP this
|
|
|
|
// was in My Documents, on OSX it was in User Docs. In 2.0, we did
|
|
|
|
// away with the drop down option, although the special label was
|
|
|
|
// still supported for the folder if it existed. Because it was
|
|
|
|
// not exposed it was rarely used.
|
2009-05-22 15:35:15 +02:00
|
|
|
// With 3.0, a new desktop folder - 'Downloads' was introduced for
|
|
|
|
// platforms and versions that don't support a default system downloads
|
|
|
|
// folder. See nsDownloadManager for details.
|
|
|
|
- downloadFolder.label = bundlePreferences.getString("downloadsFolderName");
|
|
|
|
+ downloadFolder.label = "Downloads";
|
|
|
|
iconUrlSpec = fph.getURLSpecFromFile(this._indexToFolder(1));
|
|
|
|
} else {
|
|
|
|
// 'Desktop'
|
2014-04-27 18:09:32 +02:00
|
|
|
downloadFolder.label = bundlePreferences.getString("desktopFolderName");
|
|
|
|
iconUrlSpec = fph.getURLSpecFromFile(this._getDownloadsFolder("Desktop"));
|
|
|
|
}
|
|
|
|
downloadFolder.image = "moz-icon://" + iconUrlSpec + "?size=16";
|
|
|
|
|
2011-06-01 08:05:09 +02:00
|
|
|
diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/components/downloads/nsDownloadManager.cpp
|
|
|
|
--- a/toolkit/components/downloads/nsDownloadManager.cpp
|
|
|
|
+++ b/toolkit/components/downloads/nsDownloadManager.cpp
|
2014-04-27 18:09:32 +02:00
|
|
|
@@ -1365,18 +1365,20 @@ nsDownloadManager::GetDefaultDownloadsDi
|
|
|
|
// Vista:
|
|
|
|
// Downloads
|
|
|
|
// XP/2K:
|
|
|
|
// My Documents/Downloads
|
|
|
|
// Linux:
|
2009-05-22 15:35:15 +02:00
|
|
|
// XDG user dir spec, with a fallback to Home/Downloads
|
|
|
|
|
|
|
|
nsXPIDLString folderName;
|
2014-04-27 18:09:32 +02:00
|
|
|
- mBundle->GetStringFromName(MOZ_UTF16("downloadsFolder"),
|
2009-05-22 15:35:15 +02:00
|
|
|
- getter_Copies(folderName));
|
|
|
|
+ // We don't want localized "Downloads" unless XDG is used
|
|
|
|
+ //mBundle->GetStringFromName(NS_LITERAL_STRING("downloadsFolder").get(),
|
|
|
|
+ // getter_Copies(folderName));
|
|
|
|
+ folderName.AssignLiteral("Downloads");
|
|
|
|
|
|
|
|
#if defined (XP_MACOSX)
|
|
|
|
rv = dirService->Get(NS_OSX_DEFAULT_DOWNLOAD_DIR,
|
2014-04-27 18:09:32 +02:00
|
|
|
NS_GET_IID(nsIFile),
|
|
|
|
getter_AddRefs(downloadDir));
|
|
|
|
NS_ENSURE_SUCCESS(rv, rv);
|
|
|
|
#elif defined(XP_WIN)
|
|
|
|
rv = dirService->Get(NS_WIN_DEFAULT_DOWNLOAD_DIR,
|