Bug 237592 - Bookmarks/RSS items should always show tooltip when hovering with mouse, r=gavin

This commit is contained in:
Gabriele Best 2008-10-13 12:19:55 +02:00
parent bbe8b505b9
commit a6c492d7e4
3 changed files with 14 additions and 17 deletions

View File

@ -353,7 +353,8 @@
<menupopup id="goPopup"
type="places"
onpopupshowing="HistoryMenu.onPopupShowing(this);"
place="place:type=0&amp;sort=4&amp;maxResults=10">
place="place:type=0&amp;sort=4&amp;maxResults=10"
tooltip="btTooltip">
<menuitem id="historyMenuBack"
label="&backCmd.label;"
#ifdef XP_MACOSX
@ -405,7 +406,8 @@
openInTabs="children"
oncommand="BookmarksEventHandler.onCommand(event);"
onclick="BookmarksEventHandler.onClick(event);"
onpopupshowing="BookmarksEventHandler.onPopupShowing(event);">
onpopupshowing="BookmarksEventHandler.onPopupShowing(event);"
tooltip="btTooltip">
<menuitem label="&bookmarkThisPageCmd.label;"
command="Browser:AddBookmarkAs" key="addBookmarkAsKb"/>
<menuitem id="subscribeToPageMenuitem"

View File

@ -749,31 +749,25 @@ var BookmarksEventHandler = {
},
fillInBTTooltip: function(aTipElement) {
// Fx2XP: Don't show tooltips for bookmarks under sub-folders
if (aTipElement.localName != "toolbarbutton")
if (!aTipElement.node)
return false;
// Fx2XP: Only show tooltips for URL items
//Show tooltips only for URL items
if (!PlacesUtils.nodeIsURI(aTipElement.node))
return false;
var title = aTipElement.node.title;
var url = aTipElement.node.uri;
if (!url)
return false;
var tooltipTitle = document.getElementById("btTitleText");
tooltipTitle.hidden = !title || (title == url);
if (!tooltipTitle.hidden)
tooltipTitle.textContent = title;
var tooltipUrl = document.getElementById("btUrlText");
tooltipUrl.value = url;
var title = aTipElement.label;
var tooltipTitle = document.getElementById("btTitleText");
if (title && title != url) {
tooltipTitle.hidden = false;
tooltipTitle.textContent = title;
}
else
tooltipTitle.hidden = true;
// show tooltip
//Show tooltip
return true;
}
};

View File

@ -79,6 +79,7 @@
collapsed="true"
onpopupshowing="chevronPopupShowing(event);">
<xul:menupopup anonid="chevronPopup"
xbl:inherits="tooltip"
#ifndef XP_MACOSX
context="placesContext"
#endif