From 6e3f2f44af808e9f4255c2462e16beee844c0df7 Mon Sep 17 00:00:00 2001 From: Rémi Verschelde Date: Fri, 17 Nov 2017 21:48:24 +0100 Subject: Use new XDG folders to dehardcode paths --- editor/editor_node.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'editor/editor_node.cpp') diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index e2ce9ce52..bf380c3ce 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -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 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 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 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 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 } -- cgit v1.2.3-70-g09d2