Skip to content
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
1 change: 1 addition & 0 deletions src/extensionsIntegrated/CustomSnippets/snippetsList.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ define(function (require, exports, module) {
const $deleteSnippet = $("<div>")
.html(`<i class="fas fa-trash"></i>`)
.attr("id", "delete-snippet-btn")
.attr("title", Strings.CUSTOM_SNIPPETS_DELETE_TOOLTIP)
.addClass("delete-snippet-btn");

$snippetItem.append($snippetAbbr, $snippetTemplate, $snippetDescription, $snippetFiles, $deleteSnippet);
Expand Down
2 changes: 1 addition & 1 deletion src/extensionsIntegrated/DisplayShortcuts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ define(function (require, exports, module) {
let q1 = idArray[0].toLowerCase();
if (defaultCommands.includes(cmdID) || q1 === "file" || q1 === "edit" || q1 === "view" || q1 === "navigate" || q1 === "debug" || q1 === "help" ||
cmdID.startsWith("AltMenu-") || cmdID.startsWith("codefolding.") || cmdID.startsWith("navigation.") || cmdID.startsWith("recent-files") ||
cmdID.startsWith("refactoring.") || cmdID.startsWith("recentProjects") || cmdID ==="showParameterHint") {
cmdID.startsWith("refactoring.") || cmdID.startsWith("recentProjects") || cmdID.startsWith("tabbar.") || cmdID ==="showParameterHint") {
return origBrackets;
}
if (idArray.length > 2) {
Expand Down
18 changes: 18 additions & 0 deletions src/extensionsIntegrated/TabBar/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ define(function (require, exports, module) {
const FileUtils = require("file/FileUtils");
const CommandManager = require("command/CommandManager");
const Commands = require("command/Commands");
const KeyBindingManager = require("command/KeyBindingManager");
const DocumentManager = require("document/DocumentManager");
const WorkspaceManager = require("view/WorkspaceManager");
const Menus = require("command/Menus");
Expand Down Expand Up @@ -515,6 +516,23 @@ define(function (require, exports, module) {
}
});

// add listener for tab close button to show the tooltip along with the keybinding
$(document).on("mouseenter", ".phoenix-tab-bar .tab-close", function () {

// there can be more than 1 keybinding for 'Close' as one is default and other one is user-set
// we need to get the user created keybinding...
const closeBindings = KeyBindingManager.getKeyBindings(Commands.FILE_CLOSE);
const closeShortcut = closeBindings.length > 0
? KeyBindingManager.formatKeyDescriptor(closeBindings[closeBindings.length - 1].displayKey)
: "";

const closeTabTooltip = closeShortcut
? `${Strings.CLOSE_TAB_TOOLTIP} (${closeShortcut})`
: Strings.CLOSE_TAB_TOOLTIP;

$(this).attr("title", closeTabTooltip);
});

// open tab on mousedown event
$(document).on("mousedown", ".phoenix-tab-bar .tab", function (event) {
if ($(event.target).hasClass("fa-times") || $(event.target).closest(".tab-close").length) {
Expand Down
4 changes: 3 additions & 1 deletion src/nls/root/strings.js
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ define({
"CMD_SPLITVIEW_VERTICAL": "Vertical Split",
"CMD_SPLITVIEW_HORIZONTAL": "Horizontal Split",
"SPLITVIEW_MENU_TOOLTIP": "Split the editor vertically or horizontally",
"GEAR_MENU_TOOLTIP": "Configure Working Set",
"GEAR_MENU_TOOLTIP": "Configure Working Files",

"CMD_TOGGLE_SHOW_WORKING_SET": "Show Working Files",
"CMD_TOGGLE_SHOW_FILE_TABS": "Show File Tab Bar",
Expand Down Expand Up @@ -501,6 +501,7 @@ define({
"CLOSE_TABS_TO_THE_LEFT": "Close Tabs to the Left",
"CLOSE_ALL_TABS": "Close All Tabs",
"CLOSE_SAVED_TABS": "Close Saved Tabs",
"CLOSE_TAB_TOOLTIP": "Close Tab",

// CodeInspection: errors/warnings
"ERRORS_NO_FILE": "No File Open",
Expand Down Expand Up @@ -1713,6 +1714,7 @@ define({
"CUSTOM_SNIPPETS_HEADER_TEMPLATE": "Template Text",
"CUSTOM_SNIPPETS_HEADER_DESCRIPTION": "Description",
"CUSTOM_SNIPPETS_HEADER_FILE_EXTENSION": "File Extension",
"CUSTOM_SNIPPETS_DELETE_TOOLTIP": "Delete Snippet",

// promos
"PROMO_UPGRADE_TITLE": "You’ve been upgraded to {0}",
Expand Down
Loading