mirror of
https://github.com/godotengine/godot
synced 2024-09-05 07:58:39 +00:00
Merge pull request #20455 from Calinou/add-user-data-dropdowns
Add menu buttons to open the project and editor data folders
This commit is contained in:
commit
96ce66e00f
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue