diff options
Diffstat (limited to 'editor')
| -rw-r--r-- | editor/editor_export.cpp | 4 | ||||
| -rw-r--r-- | editor/editor_file_system.cpp | 48 | ||||
| -rw-r--r-- | editor/export_template_manager.cpp | 33 | ||||
| -rw-r--r-- | editor/export_template_manager.h | 29 | ||||
| -rw-r--r-- | editor/io_plugins/editor_texture_import_plugin.cpp | 4 | ||||
| -rw-r--r-- | editor/plugins/curve_editor_plugin.cpp | 30 | ||||
| -rw-r--r-- | editor/plugins/curve_editor_plugin.h | 29 | ||||
| -rw-r--r-- | editor/plugins/gradient_texture_editor_plugin.cpp | 33 | ||||
| -rw-r--r-- | editor/plugins/gradient_texture_editor_plugin.h | 29 | ||||
| -rw-r--r-- | editor/project_manager.cpp | 42 | ||||
| -rw-r--r-- | editor/project_settings.cpp | 3 |
11 files changed, 212 insertions, 72 deletions
diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp index 7dc5db4c7d..b719e4a487 100644 --- a/editor/editor_export.cpp +++ b/editor/editor_export.cpp @@ -28,13 +28,13 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ #include "editor_export.h" + #include "editor/editor_file_system.h" #include "editor/plugins/script_editor_plugin.h" #include "editor_node.h" #include "editor_settings.h" #include "global_config.h" #include "io/config_file.h" -#include "io/md5.h" #include "io/resource_loader.h" #include "io/resource_saver.h" #include "io/zip_io.h" @@ -43,6 +43,8 @@ #include "script_language.h" #include "version.h" +#include "thirdparty/misc/md5.h" + static int _get_pad(int p_alignment, int p_n) { int rest = p_n % p_alignment; diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp index 3fb2923696..2612a2af16 100644 --- a/editor/editor_file_system.cpp +++ b/editor/editor_file_system.cpp @@ -487,22 +487,6 @@ bool EditorFileSystem::_check_missing_imported_files(const String &p_path) { return true; } -static bool _find_project(const String &p_path) { - DirAccess *dir_access = DirAccess::create_for_path(p_path); - bool ret = false; - while (true) { - bool is_dir; - String file = dir_access->get_next(&is_dir); - if (file == "") - break; - if (file.ends_with(".godot")) { - ret = true; - } - } - memdelete(dir_access); - return ret; -} - void EditorFileSystem::_scan_new_dir(EditorFileSystemDirectory *p_dir, DirAccess *da, const ScanProgress &p_progress) { List<String> dirs; @@ -525,9 +509,8 @@ void EditorFileSystem::_scan_new_dir(EditorFileSystemDirectory *p_dir, DirAccess if (f.begins_with(".")) //ignore hidden and . / .. continue; - if (_find_project(cd.plus_file(f))) { + if (FileAccess::exists(cd.plus_file(f).plus_file("godot.cfg"))) // skip if another project inside this continue; - } dirs.push_back(f); @@ -693,35 +676,34 @@ void EditorFileSystem::_scan_fs_changes(EditorFileSystemDirectory *p_dir, const while (true) { bool isdir; - String file = da->get_next(&isdir); - if (file == "") + String f = da->get_next(&isdir); + if (f == "") break; if (isdir) { - if (file.begins_with(".")) //ignore hidden and . / .. + if (f.begins_with(".")) //ignore hidden and . / .. continue; - int idx = p_dir->find_dir_index(file); + int idx = p_dir->find_dir_index(f); if (idx == -1) { - if (_find_project(cd.plus_file(file))) { + if (FileAccess::exists(cd.plus_file(f).plus_file("godot.cfg"))) // skip if another project inside this continue; - } EditorFileSystemDirectory *efd = memnew(EditorFileSystemDirectory); efd->parent = p_dir; - efd->name = file; + efd->name = f; DirAccess *d = DirAccess::create(DirAccess::ACCESS_RESOURCES); - d->change_dir(cd.plus_file(file)); + d->change_dir(cd.plus_file(f)); _scan_new_dir(efd, d, p_progress.get_sub(1, 1)); memdelete(d); ItemAction ia; ia.action = ItemAction::ACTION_DIR_ADD; ia.dir = p_dir; - ia.file = file; + ia.file = f; ia.new_dir = efd; scan_actions.push_back(ia); } else { @@ -729,16 +711,16 @@ void EditorFileSystem::_scan_fs_changes(EditorFileSystemDirectory *p_dir, const } } else { - String ext = file.get_extension().to_lower(); + String ext = f.get_extension().to_lower(); if (!valid_extensions.has(ext)) continue; //invalid - int idx = p_dir->find_file_index(file); + int idx = p_dir->find_file_index(f); if (idx == -1) { //never seen this file, add actition to add it EditorFileSystemDirectory::FileInfo *fi = memnew(EditorFileSystemDirectory::FileInfo); - fi->file = file; + fi->file = f; String path = cd.plus_file(fi->file); fi->modified_time = FileAccess::get_modified_time(path); @@ -749,7 +731,7 @@ void EditorFileSystem::_scan_fs_changes(EditorFileSystemDirectory *p_dir, const ItemAction ia; ia.action = ItemAction::ACTION_FILE_ADD; ia.dir = p_dir; - ia.file = file; + ia.file = f; ia.new_file = fi; scan_actions.push_back(ia); } @@ -757,14 +739,14 @@ void EditorFileSystem::_scan_fs_changes(EditorFileSystemDirectory *p_dir, const if (import_extensions.has(ext)) { //if it can be imported, and it was added, it needs to be reimported print_line("REIMPORT: file was not found before, reimport"); - print_line("at dir: " + p_dir->get_path() + " file: " + file); + print_line("at dir: " + p_dir->get_path() + " file: " + f); for (int i = 0; i < p_dir->files.size(); i++) { print_line(itos(i) + ": " + p_dir->files[i]->file); } ItemAction ia; ia.action = ItemAction::ACTION_FILE_REIMPORT; ia.dir = p_dir; - ia.file = file; + ia.file = f; scan_actions.push_back(ia); } diff --git a/editor/export_template_manager.cpp b/editor/export_template_manager.cpp index 83ada90144..e6f15d1712 100644 --- a/editor/export_template_manager.cpp +++ b/editor/export_template_manager.cpp @@ -1,11 +1,40 @@ +/*************************************************************************/ +/* export_template_manager.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ #include "export_template_manager.h" + #include "editor_node.h" #include "editor_scale.h" +#include "io/zip_io.h" #include "os/dir_access.h" #include "version.h" -#include "io/zip_io.h" - void ExportTemplateManager::_update_template_list() { while (current_hb->get_child_count()) { diff --git a/editor/export_template_manager.h b/editor/export_template_manager.h index c3834ec643..480c73e123 100644 --- a/editor/export_template_manager.h +++ b/editor/export_template_manager.h @@ -1,3 +1,32 @@ +/*************************************************************************/ +/* export_template_manager.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ #ifndef EXPORT_TEMPLATE_MANAGER_H #define EXPORT_TEMPLATE_MANAGER_H diff --git a/editor/io_plugins/editor_texture_import_plugin.cpp b/editor/io_plugins/editor_texture_import_plugin.cpp index ba380f0334..d9b4a95045 100644 --- a/editor/io_plugins/editor_texture_import_plugin.cpp +++ b/editor/io_plugins/editor_texture_import_plugin.cpp @@ -28,6 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ #include "editor_texture_import_plugin.h" + #if 0 #include "editor/editor_node.h" #include "editor/editor_settings.h" @@ -35,13 +36,14 @@ #include "global_config.h" #include "io/image_loader.h" #include "io/marshalls.h" -#include "io/md5.h" #include "io/resource_saver.h" #include "scene/gui/button_group.h" #include "scene/gui/check_button.h" #include "scene/gui/margin_container.h" #include "scene/io/resource_format_image.h" +#include "thirdparty/misc/md5.h" + static const char *flag_names[]={ ("Streaming Format"), ("Fix Border Alpha"), diff --git a/editor/plugins/curve_editor_plugin.cpp b/editor/plugins/curve_editor_plugin.cpp index 52edc75bc0..f3ad5c0fd1 100644 --- a/editor/plugins/curve_editor_plugin.cpp +++ b/editor/plugins/curve_editor_plugin.cpp @@ -1,8 +1,38 @@ +/*************************************************************************/ +/* curve_editor_plugin.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ #include "curve_editor_plugin.h" #include "canvas_item_editor_plugin.h" #include "os/keyboard.h" #include "spatial_editor_plugin.h" + void CurveTextureEdit::_gui_input(const InputEvent &p_event) { if (p_event.type == InputEvent::KEY && p_event.key.pressed && p_event.key.scancode == KEY_DELETE && grabbed != -1) { diff --git a/editor/plugins/curve_editor_plugin.h b/editor/plugins/curve_editor_plugin.h index e98cec2727..ebe05539aa 100644 --- a/editor/plugins/curve_editor_plugin.h +++ b/editor/plugins/curve_editor_plugin.h @@ -1,3 +1,32 @@ +/*************************************************************************/ +/* curve_editor_plugin.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ #ifndef CURVE_EDITOR_PLUGIN_H #define CURVE_EDITOR_PLUGIN_H diff --git a/editor/plugins/gradient_texture_editor_plugin.cpp b/editor/plugins/gradient_texture_editor_plugin.cpp index 9551fe19fa..41dd64d931 100644 --- a/editor/plugins/gradient_texture_editor_plugin.cpp +++ b/editor/plugins/gradient_texture_editor_plugin.cpp @@ -1,10 +1,39 @@ +/*************************************************************************/ +/* gradient_texture_editor_plugin.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ #include "gradient_texture_editor_plugin.h" #include "canvas_item_editor_plugin.h" -#include "spatial_editor_plugin.h" - #include "os/keyboard.h" #include "scene/resources/default_theme/theme_data.h" +#include "spatial_editor_plugin.h" + #define POINT_WIDTH 8 GradientTextureEdit::GradientTextureEdit() { diff --git a/editor/plugins/gradient_texture_editor_plugin.h b/editor/plugins/gradient_texture_editor_plugin.h index 5af828f17c..cb2f6b4061 100644 --- a/editor/plugins/gradient_texture_editor_plugin.h +++ b/editor/plugins/gradient_texture_editor_plugin.h @@ -1,3 +1,32 @@ +/*************************************************************************/ +/* gradient_texture_editor_plugin.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ #ifndef GRADIENT_TEXTURE_EDITOR_PLUGIN_H #define GRADIENT_TEXTURE_EDITOR_PLUGIN_H diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index 1a4a36fa18..f2c04fe785 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -50,19 +50,6 @@ #include "scene/gui/tool_button.h" #include "version.h" -static String _find_project_file(DirAccess *p_da) { - p_da->list_dir_begin(); - while (true) { - String f = p_da->get_next(); - if (f == "") - break; - if (f.get_extension() == "godot") - return p_da->get_current_dir() + "/" + f; - } - p_da->list_dir_end(); - return ""; -} - class NewProjectDialog : public ConfirmationDialog { GDCLASS(NewProjectDialog, ConfirmationDialog); @@ -105,18 +92,18 @@ private: if (mode != MODE_IMPORT) { - if (_find_project_file(d) != "") { + if (d->file_exists("godot.cfg")) { - error->set_text(TTR("Invalid project path, *.godot must not exist.")); + error->set_text(TTR("Invalid project path, godot.cfg must not exist.")); memdelete(d); return ""; } } else { - if (valid_path != "" && _find_project_file(d) == "") { + if (valid_path != "" && !d->file_exists("godot.cfg")) { - error->set_text(TTR("Invalid project path, *.godot must exist.")); + error->set_text(TTR("Invalid project path, godot.cfg must exist.")); memdelete(d); return ""; } @@ -149,7 +136,7 @@ private: String p = p_path; if (mode == MODE_IMPORT) { - if (p.get_extension() == "godot") { + if (p.ends_with("godot.cfg")) { p = p.get_base_dir(); } @@ -175,7 +162,7 @@ private: fdialog->set_mode(FileDialog::MODE_OPEN_FILE); fdialog->clear_filters(); - fdialog->add_filter("*.godot ; " _MKSTR(VERSION_NAME) " Project"); + fdialog->add_filter("godot.cfg ; " _MKSTR(VERSION_NAME) " Project"); } else { fdialog->set_mode(FileDialog::MODE_OPEN_DIR); } @@ -199,9 +186,9 @@ private: } else { if (mode == MODE_NEW) { - FileAccess *f = FileAccess::open(dir.plus_file("/" + project_name->get_text().replace(" ", "_") + ".godot"), FileAccess::WRITE); + FileAccess *f = FileAccess::open(dir.plus_file("/godot.cfg"), FileAccess::WRITE); if (!f) { - error->set_text(TTR("Couldn't create *.godot project file in project path.")); + error->set_text(TTR("Couldn't create godot.cfg in project path.")); } else { f->store_line("; Engine configuration file."); @@ -754,17 +741,10 @@ void ProjectManager::_load_recent_projects() { continue; String project = _name.get_slice("/", 1); - DirAccess *dir_access = DirAccess::create(DirAccess::ACCESS_FILESYSTEM); - if (dir_access->change_dir(path) != OK) { - EditorSettings::get_singleton()->erase(_name); - continue; - } - String conf = _find_project_file(dir_access); - memdelete(dir_access); + String conf = path.plus_file("godot.cfg"); bool favorite = (_name.begins_with("favorite_projects/")) ? true : false; uint64_t last_modified = 0; - if (FileAccess::exists(conf)) { last_modified = FileAccess::get_modified_time(conf); @@ -1026,7 +1006,7 @@ void ProjectManager::_scan_dir(DirAccess *da, float pos, float total, List<Strin while (n != String()) { if (da->current_is_dir() && !n.begins_with(".")) { subdirs.push_front(n); - } else if (n.get_extension() == "godot") { + } else if (n == "godot.cfg") { r_projects->push_back(da->get_current_dir()); } n = da->get_next(); @@ -1137,7 +1117,7 @@ void ProjectManager::_files_dropped(PoolStringArray p_files, int p_screen) { dir->list_dir_begin(); String file = dir->get_next(); while (confirm && file != String()) { - if (!dir->current_is_dir() && file.get_extension() == "godot") { + if (!dir->current_is_dir() && file.ends_with("godot.cfg")) { confirm = false; } file = dir->get_next(); diff --git a/editor/project_settings.cpp b/editor/project_settings.cpp index 7d9ee91f35..858b9403a7 100644 --- a/editor/project_settings.cpp +++ b/editor/project_settings.cpp @@ -1168,8 +1168,7 @@ void ProjectSettings::_bind_methods() { ProjectSettings::ProjectSettings(EditorData *p_data) { singleton = this; - String project_file = "(" + GlobalConfig::get_singleton()->get_project_file_name() + ")"; - set_title(TTR("Project Settings " + project_file)); + set_title(TTR("Project Settings (godot.cfg)")); set_resizable(true); undo_redo = &p_data->get_undo_redo(); data = p_data; |