mirror of https://github.com/buggins/dlangide.git
improvements
This commit is contained in:
parent
fc48143fc5
commit
ccd774d97a
|
@ -32,6 +32,8 @@ class DSourceEdit : SourceEdit {
|
||||||
MenuItem editPopupItem = new MenuItem(null);
|
MenuItem editPopupItem = new MenuItem(null);
|
||||||
editPopupItem.add(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);
|
editPopupItem.add(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);
|
||||||
popupMenu = editPopupItem;
|
popupMenu = editPopupItem;
|
||||||
|
showIcons = true;
|
||||||
|
showFolding = true;
|
||||||
}
|
}
|
||||||
this() {
|
this() {
|
||||||
this("SRCEDIT");
|
this("SRCEDIT");
|
||||||
|
|
|
@ -295,6 +295,7 @@ class IDEFrame : AppFrame {
|
||||||
// Create workspace docked panel
|
// Create workspace docked panel
|
||||||
_wsPanel = new WorkspacePanel("workspace");
|
_wsPanel = new WorkspacePanel("workspace");
|
||||||
_wsPanel.sourceFileSelectionListener = &onSourceFileSelected;
|
_wsPanel.sourceFileSelectionListener = &onSourceFileSelected;
|
||||||
|
_wsPanel.dockAlignment = DockAlignment.Left;
|
||||||
_dockHost.addDockedWindow(_wsPanel);
|
_dockHost.addDockedWindow(_wsPanel);
|
||||||
|
|
||||||
_logPanel = new OutputPanel("output");
|
_logPanel = new OutputPanel("output");
|
||||||
|
@ -425,6 +426,15 @@ class IDEFrame : AppFrame {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FileDialog createFileDialog(UIString caption) {
|
||||||
|
FileDialog dlg = new FileDialog(caption, window, null);
|
||||||
|
dlg.filetypeIcons[".d"] = "text-d";
|
||||||
|
dlg.filetypeIcons["dub.json"] = "project-d";
|
||||||
|
dlg.filetypeIcons["package.json"] = "project-d";
|
||||||
|
dlg.filetypeIcons[".dlangidews"] = "project-development";
|
||||||
|
return dlg;
|
||||||
|
}
|
||||||
|
|
||||||
/// override to handle specific actions
|
/// override to handle specific actions
|
||||||
override bool handleAction(const Action a) {
|
override bool handleAction(const Action a) {
|
||||||
if (a) {
|
if (a) {
|
||||||
|
@ -443,7 +453,7 @@ class IDEFrame : AppFrame {
|
||||||
case IDEActions.FileOpen:
|
case IDEActions.FileOpen:
|
||||||
UIString caption;
|
UIString caption;
|
||||||
caption = "Open Text File"d;
|
caption = "Open Text File"d;
|
||||||
FileDialog dlg = new FileDialog(caption, window, null);
|
FileDialog dlg = createFileDialog(caption);
|
||||||
dlg.addFilter(FileFilterEntry(UIString("Source files"d), "*.d;*.dd;*.ddoc;*.dh;*.json;*.xml;*.ini"));
|
dlg.addFilter(FileFilterEntry(UIString("Source files"d), "*.d;*.dd;*.ddoc;*.dh;*.json;*.xml;*.ini"));
|
||||||
dlg.onDialogResult = delegate(Dialog dlg, const Action result) {
|
dlg.onDialogResult = delegate(Dialog dlg, const Action result) {
|
||||||
if (result.id == ACTION_OPEN.id) {
|
if (result.id == ACTION_OPEN.id) {
|
||||||
|
@ -486,7 +496,7 @@ class IDEFrame : AppFrame {
|
||||||
case IDEActions.FileOpenWorkspace:
|
case IDEActions.FileOpenWorkspace:
|
||||||
UIString caption;
|
UIString caption;
|
||||||
caption = "Open Workspace or Project"d;
|
caption = "Open Workspace or Project"d;
|
||||||
FileDialog dlg = new FileDialog(caption, window, null);
|
FileDialog dlg = createFileDialog(caption);
|
||||||
dlg.addFilter(FileFilterEntry(UIString("Workspace and project files"d), "*.dlangidews;dub.json;package.json"));
|
dlg.addFilter(FileFilterEntry(UIString("Workspace and project files"d), "*.dlangidews;dub.json;package.json"));
|
||||||
dlg.onDialogResult = delegate(Dialog dlg, const Action result) {
|
dlg.onDialogResult = delegate(Dialog dlg, const Action result) {
|
||||||
if (result.id == ACTION_OPEN.id) {
|
if (result.id == ACTION_OPEN.id) {
|
||||||
|
|
|
@ -65,6 +65,7 @@ class WorkspacePanel : DockWindow {
|
||||||
_tree.layoutHeight(FILL_PARENT).layoutHeight(FILL_PARENT);
|
_tree.layoutHeight(FILL_PARENT).layoutHeight(FILL_PARENT);
|
||||||
_tree.selectionListener = &onTreeItemSelected;
|
_tree.selectionListener = &onTreeItemSelected;
|
||||||
_tree.fontSize = 16;
|
_tree.fontSize = 16;
|
||||||
|
_tree.noCollapseForSingleTopLevelItem = true;
|
||||||
return _tree;
|
return _tree;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,7 +88,7 @@ class WorkspacePanel : DockWindow {
|
||||||
p.objectParam = child;
|
p.objectParam = child;
|
||||||
addProjectItems(p, child);
|
addProjectItems(p, child);
|
||||||
} else {
|
} else {
|
||||||
TreeItem p = root.newChild(child.filename, child.name, "text-plain");
|
TreeItem p = root.newChild(child.filename, child.name, "text-d");
|
||||||
p.intParam = ProjectItemType.SourceFile;
|
p.intParam = ProjectItemType.SourceFile;
|
||||||
p.objectParam = child;
|
p.objectParam = child;
|
||||||
}
|
}
|
||||||
|
@ -100,7 +101,7 @@ class WorkspacePanel : DockWindow {
|
||||||
TreeItem root = _tree.items.newChild(_workspace.filename, _workspace.name, "project-development");
|
TreeItem root = _tree.items.newChild(_workspace.filename, _workspace.name, "project-development");
|
||||||
root.intParam = ProjectItemType.Workspace;
|
root.intParam = ProjectItemType.Workspace;
|
||||||
foreach(project; _workspace.projects) {
|
foreach(project; _workspace.projects) {
|
||||||
TreeItem p = root.newChild(project.filename, project.name, "project-open");
|
TreeItem p = root.newChild(project.filename, project.name, "project-d");
|
||||||
p.intParam = ProjectItemType.Project;
|
p.intParam = ProjectItemType.Project;
|
||||||
addProjectItems(p, project.items);
|
addProjectItems(p, project.items);
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 286 B |
Binary file not shown.
Before Width: | Height: | Size: 323 B After Width: | Height: | Size: 230 B |
Binary file not shown.
Before Width: | Height: | Size: 638 B After Width: | Height: | Size: 649 B |
Binary file not shown.
After Width: | Height: | Size: 676 B |
|
@ -16,9 +16,11 @@ res/mdpi/edit-paste.png
|
||||||
res/mdpi/edit-redo.png
|
res/mdpi/edit-redo.png
|
||||||
res/mdpi/edit-undo.png
|
res/mdpi/edit-undo.png
|
||||||
res/mdpi/edit-unindent.png
|
res/mdpi/edit-unindent.png
|
||||||
|
res/mdpi/project-d.png
|
||||||
res/mdpi/project-development.png
|
res/mdpi/project-development.png
|
||||||
res/mdpi/project-open.png
|
res/mdpi/project-open.png
|
||||||
res/mdpi/run-build.png
|
res/mdpi/run-build.png
|
||||||
res/mdpi/run-build-clean.png
|
res/mdpi/run-build-clean.png
|
||||||
res/mdpi/run-build-configure.png
|
res/mdpi/run-build-configure.png
|
||||||
|
res/mdpi/text-d.png
|
||||||
res/mdpi/tx_fabric.jpg
|
res/mdpi/tx_fabric.jpg
|
||||||
|
|
Loading…
Reference in New Issue