diff options
author | Attilio Oliva <attilioo92@gmail.com> | 2017-04-24 17:54:51 +0200 |
---|---|---|
committer | Attilio Oliva <attilioo92@gmail.com> | 2017-04-24 22:18:24 +0200 |
commit | 0af6c39f36f4f1d302133cb826cfd1e934c1eee9 (patch) | |
tree | 0992d8262eed529cb4da6d550b882e8a1d82f43c /editor | |
parent | b6e0eaf3ca74d9777c6869d8519db6264866d1e6 (diff) |
Right-clicking a folder in the FileSystem panel now gives the option Show in file manager
Diffstat (limited to 'editor')
-rw-r--r-- | editor/filesystem_dock.cpp | 8 | ||||
-rw-r--r-- | editor/filesystem_dock.h | 3 |
2 files changed, 10 insertions, 1 deletions
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp index 9d10117418..fd830efec3 100644 --- a/editor/filesystem_dock.cpp +++ b/editor/filesystem_dock.cpp @@ -1064,6 +1064,11 @@ void FileSystemDock::_folder_option(int p_option) { child = child->get_next(); } break; + case FOLDER_SHOW_IN_EXPLORER: + String path = item->get_metadata(tree->get_selected_column()); + String dir = GlobalConfig::get_singleton()->globalize_path(path); + OS::get_singleton()->shell_open(String("file://") + dir); + return; } } @@ -1102,6 +1107,9 @@ void FileSystemDock::_dir_rmb_pressed(const Vector2 &p_pos) { folder_options->add_item(TTR("Expand all"), FOLDER_EXPAND_ALL); folder_options->add_item(TTR("Collapse all"), FOLDER_COLLAPSE_ALL); + folder_options->add_separator(); + folder_options->add_item(TTR("Show In File Manager"), FOLDER_SHOW_IN_EXPLORER); + folder_options->set_position(tree->get_global_position() + p_pos); folder_options->popup(); } diff --git a/editor/filesystem_dock.h b/editor/filesystem_dock.h index 2b85cfa96d..77898aa6c2 100644 --- a/editor/filesystem_dock.h +++ b/editor/filesystem_dock.h @@ -76,7 +76,8 @@ private: enum FolderMenu { FOLDER_EXPAND_ALL, - FOLDER_COLLAPSE_ALL + FOLDER_COLLAPSE_ALL, + FOLDER_SHOW_IN_EXPLORER }; VBoxContainer *scanning_vb; |