summaryrefslogtreecommitdiff
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
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
-rw-r--r--editor/editor_node.cpp27
-rw-r--r--editor/editor_node.h3
2 files changed, 30 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
diff --git a/editor/editor_node.h b/editor/editor_node.h
index 38e68b2e09..b7224c9393 100644
--- a/editor/editor_node.h
+++ b/editor/editor_node.h
@@ -154,6 +154,7 @@ private:
RUN_PLAY_CUSTOM_SCENE,
RUN_SCENE_SETTINGS,
RUN_SETTINGS,
+ RUN_PROJECT_DATA_FOLDER,
RUN_PROJECT_MANAGER,
RUN_FILE_SERVER,
RUN_LIVE_DEBUG,
@@ -168,6 +169,8 @@ private:
SETTINGS_LAYOUT_SAVE,
SETTINGS_LAYOUT_DELETE,
SETTINGS_LAYOUT_DEFAULT,
+ SETTINGS_EDITOR_DATA_FOLDER,
+ SETTINGS_EDITOR_CONFIG_FOLDER,
SETTINGS_MANAGE_EXPORT_TEMPLATES,
SETTINGS_PICK_MAIN_SCENE,
SETTINGS_TOGGLE_FULLSCREEN,