|
@@ -44,8 +44,6 @@
|
|
#include "scene/gui/progress_bar.h"
|
|
#include "scene/gui/progress_bar.h"
|
|
#include "scene/gui/tree.h"
|
|
#include "scene/gui/tree.h"
|
|
|
|
|
|
-#define ROOT_PREFIX "res://"
|
|
|
|
-
|
|
|
|
const char *FindInFiles::SIGNAL_RESULT_FOUND = "result_found";
|
|
const char *FindInFiles::SIGNAL_RESULT_FOUND = "result_found";
|
|
const char *FindInFiles::SIGNAL_FINISHED = "finished";
|
|
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() {
|
|
FindInFiles::FindInFiles() {
|
|
- _root_prefix = ROOT_PREFIX;
|
|
|
|
_searching = false;
|
|
_searching = false;
|
|
_whole_words = true;
|
|
_whole_words = true;
|
|
_match_case = true;
|
|
_match_case = true;
|
|
@@ -182,7 +179,7 @@ void FindInFiles::_iterate() {
|
|
_current_dir = _current_dir.plus_file(folder_name);
|
|
_current_dir = _current_dir.plus_file(folder_name);
|
|
|
|
|
|
PoolStringArray sub_dirs;
|
|
PoolStringArray sub_dirs;
|
|
- _scan_dir(_root_prefix + _current_dir, sub_dirs);
|
|
|
|
|
|
+ _scan_dir("res://" + _current_dir, sub_dirs);
|
|
|
|
|
|
_folders_stack.push_back(sub_dirs);
|
|
_folders_stack.push_back(sub_dirs);
|
|
|
|
|
|
@@ -348,7 +345,7 @@ FindInFilesDialog::FindInFilesDialog() {
|
|
HBoxContainer *hbc = memnew(HBoxContainer);
|
|
HBoxContainer *hbc = memnew(HBoxContainer);
|
|
|
|
|
|
Label *prefix_label = memnew(Label);
|
|
Label *prefix_label = memnew(Label);
|
|
- prefix_label->set_text(ROOT_PREFIX);
|
|
|
|
|
|
+ prefix_label->set_text("res://");
|
|
hbc->add_child(prefix_label);
|
|
hbc->add_child(prefix_label);
|
|
|
|
|
|
_folder_line_edit = memnew(LineEdit);
|
|
_folder_line_edit = memnew(LineEdit);
|
|
@@ -375,10 +372,12 @@ FindInFilesDialog::FindInFilesDialog() {
|
|
{
|
|
{
|
|
HBoxContainer *hbc = memnew(HBoxContainer);
|
|
HBoxContainer *hbc = memnew(HBoxContainer);
|
|
|
|
|
|
|
|
+ // TODO: Unhardcode this.
|
|
Vector<String> exts;
|
|
Vector<String> exts;
|
|
exts.push_back("gd");
|
|
exts.push_back("gd");
|
|
if (Engine::get_singleton()->has_singleton("GodotSharp"))
|
|
if (Engine::get_singleton()->has_singleton("GodotSharp"))
|
|
exts.push_back("cs");
|
|
exts.push_back("cs");
|
|
|
|
+ exts.push_back("shader");
|
|
|
|
|
|
for (int i = 0; i < exts.size(); ++i) {
|
|
for (int i = 0; i < exts.size(); ++i) {
|
|
CheckBox *cb = memnew(CheckBox);
|
|
CheckBox *cb = memnew(CheckBox);
|