Skip to content

Commit

Permalink
[WFX-375] Remove blank space before private tab menuitems. (#2659)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamp01 authored and MrAlex94 committed May 3, 2022
1 parent 01195b7 commit f85492a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
12 changes: 6 additions & 6 deletions browser/extensions/extensibles/content/ExtensiblesElements.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const ExtensiblesElements = {
id: "openAllPrivate",
"data-l10n-id": "open-all-private",
accesskey: "v",
class: "menuitem-iconic privatetab-icon",
class: "privatetab-icon",
oncommand: "openAllPrivate(event);",
},
adjacentTo: "placesContext_openBookmarkContainer:tabs",
Expand All @@ -21,7 +21,7 @@ const ExtensiblesElements = {
id: "openAllLinksPrivate",
"data-l10n-id": "open-all-links-private",
accesskey: "v",
class: "menuitem-iconic privatetab-icon",
class: "privatetab-icon",
oncommand: "openAllPrivate(event);",
},
adjacentTo: "placesContext_openLinks:tabs",
Expand All @@ -33,7 +33,7 @@ const ExtensiblesElements = {
id: "openPrivate",
"data-l10n-id": "open-private-tab",
accesskey: "v",
class: "menuitem-iconic privatetab-icon",
class: "privatetab-icon",
oncommand: "openPrivateTab(event);",
},
adjacentTo: "placesContext_open:newtab",
Expand All @@ -54,7 +54,6 @@ const ExtensiblesElements = {
"data-l10n-id": "new-private-tab",
accesskey: "v",
acceltext: "Ctrl+Alt+P", // TODO: change to key getter
class: "menuitem-iconic privatetab-icon",
oncommand: "browserOpenTabPrivate(window)",
},
adjacentTo: "menu_newNavigatorTab",
Expand All @@ -66,7 +65,7 @@ const ExtensiblesElements = {
id: "openLinkInPrivateTab",
"data-l10n-id": "open-link-private",
accesskey: "v",
class: "menuitem-iconic privatetab-icon",
class: "privatetab-icon",
hidden: true,
},
adjacentTo: "context-openlinkintab",
Expand All @@ -77,7 +76,8 @@ const ExtensiblesElements = {
attrs: {
id: "toggleTabPrivateState",
"data-l10n-id": "private-tab",
class: "menuitem-iconic privatetab-icon",
"data-l10n-args": JSON.stringify({ isPrivate: "false" }),
class: "privatetab-icon",
accesskey: "v",
acceltext: "Ctrl+Alt+T", // TODO: change to key getter
oncommand: "togglePrivate(window, TabContextMenu.contextTab)",
Expand Down
9 changes: 4 additions & 5 deletions browser/extensions/extensibles/content/PrivateTab.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -284,13 +284,12 @@ const PrivateTab = {
return;
}
let { document, PrivateTab } = win;
const isPrivate =
win.TabContextMenu.contextTab.userContextId ===
PrivateTab.container.userContextId;
document
.getElementById("toggleTabPrivateState")
.setAttribute(
"checked",
win.TabContextMenu.contextTab.userContextId ==
PrivateTab.container.userContextId
);
.setAttribute("data-l10n-args", JSON.stringify({ isPrivate }));
},

openLink(aEvent) {
Expand Down
6 changes: 5 additions & 1 deletion browser/extensions/extensibles/locales/en-US/extensibles.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ open-link-private =
.label = Open Link in New Private Tab
private-tab =
.label = Private Tab
.label =
{ $isPrivate ->
[true] Exit Private Tab
*[false] Make Private Tab
}
status-bar =
.label = Status Bar
Expand Down

0 comments on commit f85492a

Please sign in to comment.