firefox-kde.patch
branchfirefox16
changeset 544 18fa86881f37
parent 522 fdca14856f37
--- a/firefox-kde.patch	Sat Sep 15 23:21:46 2012 +0200
+++ b/firefox-kde.patch	Fri Sep 28 08:51:44 2012 +0200
@@ -1315,13 +1315,13 @@
 +
  #ifdef HAVE_SHELL_SERVICE
      this.updateSetDefaultBrowser();
- #endif
- #ifdef MOZ_UPDATER
-     this.updateReadPrefs();
- #endif
-     this.updateOfflineApps();
- #ifdef MOZ_CRASHREPORTER
-@@ -715,12 +721,23 @@ var gAdvancedPane = {
+ #ifdef XP_WIN
+     let shellSvc = getShellService();
+     // In Windows 8 we launch the control panel since it's the only
+     // way to get all file type association prefs. So we don't know
+     // when the user will select the default.  We refresh here periodically
+     // in case the default changes. 
+@@ -737,14 +743,25 @@ var gAdvancedPane = {
     * Set browser as the operating system default browser.
     */
    setDefaultBrowser: function()
@@ -1341,7 +1341,9 @@
 +          "BrowserApplication", "MozillaFirefox"];
 +      process.run(false, args, args.length);
 +    }
-     document.getElementById("setDefaultPane").selectedIndex = 1;
+     let selectedIndex =
+       shellSvc.isDefaultBrowser(false, true) ? 1 : 0;
+     document.getElementById("setDefaultPane").selectedIndex = selectedIndex;
    }
  #endif
  };
@@ -1372,7 +1374,7 @@
 new file mode 100644
 --- /dev/null
 +++ b/browser/components/shell/src/nsKDEShellService.cpp
-@@ -0,0 +1,264 @@
+@@ -0,0 +1,265 @@
 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 +/* ***** BEGIN LICENSE BLOCK *****
 + * Version: MPL 1.1/GPL 2.0/LGPL 2.1
@@ -1434,6 +1436,7 @@
 +
 +NS_IMETHODIMP
 +nsKDEShellService::IsDefaultBrowser(bool aStartupCheck,
++                                    bool aForAllTypes,
 +                                    bool* aIsDefaultBrowser)
 +    {
 +    *aIsDefaultBrowser = false;