forked from pool/MozillaFirefox
Accepting request 612426 from mozilla:Factory
- fixed "open with" option under KDE (boo#1094747) - workaround crash on startup on aarch64 (boo#1093059) (contributed by guillaume@Arm.com) OBS-URL: https://build.opensuse.org/request/show/612426 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/MozillaFirefox?expand=0&rev=273
This commit is contained in:
commit
e2cf88b870
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat May 26 15:53:25 UTC 2018 - wr@rosenauer.org
|
||||||
|
|
||||||
|
- fixed "open with" option under KDE (boo#1094747)
|
||||||
|
- workaround crash on startup on aarch64 (boo#1093059)
|
||||||
|
(contributed by guillaume@Arm.com)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed May 23 08:49:09 UTC 2018 - guillaume.gardet@opensuse.org
|
Wed May 23 08:49:09 UTC 2018 - guillaume.gardet@opensuse.org
|
||||||
|
|
||||||
|
@ -305,6 +305,10 @@ export CFLAGS="%{optflags} -fno-strict-aliasing"
|
|||||||
%if 0%{?suse_version} > 1320
|
%if 0%{?suse_version} > 1320
|
||||||
export CFLAGS="$CFLAGS -fno-delete-null-pointer-checks"
|
export CFLAGS="$CFLAGS -fno-delete-null-pointer-checks"
|
||||||
%endif
|
%endif
|
||||||
|
%ifarch aarch64
|
||||||
|
# Workaround crash on startup. boo#1093059
|
||||||
|
export CFLAGS="$CFLAGS -ffixed-x28"
|
||||||
|
%endif
|
||||||
%ifarch %arm
|
%ifarch %arm
|
||||||
export CFLAGS="${CFLAGS/-g / }"
|
export CFLAGS="${CFLAGS/-g / }"
|
||||||
%endif
|
%endif
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# HG changeset patch
|
# HG changeset patch
|
||||||
# Parent 9cc0c990890e64f69ed068cf1a4534535bcc50a7
|
# Parent d7a4d772ba2afb3ac43e2f2f234ffa55bcf50e70
|
||||||
Description: Add KDE integration to Firefox (toolkit parts)
|
Description: Add KDE integration to Firefox (toolkit parts)
|
||||||
Author: Wolfgang Rosenauer <wolfgang@rosenauer.org>
|
Author: Wolfgang Rosenauer <wolfgang@rosenauer.org>
|
||||||
Author: Lubos Lunak <lunak@suse.com>
|
Author: Lubos Lunak <lunak@suse.com>
|
||||||
@ -714,7 +714,7 @@ diff --git a/toolkit/mozapps/downloads/nsHelperAppDlg.js b/toolkit/mozapps/downl
|
|||||||
this.mDialog.document.documentElement.getButton("accept").disabled = !ok;
|
this.mDialog.document.documentElement.getButton("accept").disabled = !ok;
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -1066,30 +1066,57 @@ nsUnknownContentTypeDialog.prototype = {
|
@@ -1066,30 +1066,60 @@ nsUnknownContentTypeDialog.prototype = {
|
||||||
|
|
||||||
if (params.handlerApp &&
|
if (params.handlerApp &&
|
||||||
params.handlerApp.executable &&
|
params.handlerApp.executable &&
|
||||||
@ -731,6 +731,12 @@ diff --git a/toolkit/mozapps/downloads/nsHelperAppDlg.js b/toolkit/mozapps/downl
|
|||||||
- let appChooserCallback = function appChooserCallback_done(aResult) {
|
- let appChooserCallback = function appChooserCallback_done(aResult) {
|
||||||
- if (aResult) {
|
- if (aResult) {
|
||||||
- contentTypeDialogObj.chosenApp = aResult.QueryInterface(Ci.nsILocalHandlerApp);
|
- contentTypeDialogObj.chosenApp = aResult.QueryInterface(Ci.nsILocalHandlerApp);
|
||||||
|
- }
|
||||||
|
- contentTypeDialogObj.finishChooseApp();
|
||||||
|
- };
|
||||||
|
- appChooser.open(this.mLauncher.MIMEInfo.MIMEType, appChooserCallback);
|
||||||
|
- // The finishChooseApp is called from appChooserCallback
|
||||||
|
- return;
|
||||||
+ // handle the KDE case which is implemented in the filepicker
|
+ // handle the KDE case which is implemented in the filepicker
|
||||||
+ // therefore falling back to Gtk2 like behaviour if KDE is running
|
+ // therefore falling back to Gtk2 like behaviour if KDE is running
|
||||||
+ // FIXME this should be better handled in the nsIApplicationChooser
|
+ // FIXME this should be better handled in the nsIApplicationChooser
|
||||||
@ -739,8 +745,8 @@ diff --git a/toolkit/mozapps/downloads/nsHelperAppDlg.js b/toolkit/mozapps/downl
|
|||||||
+ .getService(Components.interfaces.nsIEnvironment);
|
+ .getService(Components.interfaces.nsIEnvironment);
|
||||||
+ if (env.get('KDE_FULL_SESSION') == "true")
|
+ if (env.get('KDE_FULL_SESSION') == "true")
|
||||||
+ {
|
+ {
|
||||||
+ var nsIFilePicker = Components.interfaces.nsIFilePicker;
|
+ var nsIFilePicker = Ci.nsIFilePicker;
|
||||||
+ var fp = Components.classes["@mozilla.org/filepicker;1"]
|
+ var fp = Cc["@mozilla.org/filepicker;1"]
|
||||||
+ .createInstance(nsIFilePicker);
|
+ .createInstance(nsIFilePicker);
|
||||||
+ fp.init(this.mDialog,
|
+ fp.init(this.mDialog,
|
||||||
+ this.dialogElement("strings").getString("chooseAppFilePickerTitle"),
|
+ this.dialogElement("strings").getString("chooseAppFilePickerTitle"),
|
||||||
@ -748,19 +754,17 @@ diff --git a/toolkit/mozapps/downloads/nsHelperAppDlg.js b/toolkit/mozapps/downl
|
|||||||
+
|
+
|
||||||
+ fp.appendFilters(nsIFilePicker.filterApps);
|
+ fp.appendFilters(nsIFilePicker.filterApps);
|
||||||
+
|
+
|
||||||
+ if (fp.show() == nsIFilePicker.returnOK && fp.file) {
|
+ fp.open(aResult => {
|
||||||
|
+ if (aResult == nsIFilePicker.returnOK && fp.file) {
|
||||||
+ // Remember the file they chose to run.
|
+ // Remember the file they chose to run.
|
||||||
+ var localHandlerApp =
|
+ var localHandlerApp =
|
||||||
+ Components.classes["@mozilla.org/uriloader/local-handler-app;1"].
|
+ Cc["@mozilla.org/uriloader/local-handler-app;1"].
|
||||||
+ createInstance(Components.interfaces.nsILocalHandlerApp);
|
+ createInstance(Ci.nsILocalHandlerApp);
|
||||||
+ localHandlerApp.executable = fp.file;
|
+ localHandlerApp.executable = fp.file;
|
||||||
+ this.chosenApp = localHandlerApp;
|
+ this.chosenApp = localHandlerApp;
|
||||||
}
|
+ }
|
||||||
- contentTypeDialogObj.finishChooseApp();
|
+ this.finishChooseApp();
|
||||||
- };
|
+ });
|
||||||
- appChooser.open(this.mLauncher.MIMEInfo.MIMEType, appChooserCallback);
|
|
||||||
- // The finishChooseApp is called from appChooserCallback
|
|
||||||
- return;
|
|
||||||
+ } else {
|
+ } else {
|
||||||
+ var nsIApplicationChooser = Ci.nsIApplicationChooser;
|
+ var nsIApplicationChooser = Ci.nsIApplicationChooser;
|
||||||
+ var appChooser = Cc["@mozilla.org/applicationchooser;1"]
|
+ var appChooser = Cc["@mozilla.org/applicationchooser;1"]
|
||||||
@ -1304,6 +1308,46 @@ new file mode 100644
|
|||||||
+ };
|
+ };
|
||||||
+
|
+
|
||||||
+#endif // nsKDEUtils
|
+#endif // nsKDEUtils
|
||||||
|
diff --git a/uriloader/exthandler/HandlerServiceParent.cpp b/uriloader/exthandler/HandlerServiceParent.cpp
|
||||||
|
--- a/uriloader/exthandler/HandlerServiceParent.cpp
|
||||||
|
+++ b/uriloader/exthandler/HandlerServiceParent.cpp
|
||||||
|
@@ -1,16 +1,16 @@
|
||||||
|
#include "mozilla/Logging.h"
|
||||||
|
#include "HandlerServiceParent.h"
|
||||||
|
#include "nsIHandlerService.h"
|
||||||
|
#include "nsIMIMEInfo.h"
|
||||||
|
#include "ContentHandlerService.h"
|
||||||
|
#include "nsStringEnumerator.h"
|
||||||
|
#ifdef MOZ_WIDGET_GTK
|
||||||
|
-#include "unix/nsGNOMERegistry.h"
|
||||||
|
+#include "unix/nsCommonRegistry.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
using mozilla::dom::HandlerInfo;
|
||||||
|
using mozilla::dom::HandlerApp;
|
||||||
|
using mozilla::dom::ContentHandlerService;
|
||||||
|
using mozilla::dom::RemoteHandlerApp;
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
@@ -264,17 +264,17 @@ HandlerServiceParent::RecvExists(const H
|
||||||
|
}
|
||||||
|
|
||||||
|
mozilla::ipc::IPCResult
|
||||||
|
HandlerServiceParent::RecvExistsForProtocol(const nsCString& aProtocolScheme,
|
||||||
|
bool* aHandlerExists)
|
||||||
|
{
|
||||||
|
#ifdef MOZ_WIDGET_GTK
|
||||||
|
// Check the GNOME registry for a protocol handler
|
||||||
|
- *aHandlerExists = nsGNOMERegistry::HandlerExists(aProtocolScheme.get());
|
||||||
|
+ *aHandlerExists = nsCommonRegistry::HandlerExists(aProtocolScheme.get());
|
||||||
|
#else
|
||||||
|
*aHandlerExists = false;
|
||||||
|
#endif
|
||||||
|
return IPC_OK();
|
||||||
|
}
|
||||||
|
|
||||||
|
mozilla::ipc::IPCResult
|
||||||
|
HandlerServiceParent::RecvGetTypeFromExtension(const nsCString& aFileExtension,
|
||||||
diff --git a/uriloader/exthandler/moz.build b/uriloader/exthandler/moz.build
|
diff --git a/uriloader/exthandler/moz.build b/uriloader/exthandler/moz.build
|
||||||
--- a/uriloader/exthandler/moz.build
|
--- a/uriloader/exthandler/moz.build
|
||||||
+++ b/uriloader/exthandler/moz.build
|
+++ b/uriloader/exthandler/moz.build
|
||||||
|
Loading…
Reference in New Issue
Block a user