diff -urN Pale-Moon-26.3.1_Release/browser/base/content/browser-kde.xul Pale-Moon-26.3.1_Release-patched/browser/base/content/browser-kde.xul
--- Pale-Moon-26.3.1_Release/browser/base/content/browser-kde.xul 1970-01-01 10:00:00.000000000 +1000
+++ Pale-Moon-26.3.1_Release-patched/browser/base/content/browser-kde.xul 2016-06-27 21:29:53.965744116 +1000
@@ -0,0 +1,1058 @@
+#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
+
+# Promises injector
+
+
+
+# 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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#ifdef 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 -urN Pale-Moon-26.3.1_Release/browser/base/jar.mn Pale-Moon-26.3.1_Release-patched/browser/base/jar.mn
--- Pale-Moon-26.3.1_Release/browser/base/jar.mn 2016-06-24 00:37:32.000000000 +1000
+++ Pale-Moon-26.3.1_Release-patched/browser/base/jar.mn 2016-06-27 20:04:41.596109991 +1000
@@ -55,6 +55,8 @@
* 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
* content/browser/browser-tabPreviews.xml (content/browser-tabPreviews.xml)
content/browser/content.js (content/content.js)
content/browser/imagedocument.png (content/imagedocument.png)
diff -urN Pale-Moon-26.3.1_Release/browser/components/build/nsModule.cpp Pale-Moon-26.3.1_Release-patched/browser/components/build/nsModule.cpp
--- Pale-Moon-26.3.1_Release/browser/components/build/nsModule.cpp 2016-06-24 00:37:32.000000000 +1000
+++ Pale-Moon-26.3.1_Release-patched/browser/components/build/nsModule.cpp 2016-06-27 19:56:07.827146759 +1000
@@ -13,7 +13,7 @@
#elif defined(XP_MACOSX)
#include "nsMacShellService.h"
#elif defined(MOZ_WIDGET_GTK)
-#include "nsGNOMEShellService.h"
+#include "nsUnixShellService.h"
#endif
#if defined(XP_WIN)
@@ -36,8 +36,6 @@
NS_GENERIC_FACTORY_CONSTRUCTOR(nsWindowsShellService)
#elif defined(XP_MACOSX)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacShellService)
-#elif defined(MOZ_WIDGET_GTK)
-NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGNOMEShellService, Init)
#endif
#if defined(XP_WIN)
@@ -65,7 +63,7 @@
#if defined(XP_WIN)
{ &kNS_SHELLSERVICE_CID, false, NULL, nsWindowsShellServiceConstructor },
#elif defined(MOZ_WIDGET_GTK)
- { &kNS_SHELLSERVICE_CID, false, NULL, nsGNOMEShellServiceConstructor },
+ { &kNS_SHELLSERVICE_CID, false, NULL, nsUnixShellServiceConstructor },
#endif
{ &kNS_FEEDSNIFFER_CID, false, NULL, nsFeedSnifferConstructor },
{ &kNS_BROWSER_ABOUT_REDIRECTOR_CID, false, NULL, AboutRedirector::Create },
diff -urN Pale-Moon-26.3.1_Release/browser/components/preferences/advanced.js Pale-Moon-26.3.1_Release-patched/browser/components/preferences/advanced.js
--- Pale-Moon-26.3.1_Release/browser/components/preferences/advanced.js 2016-06-24 00:37:32.000000000 +1000
+++ Pale-Moon-26.3.1_Release-patched/browser/components/preferences/advanced.js 2016-06-27 19:56:07.827146759 +1000
@@ -28,6 +28,12 @@
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
@@ -666,6 +672,17 @@
if (!shellSvc)
return;
shellSvc.setDefaultBrowser(true, false);
+ 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 -urN Pale-Moon-26.3.1_Release/browser/components/shell/src/Makefile.in Pale-Moon-26.3.1_Release-patched/browser/components/shell/src/Makefile.in
--- Pale-Moon-26.3.1_Release/browser/components/shell/src/Makefile.in 2016-06-24 00:37:32.000000000 +1000
+++ Pale-Moon-26.3.1_Release-patched/browser/components/shell/src/Makefile.in 2016-06-27 19:56:07.827146759 +1000
@@ -22,5 +22,7 @@
CXXFLAGS += $(TK_CFLAGS)
+LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
+
clobber::
rm -f $(DIST)/lib/$(LIBRARY_NAME).lib
diff -urN Pale-Moon-26.3.1_Release/browser/components/shell/src/moz.build Pale-Moon-26.3.1_Release-patched/browser/components/shell/src/moz.build
--- Pale-Moon-26.3.1_Release/browser/components/shell/src/moz.build 2016-06-24 00:37:32.000000000 +1000
+++ Pale-Moon-26.3.1_Release-patched/browser/components/shell/src/moz.build 2016-06-27 19:56:07.828146759 +1000
@@ -16,7 +16,9 @@
]
elif CONFIG['MOZ_WIDGET_GTK']:
CPP_SOURCES += [
+ 'nsUnixShellService.cpp',
'nsGNOMEShellService.cpp',
+ 'nsKDEShellService.cpp'
]
if CPP_SOURCES:
diff -urN Pale-Moon-26.3.1_Release/browser/components/shell/src/nsKDEShellService.cpp Pale-Moon-26.3.1_Release-patched/browser/components/shell/src/nsKDEShellService.cpp
--- Pale-Moon-26.3.1_Release/browser/components/shell/src/nsKDEShellService.cpp 1970-01-01 10:00:00.000000000 +1000
+++ Pale-Moon-26.3.1_Release-patched/browser/components/shell/src/nsKDEShellService.cpp 2016-06-27 19:56:07.828146759 +1000
@@ -0,0 +1,234 @@
+/* -*- 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 "nsKDEShellService.h"
+#include "nsShellService.h"
+#include "nsKDEUtils.h"
+#include "nsCOMPtr.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"
+
+nsresult
+nsKDEShellService::Init()
+ {
+ if( !nsKDEUtils::kdeSupport())
+ return NS_ERROR_NOT_AVAILABLE;
+ return NS_OK;
+ }
+
+NS_IMPL_ISUPPORTS1(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 -urN Pale-Moon-26.3.1_Release/browser/components/shell/src/nsKDEShellService.h Pale-Moon-26.3.1_Release-patched/browser/components/shell/src/nsKDEShellService.h
--- Pale-Moon-26.3.1_Release/browser/components/shell/src/nsKDEShellService.h 1970-01-01 10:00:00.000000000 +1000
+++ Pale-Moon-26.3.1_Release-patched/browser/components/shell/src/nsKDEShellService.h 2016-06-27 19:56:07.828146759 +1000
@@ -0,0 +1,59 @@
+/* -*- 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"
+
+class nsKDEShellService : public nsIShellService
+{
+public:
+ nsKDEShellService() : mCheckedThisSession(PR_FALSE) { }
+
+ NS_DECL_ISUPPORTS
+ NS_DECL_NSISHELLSERVICE
+
+ nsresult Init() NS_HIDDEN;
+
+private:
+ ~nsKDEShellService() {}
+
+ PRPackedBool mCheckedThisSession;
+};
+
+#endif // nskdeshellservice_h____
diff -urN Pale-Moon-26.3.1_Release/browser/components/shell/src/nsUnixShellService.cpp Pale-Moon-26.3.1_Release-patched/browser/components/shell/src/nsUnixShellService.cpp
--- Pale-Moon-26.3.1_Release/browser/components/shell/src/nsUnixShellService.cpp 1970-01-01 10:00:00.000000000 +1000
+++ Pale-Moon-26.3.1_Release-patched/browser/components/shell/src/nsUnixShellService.cpp 2016-06-27 19:56:07.828146759 +1000
@@ -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 -urN Pale-Moon-26.3.1_Release/browser/components/shell/src/nsUnixShellService.h Pale-Moon-26.3.1_Release-patched/browser/components/shell/src/nsUnixShellService.h
--- Pale-Moon-26.3.1_Release/browser/components/shell/src/nsUnixShellService.h 1970-01-01 10:00:00.000000000 +1000
+++ Pale-Moon-26.3.1_Release-patched/browser/components/shell/src/nsUnixShellService.h 2016-06-27 19:56:07.828146759 +1000
@@ -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 -urN Pale-Moon-26.3.1_Release/browser/installer/package-manifest.in Pale-Moon-26.3.1_Release-patched/browser/installer/package-manifest.in
--- Pale-Moon-26.3.1_Release/browser/installer/package-manifest.in 2016-06-24 00:37:32.000000000 +1000
+++ Pale-Moon-26.3.1_Release-patched/browser/installer/package-manifest.in 2016-06-27 19:56:07.828146759 +1000
@@ -585,9 +585,11 @@
; Technically this is an app pref file, but we are keeping it in the original
; gre location for now.
@BINPATH@/defaults/pref/channel-prefs.js
+@BINPATH@/defaults/pref/kde.js
#else
; For Fx-on-xr, channel-prefs lives with the app preferences. (Bug 762588)
@BINPATH@/@PREF_DIR@/channel-prefs.js
+@BINPATH@/@PREF_DIR@/kde.js
#endif
; Services (gre) prefs