Merge branch 'master' of github.com:buggins/dlangide

This commit is contained in:
Vadim Lopatin 2016-01-28 10:26:25 +03:00
commit f4d1a8ec7f
4 changed files with 10 additions and 1 deletions

View File

@ -43,6 +43,7 @@ enum IDEActions : int {
DebugStepOut,
HelpAbout,
WindowCloseDocument,
WindowCloseAllDocuments,
CreateNewWorkspace,
AddToCurrentWorkspace,
@ -122,6 +123,7 @@ const Action ACTION_EDIT_TOGGLE_LINE_COMMENT = (new Action(EditorActions.ToggleL
const Action ACTION_EDIT_TOGGLE_BLOCK_COMMENT = (new Action(EditorActions.ToggleBlockComment, "MENU_EDIT_TOGGLE_BLOCK_COMMENT"c, null, KeyCode.KEY_DIVIDE, KeyFlag.Control|KeyFlag.Shift)).disableByDefault();
const Action ACTION_EDIT_PREFERENCES = (new Action(IDEActions.EditPreferences, "MENU_EDIT_PREFERENCES"c, null)).disableByDefault();
const Action ACTION_HELP_ABOUT = new Action(IDEActions.HelpAbout, "MENU_HELP_ABOUT"c);
const Action ACTION_WINDOW_CLOSE_DOCUMENT = new Action(IDEActions.WindowCloseDocument, "MENU_WINDOW_CLOSE_DOCUMENT"c, null, KeyCode.KEY_W, KeyFlag.Control);
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);

View File

@ -616,6 +616,7 @@ class IDEFrame : AppFrame, ProgramExecutionStatusListener, BreakpointListChangeL
MenuItem windowItem = new MenuItem(new Action(3, "MENU_WINDOW"c));
windowItem.add(new Action(30, "MENU_WINDOW_PREFERENCES"));
windowItem.add(ACTION_WINDOW_CLOSE_DOCUMENT);
windowItem.add(ACTION_WINDOW_CLOSE_ALL_DOCUMENTS);
MenuItem helpItem = new MenuItem(new Action(4, "MENU_HELP"c));
helpItem.add(new Action(40, "MENU_HELP_VIEW_HELP"));
@ -657,7 +658,7 @@ class IDEFrame : AppFrame, ProgramExecutionStatusListener, BreakpointListChangeL
ACTION_DEBUG_STEP_INTO,
ACTION_DEBUG_STEP_OVER,
ACTION_DEBUG_STEP_OUT,
ACTION_WINDOW_CLOSE_ALL_DOCUMENTS, ACTION_HELP_ABOUT];
ACTION_WINDOW_CLOSE_DOCUMENT, ACTION_WINDOW_CLOSE_ALL_DOCUMENTS, ACTION_HELP_ABOUT];
actions ~= STD_EDITOR_ACTIONS;
saveShortcutsSettings(actions);
}
@ -713,6 +714,7 @@ class IDEFrame : AppFrame, ProgramExecutionStatusListener, BreakpointListChangeL
return true;
case IDEActions.FileExit:
case IDEActions.FileOpen:
case IDEActions.WindowCloseDocument:
case IDEActions.WindowCloseAllDocuments:
case IDEActions.FileOpenWorkspace:
// disable when background operation in progress
@ -850,6 +852,9 @@ class IDEFrame : AppFrame, ProgramExecutionStatusListener, BreakpointListChangeL
case IDEActions.RefreshProject:
refreshWorkspace();
return true;
case IDEActions.WindowCloseDocument:
onTabClose(_tabs.selectedTabId);
return true;
case IDEActions.WindowCloseAllDocuments:
askForUnsavedEdits(delegate() {
closeAllDocuments();

View File

@ -66,6 +66,7 @@ MENU_DEBUG_BREAKPOINT_DISABLE=Disable breakpoint
MENU_WINDOW=&Window
MENU_WINDOW_PREFERENCES=&Preferences
MENU_WINDOW_CLOSE_DOCUMENT=Close document
MENU_WINDOW_CLOSE_ALL_DOCUMENTS=Close all documents
MENU_HELP=&Help

View File

@ -50,6 +50,7 @@ MENU_DEBUG=&Отладка
MENU_WINDOW=&Окно
MENU_WINDOW_PREFERENCES=&Настройки
MENU_WINDOW_CLOSE_DOCUMENT=Закрыть документ
MENU_WINDOW_CLOSE_ALL_DOCUMENTS=Закрыть все документы
MENU_HELP=&Справка