diff options
Diffstat (limited to 'editor/project_manager.cpp')
-rw-r--r-- | editor/project_manager.cpp | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index 5a1eedd8a2..b2a2566ad4 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -546,7 +546,6 @@ private: Vector<String> failed_files; - int idx = 0; while (ret == UNZ_OK) { //get filename unz_file_info info; @@ -585,7 +584,6 @@ private: } } - idx++; ret = unzGoToNextFile(pkg); } @@ -714,7 +712,7 @@ public: create_dir->hide(); } else { - fav_dir = EditorSettings::get_singleton()->get("filesystem/directories/default_project_path"); + fav_dir = EDITOR_GET("filesystem/directories/default_project_path"); if (!fav_dir.is_empty()) { project_path->set_text(fav_dir); fdialog->set_current_dir(fav_dir); @@ -1265,7 +1263,7 @@ void ProjectList::migrate_config() { continue; } - String path = EditorSettings::get_singleton()->get(property_key); + String path = EDITOR_GET(property_key); String favoriteKey = "favorite_projects/" + property_key.get_slice("/", 1); bool favorite = EditorSettings::get_singleton()->has_setting(favoriteKey); add_project(path, favorite); @@ -1916,7 +1914,7 @@ void ProjectManager::_notification(int p_what) { } break; case NOTIFICATION_READY: { - int default_sorting = (int)EditorSettings::get_singleton()->get("project_manager/sorting_order"); + int default_sorting = (int)EDITOR_GET("project_manager/sorting_order"); filter_option->select(default_sorting); _project_list->set_order_option(default_sorting); @@ -2561,7 +2559,7 @@ ProjectManager::ProjectManager() { EditorSettings::get_singleton()->set_optimize_save(false); //just write settings as they came { - int display_scale = EditorSettings::get_singleton()->get("interface/editor/display_scale"); + int display_scale = EDITOR_GET("interface/editor/display_scale"); switch (display_scale) { case 0: @@ -2587,7 +2585,7 @@ ProjectManager::ProjectManager() { editor_set_scale(2.0); break; default: - editor_set_scale(EditorSettings::get_singleton()->get("interface/editor/custom_display_scale")); + editor_set_scale(EDITOR_GET("interface/editor/custom_display_scale")); break; } EditorFileDialog::get_icon_func = &ProjectManager::_file_dialog_get_icon; @@ -2596,7 +2594,7 @@ ProjectManager::ProjectManager() { // TRANSLATORS: This refers to the application where users manage their Godot projects. DisplayServer::get_singleton()->window_set_title(VERSION_NAME + String(" - ") + TTR("Project Manager", "Application")); - EditorFileDialog::set_default_show_hidden_files(EditorSettings::get_singleton()->get("filesystem/file_dialog/show_hidden_files")); + EditorFileDialog::set_default_show_hidden_files(EDITOR_GET("filesystem/file_dialog/show_hidden_files")); int swap_cancel_ok = EDITOR_GET("interface/editor/accept_dialog_cancel_ok_buttons"); if (swap_cancel_ok != 0) { // 0 is auto, set in register_scene based on DisplayServer. @@ -2815,7 +2813,7 @@ ProjectManager::ProjectManager() { } } - String current_lang = EditorSettings::get_singleton()->get("interface/editor/editor_language"); + String current_lang = EDITOR_GET("interface/editor/editor_language"); language_btn->set_text(current_lang); for (int i = 0; i < editor_languages.size(); i++) { @@ -2854,7 +2852,7 @@ ProjectManager::ProjectManager() { scan_dir->set_access(EditorFileDialog::ACCESS_FILESYSTEM); scan_dir->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_DIR); scan_dir->set_title(TTR("Select a Folder to Scan")); // must be after mode or it's overridden - scan_dir->set_current_dir(EditorSettings::get_singleton()->get("filesystem/directories/default_project_path")); + scan_dir->set_current_dir(EDITOR_GET("filesystem/directories/default_project_path")); add_child(scan_dir); scan_dir->connect("dir_selected", callable_mp(this, &ProjectManager::_scan_begin)); @@ -2936,7 +2934,7 @@ ProjectManager::ProjectManager() { Ref<DirAccess> dir_access = DirAccess::create(DirAccess::AccessType::ACCESS_FILESYSTEM); - String default_project_path = EditorSettings::get_singleton()->get("filesystem/directories/default_project_path"); + String default_project_path = EDITOR_GET("filesystem/directories/default_project_path"); if (!dir_access->dir_exists(default_project_path)) { Error error = dir_access->make_dir_recursive(default_project_path); if (error != OK) { @@ -2944,7 +2942,7 @@ ProjectManager::ProjectManager() { } } - String autoscan_path = EditorSettings::get_singleton()->get("filesystem/directories/autoscan_project_path"); + String autoscan_path = EDITOR_GET("filesystem/directories/autoscan_project_path"); if (!autoscan_path.is_empty()) { if (dir_access->dir_exists(autoscan_path)) { _scan_begin(autoscan_path); |