additional fix #292

This commit is contained in:
Vadim Lopatin 2017-09-14 14:02:00 +03:00
parent f0bc81776f
commit 595f0b5847
4 changed files with 15 additions and 22 deletions

View File

@ -12,7 +12,7 @@
"stringImportPaths": ["views"],
"dependencies": {
"dlangui": "==0.9.132",
"dlangui": "==0.9.134",
"dsymbol": "~>0.2.9",
"dcd": "~>0.9.1"
},

View File

@ -122,10 +122,10 @@ class NewFileDlg : Dialog {
_edLocation.addFilter(FileFilterEntry(UIString.fromId("IDE_FILES"c), "*.dlangidews;*.d;*.dd;*.di;*.ddoc;*.dh;*.json;*.xml;*.ini;*.dt"));
_edLocation.caption = "Select directory"d;
_edFileName.editorAction.connect(&onEditorAction);
_edFilePath.editorAction.connect(&onEditorAction);
_edModuleName.editorAction.connect(&onEditorAction);
_edLocation.editorAction.connect(&onEditorAction);
_edFileName.enterKey.connect(&onEnterKey);
_edFilePath.enterKey.connect(&onEnterKey);
_edModuleName.enterKey.connect(&onEnterKey);
_edLocation.enterKey.connect(&onEnterKey);
// fill templates
dstring[] names;
@ -168,14 +168,11 @@ class NewFileDlg : Dialog {
_edFileName.setFocus();
}
protected bool onEditorAction(const Action action) {
if (action.id == EditorActions.InsertNewLine) {
if (!validate())
return false;
close(_buttonActions[0]);
return true;
}
return false;
protected bool onEnterKey(EditWidgetBase editor) {
if (!validate())
return false;
close(_buttonActions[0]);
return true;
}
StringListWidget _projectTemplateList;

View File

@ -176,13 +176,6 @@ class SearchWidget : TabWidget {
_findText.text = txt;
}
protected bool onEditorAction(const Action action) {
if (action.id == EditorActions.InsertNewLine) {
return onFindButtonPressed(this);
}
return false;
}
this(string ID, IDEFrame frame) {
super(ID);
_frame = frame;
@ -199,7 +192,10 @@ class SearchWidget : TabWidget {
_findText = new EditLine();
_findText.padding(Rect(5,4,50,4));
_findText.layoutWidth = FILL_PARENT;
_findText.editorAction = &onEditorAction; // to handle Enter key press in editor
// to handle Enter key press in editor
_findText.enterKey = delegate (EditWidgetBase editor) {
return onFindButtonPressed(this);
};
_layout.addChild(_findText);
auto goButton = new ImageButton("findTextButton", "edit-find");

View File

@ -1 +1 @@
v0.7.79
v0.7.80