mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 436758 - Show tooltip and URL in status bar when hovering over a link inside "Recently Closed Tabs/Windows", r=mak77
This commit is contained in:
parent
02de585826
commit
18cf4a87a5
@ -494,13 +494,13 @@
|
||||
<menu id="historyUndoMenu"
|
||||
label="&historyUndoMenu.label;"
|
||||
disabled="true">
|
||||
<menupopup id="historyUndoPopup"
|
||||
<menupopup id="historyUndoPopup" placespopup="true"
|
||||
onpopupshowing="HistoryMenu.populateUndoSubmenu();"/>
|
||||
</menu>
|
||||
<menu id="historyUndoWindowMenu"
|
||||
label="&historyUndoWindowMenu.label;"
|
||||
disabled="true">
|
||||
<menupopup id="historyUndoWindowPopup"
|
||||
<menupopup id="historyUndoWindowPopup" placespopup="true"
|
||||
onpopupshowing="HistoryMenu.populateUndoWindowSubmenu();"/>
|
||||
</menu>
|
||||
</menupopup>
|
||||
|
@ -637,6 +637,14 @@ var HistoryMenu = {
|
||||
m.setAttribute("class", "menuitem-iconic bookmark-item");
|
||||
m.setAttribute("value", i);
|
||||
m.setAttribute("oncommand", "undoCloseTab(" + i + ");");
|
||||
|
||||
// Set the targetURI attribute so it will be shown in tooltip and statusbar.
|
||||
// SessionStore uses one-based indexes, so we need to normalize them.
|
||||
let tabData = undoItems[i].state;
|
||||
let activeIndex = (tabData.index || tabData.entries.length) - 1;
|
||||
if (activeIndex >= 0 && tabData.entries[activeIndex])
|
||||
m.setAttribute("targetURI", tabData.entries[activeIndex].url);
|
||||
|
||||
m.addEventListener("click", this._undoCloseMiddleClick, false);
|
||||
if (i == 0)
|
||||
m.setAttribute("key", "key_undoCloseTab");
|
||||
@ -710,6 +718,13 @@ var HistoryMenu = {
|
||||
}
|
||||
m.setAttribute("class", "menuitem-iconic bookmark-item");
|
||||
m.setAttribute("oncommand", "undoCloseWindow(" + i + ");");
|
||||
|
||||
// Set the targetURI attribute so it will be shown in tooltip and statusbar.
|
||||
// SessionStore uses one-based indexes, so we need to normalize them.
|
||||
let activeIndex = (selectedTab.index || selectedTab.entries.length) - 1;
|
||||
if (activeIndex >= 0 && selectedTab.entries[activeIndex])
|
||||
m.setAttribute("targetURI", selectedTab.entries[activeIndex].url);
|
||||
|
||||
if (i == 0)
|
||||
m.setAttribute("key", "key_undoCloseWindow");
|
||||
undoPopup.appendChild(m);
|
||||
|
Loading…
Reference in New Issue
Block a user