You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-13 13:31:48 +00:00
Use new XDG folders to dehardcode paths
This commit is contained in:
@@ -926,7 +926,7 @@ void EditorNode::_save_scene_with_preview(String p_file, int p_idx) {
|
||||
img->flip_y();
|
||||
|
||||
//save thumbnail directly, as thumbnailer may not update due to actual scene not changing md5
|
||||
String temp_path = EditorSettings::get_singleton()->get_settings_dir().plus_file("tmp");
|
||||
String temp_path = EditorSettings::get_singleton()->get_cache_dir();
|
||||
String cache_base = ProjectSettings::get_singleton()->globalize_path(p_file).md5_text();
|
||||
cache_base = temp_path.plus_file("resthumb-" + cache_base);
|
||||
|
||||
@@ -1198,7 +1198,7 @@ void EditorNode::_dialog_action(String p_file) {
|
||||
|
||||
Ref<ConfigFile> config;
|
||||
config.instance();
|
||||
Error err = config->load(EditorSettings::get_singleton()->get_settings_dir().plus_file("editor_layouts-3.cfg"));
|
||||
Error err = config->load(EditorSettings::get_singleton()->get_editor_layouts_config());
|
||||
|
||||
if (err == ERR_CANT_OPEN) {
|
||||
config.instance(); // new config
|
||||
@@ -1209,7 +1209,7 @@ void EditorNode::_dialog_action(String p_file) {
|
||||
|
||||
_save_docks_to_config(config, p_file);
|
||||
|
||||
config->save(EditorSettings::get_singleton()->get_settings_dir().plus_file("editor_layouts-3.cfg"));
|
||||
config->save(EditorSettings::get_singleton()->get_editor_layouts_config());
|
||||
|
||||
layout_dialog->hide();
|
||||
_update_layouts_menu();
|
||||
@@ -1226,7 +1226,7 @@ void EditorNode::_dialog_action(String p_file) {
|
||||
|
||||
Ref<ConfigFile> config;
|
||||
config.instance();
|
||||
Error err = config->load(EditorSettings::get_singleton()->get_settings_dir().plus_file("editor_layouts-3.cfg"));
|
||||
Error err = config->load(EditorSettings::get_singleton()->get_editor_layouts_config());
|
||||
|
||||
if (err != OK || !config->has_section(p_file)) {
|
||||
show_warning(TTR("Layout name not found!"));
|
||||
@@ -1240,7 +1240,7 @@ void EditorNode::_dialog_action(String p_file) {
|
||||
config->set_value(p_file, E->get(), Variant());
|
||||
}
|
||||
|
||||
config->save(EditorSettings::get_singleton()->get_settings_dir().plus_file("editor_layouts-3.cfg"));
|
||||
config->save(EditorSettings::get_singleton()->get_editor_layouts_config());
|
||||
|
||||
layout_dialog->hide();
|
||||
_update_layouts_menu();
|
||||
@@ -3812,7 +3812,7 @@ void EditorNode::_update_layouts_menu() {
|
||||
|
||||
Ref<ConfigFile> config;
|
||||
config.instance();
|
||||
Error err = config->load(EditorSettings::get_singleton()->get_settings_dir().plus_file("editor_layouts-3.cfg"));
|
||||
Error err = config->load(EditorSettings::get_singleton()->get_editor_layouts_config());
|
||||
if (err != OK) {
|
||||
return; //no config
|
||||
}
|
||||
@@ -3860,7 +3860,7 @@ void EditorNode::_layout_menu_option(int p_id) {
|
||||
|
||||
Ref<ConfigFile> config;
|
||||
config.instance();
|
||||
Error err = config->load(EditorSettings::get_singleton()->get_settings_dir().plus_file("editor_layouts-3.cfg"));
|
||||
Error err = config->load(EditorSettings::get_singleton()->get_editor_layouts_config());
|
||||
if (err != OK) {
|
||||
return; //no config
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user