Bug 865676 - The bookmarks menu button should have separate tooltips for the star and the dropdown arrow. r=neil,mak

This commit is contained in:
Dão Gottwald 2013-09-17 12:44:43 +02:00
parent 7033e99cda
commit 7ea7f1e12d
3 changed files with 5 additions and 4 deletions

View File

@ -1111,6 +1111,7 @@ let BookmarkingUI = {
if (aState == "invalid") {
this.star.setAttribute("disabled", "true");
this.button.removeAttribute("starred");
this.button.setAttribute("buttontooltiptext", "");
}
else {
this.star.removeAttribute("disabled");
@ -1229,11 +1230,11 @@ let BookmarkingUI = {
if (this._itemIds.length > 0) {
button.setAttribute("starred", "true");
button.setAttribute("tooltiptext", this._starredTooltip);
button.setAttribute("buttontooltiptext", this._starredTooltip);
}
else {
button.removeAttribute("starred");
button.setAttribute("tooltiptext", this._unstarredTooltip);
button.setAttribute("buttontooltiptext", this._unstarredTooltip);
}
},

View File

@ -11,7 +11,7 @@ function test() {
tab.linkedBrowser.addEventListener("load", (function(event) {
tab.linkedBrowser.removeEventListener("load", arguments.callee, true);
is(BookmarkingUI.button.getAttribute("tooltiptext"),
is(BookmarkingUI.button.getAttribute("buttontooltiptext"),
BookmarkingUI._unstarredTooltip,
"Star icon should have the unstarred tooltip text");

View File

@ -60,7 +60,7 @@
<xul:toolbarbutton class="box-inherit toolbarbutton-menubutton-button"
anonid="button" flex="1" allowevents="true"
xbl:inherits="disabled,crop,image,label,accesskey,command,
align,dir,pack,orient"/>
align,dir,pack,orient,tooltiptext=buttontooltiptext"/>
<xul:dropmarker type="menu-button" class="toolbarbutton-menubutton-dropmarker"
xbl:inherits="align,dir,pack,orient,disabled,label,open"/>
</content>