From 5c03cd9283fa7eb6d95d057d4a70efe433a8c4a1 Mon Sep 17 00:00:00 2001 From: Adri Hilviu Date: Wed, 29 May 2013 11:00:18 -0400 Subject: [PATCH] Bug 828284 - Force shortcut desktop icons off on Windows XP. r=bbondy --- browser/app/profile/firefox.js | 1 + widget/windows/nsDataObj.cpp | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js index 770ae98af26a..23ffc79c94f3 100644 --- a/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js @@ -227,6 +227,7 @@ pref("general.useragent.complexOverride.moodle", false); // bug 797703 // At startup, check if we're the default browser and prompt user if not. pref("browser.shell.checkDefaultBrowser", true); +pref("browser.shell.shortcutFavicons",true); // 0 = blank, 1 = home (browser.startup.homepage), 2 = last visited page, 3 = resume previous browser session // The behavior of option 3 is detailed at: http://wiki.mozilla.org/Session_Restore diff --git a/widget/windows/nsDataObj.cpp b/widget/windows/nsDataObj.cpp index db3ce6bab5e0..10247de43c02 100644 --- a/widget/windows/nsDataObj.cpp +++ b/widget/windows/nsDataObj.cpp @@ -37,6 +37,7 @@ using namespace mozilla; +using namespace mozilla::widget; #define DEFAULT_THREAD_TIMEOUT_MS 30000 @@ -1114,7 +1115,8 @@ nsDataObj :: GetFileContentsInternetShortcut ( FORMATETC& aFE, STGMEDIUM& aSTG ) const char *shortcutFormatStr; int totalLen; nsCString path; - if (!Preferences::GetBool(kShellIconPref, true)) { + if (!Preferences::GetBool(kShellIconPref, true) || + WinUtils::GetWindowsVersion() < WinUtils::VISTA_VERSION) { shortcutFormatStr = "[InternetShortcut]\r\nURL=%s\r\n"; const int formatLen = strlen(shortcutFormatStr) - 2; // don't include %s totalLen = formatLen + asciiUrl.Length(); // don't include null character