From 63dd8d9103114b792855e78bac25a7f2ff100153 Mon Sep 17 00:00:00 2001 From: Brindusan Cristian Date: Sun, 3 May 2020 20:32:26 +0300 Subject: [PATCH] Backed out changeset 24437647ba33 (bug 1581383) for bc failures at browser_applications_selection.js. --- browser/components/preferences/main.js | 46 ++++++++----------- .../en-US/browser/preferences/preferences.ftl | 18 ++------ .../themes/linux/preferences/applications.css | 5 -- .../themes/osx/preferences/applications.css | 5 -- .../windows/preferences/applications.css | 5 -- 5 files changed, 24 insertions(+), 55 deletions(-) diff --git a/browser/components/preferences/main.js b/browser/components/preferences/main.js index 6010a5bbe644..0d10ac20b928 100644 --- a/browser/components/preferences/main.js +++ b/browser/components/preferences/main.js @@ -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; diff --git a/browser/locales/en-US/browser/preferences/preferences.ftl b/browser/locales/en-US/browser/preferences/preferences.ftl index dfcc7a276455..d533db4ddf6b 100644 --- a/browser/locales/en-US/browser/preferences/preferences.ftl +++ b/browser/locales/en-US/browser/preferences/preferences.ftl @@ -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 } diff --git a/browser/themes/linux/preferences/applications.css b/browser/themes/linux/preferences/applications.css index 2f00d7ecf4b7..36b07c1cf27d 100644 --- a/browser/themes/linux/preferences/applications.css +++ b/browser/themes/linux/preferences/applications.css @@ -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"); diff --git a/browser/themes/osx/preferences/applications.css b/browser/themes/osx/preferences/applications.css index 776840e7d195..920f3c8c0fb6 100644 --- a/browser/themes/osx/preferences/applications.css +++ b/browser/themes/osx/preferences/applications.css @@ -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"); diff --git a/browser/themes/windows/preferences/applications.css b/browser/themes/windows/preferences/applications.css index fc0afea7e1cf..e62c61ee4f1f 100644 --- a/browser/themes/windows/preferences/applications.css +++ b/browser/themes/windows/preferences/applications.css @@ -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");