diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2016-05-21 14:17:51 +0200 |
---|---|---|
committer | Rémi Verschelde <remi@verschelde.fr> | 2016-05-21 14:17:51 +0200 |
commit | b0a5347a1ceaff56e88d33fb13df2a91abae594f (patch) | |
tree | c10f77c617f663c6e26ac34839ffdf7c5a298cb3 /tools/editor | |
parent | da24bc8f3fa5bb00deb7042b63794f4218dee774 (diff) | |
parent | 83fe6a6bdb057388308bdffa4a492d3af4390179 (diff) |
Merge pull request #4737 from Geequlim/filesystem-show_in_explore
Changes to open dir in native explorer RMB option
Diffstat (limited to 'tools/editor')
-rw-r--r-- | tools/editor/scenes_dock.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/tools/editor/scenes_dock.cpp b/tools/editor/scenes_dock.cpp index 0d55f14a3a..ee4258145e 100644 --- a/tools/editor/scenes_dock.cpp +++ b/tools/editor/scenes_dock.cpp @@ -961,13 +961,8 @@ void ScenesDock::_file_option(int p_option) { String path = files->get_item_metadata(idx); if (p_option == FILE_SHOW_IN_EXPLORER) { - String dir = DirAccess::get_full_path("res://", DirAccess::ACCESS_FILESYSTEM); - const int res_begin = String("res://").length(); - const int last_sep = path.find_last("/"); - if (last_sep > res_begin) { - dir += "/"; - dir += path.substr(res_begin, last_sep - res_begin); - } + String dir = Globals::get_singleton()->globalize_path(path); + dir = dir.substr(0, dir.find_last("/")); OS::get_singleton()->shell_open(String("file://")+dir); return; } @@ -1430,7 +1425,7 @@ void ScenesDock::_files_list_rmb_select(int p_item,const Vector2& p_pos) { //file_options->add_item(TTR("Info"),FILE_INFO); file_options->add_separator(); - file_options->add_item(TTR("Show In System"),FILE_SHOW_IN_EXPLORER); + file_options->add_item(TTR("Show In File Manager"),FILE_SHOW_IN_EXPLORER); file_options->set_pos(files->get_global_pos() + p_pos); file_options->popup(); |