Bug 1447831: Part 2 - Remove support for restart-required install prompts. r=aswan

MozReview-Commit-ID: JMIiF54Cikm

--HG--
extra : rebase_source : 9abbba8318196124ffab644a7e128e139df9881a
This commit is contained in:
Kris Maglione 2018-03-21 15:19:49 -07:00
parent 81e92377b6
commit 1517368b77
5 changed files with 7 additions and 132 deletions

View file

@ -436,37 +436,9 @@ var gXPInstallObserver = {
showNotification();
break; }
case "addon-install-complete": {
let needsRestart = installInfo.installs.some(function(i) {
return i.addon.pendingOperations != AddonManager.PENDING_NONE;
});
let secondaryActions = null;
let numAddons = installInfo.installs.length;
if (needsRestart) {
notificationID = "addon-install-restart";
if (numAddons == 1) {
messageString = gNavigatorBundle.getFormattedString("addonInstalledNeedsRestart",
[installInfo.installs[0].name, brandShortName]);
} else {
messageString = gNavigatorBundle.getString("addonsGenericInstalledNeedsRestart");
messageString = PluralForm.get(numAddons, messageString);
messageString = messageString.replace("#1", numAddons);
messageString = messageString.replace("#2", brandShortName);
}
action = {
label: gNavigatorBundle.getString("addonInstallRestartButton"),
accessKey: gNavigatorBundle.getString("addonInstallRestartButton.accesskey"),
callback() {
BrowserUtils.restartApplication();
}
};
secondaryActions = [{
label: gNavigatorBundle.getString("addonInstallRestartIgnoreButton"),
accessKey: gNavigatorBundle.getString("addonInstallRestartIgnoreButton.accesskey"),
callback: () => {},
}];
} else {
if (numAddons == 1) {
messageString = gNavigatorBundle.getFormattedString("addonInstalled",
[installInfo.installs[0].name]);
@ -476,11 +448,7 @@ var gXPInstallObserver = {
messageString = messageString.replace("#1", numAddons);
}
action = null;
}
// Remove notification on dismissal, since it's possible to cancel the
// install through the addons manager UI, making the "restart" prompt
// irrelevant.
options.removeOnDismissal = true;
options.persistent = false;
@ -669,31 +637,6 @@ var LightWeightThemeWebInstaller = {
_install(newLWTheme, notify) {
let listener = {
onEnabling(aAddon, aRequiresRestart) {
if (!aRequiresRestart) {
return;
}
let messageString = gNavigatorBundle.getFormattedString("lwthemeNeedsRestart.message",
[aAddon.name], 1);
let action = {
label: gNavigatorBundle.getString("lwthemeNeedsRestart.button"),
accessKey: gNavigatorBundle.getString("lwthemeNeedsRestart.accesskey"),
callback() {
BrowserUtils.restartApplication();
}
};
let options = {
persistent: true
};
PopupNotifications.show(gBrowser.selectedBrowser, "addon-theme-change",
messageString, "addons-notification-icon",
action, null, options);
},
onEnabled(aAddon) {
if (notify) {
ExtensionsUI.showInstallNotification(gBrowser.selectedBrowser, newLWTheme);

View file

@ -202,18 +202,6 @@ addonInstalled=%S has been installed successfully.
# http://developer.mozilla.org/en/docs/Localization_and_Plurals
# #1 number of add-ons
addonsGenericInstalled=#1 add-on has been installed successfully.;#1 add-ons have been installed successfully.
# LOCALIZATION NOTE (addonInstalledNeedsRestart):
# %1$S is the name of the add-on, %2$S is the application's name
addonInstalledNeedsRestart=%1$S will be installed after you restart %2$S.
# LOCALIZATION NOTE (addonsGenericInstalledNeedsRestart):
# Semicolon-separated list of plural forms. See:
# http://developer.mozilla.org/en/docs/Localization_and_Plurals
# #1 number of add-ons. #2 application's name
addonsGenericInstalledNeedsRestart=#1 add-on will be installed after you restart #2.;#1 add-ons will be installed after you restart #2.
addonInstallRestartButton=Restart Now
addonInstallRestartButton.accesskey=R
addonInstallRestartIgnoreButton=Not Now
addonInstallRestartIgnoreButton.accesskey=N
# LOCALIZATION NOTE (addonInstallError-1, addonInstallError-2, addonInstallError-3, addonInstallError-4, addonInstallError-5, addonLocalInstallError-1, addonLocalInstallError-2, addonLocalInstallError-3, addonLocalInstallError-4, addonLocalInstallError-5):
# %1$S is the application name, %2$S is the add-on name
@ -253,12 +241,6 @@ lwthemeInstallRequest.message2=This site (%S) attempted to install a theme.
lwthemeInstallRequest.allowButton2=Allow
lwthemeInstallRequest.allowButton.accesskey2=a
# LOCALIZATION NOTE (lwthemeNeedsRestart.message):
# %S will be replaced with the new theme name.
lwthemeNeedsRestart.message=%S will be installed after you restart.
lwthemeNeedsRestart.button=Restart Now
lwthemeNeedsRestart.accesskey=R
# LOCALIZATION NOTE (popupWarning.message): Semicolon-separated list of plural forms.
# See: http://developer.mozilla.org/en/docs/Localization_and_Plurals
# #1 is brandShortName and #2 is the number of pop-ups blocked.

View file

@ -1,46 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- 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
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
width="64" height="64" viewBox="0 0 64 64">
<defs>
<style>
.style-puzzle-piece {
fill: url('#gradient-linear-puzzle-piece');
fill-opacity: .25;
}
.style-puzzle-piece-outline {
fill: none;
stroke-width: 2;
stroke: #52b33e;
stroke-dasharray: 4 2;
}
.style-badge-shadow {
fill: #0d131a;
fill-opacity: .15;
}
.style-badge-background {
fill: #fff;
}
.style-badge-inside {
fill: #00a1e5;
}
.style-badge-icon {
fill: #fff;
}
</style>
<linearGradient id="gradient-linear-puzzle-piece" x1="0%" y1="0%" x2="0%" y2="100%">
<stop offset="0%" stop-color="#66cc52" stop-opacity="1"/>
<stop offset="100%" stop-color="#60bf4c" stop-opacity="1"/>
</linearGradient>
</defs>
<path class="style-puzzle-piece" d="M42,62c2.2,0,4-1.8,4-4l0-14.2c0,0,0.4-3.7,2.8-3.7c2.4,0,2.2,3.9,6.7,3.9c2.3,0,6.2-1.2,6.2-8.2 c0-7-3.9-7.9-6.2-7.9c-4.5,0-4.3,3.7-6.7,3.7c-2.4,0-2.8-3.8-2.8-3.8V22c0-2.2-1.8-4-4-4H31.5c0,0-3.4-0.6-3.4-3 c0-2.4,3.8-2.6,3.8-7.1c0-2.3-1.3-5.9-8.3-5.9s-8,3.6-8,5.9c0,4.5,3.4,4.7,3.4,7.1c0,2.4-3.4,3-3.4,3H6c-2.2,0-4,1.8-4,4l0,7.8 c0,0-0.4,6,4.4,6c3.1,0,3.2-4.1,7.3-4.1c2,0,4,1.9,4,6c0,4.2-2,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3,29.9 l0,0l0,0L3,22c0-1.7,1.3-3,3-3h9.7h0.1l0.1,0c1.6-0.3,4.3-1.4,4.3-4c0-1.4-0.9-2.3-1.6-3.1c-0.9-1-1.8-1.9-1.8-4.1 C16.6,4.6,18.9,3,23.6,3"/>
<svg width="32" height="32" x="32" y="0">
<ellipse class="style-badge-shadow" rx="14" ry="15" cx="16" cy="17" />
<circle class="style-badge-background" r="15" cy="15" cx="16" />
<circle class="style-badge-inside" r="12" cy="15" cx="16" />
<path class="style-badge-icon" d="M21,15h-6l2.4-2.4c-0.6-0.4-1.2-0.6-1.9-0.6c-2,0-3.5,1.6-3.5,3.5 c0,2,1.6,3.5,3.5,3.5c1,0,2-0.5,2.6-1.2l1.7,1c-1,1.3-2.6,2.1-4.3,2.1c-3,0-5.5-2.5-5.5-5.5c0-3,2.5-5.5,5.5-5.5 c1.3,0,2.4,0.4,3.3,1.2L21,9V15z"/>
</svg>
</svg>

Before

Width:  |  Height:  |  Size: 3.3 KiB

View file

@ -18,7 +18,6 @@
skin/classic/browser/addons/addon-install-downloading.svg (../shared/addons/addon-install-downloading.svg)
skin/classic/browser/addons/addon-install-error.svg (../shared/addons/addon-install-error.svg)
skin/classic/browser/addons/addon-install-installed.svg (../shared/addons/addon-install-installed.svg)
skin/classic/browser/addons/addon-install-restart.svg (../shared/addons/addon-install-restart.svg)
skin/classic/browser/addons/addon-install-warning.svg (../shared/addons/addon-install-warning.svg)
skin/classic/browser/controlcenter/conn-not-secure.svg (../shared/controlcenter/conn-not-secure.svg)
skin/classic/browser/controlcenter/connection.svg (../shared/controlcenter/connection.svg)

View file

@ -228,9 +228,6 @@ html|*#webRTC-previewVideo {
list-style-image: url(chrome://browser/skin/addons/addon-install-installed.svg);
}
.popup-notification-icon[popupid="addon-install-restart"] {
list-style-image: url(chrome://browser/skin/addons/addon-install-restart.svg);
}
/* OFFLINE APPS */
.popup-notification-icon[popupid*="offline-app-requested"],