summaryrefslogtreecommitdiff
path: root/editor/find_in_files.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/find_in_files.cpp')
-rw-r--r--editor/find_in_files.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/editor/find_in_files.cpp b/editor/find_in_files.cpp
index 705bb1d9c5..6ebe8cfe2c 100644
--- a/editor/find_in_files.cpp
+++ b/editor/find_in_files.cpp
@@ -44,8 +44,6 @@
#include "scene/gui/progress_bar.h"
#include "scene/gui/tree.h"
-#define ROOT_PREFIX "res://"
-
const char *FindInFiles::SIGNAL_RESULT_FOUND = "result_found";
const char *FindInFiles::SIGNAL_FINISHED = "finished";
@@ -89,7 +87,6 @@ static bool find_next(const String &line, String pattern, int from, bool match_c
//--------------------------------------------------------------------------------
FindInFiles::FindInFiles() {
- _root_prefix = ROOT_PREFIX;
_searching = false;
_whole_words = true;
_match_case = true;
@@ -182,7 +179,7 @@ void FindInFiles::_iterate() {
_current_dir = _current_dir.plus_file(folder_name);
PoolStringArray sub_dirs;
- _scan_dir(_root_prefix + _current_dir, sub_dirs);
+ _scan_dir("res://" + _current_dir, sub_dirs);
_folders_stack.push_back(sub_dirs);
@@ -348,7 +345,7 @@ FindInFilesDialog::FindInFilesDialog() {
HBoxContainer *hbc = memnew(HBoxContainer);
Label *prefix_label = memnew(Label);
- prefix_label->set_text(ROOT_PREFIX);
+ prefix_label->set_text("res://");
hbc->add_child(prefix_label);
_folder_line_edit = memnew(LineEdit);
@@ -375,10 +372,12 @@ FindInFilesDialog::FindInFilesDialog() {
{
HBoxContainer *hbc = memnew(HBoxContainer);
+ // TODO: Unhardcode this.
Vector<String> exts;
exts.push_back("gd");
if (Engine::get_singleton()->has_singleton("GodotSharp"))
exts.push_back("cs");
+ exts.push_back("shader");
for (int i = 0; i < exts.size(); ++i) {
CheckBox *cb = memnew(CheckBox);