Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
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
21 changes: 13 additions & 8 deletions src/document/DocumentCommandHandlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ define(function (require, exports, module) {
function updateDocumentTitle() {
var newDocument = DocumentManager.getCurrentDocument();

// TODO: This timer is causing a "Recursive tests with the same name are not supporte"
// TODO: This timer is causing a "Recursive tests with the same name are not supported"
// exception. This code should be removed (if not needed), or updated with a unique
// timer name (if needed).
// var perfTimerName = PerfUtils.markStart("DocumentCommandHandlers._onCurrentDocumentChange():\t" + (!newDocument || newDocument.file.fullPath));
Expand Down Expand Up @@ -1550,6 +1550,16 @@ define(function (require, exports, module) {
// Exported for unit testing only
exports._parseDecoratedPath = _parseDecoratedPath;

// Set some command strings
var quitString = Strings.CMD_QUIT,
showInOS = Strings.CMD_SHOW_IN_OS;
if (brackets.platform === "win") {
quitString = Strings.CMD_EXIT;
showInOS = Strings.CMD_SHOW_IN_EXPLORER;
} else if (brackets.platform === "mac") {
showInOS = Strings.CMD_SHOW_IN_FINDER;
}

// Register global commands
CommandManager.register(Strings.CMD_FILE_OPEN, Commands.FILE_OPEN, handleFileOpen);
CommandManager.register(Strings.CMD_ADD_TO_WORKING_SET, Commands.FILE_ADD_TO_WORKING_SET, handleFileAddToWorkingSet);
Expand All @@ -1568,17 +1578,12 @@ define(function (require, exports, module) {
CommandManager.register(Strings.CMD_FILE_CLOSE, Commands.FILE_CLOSE, handleFileClose);
CommandManager.register(Strings.CMD_FILE_CLOSE_ALL, Commands.FILE_CLOSE_ALL, handleFileCloseAll);
CommandManager.register(Strings.CMD_FILE_CLOSE_LIST, Commands.FILE_CLOSE_LIST, handleFileCloseList);

if (brackets.platform === "win") {
CommandManager.register(Strings.CMD_EXIT, Commands.FILE_QUIT, handleFileQuit);
} else {
CommandManager.register(Strings.CMD_QUIT, Commands.FILE_QUIT, handleFileQuit);
}
CommandManager.register(quitString, Commands.FILE_QUIT, handleFileQuit);

CommandManager.register(Strings.CMD_NEXT_DOC, Commands.NAVIGATE_NEXT_DOC, handleGoNextDoc);
CommandManager.register(Strings.CMD_PREV_DOC, Commands.NAVIGATE_PREV_DOC, handleGoPrevDoc);
CommandManager.register(Strings.CMD_SHOW_IN_TREE, Commands.NAVIGATE_SHOW_IN_FILE_TREE, handleShowInTree);
CommandManager.register(Strings.CMD_SHOW_IN_OS, Commands.NAVIGATE_SHOW_IN_OS, handleShowInOS);
CommandManager.register(showInOS, Commands.NAVIGATE_SHOW_IN_OS, handleShowInOS);

// These commands have no UI representation and are only used internally
CommandManager.registerInternal(Commands.APP_ABORT_QUIT, handleAbortQuit);
Expand Down
2 changes: 2 additions & 0 deletions src/nls/de/strings.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,8 @@ define({
"CMD_NEXT_DOC" : "Nächstes Dokument",
"CMD_PREV_DOC" : "Voriges Dokument",
"CMD_SHOW_IN_TREE" : "Im Dateibaum anzeigen",
"CMD_SHOW_IN_EXPLORER" : "Im Explorer anzeigen",
"CMD_SHOW_IN_FINDER" : "Im Finder anzeigen",
"CMD_SHOW_IN_OS" : "Im Dateisystem anzeigen",

// Help menu commands
Expand Down
2 changes: 2 additions & 0 deletions src/nls/root/strings.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,8 @@ define({
"CMD_NEXT_DOC" : "Next Document",
"CMD_PREV_DOC" : "Previous Document",
"CMD_SHOW_IN_TREE" : "Show in File Tree",
"CMD_SHOW_IN_EXPLORER" : "Show in Explorer",
"CMD_SHOW_IN_FINDER" : "Show in Finder",
"CMD_SHOW_IN_OS" : "Show in OS",

// Help menu commands
Expand Down