Skip to content

Commit

Permalink
update action shortcut override - fix #208
Browse files Browse the repository at this point in the history
  • Loading branch information
buggins committed Sep 26, 2017
1 parent 368351c commit 403108b
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 18 deletions.
2 changes: 1 addition & 1 deletion dub.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"stringImportPaths": ["views"],

"dependencies": {
"dlangui": "==0.9.146",
"dlangui": "==0.9.147",
"dsymbol": "~>0.2.9",
"dcd": "~>0.9.1"
},
Expand Down
25 changes: 25 additions & 0 deletions src/dlangide/ui/commands.d
Original file line number Diff line number Diff line change
Expand Up @@ -175,3 +175,28 @@ const Action ACTION_GET_PAREN_COMPLETION = (new Action(IDEActions.GetParenComple
const Action ACTION_GO_TO_LINE = (new Action(IDEActions.GotoLine, "GO_TO_LINE"c, ""c, KeyCode.KEY_L, KeyFlag.Control|KeyFlag.Option)).disableByDefault();;

const Action ACTION_FIND_TEXT = (new Action(IDEActions.FindInFiles, "FIND_IN_FILES"c, "edit-find"c, KeyCode.KEY_F, KeyFlag.Control | KeyFlag.Shift)).disableByDefault();

const Action[] STD_IDE_ACTIONS = [
ACTION_EDIT_COPY, ACTION_EDIT_PASTE, ACTION_EDIT_CUT,
ACTION_EDIT_UNDO, ACTION_EDIT_REDO,
ACTION_EDIT_INDENT, ACTION_EDIT_UNINDENT,
ACTION_EDIT_TOGGLE_LINE_COMMENT, ACTION_EDIT_TOGGLE_BLOCK_COMMENT,
ACTION_EDIT_PREFERENCES,
ACTION_FILE_NEW_SOURCE_FILE, ACTION_FILE_NEW_WORKSPACE, ACTION_FILE_NEW_PROJECT, ACTION_FILE_OPEN_WORKSPACE, ACTION_FILE_OPEN,
ACTION_FILE_SAVE, ACTION_FILE_SAVE_AS, ACTION_FILE_SAVE_ALL, ACTION_FILE_EXIT,
ACTION_PROJECT_SET_STARTUP, ACTION_PROJECT_REFRESH, ACTION_PROJECT_UPDATE_DEPENDENCIES,
ACTION_PROJECT_SETTINGS, ACTION_WORKSPACE_BUILD, ACTION_WORKSPACE_REBUILD, ACTION_WORKSPACE_CLEAN,
ACTION_PROJECT_BUILD, ACTION_PROJECT_REBUILD, ACTION_PROJECT_CLEAN, ACTION_RUN_WITH_RDMD,
ACTION_DEBUG_START, ACTION_DEBUG_START_NO_DEBUG, ACTION_DEBUG_CONTINUE, ACTION_DEBUG_STOP, ACTION_DEBUG_PAUSE,
ACTION_DEBUG_RESTART,
ACTION_DEBUG_STEP_INTO,
ACTION_DEBUG_STEP_OVER,
ACTION_DEBUG_STEP_OUT,
ACTION_WINDOW_CLOSE_DOCUMENT, ACTION_WINDOW_CLOSE_ALL_DOCUMENTS, ACTION_HELP_ABOUT,
ACTION_GET_DOC_COMMENTS,
ACTION_GO_TO_DEFINITION,
ACTION_GET_COMPLETIONS,
ACTION_GET_PAREN_COMPLETION,
ACTION_GO_TO_LINE,
ACTION_FIND_TEXT,
];
17 changes: 1 addition & 16 deletions src/dlangide/ui/frame.d
Original file line number Diff line number Diff line change
Expand Up @@ -806,22 +806,7 @@ class IDEFrame : AppFrame, ProgramExecutionStatusListener, BreakpointListChangeL
} else {
Log.d("Saving default shortcuts");
const(Action)[] actions;
actions ~= [
ACTION_EDIT_COPY, ACTION_EDIT_PASTE, ACTION_EDIT_CUT,
ACTION_EDIT_UNDO, ACTION_EDIT_REDO, ACTION_EDIT_INDENT,
ACTION_EDIT_UNINDENT, ACTION_EDIT_TOGGLE_LINE_COMMENT, ACTION_EDIT_TOGGLE_BLOCK_COMMENT,
ACTION_EDIT_PREFERENCES,
ACTION_FILE_NEW_SOURCE_FILE, ACTION_FILE_NEW_WORKSPACE, ACTION_FILE_NEW_PROJECT, ACTION_FILE_OPEN_WORKSPACE, ACTION_FILE_OPEN,
ACTION_FILE_SAVE, ACTION_FILE_SAVE_AS, ACTION_FILE_SAVE_ALL, ACTION_FILE_EXIT,
ACTION_PROJECT_SET_STARTUP, ACTION_PROJECT_REFRESH, ACTION_PROJECT_UPDATE_DEPENDENCIES,
ACTION_PROJECT_SETTINGS, ACTION_WORKSPACE_BUILD, ACTION_WORKSPACE_REBUILD, ACTION_WORKSPACE_CLEAN,
ACTION_PROJECT_BUILD, ACTION_PROJECT_REBUILD, ACTION_PROJECT_CLEAN, ACTION_RUN_WITH_RDMD,
ACTION_DEBUG_START, ACTION_DEBUG_START_NO_DEBUG, ACTION_DEBUG_CONTINUE, ACTION_DEBUG_STOP, ACTION_DEBUG_PAUSE,
ACTION_DEBUG_RESTART,
ACTION_DEBUG_STEP_INTO,
ACTION_DEBUG_STEP_OVER,
ACTION_DEBUG_STEP_OUT,
ACTION_WINDOW_CLOSE_DOCUMENT, ACTION_WINDOW_CLOSE_ALL_DOCUMENTS, ACTION_HELP_ABOUT];
actions ~= STD_IDE_ACTIONS;
actions ~= STD_EDITOR_ACTIONS;
saveShortcutsSettings(actions);
}
Expand Down
2 changes: 1 addition & 1 deletion views/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.7.95
v0.7.96

0 comments on commit 403108b

Please sign in to comment.