firefox-kde.patch
branchfirefox16
changeset 544 18fa86881f37
parent 522 fdca14856f37
equal deleted inserted replaced
542:890521f49a09 544:18fa86881f37
  1313 +    if (env.get('KDE_FULL_SESSION') == "true")
  1313 +    if (env.get('KDE_FULL_SESSION') == "true")
  1314 +      kde_session = 1;
  1314 +      kde_session = 1;
  1315 +
  1315 +
  1316  #ifdef HAVE_SHELL_SERVICE
  1316  #ifdef HAVE_SHELL_SERVICE
  1317      this.updateSetDefaultBrowser();
  1317      this.updateSetDefaultBrowser();
  1318  #endif
  1318  #ifdef XP_WIN
  1319  #ifdef MOZ_UPDATER
  1319      let shellSvc = getShellService();
  1320      this.updateReadPrefs();
  1320      // In Windows 8 we launch the control panel since it's the only
  1321  #endif
  1321      // way to get all file type association prefs. So we don't know
  1322      this.updateOfflineApps();
  1322      // when the user will select the default.  We refresh here periodically
  1323  #ifdef MOZ_CRASHREPORTER
  1323      // in case the default changes. 
  1324 @@ -715,12 +721,23 @@ var gAdvancedPane = {
  1324 @@ -737,14 +743,25 @@ var gAdvancedPane = {
  1325     * Set browser as the operating system default browser.
  1325     * Set browser as the operating system default browser.
  1326     */
  1326     */
  1327    setDefaultBrowser: function()
  1327    setDefaultBrowser: function()
  1328    {
  1328    {
  1329      let shellSvc = getShellService();
  1329      let shellSvc = getShellService();
  1339 +      process.init(shellObj);
  1339 +      process.init(shellObj);
  1340 +      var args = ["--file", "kdeglobals", "--group", "General", "--key",
  1340 +      var args = ["--file", "kdeglobals", "--group", "General", "--key",
  1341 +          "BrowserApplication", "MozillaFirefox"];
  1341 +          "BrowserApplication", "MozillaFirefox"];
  1342 +      process.run(false, args, args.length);
  1342 +      process.run(false, args, args.length);
  1343 +    }
  1343 +    }
  1344      document.getElementById("setDefaultPane").selectedIndex = 1;
  1344      let selectedIndex =
       
  1345        shellSvc.isDefaultBrowser(false, true) ? 1 : 0;
       
  1346      document.getElementById("setDefaultPane").selectedIndex = selectedIndex;
  1345    }
  1347    }
  1346  #endif
  1348  #endif
  1347  };
  1349  };
  1348 diff --git a/browser/components/shell/src/Makefile.in b/browser/components/shell/src/Makefile.in
  1350 diff --git a/browser/components/shell/src/Makefile.in b/browser/components/shell/src/Makefile.in
  1349 --- a/browser/components/shell/src/Makefile.in
  1351 --- a/browser/components/shell/src/Makefile.in
  1370  
  1372  
  1371 diff --git a/browser/components/shell/src/nsKDEShellService.cpp b/browser/components/shell/src/nsKDEShellService.cpp
  1373 diff --git a/browser/components/shell/src/nsKDEShellService.cpp b/browser/components/shell/src/nsKDEShellService.cpp
  1372 new file mode 100644
  1374 new file mode 100644
  1373 --- /dev/null
  1375 --- /dev/null
  1374 +++ b/browser/components/shell/src/nsKDEShellService.cpp
  1376 +++ b/browser/components/shell/src/nsKDEShellService.cpp
  1375 @@ -0,0 +1,264 @@
  1377 @@ -0,0 +1,265 @@
  1376 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  1378 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  1377 +/* ***** BEGIN LICENSE BLOCK *****
  1379 +/* ***** BEGIN LICENSE BLOCK *****
  1378 + * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  1380 + * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  1379 + *
  1381 + *
  1380 + * The contents of this file are subject to the Mozilla Public License Version
  1382 + * The contents of this file are subject to the Mozilla Public License Version
  1432 +
  1434 +
  1433 +NS_IMPL_ISUPPORTS1(nsKDEShellService, nsIShellService)
  1435 +NS_IMPL_ISUPPORTS1(nsKDEShellService, nsIShellService)
  1434 +
  1436 +
  1435 +NS_IMETHODIMP
  1437 +NS_IMETHODIMP
  1436 +nsKDEShellService::IsDefaultBrowser(bool aStartupCheck,
  1438 +nsKDEShellService::IsDefaultBrowser(bool aStartupCheck,
       
  1439 +                                    bool aForAllTypes,
  1437 +                                    bool* aIsDefaultBrowser)
  1440 +                                    bool* aIsDefaultBrowser)
  1438 +    {
  1441 +    {
  1439 +    *aIsDefaultBrowser = false;
  1442 +    *aIsDefaultBrowser = false;
  1440 +    if (aStartupCheck)
  1443 +    if (aStartupCheck)
  1441 +        mCheckedThisSession = true;
  1444 +        mCheckedThisSession = true;