зеркало из https://github.com/mozilla/pjs.git
Bug 310737: 1.0.x users have no way to re-enable software installation (message bar that appears when xpinstall.enabled is false points to removed UI). r=mconnor, ui=beltzner
This commit is contained in:
Родитель
4e72d58a48
Коммит
c618f77b70
|
@ -582,13 +582,18 @@ const gXPInstallObserver = {
|
|||
}
|
||||
var messageString, buttonString, buttonAccesskeyString;
|
||||
if (!gPrefService.getBoolPref("xpinstall.enabled")) {
|
||||
messageString = browserBundle.getFormattedString("xpinstallDisabledWarning",
|
||||
[brandShortName, host]);
|
||||
buttonAccesskeyString = browserBundle.getString("xpinstallDisabledWarningButton.accesskey");
|
||||
buttonString = browserBundle.getString("xpinstallDisabledWarningButton");
|
||||
if (gPrefService.prefIsLocked("xpinstall.enabled")) {
|
||||
messageString = browserBundle.getString("xpinstallDisabledMessageLocked");
|
||||
buttonString = ""; // don't show the button
|
||||
}
|
||||
else {
|
||||
messageString = browserBundle.getString("xpinstallDisabledMessage");
|
||||
buttonString = browserBundle.getString("xpinstallDisabledButton");
|
||||
buttonAccesskeyString = browserBundle.getString("xpinstallDisabledButton.accesskey");
|
||||
}
|
||||
getBrowser().showMessage(browser, iconURL, messageString, buttonString,
|
||||
null, "xpinstall-install-edit-prefs",
|
||||
null, "top", false, buttonAccesskeyString);
|
||||
null, "top", true, buttonAccesskeyString);
|
||||
}
|
||||
else {
|
||||
messageString = browserBundle.getFormattedString(messageKey, [brandShortName, host]);
|
||||
|
@ -602,7 +607,7 @@ const gXPInstallObserver = {
|
|||
}
|
||||
break;
|
||||
case "xpinstall-install-edit-prefs":
|
||||
openPreferences("paneContent");
|
||||
gPrefService.setBoolPref("xpinstall.enabled", true);
|
||||
getBrowser().hideMessage(null, "top");
|
||||
break;
|
||||
case "xpinstall-install-edit-permissions":
|
||||
|
|
|
@ -72,9 +72,10 @@ xpinstallWarningButton=Edit Options...
|
|||
# Be sure you do not choose an accesskey that is used elsewhere in the active context (e.g. main menu bar, submenu of the warning popup button)
|
||||
# See http://www.mozilla.org/access/keyboard/accesskey for details
|
||||
xpinstallWarningButton.accesskey=O
|
||||
xpinstallDisabledWarning=Software installation is currently disabled. Click Edit Options... to enable it and try again.
|
||||
xpinstallDisabledWarningButton=Edit Options...
|
||||
xpinstallDisabledWarningButton.accesskey=O
|
||||
xpinstallDisabledMessageLocked=Software installation has been disabled by your system administrator.
|
||||
xpinstallDisabledMessage=Software installation is currently disabled. Click Enable and try again.
|
||||
xpinstallDisabledButton=Enable
|
||||
xpinstallDisabledButton.accesskey=n
|
||||
themeWarning=To protect your computer, %S prevented this site (%S) from installing themes.
|
||||
themeWarningButton=Edit Options...
|
||||
popupWarning=%S prevented this site from opening a popup window.
|
||||
|
|
Загрузка…
Ссылка в новой задаче