summaryrefslogtreecommitdiff
path: root/editor/editor_node.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-07-26 00:01:49 +0200
committerGitHub <noreply@github.com>2018-07-26 00:01:49 +0200
commit96ce66e00f345147f9280bdbf7113972094e031e (patch)
treea4c5a4d9c88cba3045994914663c8fe03bee0014 /editor/editor_node.cpp
parente38051970c73713948544a96a27012b30d59d444 (diff)
parentb4f6b202739d6c9aa255836a18759c077c99a9a9 (diff)
Merge pull request #20455 from Calinou/add-user-data-dropdowns
Add menu buttons to open the project and editor data folders
Diffstat (limited to 'editor/editor_node.cpp')
-rw-r--r--editor/editor_node.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index b366ebd911..4eccadd36c 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -2047,6 +2047,10 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
project_settings->popup_project_settings();
} break;
+ case RUN_PROJECT_DATA_FOLDER: {
+
+ OS::get_singleton()->shell_open(OS::get_singleton()->get_user_data_dir());
+ } break;
case FILE_QUIT:
case RUN_PROJECT_MANAGER: {
@@ -2179,6 +2183,14 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
settings_config_dialog->popup_edit_settings();
} break;
+ case SETTINGS_EDITOR_DATA_FOLDER: {
+
+ OS::get_singleton()->shell_open(EditorSettings::get_singleton()->get_data_dir());
+ } break;
+ case SETTINGS_EDITOR_CONFIG_FOLDER: {
+
+ OS::get_singleton()->shell_open(EditorSettings::get_singleton()->get_settings_dir());
+ } break;
case SETTINGS_MANAGE_EXPORT_TEMPLATES: {
export_template_manager->popup_manager();
@@ -5078,6 +5090,9 @@ EditorNode::EditorNode() {
tool_menu->add_item(TTR("Orphan Resource Explorer"), TOOLS_ORPHAN_RESOURCES);
p->add_separator();
+ p->add_item(TTR("Open Project Data Folder"), RUN_PROJECT_DATA_FOLDER);
+ p->add_separator();
+
#ifdef OSX_ENABLED
p->add_item(TTR("Quit to Project List"), RUN_PROJECT_MANAGER, KEY_MASK_SHIFT + KEY_MASK_ALT + KEY_Q);
#else
@@ -5125,6 +5140,7 @@ EditorNode::EditorNode() {
p->add_item(TTR("Editor Settings"), SETTINGS_PREFERENCES);
p->add_separator();
+
editor_layouts = memnew(PopupMenu);
editor_layouts->set_name("Layouts");
p->add_child(editor_layouts);
@@ -5136,6 +5152,17 @@ EditorNode::EditorNode() {
p->add_shortcut(ED_SHORTCUT("editor/fullscreen_mode", TTR("Toggle Fullscreen"), KEY_MASK_SHIFT | KEY_F11), SETTINGS_TOGGLE_FULLSCREEN);
#endif
p->add_separator();
+
+ if (OS::get_singleton()->get_data_path() == OS::get_singleton()->get_config_path()) {
+ // Configuration and data folders are located in the same place (Windows/macOS)
+ p->add_item(TTR("Open Editor Data/Settings Folder"), SETTINGS_EDITOR_DATA_FOLDER);
+ } else {
+ // Separate configuration and data folders (Linux)
+ p->add_item(TTR("Open Editor Data Folder"), SETTINGS_EDITOR_DATA_FOLDER);
+ p->add_item(TTR("Open Editor Settings Folder"), SETTINGS_EDITOR_CONFIG_FOLDER);
+ }
+ p->add_separator();
+
p->add_item(TTR("Manage Export Templates"), SETTINGS_MANAGE_EXPORT_TEMPLATES);
// Help Menu