mirror of https://github.com/buggins/dlangide.git
parent
045acfd73d
commit
592826f94a
|
@ -45,6 +45,7 @@ enum IDEActions : int {
|
||||||
DebugStepOut,
|
DebugStepOut,
|
||||||
|
|
||||||
HelpAbout,
|
HelpAbout,
|
||||||
|
HelpViewHelp,
|
||||||
WindowCloseDocument,
|
WindowCloseDocument,
|
||||||
WindowCloseAllDocuments,
|
WindowCloseAllDocuments,
|
||||||
CreateNewWorkspace,
|
CreateNewWorkspace,
|
||||||
|
@ -127,6 +128,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_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_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_HELP_ABOUT = new Action(IDEActions.HelpAbout, "MENU_HELP_ABOUT"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);
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,10 @@ import std.array : empty;
|
||||||
import std.string : split;
|
import std.string : split;
|
||||||
import std.path;
|
import std.path;
|
||||||
|
|
||||||
|
immutable string HELP_PAGE_URL = "https://github.com/buggins/dlangide/wiki";
|
||||||
|
// TODO: get version from GIT commit
|
||||||
|
immutable dstring DLANGIDE_VERSION = "v0.6.8"d;
|
||||||
|
|
||||||
bool isSupportedSourceTextFileFormat(string filename) {
|
bool isSupportedSourceTextFileFormat(string filename) {
|
||||||
return (filename.endsWith(".d") || filename.endsWith(".txt") || filename.endsWith(".cpp") || filename.endsWith(".h") || filename.endsWith(".c")
|
return (filename.endsWith(".d") || filename.endsWith(".txt") || filename.endsWith(".cpp") || filename.endsWith(".h") || filename.endsWith(".c")
|
||||||
|| filename.endsWith(".json") || filename.endsWith(".dd") || filename.endsWith(".ddoc") || filename.endsWith(".xml") || filename.endsWith(".html")
|
|| filename.endsWith(".json") || filename.endsWith(".dd") || filename.endsWith(".ddoc") || filename.endsWith(".xml") || filename.endsWith(".html")
|
||||||
|
@ -666,11 +670,11 @@ 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);
|
||||||
windowItem.add(ACTION_WINDOW_CLOSE_ALL_DOCUMENTS);
|
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(new Action(40, "MENU_HELP_VIEW_HELP"));
|
helpItem.add(ACTION_HELP_VIEW_HELP);
|
||||||
helpItem.add(ACTION_HELP_ABOUT);
|
helpItem.add(ACTION_HELP_ABOUT);
|
||||||
mainMenuItems.add(fileItem);
|
mainMenuItems.add(fileItem);
|
||||||
mainMenuItems.add(editItem);
|
mainMenuItems.add(editItem);
|
||||||
|
@ -846,8 +850,11 @@ class IDEFrame : AppFrame, ProgramExecutionStatusListener, BreakpointListChangeL
|
||||||
if (onCanClose())
|
if (onCanClose())
|
||||||
window.close();
|
window.close();
|
||||||
return true;
|
return true;
|
||||||
|
case IDEActions.HelpViewHelp:
|
||||||
|
Platform.instance.openURL(HELP_PAGE_URL);
|
||||||
|
return true;
|
||||||
case IDEActions.HelpAbout:
|
case IDEActions.HelpAbout:
|
||||||
window.showMessageBox(UIString("About DlangIDE"d),
|
window.showMessageBox(UIString("About DlangIDE "d ~ DLANGIDE_VERSION),
|
||||||
UIString("DLangIDE\n(C) Vadim Lopatin, 2014\nhttp://github.com/buggins/dlangide\nIDE for D programming language written in D\nUses DlangUI library for GUI"d));
|
UIString("DLangIDE\n(C) Vadim Lopatin, 2014\nhttp://github.com/buggins/dlangide\nIDE for D programming language written in D\nUses DlangUI library for GUI"d));
|
||||||
return true;
|
return true;
|
||||||
case StandardAction.OpenUrl:
|
case StandardAction.OpenUrl:
|
||||||
|
|
Loading…
Reference in New Issue