diff options
Diffstat (limited to 'toolkit/mozapps')
-rw-r--r-- | toolkit/mozapps/downloads/nsHelperAppDlg.js | 70 | ||||
-rw-r--r-- | toolkit/mozapps/extensions/content/extensions.js | 9 | ||||
-rw-r--r-- | toolkit/mozapps/extensions/content/extensions.xml | 14 | ||||
-rw-r--r-- | toolkit/mozapps/extensions/internal/XPIProvider.jsm | 4 |
4 files changed, 58 insertions, 39 deletions
diff --git a/toolkit/mozapps/downloads/nsHelperAppDlg.js b/toolkit/mozapps/downloads/nsHelperAppDlg.js index 243db1c2f..90d38c90b 100644 --- a/toolkit/mozapps/downloads/nsHelperAppDlg.js +++ b/toolkit/mozapps/downloads/nsHelperAppDlg.js @@ -638,6 +638,7 @@ nsUnknownContentTypeDialog.prototype = { // Returns true if opening the default application makes sense. openWithDefaultOK: function() { + // The checking is different on Windows... #ifdef XP_WIN // Windows presents some special cases. // We need to prevent use of "system default" when the file is @@ -675,7 +676,7 @@ nsUnknownContentTypeDialog.prototype = { // getPath: getPath: function (aFile) { #ifdef XP_MACOSX - return aFile.leafName || aFile.path; + return aFile.leafName || aFile.path; #else return aFile.path; #endif @@ -1007,11 +1008,13 @@ nsUnknownContentTypeDialog.prototype = { var otherHandler = this.dialogElement("otherHandler"); otherHandler.removeAttribute("hidden"); otherHandler.setAttribute("path", this.getPath(this.chosenApp.executable)); + #ifdef XP_WIN otherHandler.label = this.getFileDisplayName(this.chosenApp.executable); #else otherHandler.label = this.chosenApp.name; #endif + this.dialogElement("openHandler").selectedIndex = 1; this.dialogElement("openHandler").setAttribute("lastSelectedItemID", "otherHandler"); @@ -1069,43 +1072,42 @@ nsUnknownContentTypeDialog.prototype = { // Remember the file they chose to run. this.chosenApp = params.handlerApp; } -#else +#else // XP_WIN #if MOZ_WIDGET_GTK == 3 - var nsIApplicationChooser = Components.interfaces.nsIApplicationChooser; - var appChooser = Components.classes["@mozilla.org/applicationchooser;1"] - .createInstance(nsIApplicationChooser); - appChooser.init(this.mDialog, this.dialogElement("strings").getString("chooseAppFilePickerTitle")); - var contentTypeDialogObj = this; - let appChooserCallback = function appChooserCallback_done(aResult) { - if (aResult) { - contentTypeDialogObj.chosenApp = aResult.QueryInterface(Components.interfaces.nsILocalHandlerApp); - } - contentTypeDialogObj.finishChooseApp(); - }; - appChooser.open(this.mLauncher.MIMEInfo.MIMEType, appChooserCallback); - // The finishChooseApp is called from appChooserCallback - return; -#else - var nsIFilePicker = Components.interfaces.nsIFilePicker; - var fp = Components.classes["@mozilla.org/filepicker;1"] - .createInstance(nsIFilePicker); - fp.init(this.mDialog, - this.dialogElement("strings").getString("chooseAppFilePickerTitle"), - nsIFilePicker.modeOpen); - - fp.appendFilters(nsIFilePicker.filterApps); - - if (fp.show() == nsIFilePicker.returnOK && fp.file) { - // Remember the file they chose to run. - var localHandlerApp = - Components.classes["@mozilla.org/uriloader/local-handler-app;1"]. - createInstance(Components.interfaces.nsILocalHandlerApp); - localHandlerApp.executable = fp.file; - this.chosenApp = localHandlerApp; + var nsIApplicationChooser = Components.interfaces.nsIApplicationChooser; + var appChooser = Components.classes["@mozilla.org/applicationchooser;1"] + .createInstance(nsIApplicationChooser); + appChooser.init(this.mDialog, this.dialogElement("strings").getString("chooseAppFilePickerTitle")); + var contentTypeDialogObj = this; + let appChooserCallback = function appChooserCallback_done(aResult) { + if (aResult) { + contentTypeDialogObj.chosenApp = aResult.QueryInterface(Components.interfaces.nsILocalHandlerApp); } + contentTypeDialogObj.finishChooseApp(); + }; + appChooser.open(this.mLauncher.MIMEInfo.MIMEType, appChooserCallback); + // The finishChooseApp is called from appChooserCallback + return; +#else // MOZ_WIDGET_GTK == 3 + var nsIFilePicker = Components.interfaces.nsIFilePicker; + var fp = Components.classes["@mozilla.org/filepicker;1"] + .createInstance(nsIFilePicker); + fp.init(this.mDialog, + this.dialogElement("strings").getString("chooseAppFilePickerTitle"), + nsIFilePicker.modeOpen); + + fp.appendFilters(nsIFilePicker.filterApps); + + if (fp.show() == nsIFilePicker.returnOK && fp.file) { + // Remember the file they chose to run. + var localHandlerApp = + Components.classes["@mozilla.org/uriloader/local-handler-app;1"]. + createInstance(Components.interfaces.nsILocalHandlerApp); + localHandlerApp.executable = fp.file; + this.chosenApp = localHandlerApp; + } #endif // MOZ_WIDGET_GTK == 3 #endif // XP_WIN - } this.finishChooseApp(); }, diff --git a/toolkit/mozapps/extensions/content/extensions.js b/toolkit/mozapps/extensions/content/extensions.js index 9576e9a3b..782fca303 100644 --- a/toolkit/mozapps/extensions/content/extensions.js +++ b/toolkit/mozapps/extensions/content/extensions.js @@ -3059,6 +3059,15 @@ var gDetailView = { warning.textContent = gStrings.ext.formatStringFromName("details.notification.gmpPending", [this._addon.name], 1); +#ifdef MOZ_PHOENIX_EXTENSIONS + } else if (this._addon.native == false) { + this.node.setAttribute("notification", "warning"); + this.node.setAttribute("native", "false"); + document.getElementById("detail-warning").textContent = gStrings.ext.formatStringFromName( + "details.notification.compatibility", + [this._addon.name, gStrings.brandShortName], 2 + ); +#endif } else { this.node.removeAttribute("notification"); } diff --git a/toolkit/mozapps/extensions/content/extensions.xml b/toolkit/mozapps/extensions/content/extensions.xml index 9c8fda8ed..513807e78 100644 --- a/toolkit/mozapps/extensions/content/extensions.xml +++ b/toolkit/mozapps/extensions/content/extensions.xml @@ -858,8 +858,8 @@ xbl:inherits="value=name,tooltiptext=name"/> <xul:label anonid="version" class="version"/> #ifdef MOZ_PHOENIX_EXTENSIONS - <xul:label class="nativeIndicator nativeAddon" value="●" tooltiptext="&addon.nativeAddon;"/> - <xul:label class="nativeIndicator compatAddon" value="●" tooltiptext="&addon.compatAddon;"/> + <xul:label class="nativeIndicator nativeAddon" value="" tooltiptext="&addon.nativeAddon;"/> + <xul:label class="nativeIndicator compatAddon" value="⚠️" tooltiptext="&addon.compatAddon;"/> #endif <xul:label class="disabled-postfix" value="&addon.disabled.postfix;"/> <xul:label class="update-postfix" value="&addon.update.postfix;"/> @@ -1359,8 +1359,16 @@ } else { this.removeAttribute("notification"); #ifdef MOZ_PHOENIX_EXTENSIONS - if (this.mAddon.type == "extension") + if (this.mAddon.type == "extension") { this.setAttribute("native", this.mAddon.native); + if (this.mAddon.native == false) { + this.setAttribute("notification", "warning"); + this._warning.textContent = gStrings.ext.formatStringFromName( + "notification.compatibility", + [this.mAddon.name, gStrings.brandShortName], 2 + ); + } + } #endif } } diff --git a/toolkit/mozapps/extensions/internal/XPIProvider.jsm b/toolkit/mozapps/extensions/internal/XPIProvider.jsm index 600ec2ff5..2f298a934 100644 --- a/toolkit/mozapps/extensions/internal/XPIProvider.jsm +++ b/toolkit/mozapps/extensions/internal/XPIProvider.jsm @@ -6472,8 +6472,8 @@ AddonInternal.prototype = { } else if (app.id == FIREFOX_ID) { version = FIREFOX_APPCOMPATVERSION; - if (this.type == "locale") - //Never allow language packs in Firefox compatibility mode + if (this.type != "extension") + //Only allow extensions in Firefox compatibility mode return false; #endif } |