add Menu / Show Home Screen command

This commit is contained in:
Vadim Lopatin 2017-08-29 10:47:11 +03:00
parent 4dc88393de
commit e52d812401
4 changed files with 9 additions and 2 deletions

View File

@ -48,6 +48,7 @@ enum IDEActions : int {
HelpViewHelp, HelpViewHelp,
WindowCloseDocument, WindowCloseDocument,
WindowCloseAllDocuments, WindowCloseAllDocuments,
WindowShowHomeScreen,
CreateNewWorkspace, CreateNewWorkspace,
AddToCurrentWorkspace, AddToCurrentWorkspace,
//ProjectFolderAddItem, //ProjectFolderAddItem,
@ -131,6 +132,7 @@ const Action ACTION_HELP_ABOUT = new Action(IDEActions.HelpAbout, "MENU_HELP_ABO
const Action ACTION_HELP_VIEW_HELP = new Action(IDEActions.HelpViewHelp, "MENU_HELP_VIEW_HELP"c); const Action ACTION_HELP_VIEW_HELP = new Action(IDEActions.HelpViewHelp, "MENU_HELP_VIEW_HELP"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_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_WINDOW_CLOSE_ALL_DOCUMENTS = new Action(IDEActions.WindowCloseAllDocuments, "MENU_WINDOW_CLOSE_ALL_DOCUMENTS"c);
const Action ACTION_WINDOW_SHOW_HOME_SCREEN = new Action(IDEActions.WindowShowHomeScreen, "MENU_WINDOW_SHOW_HOME_SCREEN"c);
const Action ACTION_CREATE_NEW_WORKSPACE = new Action(IDEActions.CreateNewWorkspace, "OPTION_CREATE_NEW_WORKSPACE"c); const Action ACTION_CREATE_NEW_WORKSPACE = new Action(IDEActions.CreateNewWorkspace, "OPTION_CREATE_NEW_WORKSPACE"c);
const Action ACTION_ADD_TO_CURRENT_WORKSPACE = new Action(IDEActions.AddToCurrentWorkspace, "OPTION_ADD_TO_CURRENT_WORKSPACE"c); const Action ACTION_ADD_TO_CURRENT_WORKSPACE = new Action(IDEActions.AddToCurrentWorkspace, "OPTION_ADD_TO_CURRENT_WORKSPACE"c);

View File

@ -731,8 +731,7 @@ class IDEFrame : AppFrame, ProgramExecutionStatusListener, BreakpointListChangeL
MenuItem windowItem = new MenuItem(new Action(3, "MENU_WINDOW"c)); MenuItem windowItem = new MenuItem(new Action(3, "MENU_WINDOW"c));
//windowItem.add(new Action(30, "MENU_WINDOW_PREFERENCES")); //windowItem.add(new Action(30, "MENU_WINDOW_PREFERENCES"));
windowItem.add(ACTION_WINDOW_CLOSE_DOCUMENT); windowItem.add(ACTION_WINDOW_CLOSE_DOCUMENT, ACTION_WINDOW_CLOSE_ALL_DOCUMENTS, ACTION_WINDOW_SHOW_HOME_SCREEN);
windowItem.add(ACTION_WINDOW_CLOSE_ALL_DOCUMENTS);
MenuItem helpItem = new MenuItem(new Action(4, "MENU_HELP"c)); MenuItem helpItem = new MenuItem(new Action(4, "MENU_HELP"c));
helpItem.add(ACTION_HELP_VIEW_HELP); helpItem.add(ACTION_HELP_VIEW_HELP);
helpItem.add(ACTION_HELP_ABOUT); helpItem.add(ACTION_HELP_ABOUT);
@ -831,6 +830,7 @@ class IDEFrame : AppFrame, ProgramExecutionStatusListener, BreakpointListChangeL
case IDEActions.FileOpen: case IDEActions.FileOpen:
case IDEActions.WindowCloseDocument: case IDEActions.WindowCloseDocument:
case IDEActions.WindowCloseAllDocuments: case IDEActions.WindowCloseAllDocuments:
case IDEActions.WindowShowHomeScreen:
case IDEActions.FileOpenWorkspace: case IDEActions.FileOpenWorkspace:
// disable when background operation in progress // disable when background operation in progress
if (!_currentBackgroundOperation) if (!_currentBackgroundOperation)
@ -1033,6 +1033,9 @@ class IDEFrame : AppFrame, ProgramExecutionStatusListener, BreakpointListChangeL
closeAllDocuments(); closeAllDocuments();
}); });
return true; return true;
case IDEActions.WindowShowHomeScreen:
showHomeScreen();
return true;
case IDEActions.FileOpenWorkspace: case IDEActions.FileOpenWorkspace:
// Already specified workspace // Already specified workspace
if (!a.stringParam.empty) { if (!a.stringParam.empty) {

View File

@ -86,6 +86,7 @@ MENU_WINDOW=&Window
MENU_WINDOW_PREFERENCES=&Preferences MENU_WINDOW_PREFERENCES=&Preferences
MENU_WINDOW_CLOSE_DOCUMENT=Close document MENU_WINDOW_CLOSE_DOCUMENT=Close document
MENU_WINDOW_CLOSE_ALL_DOCUMENTS=Close all documents MENU_WINDOW_CLOSE_ALL_DOCUMENTS=Close all documents
MENU_WINDOW_SHOW_HOME_SCREEN=Show home screen
MENU_HELP=&Help MENU_HELP=&Help
MENU_HELP_VIEW_HELP=&View help MENU_HELP_VIEW_HELP=&View help

View File

@ -86,6 +86,7 @@ MENU_WINDOW=&Окно
MENU_WINDOW_PREFERENCES=&Настройки MENU_WINDOW_PREFERENCES=&Настройки
MENU_WINDOW_CLOSE_DOCUMENT=Закрыть документ MENU_WINDOW_CLOSE_DOCUMENT=Закрыть документ
MENU_WINDOW_CLOSE_ALL_DOCUMENTS=Закрыть все документы MENU_WINDOW_CLOSE_ALL_DOCUMENTS=Закрыть все документы
MENU_WINDOW_SHOW_HOME_SCREEN=Домашняя страница
MENU_HELP=&Справка MENU_HELP=&Справка
MENU_HELP_VIEW_HELP=&Просмотр справки MENU_HELP_VIEW_HELP=&Просмотр справки