bug 287739. New way of doing mnemnonics on message bar buttons that doesn't break extensions. Patch by Giorgio Maone. r=mconnor, a=bsmedberg

This commit is contained in:
aaronleventhal%moonset.net 2005-07-20 19:47:09 +00:00
parent 51adbfe941
commit 9d39f4bd85
2 changed files with 14 additions and 10 deletions

View File

@ -33,6 +33,7 @@
# Asaf Romano <mozilla.mano@sent.com>
# Jason Barnabe <jason_barnabe@fastmail.fm>
# Peter Parente <parente@cs.unc.edu>
# Giorgio Maone <g.maone@informaction.com>
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
@ -227,8 +228,8 @@ const gPopupBlockerObserver = {
message = bundle_browser.getFormattedString("popupWarning", [brandShortName]);
gBrowser.showMessage(gBrowser.selectedBrowser, "chrome://browser/skin/Info.png",
message, popupButtonText, popupButtonAccesskey, null, null,
"blockedPopupOptions", "top", true);
message, popupButtonText, null, null, "blockedPopupOptions",
"top", true, popupButtonAccesskey);
}
}
else
@ -474,8 +475,8 @@ const gXPInstallObserver = {
buttonKey = browserBundle.getString("xpinstallDisabledWarningButton.accesskey");
buttonAccesskeyString = browserBundle.getString("xpinstallDisabledWarningButton");
getBrowser().showMessage(browser, iconURL, messageString, buttonString,
buttonAccesskeyString, null, "xpinstall-install-edit-prefs",
null, "top", false);
null, "xpinstall-install-edit-prefs",
null, "top", false, buttonAccesskeyString);
}
else {
messageString = browserBundle.getFormattedString(messageKey, [brandShortName, host]);
@ -483,8 +484,8 @@ const gXPInstallObserver = {
buttonAccesskeyString = browserBundle.getString(buttonAccesskeyKey);
webNav = shell.QueryInterface(Components.interfaces.nsIWebNavigation);
getBrowser().showMessage(browser, iconURL, messageString, buttonString,
buttonAccesskeyString, shell,
"xpinstall-install-edit-permissions", null, "top", false);
shell, "xpinstall-install-edit-permissions",
null, "top", false, buttonAccesskeyString);
}
}
break;
@ -5887,8 +5888,8 @@ missingPluginInstaller.prototype.newMissingPlugin = function(aEvent){
var buttonString = bundle_browser.getString("missingpluginsMessage.button.label");
var buttonAccesskeyString = bundle_browser.getString("missingpluginsMessage.button.accesskey");
tabbrowser.showMessage(browser, iconURL, messageString, buttonString, buttonAccesskeyString,
"", "missing-plugin", null, "top", true);
tabbrowser.showMessage(browser, iconURL, messageString, buttonString,"",
"missing-plugin", null, "top", true, buttonAccesskeyString);
}
missingPluginInstaller.prototype.observe = function(aSubject, aTopic, aData){

View File

@ -24,6 +24,7 @@
- David Hyatt <hyatt@netscape.com> (Original Author of <tabbrowser>)
- Mike Connor <mconnor@steelgryphon.com>
- Peter Parente <parente@cs.unc.edu>
- Giorgio Maone <g.maone@informaction.com>
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
@ -223,19 +224,21 @@
<parameter name="aIconURL"/>
<parameter name="aMessage"/>
<parameter name="aButtonLabel"/>
<parameter name="aButtonAccesskey"/>
<parameter name="aDocShell"/>
<parameter name="aSource"/>
<parameter name="aPopup"/>
<parameter name="aTopBottom"/>
<parameter name="aShowCloseButton"/>
<parameter name="aButtonAccesskey"/>
<body>
<![CDATA[
var message = this.getMessageForBrowser(aBrowser, aTopBottom);
message.image = aIconURL;
message.text = aMessage;
message.buttonText = aButtonLabel;
message.buttonAccesskey = aButtonAccesskey;
message.buttonAccesskey =
typeof(aButtonAccesskey) == "undefined" ? ""
: aButtonAccesskey;
message.hidden = false;
if (aSource) {
message.source = aSource;