From caa3d2e8339ff236e06056b72149c38a6a58c05d Mon Sep 17 00:00:00 2001 From: Keywan Ghadami Date: Sun, 6 Mar 2016 10:18:56 +0100 Subject: [PATCH 1/2] workaround for #140 using highest availible version number lowers the problems for dub --- dub.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dub.json b/dub.json index 5eccc29..e271187 100644 --- a/dub.json +++ b/dub.json @@ -12,7 +12,7 @@ "stringImportPaths": ["views", "views/res", "views/res/i18n", "views/res/mdpi", "views/res/hdpi"], "dependencies": { - "dlangui": "~>0.7.72", + "dlangui": "~>0.7.74", "dcd": "~>0.7.5" }, From 45159cb3010d84fcdca9844985b595275380bd35 Mon Sep 17 00:00:00 2001 From: Keywan Ghadami Date: Tue, 8 Mar 2016 11:53:08 +0100 Subject: [PATCH 2/2] prefill the search panael text box with the selected text from the current editor usecase: if DCD does not work or is not responsible i like to be able to select some text and then search for other occurrences. If the ide automaticlly prefill the textbox for the search it much more comfortable. It is standard behaivor in many (maybe every) popular applications (firefox, openoffice ...) --- src/dlangide/ui/frame.d | 2 ++ src/dlangide/ui/searchPanel.d | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/dlangide/ui/frame.d b/src/dlangide/ui/frame.d index b541dfd..d275dbb 100644 --- a/src/dlangide/ui/frame.d +++ b/src/dlangide/ui/frame.d @@ -986,6 +986,8 @@ class IDEFrame : AppFrame, ProgramExecutionStatusListener, BreakpointListChangeL _logPanel.getTabs.selectTab("search"); if(searchPanel !is null) { searchPanel.focus(); + dstring selectedText = currentEditor.getSelectedText(); + searchPanel.setSearchText(selectedText); } return true; case IDEActions.FileNewWorkspace: diff --git a/src/dlangide/ui/searchPanel.d b/src/dlangide/ui/searchPanel.d index 929048d..841d3ca 100644 --- a/src/dlangide/ui/searchPanel.d +++ b/src/dlangide/ui/searchPanel.d @@ -170,6 +170,10 @@ class SearchWidget : TabWidget { } return true; } + + public void setSearchText(dstring txt){ + _findText.text = txt; + } protected bool onEditorAction(const Action action) { if (action.id == EditorActions.InsertNewLine) {