firefox-kde.patch
branchfirefox68
changeset 1099 8a3c73e74e65
parent 1097 840132a4a9b3
child 1106 6c6375987b6c
equal deleted inserted replaced
1098:538cbf0bbdca 1099:8a3c73e74e65
     1 # HG changeset patch
     1 # HG changeset patch
     2 # User msirringhaus@suse.de
     2 # User msirringhaus@suse.de
     3 # Date 1559300151 -7200
     3 # Date 1559300151 -7200
     4 #      Fri May 31 12:55:51 2019 +0200
     4 #      Fri May 31 12:55:51 2019 +0200
     5 # Node ID 54d41b0033b8d649d842a1f862c6fed8b9874dec
     5 # Node ID 54d41b0033b8d649d842a1f862c6fed8b9874dec
     6 # Parent  428161c3b9599083e1b8710eda1760f1f707ab11
     6 # Parent  28bde69150771a1530f784903bf68214dd5790ea
     7 How to apply this patch:
     7 How to apply this patch:
     8 1. Import and apply it
     8 1. Import and apply it
     9 2. cp browser/base/content/browser.xul browser/base/content/browser-kde.xul
     9 2. cp browser/base/content/browser.xul browser/base/content/browser-kde.xul
    10 3. Find editBookmarkPanelDoneButton
    10 3. Find editBookmarkPanelDoneButton
    11 4. Replace #ifndef with #ifdef in the line above (this hanges the button order from Gnome-style to KDE-style)
    11 4. Replace #ifndef with #ifdef in the line above (this hanges the button order from Gnome-style to KDE-style)
    12 5. hg qrefresh
    12 5. hg qrefresh
    13 
    13 
    14 diff -r 428161c3b959 -r 54d41b0033b8 browser/base/content/browser-kde.xul
    14 diff --git a/browser/base/content/browser-kde.xul b/browser/base/content/browser-kde.xul
    15 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15 new file mode 100644
    16 +++ b/browser/base/content/browser-kde.xul	Fri May 31 12:55:51 2019 +0200
    16 --- /dev/null
       
    17 +++ b/browser/base/content/browser-kde.xul
    17 @@ -0,0 +1,1375 @@
    18 @@ -0,0 +1,1375 @@
    18 +#filter substitution
    19 +#filter substitution
    19 +<?xml version="1.0"?>
    20 +<?xml version="1.0"?>
    20 +# -*- Mode: HTML -*-
    21 +# -*- Mode: HTML -*-
    21 +#
    22 +#
  1388 +
  1389 +
  1389 +  <vbox id="browser-bottombox" layer="true" renderroot="content">
  1390 +  <vbox id="browser-bottombox" layer="true" renderroot="content">
  1390 +    <!-- gNotificationBox will be added here lazily. -->
  1391 +    <!-- gNotificationBox will be added here lazily. -->
  1391 +  </vbox>
  1392 +  </vbox>
  1392 +</window>
  1393 +</window>
  1393 diff -r 428161c3b959 -r 54d41b0033b8 browser/base/jar.mn
  1394 diff --git a/browser/base/jar.mn b/browser/base/jar.mn
  1394 --- a/browser/base/jar.mn	Mon Jun 17 09:02:06 2019 +0200
  1395 --- a/browser/base/jar.mn
  1395 +++ b/browser/base/jar.mn	Fri May 31 12:55:51 2019 +0200
  1396 +++ b/browser/base/jar.mn
  1396 @@ -33,6 +33,8 @@
  1397 @@ -28,16 +28,18 @@ browser.jar:
       
  1398          content/browser/aboutTabCrashed.xhtml         (content/aboutTabCrashed.xhtml)
       
  1399  *       content/browser/browser.css                   (content/browser.css)
       
  1400          content/browser/browser.js                    (content/browser.js)
       
  1401  #ifdef MOZ_BROWSER_XHTML
       
  1402  *       content/browser/browser.xhtml                 (content/browser.xhtml)
  1397  #else
  1403  #else
  1398  *       content/browser/browser.xul                   (content/browser.xul)
  1404  *       content/browser/browser.xul                   (content/browser.xul)
  1399  #endif
  1405  #endif
  1400 +*       content/browser/browser-kde.xul               (content/browser-kde.xul)
  1406 +*       content/browser/browser-kde.xul               (content/browser-kde.xul)
  1401 +%       override chrome://browser/content/browser.xul chrome://browser/content/browser-kde.xul desktop=kde
  1407 +%       override chrome://browser/content/browser.xul chrome://browser/content/browser-kde.xul desktop=kde
  1402          content/browser/browser-addons.js             (content/browser-addons.js)
  1408          content/browser/browser-addons.js             (content/browser-addons.js)
  1403          content/browser/browser-allTabsMenu.js        (content/browser-allTabsMenu.js)
  1409          content/browser/browser-allTabsMenu.js        (content/browser-allTabsMenu.js)
  1404          content/browser/browser-captivePortal.js      (content/browser-captivePortal.js)
  1410          content/browser/browser-captivePortal.js      (content/browser-captivePortal.js)
  1405 diff -r 428161c3b959 -r 54d41b0033b8 browser/components/preferences/in-content/main.js
  1411          content/browser/browser-ctrlTab.js            (content/browser-ctrlTab.js)
  1406 --- a/browser/components/preferences/in-content/main.js	Mon Jun 17 09:02:06 2019 +0200
  1412          content/browser/browser-customization.js      (content/browser-customization.js)
  1407 +++ b/browser/components/preferences/in-content/main.js	Fri May 31 12:55:51 2019 +0200
  1413          content/browser/browser-data-submission-info-bar.js (content/browser-data-submission-info-bar.js)
  1408 @@ -294,6 +294,13 @@
  1414          content/browser/browser-contentblocking.js    (content/browser-contentblocking.js)
       
  1415  #ifndef MOZILLA_OFFICIAL
       
  1416 diff --git a/browser/components/preferences/in-content/main.js b/browser/components/preferences/in-content/main.js
       
  1417 --- a/browser/components/preferences/in-content/main.js
       
  1418 +++ b/browser/components/preferences/in-content/main.js
       
  1419 @@ -339,16 +339,23 @@ var gMainPane = {
       
  1420          }, backoffTimes[this._backoffIndex + 1 < backoffTimes.length ? this._backoffIndex++ : backoffTimes.length - 1]);
       
  1421        };
       
  1422  
       
  1423        window.setTimeout(() => {
       
  1424          window.requestIdleCallback(pollForDefaultBrowser);
  1409        }, backoffTimes[this._backoffIndex]);
  1425        }, backoffTimes[this._backoffIndex]);
  1410      }
  1426      }
  1411  
  1427  
  1412 +    var env = Components.classes["@mozilla.org/process/environment;1"]
  1428 +    var env = Components.classes["@mozilla.org/process/environment;1"]
  1413 +      .getService(Components.interfaces.nsIEnvironment);
  1429 +      .getService(Components.interfaces.nsIEnvironment);
  1417 +    }
  1433 +    }
  1418 +
  1434 +
  1419      this.initBrowserContainers();
  1435      this.initBrowserContainers();
  1420      this.buildContentProcessCountMenuList();
  1436      this.buildContentProcessCountMenuList();
  1421  
  1437  
  1422 @@ -983,6 +990,17 @@
  1438      let performanceSettingsLink = document.getElementById(
       
  1439        "performanceSettingsLearnMore"
       
  1440      );
       
  1441      let performanceSettingsUrl =
       
  1442        Services.urlFormatter.formatURLPref("app.support.baseURL") +
       
  1443 @@ -1146,16 +1153,27 @@ var gMainPane = {
       
  1444        this._backoffIndex = 0;
       
  1445  
       
  1446        let shellSvc = getShellService();
       
  1447        if (!shellSvc) {
  1423          return;
  1448          return;
       
  1449        }
  1424        try {
  1450        try {
  1425          shellSvc.setDefaultBrowser(true, false);
  1451          shellSvc.setDefaultBrowser(true, false);
  1426 +        if (kde_session == 1) {
  1452 +        if (kde_session == 1) {
  1427 +          var shellObj = Components.classes["@mozilla.org/file/local;1"]
  1453 +          var shellObj = Components.classes["@mozilla.org/file/local;1"]
  1428 +            .createInstance(Components.interfaces.nsILocalFile);
  1454 +            .createInstance(Components.interfaces.nsILocalFile);
  1435 +          process.run(false, args, args.length);
  1461 +          process.run(false, args, args.length);
  1436 +        }
  1462 +        }
  1437        } catch (ex) {
  1463        } catch (ex) {
  1438          Cu.reportError(ex);
  1464          Cu.reportError(ex);
  1439          return;
  1465          return;
  1440 diff -r 428161c3b959 -r 54d41b0033b8 browser/components/shell/moz.build
  1466        }
  1441 --- a/browser/components/shell/moz.build	Mon Jun 17 09:02:06 2019 +0200
  1467  
  1442 +++ b/browser/components/shell/moz.build	Fri May 31 12:55:51 2019 +0200
  1468        let selectedIndex = shellSvc.isDefaultBrowser(false, true) ? 1 : 0;
  1443 @@ -33,6 +33,8 @@
  1469        document.getElementById("setDefaultPane").selectedIndex = selectedIndex;
       
  1470      }
       
  1471 diff --git a/browser/components/shell/moz.build b/browser/components/shell/moz.build
       
  1472 --- a/browser/components/shell/moz.build
       
  1473 +++ b/browser/components/shell/moz.build
       
  1474 @@ -28,16 +28,18 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'coco
       
  1475      ]
       
  1476  elif 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
       
  1477      XPIDL_SOURCES += [
       
  1478          'nsIGNOMEShellService.idl',
       
  1479      ]
  1444  
  1480  
  1445      SOURCES += [
  1481      SOURCES += [
  1446          'nsGNOMEShellService.cpp',
  1482          'nsGNOMEShellService.cpp',
  1447 +        'nsKDEShellService.cpp',
  1483 +        'nsKDEShellService.cpp',
  1448 +        'nsUnixShellService.cpp',
  1484 +        'nsUnixShellService.cpp',
  1449      ]
  1485      ]
  1450  elif CONFIG['OS_ARCH'] == 'WINNT':
  1486  elif CONFIG['OS_ARCH'] == 'WINNT':
  1451      SOURCES += [
  1487      SOURCES += [
  1452 diff -r 428161c3b959 -r 54d41b0033b8 browser/components/shell/nsKDEShellService.cpp
  1488          'nsWindowsShellService.cpp',
  1453 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
  1489      ]
  1454 +++ b/browser/components/shell/nsKDEShellService.cpp	Fri May 31 12:55:51 2019 +0200
  1490      LOCAL_INCLUDES += [
       
  1491          '../../../other-licenses/nsis/Contrib/CityHash/cityhash',
       
  1492      ]
       
  1493 diff --git a/browser/components/shell/nsKDEShellService.cpp b/browser/components/shell/nsKDEShellService.cpp
       
  1494 new file mode 100644
       
  1495 --- /dev/null
       
  1496 +++ b/browser/components/shell/nsKDEShellService.cpp
  1455 @@ -0,0 +1,150 @@
  1497 @@ -0,0 +1,150 @@
  1456 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  1498 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  1457 +/* This Source Code Form is subject to the terms of the Mozilla Public
  1499 +/* This Source Code Form is subject to the terms of the Mozilla Public
  1458 + * License, v. 2.0. If a copy of the MPL was not distributed with this
  1500 + * License, v. 2.0. If a copy of the MPL was not distributed with this
  1459 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  1501 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  1601 +    uristr->SetData( aURI );
  1643 +    uristr->SetData( aURI );
  1602 +    command->AppendElement( uristr );
  1644 +    command->AppendElement( uristr );
  1603 +    return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
  1645 +    return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
  1604 +}
  1646 +}
  1605 +
  1647 +
  1606 diff -r 428161c3b959 -r 54d41b0033b8 browser/components/shell/nsKDEShellService.h
  1648 diff --git a/browser/components/shell/nsKDEShellService.h b/browser/components/shell/nsKDEShellService.h
  1607 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
  1649 new file mode 100644
  1608 +++ b/browser/components/shell/nsKDEShellService.h	Fri May 31 12:55:51 2019 +0200
  1650 --- /dev/null
       
  1651 +++ b/browser/components/shell/nsKDEShellService.h
  1609 @@ -0,0 +1,32 @@
  1652 @@ -0,0 +1,32 @@
  1610 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  1653 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  1611 +/* This Source Code Form is subject to the terms of the Mozilla Public
  1654 +/* This Source Code Form is subject to the terms of the Mozilla Public
  1612 + * License, v. 2.0. If a copy of the MPL was not distributed with this
  1655 + * License, v. 2.0. If a copy of the MPL was not distributed with this
  1613 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  1656 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  1637 +
  1680 +
  1638 +  bool mCheckedThisSession;
  1681 +  bool mCheckedThisSession;
  1639 +};
  1682 +};
  1640 +
  1683 +
  1641 +#endif // nskdeshellservice_h____
  1684 +#endif // nskdeshellservice_h____
  1642 diff -r 428161c3b959 -r 54d41b0033b8 browser/components/shell/nsUnixShellService.cpp
  1685 diff --git a/browser/components/shell/nsUnixShellService.cpp b/browser/components/shell/nsUnixShellService.cpp
  1643 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
  1686 new file mode 100644
  1644 +++ b/browser/components/shell/nsUnixShellService.cpp	Fri May 31 12:55:51 2019 +0200
  1687 --- /dev/null
       
  1688 +++ b/browser/components/shell/nsUnixShellService.cpp
  1645 @@ -0,0 +1,22 @@
  1689 @@ -0,0 +1,22 @@
  1646 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  1690 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  1647 +/* This Source Code Form is subject to the terms of the Mozilla Public
  1691 +/* This Source Code Form is subject to the terms of the Mozilla Public
  1648 + * License, v. 2.0. If a copy of the MPL was not distributed with this
  1692 + * License, v. 2.0. If a copy of the MPL was not distributed with this
  1649 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  1693 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  1663 +{
  1707 +{
  1664 +    if( nsKDEUtils::kdeSupport())
  1708 +    if( nsKDEUtils::kdeSupport())
  1665 +        return nsKDEShellServiceConstructor( aOuter, aIID, aResult );
  1709 +        return nsKDEShellServiceConstructor( aOuter, aIID, aResult );
  1666 +    return nsGNOMEShellServiceConstructor( aOuter, aIID, aResult );
  1710 +    return nsGNOMEShellServiceConstructor( aOuter, aIID, aResult );
  1667 +}
  1711 +}
  1668 diff -r 428161c3b959 -r 54d41b0033b8 browser/components/shell/nsUnixShellService.h
  1712 diff --git a/browser/components/shell/nsUnixShellService.h b/browser/components/shell/nsUnixShellService.h
  1669 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
  1713 new file mode 100644
  1670 +++ b/browser/components/shell/nsUnixShellService.h	Fri May 31 12:55:51 2019 +0200
  1714 --- /dev/null
       
  1715 +++ b/browser/components/shell/nsUnixShellService.h
  1671 @@ -0,0 +1,15 @@
  1716 @@ -0,0 +1,15 @@
  1672 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  1717 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  1673 +/* This Source Code Form is subject to the terms of the Mozilla Public
  1718 +/* This Source Code Form is subject to the terms of the Mozilla Public
  1674 + * License, v. 2.0. If a copy of the MPL was not distributed with this
  1719 + * License, v. 2.0. If a copy of the MPL was not distributed with this
  1675 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  1720 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  1682 +
  1727 +
  1683 +NS_IMETHODIMP
  1728 +NS_IMETHODIMP
  1684 +nsUnixShellServiceConstructor(nsISupports *aOuter, REFNSIID aIID, void **aResult);
  1729 +nsUnixShellServiceConstructor(nsISupports *aOuter, REFNSIID aIID, void **aResult);
  1685 +
  1730 +
  1686 +#endif // nsunixshellservice_h____
  1731 +#endif // nsunixshellservice_h____
  1687 diff -r 428161c3b959 -r 54d41b0033b8 browser/installer/package-manifest.in
  1732 diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in
  1688 --- a/browser/installer/package-manifest.in	Mon Jun 17 09:02:06 2019 +0200
  1733 --- a/browser/installer/package-manifest.in
  1689 +++ b/browser/installer/package-manifest.in	Fri May 31 12:55:51 2019 +0200
  1734 +++ b/browser/installer/package-manifest.in
  1690 @@ -299,6 +299,8 @@
  1735 @@ -295,16 +295,18 @@
       
  1736  @RESPATH@/browser/defaults/settings/main
       
  1737  @RESPATH@/browser/defaults/settings/security-state
       
  1738  
       
  1739  ; Warning: changing the path to channel-prefs.js can cause bugs (Bug 756325)
       
  1740  ; Technically this is an app pref file, but we are keeping it in the original
  1691  ; gre location for now.
  1741  ; gre location for now.
  1692  @RESPATH@/defaults/pref/channel-prefs.js
  1742  @RESPATH@/defaults/pref/channel-prefs.js
  1693  
  1743  
  1694 +@RESPATH@/defaults/pref/kde.js
  1744 +@RESPATH@/defaults/pref/kde.js
  1695 +
  1745 +
  1696  ; Services (gre) prefs
  1746  ; Services (gre) prefs
  1697  @RESPATH@/defaults/pref/services-sync.js
  1747  @RESPATH@/defaults/pref/services-sync.js
  1698  
  1748  
       
  1749  ; [Layout Engine Resources]
       
  1750  ; Style Sheets, Graphics and other Resources used by the layout engine.
       
  1751  @RESPATH@/res/EditorOverride.css
       
  1752  @RESPATH@/res/contenteditable.css
       
  1753  @RESPATH@/res/designmode.css