diff -uNrBbwp palemoon-29.4.6/palemoon/palemoon/base/content/browser-kde.xul palemoon-29.4.6-new/palemoon/palemoon/base/content/browser-kde.xul
--- palemoon-29.4.6/palemoon/palemoon/base/content/browser-kde.xul 1970-01-01 00:00:00.000000000 +0000
+++ palemoon-29.4.6-new/palemoon/palemoon/base/content/browser-kde.xul 2022-05-07 20:51:09.696829590 +0000
@@ -0,0 +1,1056 @@
+#filter substitution
+
+# -*- Mode: HTML -*-
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+
+
+# Restore title to AppMenu windowed use
+
+
+
+#ifdef MOZ_DEVTOOLS
+
+#endif
+
+
+
+
+
+
+# Padlock feature
+
+# Improve bookmark menu dragging
+
+
+
+# All DTD information is stored in a separate file so that it can be shared by
+# hiddenWindow.xul.
+#include browser-doctype.inc
+
+
+
+# All JS files which are not content (only) dependent that browser.xul
+# wishes to include *must* go into the global-scripts.inc file
+# so that they can be shared by macBrowserOverlay.xul.
+#include global-scripts.inc
+
+
+
+
+
+
+# All sets except for popupsets (commands, keys, stringbundles and broadcasters) *must* go into the
+# browser-sets.inc file for sharing with hiddenWindow.xul.
+#define FULL_BROWSER_WINDOW
+#include browser-sets.inc
+#undef FULL_BROWSER_WINDOW
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#ifndef XP_UNIX
+
+
+#else
+
+
+#endif
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#include browser-context.inc
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#ifdef XP_MACOSX
+
+#else
+
+#endif
+
+
+
+
+#ifdef XP_MACOSX
+
+#else
+
+#endif
+
+
+#include popup-notifications.inc
+
+
+
+#ifdef CAN_DRAW_IN_TITLEBAR
+
+
+#ifdef MENUBAR_CAN_AUTOHIDE
+
+
+
+#endif
+
+
+
+
+
+
+
+
+
+
+#endif
+
+
+
+
+
+
+
+
+# The entire main menubar is placed into browser-menubar.inc, so that it can be shared by
+# hiddenWindow.xul.
+#include browser-menubar.inc
+
+
+#ifdef CAN_DRAW_IN_TITLEBAR
+
+
+#endif
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#ifdef MOZ_SERVICES_SYNC
+
+#endif
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#ifdef MENUBAR_CAN_AUTOHIDE
+#ifndef CAN_DRAW_IN_TITLEBAR
+#define APPMENU_ON_TABBAR
+#endif
+#endif
+
+
+
+
+#ifdef APPMENU_ON_TABBAR
+
+#include browser-appmenu.inc
+
+#endif
+
+
+
+
+
+
+
+
+
+
+
+
+
+#ifdef CAN_DRAW_IN_TITLEBAR
+
+
+#endif
+
+
+
+
+# Update primaryToolbarButtons in browser/themes/shared/browser.inc when adding
+# or removing default items with the toolbarbutton-1 class.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#ifdef MOZ_SERVICES_SYNC
+
+#endif
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#ifdef MOZ_DEVTOOLS
+
+#ifdef XP_MACOSX
+
+#endif
+
+
+
+
+
+#ifndef XP_MACOSX
+
+#endif
+
+#endif
+
+
+
+
+
+
+
+#ifndef XP_UNIX
+
+
+
+
+
+
+
+
+#endif
+#ifdef XP_MACOSX
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#endif
+
+
+#
+
+
diff -uNrBbwp palemoon-29.4.6/palemoon/palemoon/base/jar.mn palemoon-29.4.6-new/palemoon/palemoon/base/jar.mn
--- palemoon-29.4.6/palemoon/palemoon/base/jar.mn 2022-05-07 15:30:02.000000000 +0000
+++ palemoon-29.4.6-new/palemoon/palemoon/base/jar.mn 2022-05-07 20:53:06.206400415 +0000
@@ -21,6 +21,8 @@ browser.jar:
content/browser/browser-title.css (content/browser-title.css)
* content/browser/browser.js (content/browser.js)
* content/browser/browser.xul (content/browser.xul)
+* content/browser/browser-kde.xul (content/browser-kde.xul)
+% override chrome://browser/content/browser.xul chrome://browser/content/browser-kde.xul desktop=kde
#ifdef MOZ_DEVTOOLS
content/browser/browser-devtools-theme.js (content/browser-devtools-theme.js)
#endif
diff -uNrBbwp palemoon-29.4.6/palemoon/palemoon/components/build/nsModule.cpp palemoon-29.4.6-new/palemoon/palemoon/components/build/nsModule.cpp
--- palemoon-29.4.6/palemoon/palemoon/components/build/nsModule.cpp 2022-05-07 15:30:02.000000000 +0000
+++ palemoon-29.4.6-new/palemoon/palemoon/components/build/nsModule.cpp 2022-05-07 20:56:35.056611212 +0000
@@ -11,7 +11,7 @@
#if defined(XP_WIN)
#include "nsWindowsShellService.h"
#elif defined(MOZ_WIDGET_GTK)
-#include "nsGNOMEShellService.h"
+#include "nsUnixShellService.h"
#endif
#include "rdf.h"
@@ -26,8 +26,6 @@ using namespace mozilla::browser;
NS_GENERIC_FACTORY_CONSTRUCTOR(DirectoryProvider)
#if defined(XP_WIN)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsWindowsShellService)
-#elif defined(MOZ_WIDGET_GTK)
-NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGNOMEShellService, Init)
#endif
NS_GENERIC_FACTORY_CONSTRUCTOR(nsFeedSniffer)
@@ -45,7 +43,7 @@ static const mozilla::Module::CIDEntry k
#if defined(XP_WIN)
{ &kNS_SHELLSERVICE_CID, false, nullptr, nsWindowsShellServiceConstructor },
#elif defined(MOZ_WIDGET_GTK)
- { &kNS_SHELLSERVICE_CID, false, nullptr, nsGNOMEShellServiceConstructor },
+ { &kNS_SHELLSERVICE_CID, false, nullptr, nsUnixShellServiceConstructor },
#endif
{ &kNS_FEEDSNIFFER_CID, false, nullptr, nsFeedSnifferConstructor },
{ nullptr }
diff -uNrBbwp palemoon-29.4.6/palemoon/palemoon/components/preferences/advanced.js palemoon-29.4.6-new/palemoon/palemoon/components/preferences/advanced.js
--- palemoon-29.4.6/palemoon/palemoon/components/preferences/advanced.js 2022-05-07 15:30:02.000000000 +0000
+++ palemoon-29.4.6-new/palemoon/palemoon/components/preferences/advanced.js 2022-05-07 21:05:49.531741692 +0000
@@ -29,6 +29,12 @@ var gAdvancedPane = {
advancedPrefs.selectedIndex = preference.value;
}
+ var env = Components.classes["@mozilla.org/process/environment;1"]
+ .getService(Components.interfaces.nsIEnvironment);
+ var kde_session = 0;
+ if (env.get('KDE_FULL_SESSION') == "true")
+ kde_session = 1;
+
#ifdef HAVE_SHELL_SERVICE
this.updateSetDefaultBrowser();
#ifdef XP_WIN
@@ -789,6 +795,17 @@ var gAdvancedPane = {
Cu.reportError(ex);
return;
}
+ if (kde_session == 1) {
+ var shellObj = Components.classes["@mozilla.org/file/local;1"]
+ .createInstance(Components.interfaces.nsILocalFile);
+ shellObj.initWithPath("/usr/bin/kwriteconfig");
+ var process = Components.classes["@mozilla.org/process/util;1"]
+ .createInstance(Components.interfaces.nsIProcess);
+ process.init(shellObj);
+ var args = ["--file", "kdeglobals", "--group", "General", "--key",
+ "BrowserApplication", "newmoon"];
+ process.run(false, args, args.length);
+ }
let selectedIndex =
shellSvc.isDefaultBrowser(false, true) ? 1 : 0;
document.getElementById("setDefaultPane").selectedIndex = selectedIndex;
diff -uNrBbwp palemoon-29.4.6/palemoon/palemoon/components/shell/moz.build palemoon-29.4.6-new/palemoon/palemoon/components/shell/moz.build
--- palemoon-29.4.6/palemoon/palemoon/components/shell/moz.build 2022-05-07 15:30:02.000000000 +0000
+++ palemoon-29.4.6-new/palemoon/palemoon/components/shell/moz.build 2022-05-07 21:09:40.434057889 +0000
@@ -17,8 +17,10 @@ XPIDL_MODULE = 'shellservice'
if CONFIG['OS_ARCH'] == 'WINNT':
SOURCES += ['nsWindowsShellService.cpp']
elif 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
- SOURCES += ['nsGNOMEShellService.cpp']
-
+ SOURCES += ['nsGNOMEShellService.cpp',
+ 'nsKDEShellService.cpp',
+ 'nsUnixShellService.cpp',
+ ],
if SOURCES:
FINAL_LIBRARY = 'browsercomps'
diff -uNrBbwp palemoon-29.4.6/palemoon/palemoon/components/shell/nsKDEShellService.cpp palemoon-29.4.6-new/palemoon/palemoon/components/shell/nsKDEShellService.cpp
--- palemoon-29.4.6/palemoon/palemoon/components/shell/nsKDEShellService.cpp 1970-01-01 00:00:00.000000000 +0000
+++ palemoon-29.4.6-new/palemoon/palemoon/components/shell/nsKDEShellService.cpp 2022-05-07 21:10:34.950827102 +0000
@@ -0,0 +1,238 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include "mozilla/ArrayUtils.h"
+
+#include "nsCOMPtr.h"
+#include "nsKDEShellService.h"
+#include "nsShellService.h"
+#include "nsKDEUtils.h"
+#include "nsIPrefService.h"
+#include "nsIProcess.h"
+#include "nsIFile.h"
+#include "nsServiceManagerUtils.h"
+#include "nsComponentManagerUtils.h"
+#include "nsIMutableArray.h"
+#include "nsISupportsPrimitives.h"
+#include "nsArrayUtils.h"
+
+using namespace mozilla;
+
+nsresult
+nsKDEShellService::Init()
+{
+ if( !nsKDEUtils::kdeSupport())
+ return NS_ERROR_NOT_AVAILABLE;
+ return NS_OK;
+}
+
+NS_IMPL_ISUPPORTS(nsKDEShellService, nsIShellService)
+
+NS_IMETHODIMP
+nsKDEShellService::IsDefaultBrowser(bool aStartupCheck,
+ bool aForAllTypes,
+ bool* aIsDefaultBrowser)
+{
+ *aIsDefaultBrowser = false;
+ if (aStartupCheck)
+ mCheckedThisSession = true;
+
+ nsCOMPtr command = do_CreateInstance( NS_ARRAY_CONTRACTID );
+ if (!command)
+ return NS_ERROR_FAILURE;
+
+ nsCOMPtr str = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
+ if (!str)
+ return NS_ERROR_FAILURE;
+
+ str->SetData( NS_LITERAL_CSTRING( "ISDEFAULTBROWSER" ));
+ command->AppendElement( str, false );
+
+ if( nsKDEUtils::command( command ))
+ *aIsDefaultBrowser = true;
+ return NS_OK;
+}
+
+NS_IMETHODIMP
+nsKDEShellService::SetDefaultBrowser(bool aClaimAllTypes,
+ bool aForAllUsers)
+{
+ nsCOMPtr command = do_CreateInstance( NS_ARRAY_CONTRACTID );
+ if (!command)
+ return NS_ERROR_FAILURE;
+
+ nsCOMPtr cmdstr = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
+ nsCOMPtr paramstr = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
+ if (!cmdstr || !paramstr)
+ return NS_ERROR_FAILURE;
+
+ cmdstr->SetData( NS_LITERAL_CSTRING( "SETDEFAULTBROWSER" ));
+ command->AppendElement( cmdstr, false );
+
+ paramstr->SetData( aClaimAllTypes ? NS_LITERAL_CSTRING( "ALLTYPES" ) : NS_LITERAL_CSTRING( "NORMAL" ));
+ command->AppendElement( paramstr, false );
+
+ return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
+}
+
+NS_IMETHODIMP
+nsKDEShellService::GetShouldCheckDefaultBrowser(bool* aResult)
+{
+ // If we've already checked, the browser has been started and this is a
+ // new window open, and we don't want to check again.
+ if (mCheckedThisSession) {
+ *aResult = false;
+ return NS_OK;
+ }
+
+ nsCOMPtr prefs;
+ nsCOMPtr pserve(do_GetService(NS_PREFSERVICE_CONTRACTID));
+ if (pserve)
+ pserve->GetBranch("", getter_AddRefs(prefs));
+
+ if (prefs)
+ prefs->GetBoolPref(PREF_CHECKDEFAULTBROWSER, aResult);
+
+ return NS_OK;
+}
+
+NS_IMETHODIMP
+nsKDEShellService::SetShouldCheckDefaultBrowser(bool aShouldCheck)
+{
+ nsCOMPtr prefs;
+ nsCOMPtr pserve(do_GetService(NS_PREFSERVICE_CONTRACTID));
+ if (pserve)
+ pserve->GetBranch("", getter_AddRefs(prefs));
+
+ if (prefs)
+ prefs->SetBoolPref(PREF_CHECKDEFAULTBROWSER, aShouldCheck);
+
+ return NS_OK;
+}
+
+NS_IMETHODIMP
+nsKDEShellService::GetCanSetDesktopBackground(bool* aResult)
+{
+ *aResult = true;
+ return NS_OK;
+}
+
+NS_IMETHODIMP
+nsKDEShellService::SetDesktopBackground(nsIDOMElement* aElement,
+ PRInt32 aPosition)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+NS_IMETHODIMP
+nsKDEShellService::GetDesktopBackgroundColor(PRUint32 *aColor)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+NS_IMETHODIMP
+nsKDEShellService::SetDesktopBackgroundColor(PRUint32 aColor)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+NS_IMETHODIMP
+nsKDEShellService::OpenApplication(PRInt32 aApplication)
+{
+ nsCOMPtr command = do_CreateInstance( NS_ARRAY_CONTRACTID );
+ if (!command)
+ return NS_ERROR_FAILURE;
+
+ nsCOMPtr str = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
+ if (!str)
+ return NS_ERROR_FAILURE;
+
+ if( aApplication == APPLICATION_MAIL )
+ str->SetData( NS_LITERAL_CSTRING( "OPENMAIL" ));
+ else if( aApplication == APPLICATION_NEWS )
+ str->SetData( NS_LITERAL_CSTRING( "OPENNEWS" ));
+ else
+ return NS_ERROR_NOT_IMPLEMENTED;
+
+ command->AppendElement( str, false );
+ return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
+}
+
+NS_IMETHODIMP
+nsKDEShellService::OpenApplicationWithURI(nsIFile* aApplication, const nsACString& aURI)
+{
+ nsCOMPtr command = do_CreateInstance( NS_ARRAY_CONTRACTID );
+ if (!command)
+ return NS_ERROR_FAILURE;
+
+ nsCOMPtr cmdstr = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
+ nsCOMPtr appstr = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
+ nsCOMPtr uristr = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
+ if (!cmdstr || !appstr || !uristr)
+ return NS_ERROR_FAILURE;
+
+ cmdstr->SetData( NS_LITERAL_CSTRING( "RUN" ));
+ command->AppendElement( cmdstr, false );
+ nsAutoCString app;
+ nsresult rv = aApplication->GetNativePath( app );
+ NS_ENSURE_SUCCESS( rv, rv );
+ appstr->SetData( app );
+ command->AppendElement( appstr, false );
+ uristr->SetData( aURI );
+ command->AppendElement( uristr, false );
+ return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
+}
+
+NS_IMETHODIMP
+nsKDEShellService::GetDefaultFeedReader(nsIFile** _retval)
+{
+ *_retval = nullptr;
+
+ nsCOMPtr command = do_CreateInstance( NS_ARRAY_CONTRACTID );
+ if( !command )
+ return NS_ERROR_FAILURE;
+
+ nsCOMPtr str = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
+ if( !str )
+ return NS_ERROR_FAILURE;
+
+ str->SetData( NS_LITERAL_CSTRING( "GETDEFAULTFEEDREADER" ));
+ command->AppendElement( str, false );
+
+ nsCOMPtr output;
+ if( !nsKDEUtils::command( command, getter_AddRefs( output ) ) )
+ return NS_ERROR_FAILURE;
+
+ PRUint32 length;
+ output->GetLength( &length );
+ if( length != 1 )
+ return NS_ERROR_FAILURE;
+
+ nsCOMPtr resstr = do_QueryElementAt( output, 0 );
+ if( !resstr )
+ return NS_ERROR_FAILURE;
+
+ nsAutoCString path;
+ resstr->GetData( path );
+ if (path.IsEmpty())
+ return NS_ERROR_FAILURE;
+
+ nsresult rv;
+ nsCOMPtr defaultReader =
+ do_CreateInstance("@mozilla.org/file/local;1", &rv);
+ NS_ENSURE_SUCCESS(rv, rv);
+
+ rv = defaultReader->InitWithNativePath(path);
+ NS_ENSURE_SUCCESS(rv, rv);
+
+ bool exists;
+ rv = defaultReader->Exists(&exists);
+ NS_ENSURE_SUCCESS(rv, rv);
+ if (!exists)
+ return NS_ERROR_FAILURE;
+
+ NS_ADDREF(*_retval = defaultReader);
+ return NS_OK;
+}
diff -uNrBbwp palemoon-29.4.6/palemoon/palemoon/components/shell/nsKDEShellService.h palemoon-29.4.6-new/palemoon/palemoon/components/shell/nsKDEShellService.h
--- palemoon-29.4.6/palemoon/palemoon/components/shell/nsKDEShellService.h 1970-01-01 00:00:00.000000000 +0000
+++ palemoon-29.4.6-new/palemoon/palemoon/components/shell/nsKDEShellService.h 2022-05-07 21:10:58.629423846 +0000
@@ -0,0 +1,60 @@
+/* -*- 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
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Shell Service.
+ *
+ * The Initial Developer of the Original Code is mozilla.org.
+ * Portions created by the Initial Developer are Copyright (C) 2004
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#ifndef nskdeshellservice_h____
+#define nskdeshellservice_h____
+
+#include "nsIShellService.h"
+#include "nsStringAPI.h"
+#include "mozilla/Attributes.h"
+
+class nsKDEShellService final : public nsIShellService
+{
+public:
+ nsKDEShellService() : mCheckedThisSession(false) { }
+
+ NS_DECL_ISUPPORTS
+ NS_DECL_NSISHELLSERVICE
+
+ nsresult Init() NS_HIDDEN;
+
+private:
+ ~nsKDEShellService() {}
+
+ bool mCheckedThisSession;
+};
+
+#endif // nskdeshellservice_h____
diff -uNrBbwp palemoon-29.4.6/palemoon/palemoon/components/shell/nsUnixShellService.cpp palemoon-29.4.6-new/palemoon/palemoon/components/shell/nsUnixShellService.cpp
--- palemoon-29.4.6/palemoon/palemoon/components/shell/nsUnixShellService.cpp 1970-01-01 00:00:00.000000000 +0000
+++ palemoon-29.4.6-new/palemoon/palemoon/components/shell/nsUnixShellService.cpp 2022-05-07 21:11:31.002505336 +0000
@@ -0,0 +1,52 @@
+/* -*- 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
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Shell Service.
+ *
+ * The Initial Developer of the Original Code is mozilla.org.
+ * Portions created by the Initial Developer are Copyright (C) 2004
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#include "nsUnixShellService.h"
+#include "nsGNOMEShellService.h"
+#include "nsKDEShellService.h"
+#include "nsKDEUtils.h"
+#include "mozilla/ModuleUtils.h"
+
+NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGNOMEShellService, Init)
+NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsKDEShellService, Init)
+
+NS_METHOD
+nsUnixShellServiceConstructor(nsISupports *aOuter, REFNSIID aIID, void **aResult)
+{
+ if( nsKDEUtils::kdeSupport())
+ return nsKDEShellServiceConstructor( aOuter, aIID, aResult );
+ return nsGNOMEShellServiceConstructor( aOuter, aIID, aResult );
+}
diff -uNrBbwp palemoon-29.4.6/palemoon/palemoon/components/shell/nsUnixShellService.h palemoon-29.4.6-new/palemoon/palemoon/components/shell/nsUnixShellService.h
--- palemoon-29.4.6/palemoon/palemoon/components/shell/nsUnixShellService.h 1970-01-01 00:00:00.000000000 +0000
+++ palemoon-29.4.6-new/palemoon/palemoon/components/shell/nsUnixShellService.h 2022-05-07 21:11:49.418413965 +0000
@@ -0,0 +1,45 @@
+/* -*- 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
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Shell Service.
+ *
+ * The Initial Developer of the Original Code is mozilla.org.
+ * Portions created by the Initial Developer are Copyright (C) 2004
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#ifndef nsunixshellservice_h____
+#define nsunixshellservice_h____
+
+#include "nsIShellService.h"
+
+NS_METHOD
+nsUnixShellServiceConstructor(nsISupports *aOuter, REFNSIID aIID, void **aResult);
+
+#endif // nsunixshellservice_h____
diff -uNrBbwp palemoon-29.4.6/palemoon/palemoon/installer/package-manifest.in palemoon-29.4.6-new/palemoon/palemoon/installer/package-manifest.in
--- palemoon-29.4.6/palemoon/palemoon/installer/package-manifest.in 2022-05-07 15:30:02.000000000 +0000
+++ palemoon-29.4.6-new/palemoon/palemoon/installer/package-manifest.in 2022-05-07 21:24:17.977783760 +0000
@@ -214,10 +214,12 @@
; Technically this is an app pref file, but we are keeping it in the original
; gre location for now.
@RESPATH@/defaults/pref/channel-prefs.js
+@RESPATH@/defaults/pref/kde.js
#ifdef MOZ_SERVICES_SYNC
; Services (gre) prefs
@RESPATH@/defaults/pref/services-sync.js
+@RESPATH@/defaults/pref/kde.js
#endif
; [Layout Engine Resources]