From 6f6fe65b316cf564291c24acc3874832300b7f86 Mon Sep 17 00:00:00 2001 From: Vadim Lopatin Date: Sat, 31 Jan 2015 08:04:43 +0300 Subject: [PATCH] update actions - continue --- src/dlangide/ui/commands.d | 14 +++++++------- src/dlangide/ui/frame.d | 2 ++ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/dlangide/ui/commands.d b/src/dlangide/ui/commands.d index a50761e..790019a 100644 --- a/src/dlangide/ui/commands.d +++ b/src/dlangide/ui/commands.d @@ -59,13 +59,13 @@ const Action ACTION_PROJECT_UPDATE_DEPENDENCIES = new Action(IDEActions.UpdatePr const Action ACTION_DEBUG_START = new Action(IDEActions.DebugStart, "MENU_DEBUG_START_DEBUGGING"c, "debug-run"c, KeyCode.F5, 0); const Action ACTION_DEBUG_START_NO_DEBUG = new Action(IDEActions.DebugStartNoDebug, "MENU_DEBUG_START_NO_DEBUGGING"c, null, KeyCode.F5, KeyFlag.Control); const Action ACTION_DEBUG_CONTINUE = new Action(IDEActions.DebugContinue, "MENU_DEBUG_CONTINUE"c); -const Action ACTION_DEBUG_STOP = new Action(IDEActions.DebugStop, "MENU_DEBUG_STOP"c); -const Action ACTION_DEBUG_PAUSE = new Action(IDEActions.DebugPause, "MENU_DEBUG_PAUSE"c); -const Action ACTION_EDIT_COPY = new Action(EditorActions.Copy, "MENU_EDIT_COPY"c, "edit-copy"c, KeyCode.KEY_C, KeyFlag.Control); -const Action ACTION_EDIT_PASTE = new Action(EditorActions.Paste, "MENU_EDIT_PASTE"c, "edit-paste"c, KeyCode.KEY_V, KeyFlag.Control); -const Action ACTION_EDIT_CUT = new Action(EditorActions.Cut, "MENU_EDIT_CUT"c, "edit-cut"c, KeyCode.KEY_X, KeyFlag.Control); -const Action ACTION_EDIT_UNDO = new Action(EditorActions.Undo, "MENU_EDIT_UNDO"c, "edit-undo"c, KeyCode.KEY_Z, KeyFlag.Control); -const Action ACTION_EDIT_REDO = new Action(EditorActions.Redo, "MENU_EDIT_REDO"c, "edit-redo"c, KeyCode.KEY_Z, KeyFlag.Control|KeyFlag.Shift); +const Action ACTION_DEBUG_STOP = (new Action(IDEActions.DebugStop, "MENU_DEBUG_STOP"c)).disableByDefault(); +const Action ACTION_DEBUG_PAUSE = (new Action(IDEActions.DebugPause, "MENU_DEBUG_PAUSE"c)).disableByDefault(); +const Action ACTION_EDIT_COPY = (new Action(EditorActions.Copy, "MENU_EDIT_COPY"c, "edit-copy"c, KeyCode.KEY_C, KeyFlag.Control)).disableByDefault(); +const Action ACTION_EDIT_PASTE = (new Action(EditorActions.Paste, "MENU_EDIT_PASTE"c, "edit-paste"c, KeyCode.KEY_V, KeyFlag.Control)).disableByDefault(); +const Action ACTION_EDIT_CUT = (new Action(EditorActions.Cut, "MENU_EDIT_CUT"c, "edit-cut"c, KeyCode.KEY_X, KeyFlag.Control)).disableByDefault(); +const Action ACTION_EDIT_UNDO = (new Action(EditorActions.Undo, "MENU_EDIT_UNDO"c, "edit-undo"c, KeyCode.KEY_Z, KeyFlag.Control)).disableByDefault(); +const Action ACTION_EDIT_REDO = (new Action(EditorActions.Redo, "MENU_EDIT_REDO"c, "edit-redo"c, KeyCode.KEY_Z, KeyFlag.Control|KeyFlag.Shift)).disableByDefault(); const Action ACTION_HELP_ABOUT = new Action(IDEActions.HelpAbout, "MENU_HELP_ABOUT"c); const Action ACTION_WINDOW_CLOSE_ALL_DOCUMENTS = new Action(IDEActions.WindowCloseAllDocuments, "MENU_WINDOW_CLOSE_ALL_DOCUMENTS"c); const Action ACTION_CREATE_NEW_WORKSPACE = new Action(IDEActions.CreateNewWorkspace, "Create new workspace"d); diff --git a/src/dlangide/ui/frame.d b/src/dlangide/ui/frame.d index 7ab7902..a954de7 100644 --- a/src/dlangide/ui/frame.d +++ b/src/dlangide/ui/frame.d @@ -389,6 +389,8 @@ class IDEFrame : AppFrame { case IDEActions.DebugContinue: case IDEActions.UpdateProjectDependencies: case IDEActions.RefreshProject: + case IDEActions.SetStartupProject: + case IDEActions.ProjectSettings: // enable when project exists if (currentWorkspace && currentWorkspace.startupProject && !_currentBackgroundOperation) a.state = ACTION_STATE_ENABLED;