Skip to content

Commit

Permalink
chore: followup bug 1927774 - Add closed tab groups to history menus
Browse files Browse the repository at this point in the history
  • Loading branch information
onemen committed Dec 9, 2024
1 parent e2a7099 commit 64188c1
Show file tree
Hide file tree
Showing 9 changed files with 291 additions and 89 deletions.
4 changes: 2 additions & 2 deletions addon/chrome/content/minit/tablib.js
Original file line number Diff line number Diff line change
Expand Up @@ -876,6 +876,7 @@ Tabmix.tablib = {
return;
}

Tabmix.closedObjectsUtils.addSeparatorIfMissing(undoPopup);
let restoreAllWindows = undoPopup.lastChild;
restoreAllWindows.setAttribute("value", "-2");
let clearList = document.createXULElement(undoPopup.__tagName || "menuitem");
Expand Down Expand Up @@ -1520,7 +1521,6 @@ Tabmix.tablib = {
{checkboxLabel2 = "", restoreSession = null} = {}
) {
let warningTitle = "", buttonLabel = "", chkBoxLabel = "", warningText = "";
// if (shouldPrompt === 1 || numProtected === 0) {
if (shouldPrompt === 1) {
// @ts-expect-error - return types are strings
[warningTitle, buttonLabel, chkBoxLabel] = gBrowser.tabLocalization.formatValuesSync([
Expand All @@ -1529,7 +1529,7 @@ Tabmix.tablib = {
args: {tabCount: tabsToClose},
},
{id: "tabbrowser-confirm-close-tabs-button"},
{id: "tabbrowser-confirm-close-tabs-checkbox"},
{id: `tabbrowser-${Tabmix.isVersion(1350) ? "ask" : "confirm"}-close-tabs-checkbox`},
]);
} else if (numProtected === 0) {
// @ts-expect-error - return types are strings
Expand Down
6 changes: 3 additions & 3 deletions addon/chrome/content/overlay/tabContextMenu.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@
tmp_iconic="menu-iconic closedtabs-icon"
label="&undoCloseListMenu.label;" accesskey="&undoCloseListMenu.accesskey;">
<menupopup id="tm-undoCloseList-menu"
onpopupshowing="Tabmix.closedObjectsUtils.populateClosedTabsMenu(this.parentNode); event.stopPropagation();"
onpopupshown="event.stopPropagation();"
onpopuphidden="TabmixAllTabs.hideCommonList(this);"/>
onpopupshowing="if (event.target === this) {Tabmix.closedObjectsUtils.populateClosedTabsMenu(this.parentNode); event.stopPropagation();}"
onpopupshown="if (event.target === this) event.stopPropagation();"
onpopuphidden="if (event.target === this) TabmixAllTabs.hideCommonList(this);"/>
</menu>
<!--
<menuitem id="context_closeTab"/>
Expand Down
Loading

0 comments on commit 64188c1

Please sign in to comment.