Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WFX-375] Remove blank space before private tab menuitems. #2659

Merged
merged 1 commit into from
Apr 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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