Bug 393546 Star-icon needs a tooltip with a description of what it's doing when clicking on it (r=sspitzer)

This commit is contained in:
dietrich@mozilla.com 2007-09-21 11:18:34 -07:00
parent c52ad335ce
commit 39bfcb5b48
3 changed files with 13 additions and 3 deletions

View File

@ -769,13 +769,18 @@ var PlacesStarButton = {
if (!starIcon)
return;
var browserBundle = document.getElementById("bundle_browser");
var uri = getBrowser().currentURI;
this._starred = uri && (PlacesUtils.getMostRecentBookmarkForURI(uri) != -1 ||
PlacesUtils.getMostRecentFolderForFeedURI(uri) != -1);
if (this._starred)
if (this._starred) {
starIcon.setAttribute("starred", "true");
else
starIcon.setAttribute("tooltiptext", browserBundle.getString("starButtonOn.tooltip"));
}
else {
starIcon.removeAttribute("starred");
starIcon.setAttribute("tooltiptext", browserBundle.getString("starButtonOff.tooltip"));
}
},
onClick: function PSB_onClick(aEvent) {

View File

@ -267,7 +267,8 @@
<stack id="go-button-stack" class="endcap">
<box class="endcap-box" chromedir="&locale.dir;"/>
<hbox>
<toolbarbutton id="star-button" onclick="if (event.button == 0) PlacesStarButton.onClick(event);"/>
<toolbarbutton id="star-button"
onclick="if (event.button == 0) PlacesStarButton.onClick(event);"/>
<toolbarbutton id="go-button" chromedir="&locale.dir;"
label="&goEndCap.label;"
onclick="handleURLBarCommand(event);"

View File

@ -97,3 +97,7 @@ chromelessWindow.warningMessage=The web site at %S has hidden your toolbars.
chromelessWindow.warningNoLocation=This web site has hidden your toolbars.
chromelessWindow.showToolbarsButton=Show Toolbars
chromelessWindow.accessKey=S
# Star button
starButtonOn.tooltip=Edit this bookmark
starButtonOff.tooltip=Bookmark this page