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
|
2015-04-01 07:22:19 +02:00
|
|
|
@@ -408,17 +408,17 @@ var gMainPane = {
|
2014-04-27 18:09:32 +02:00
|
|
|
// 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";
|
2015-04-01 07:22:19 +02:00
|
|
|
iconUrlSpec = fph.getURLSpecFromFile(yield this._indexToFolder(1));
|
2009-05-22 15:35:15 +02:00
|
|
|
} else {
|
|
|
|
// 'Desktop'
|
2014-04-27 18:09:32 +02:00
|
|
|
downloadFolder.label = bundlePreferences.getString("desktopFolderName");
|
2015-04-01 07:22:19 +02:00
|
|
|
iconUrlSpec = fph.getURLSpecFromFile(yield this._getDownloadsFolder("Desktop"));
|
2014-04-27 18:09:32 +02:00
|
|
|
}
|
|
|
|
downloadFolder.image = "moz-icon://" + iconUrlSpec + "?size=16";
|
2015-04-01 07:22:19 +02:00
|
|
|
}),
|
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
|
2015-04-01 07:22:19 +02:00
|
|
|
@@ -1361,18 +1361,20 @@ nsDownloadManager::GetDefaultDownloadsDi
|
2014-04-27 18:09:32 +02:00
|
|
|
// 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,
|