mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 01:05:45 +00:00
Backed out changeset 24437647ba33 (bug 1581383) for bc failures at browser_applications_selection.js.
This commit is contained in:
parent
47d1d70b51
commit
63dd8d9103
@ -77,7 +77,7 @@ const ICON_URL_APP =
|
||||
? "moz-icon://dummy.exe?size=16"
|
||||
: "chrome://browser/skin/preferences/application.png";
|
||||
|
||||
// For CSS. Can be one of "ask", "save", "handleInternally" or "plugin". If absent, the icon URL
|
||||
// For CSS. Can be one of "ask", "save" or "plugin". If absent, the icon URL
|
||||
// was set by us to a custom handler icon and CSS should not try to override it.
|
||||
const APP_ICON_ATTR_NAME = "appHandlerIcon";
|
||||
|
||||
@ -2234,15 +2234,18 @@ var gMainPane = {
|
||||
}
|
||||
|
||||
let internalMenuItem;
|
||||
// Add the "Open in Firefox" option for optional internal handlers.
|
||||
// Add the "Preview in Firefox" option for optional internal handlers.
|
||||
if (handlerInfo instanceof InternalHandlerInfoWrapper) {
|
||||
internalMenuItem = document.createXULElement("menuitem");
|
||||
internalMenuItem.setAttribute(
|
||||
"action",
|
||||
Ci.nsIHandlerInfo.handleInternally
|
||||
);
|
||||
document.l10n.setAttributes(internalMenuItem, "applications-open-inapp");
|
||||
internalMenuItem.setAttribute(APP_ICON_ATTR_NAME, "handleInternally");
|
||||
document.l10n.setAttributes(
|
||||
internalMenuItem,
|
||||
"applications-preview-inapp"
|
||||
);
|
||||
internalMenuItem.setAttribute(APP_ICON_ATTR_NAME, "ask");
|
||||
menuPopup.appendChild(internalMenuItem);
|
||||
}
|
||||
|
||||
@ -2275,28 +2278,17 @@ var gMainPane = {
|
||||
"action",
|
||||
Ci.nsIHandlerInfo.useSystemDefault
|
||||
);
|
||||
// If an internal option is available, don't show the application
|
||||
// name for the OS default to prevent two options from appearing
|
||||
// that may both say "Firefox".
|
||||
if (internalMenuItem) {
|
||||
document.l10n.setAttributes(
|
||||
defaultMenuItem,
|
||||
"applications-use-os-default"
|
||||
);
|
||||
defaultMenuItem.setAttribute("image", ICON_URL_APP);
|
||||
} else {
|
||||
document.l10n.setAttributes(
|
||||
defaultMenuItem,
|
||||
"applications-use-app-default",
|
||||
{
|
||||
"app-name": handlerInfo.defaultDescription,
|
||||
}
|
||||
);
|
||||
defaultMenuItem.setAttribute(
|
||||
"image",
|
||||
handlerInfo.iconURLForSystemDefault
|
||||
);
|
||||
}
|
||||
document.l10n.setAttributes(
|
||||
defaultMenuItem,
|
||||
"applications-use-app-default",
|
||||
{
|
||||
"app-name": handlerInfo.defaultDescription,
|
||||
}
|
||||
);
|
||||
defaultMenuItem.setAttribute(
|
||||
"image",
|
||||
handlerInfo.iconURLForSystemDefault
|
||||
);
|
||||
|
||||
menuPopup.appendChild(defaultMenuItem);
|
||||
}
|
||||
@ -3347,7 +3339,7 @@ class HandlerInfoWrapper {
|
||||
|
||||
case Ci.nsIHandlerInfo.handleInternally:
|
||||
if (this instanceof InternalHandlerInfoWrapper) {
|
||||
return "handleInternally";
|
||||
return "ask";
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -285,7 +285,7 @@ translate-exceptions =
|
||||
.label = Exceptions…
|
||||
.accesskey = x
|
||||
|
||||
# Variables:
|
||||
# Variables:
|
||||
# $localeName (string) - Localized name of the locale to be used.
|
||||
use-system-locale =
|
||||
.label = Use your operating system settings for “{ $localeName }” to format dates, times, numbers, and measurements.
|
||||
@ -351,14 +351,6 @@ applications-use-app =
|
||||
applications-use-app-default =
|
||||
.label = Use { $app-name } (default)
|
||||
|
||||
applications-use-os-default =
|
||||
.label =
|
||||
{ PLATFORM() ->
|
||||
[macos] Use macOS default application
|
||||
[windows] Use Windows default application
|
||||
*[other] Use system default application
|
||||
}
|
||||
|
||||
applications-use-other =
|
||||
.label = Use other…
|
||||
applications-select-helper = Select Helper Application
|
||||
@ -387,8 +379,8 @@ applications-file-ending-with-type = { applications-file-ending } ({ $type })
|
||||
# $plugin-name (String) - Name of a plugin (e.g Adobe Flash)
|
||||
applications-use-plugin-in =
|
||||
.label = Use { $plugin-name } (in { -brand-short-name })
|
||||
applications-open-inapp =
|
||||
.label = Open in { -brand-short-name }
|
||||
applications-preview-inapp =
|
||||
.label = Preview in { -brand-short-name }
|
||||
|
||||
## The strings in this group are used to populate
|
||||
## selected label element based on the string from
|
||||
@ -403,8 +395,8 @@ applications-action-save-label =
|
||||
applications-use-app-label =
|
||||
.value = { applications-use-app.label }
|
||||
|
||||
applications-open-inapp-label =
|
||||
.value = { applications-open-inapp.label }
|
||||
applications-preview-inapp-label =
|
||||
.value = { applications-preview-inapp.label }
|
||||
|
||||
applications-always-ask-label =
|
||||
.value = { applications-always-ask.label }
|
||||
|
@ -27,11 +27,6 @@
|
||||
min-height: 25px;
|
||||
}
|
||||
|
||||
richlistitem[appHandlerIcon="handleInternally"],
|
||||
menuitem[appHandlerIcon="handleInternally"] {
|
||||
list-style-image: url("chrome://branding/content/icon32.png");
|
||||
}
|
||||
|
||||
richlistitem[appHandlerIcon="ask"],
|
||||
menuitem[appHandlerIcon="ask"] {
|
||||
list-style-image: url("chrome://browser/skin/preferences/alwaysAsk.png");
|
||||
|
@ -46,11 +46,6 @@
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
richlistitem[appHandlerIcon="handleInternally"],
|
||||
menuitem[appHandlerIcon="handleInternally"] {
|
||||
list-style-image: url("chrome://branding/content/icon32.png");
|
||||
}
|
||||
|
||||
richlistitem[appHandlerIcon="ask"],
|
||||
menuitem[appHandlerIcon="ask"] {
|
||||
list-style-image: url("chrome://browser/skin/preferences/alwaysAsk.png");
|
||||
|
@ -27,11 +27,6 @@
|
||||
min-height: 22px;
|
||||
}
|
||||
|
||||
richlistitem[appHandlerIcon="handleInternally"],
|
||||
menuitem[appHandlerIcon="handleInternally"] {
|
||||
list-style-image: url("chrome://branding/content/icon32.png");
|
||||
}
|
||||
|
||||
richlistitem[appHandlerIcon="ask"],
|
||||
menuitem[appHandlerIcon="ask"] {
|
||||
list-style-image: url("chrome://browser/skin/preferences/alwaysAsk.png");
|
||||
|
Loading…
Reference in New Issue
Block a user