diff -r 97a6da6d7e29 -r 8a4f5aea2475 firefox-kde.patch --- a/firefox-kde.patch Sun Oct 20 14:25:55 2019 +0200 +++ b/firefox-kde.patch Fri Oct 25 11:19:31 2019 +0200 @@ -3,7 +3,7 @@ # Date 1559300151 -7200 # Fri May 31 12:55:51 2019 +0200 # Node ID 54d41b0033b8d649d842a1f862c6fed8b9874dec -# Parent 28bde69150771a1530f784903bf68214dd5790ea +# Parent 4faaad3619f286bd6077754d8e59d339a5142b80 How to apply this patch: 1. Import and apply it 2. cp browser/base/content/browser.xul browser/base/content/browser-kde.xul @@ -14,7 +14,7 @@ diff --git a/browser/components/preferences/in-content/main.js b/browser/components/preferences/in-content/main.js --- a/browser/components/preferences/in-content/main.js +++ b/browser/components/preferences/in-content/main.js -@@ -339,16 +339,23 @@ var gMainPane = { +@@ -341,16 +341,23 @@ var gMainPane = { }, backoffTimes[this._backoffIndex + 1 < backoffTimes.length ? this._backoffIndex++ : backoffTimes.length - 1]); }; @@ -38,7 +38,7 @@ ); let performanceSettingsUrl = Services.urlFormatter.formatURLPref("app.support.baseURL") + -@@ -1146,16 +1153,27 @@ var gMainPane = { +@@ -1199,16 +1206,27 @@ var gMainPane = { this._backoffIndex = 0; let shellSvc = getShellService(); @@ -71,7 +71,7 @@ +++ b/browser/components/shell/moz.build @@ -28,16 +28,18 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'coco ] - elif 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']: + elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk': XPIDL_SOURCES += [ 'nsIGNOMEShellService.idl', ] @@ -92,7 +92,7 @@ new file mode 100644 --- /dev/null +++ b/browser/components/shell/nsKDEShellService.cpp -@@ -0,0 +1,150 @@ +@@ -0,0 +1,103 @@ +/* -*- 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 @@ -196,53 +196,6 @@ + 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 ); -+ 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 ); -+ nsAutoCString app; -+ nsresult rv = aApplication->GetNativePath( app ); -+ NS_ENSURE_SUCCESS( rv, rv ); -+ appstr->SetData( app ); -+ command->AppendElement( appstr ); -+ uristr->SetData( aURI ); -+ command->AppendElement( uristr ); -+ return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE; -+} -+ diff --git a/browser/components/shell/nsKDEShellService.h b/browser/components/shell/nsKDEShellService.h new file mode 100644 --- /dev/null