1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Revert "Add option to copy a file's name in the FileSystem dock"

This reverts commit 2569416881.
This commit is contained in:
Rémi Verschelde
2025-03-21 12:07:03 +01:00
parent 03359c8735
commit 09988ae22b
2 changed files with 0 additions and 15 deletions

View File

@@ -2544,14 +2544,6 @@ void FileSystemDock::_file_option(int p_option, const Vector<String> &p_selected
}
} break;
case FILE_COPY_NAME: {
if (!p_selected.is_empty()) {
const String &fpath = p_selected[0];
const String file_name = fpath.get_file();
DisplayServer::get_singleton()->clipboard_set(file_name);
}
} break;
case FILE_COPY_UID: {
if (!p_selected.is_empty()) {
ResourceUID::ID uid = ResourceLoader::get_resource_uid(p_selected[0]);
@@ -3290,7 +3282,6 @@ void FileSystemDock::_file_and_folders_fill_popup(PopupMenu *p_popup, const Vect
if (p_paths.size() == 1) {
p_popup->add_icon_shortcut(get_editor_theme_icon(SNAME("ActionCopy")), ED_GET_SHORTCUT("filesystem_dock/copy_path"), FILE_COPY_PATH);
p_popup->add_shortcut(ED_GET_SHORTCUT("filesystem_dock/copy_absolute_path"), FILE_COPY_ABSOLUTE_PATH);
p_popup->add_shortcut(ED_GET_SHORTCUT("filesystem_dock/copy_name"), FILE_COPY_NAME);
if (ResourceLoader::get_resource_uid(p_paths[0]) != ResourceUID::INVALID_ID) {
p_popup->add_icon_shortcut(get_editor_theme_icon(SNAME("Instance")), ED_GET_SHORTCUT("filesystem_dock/copy_uid"), FILE_COPY_UID);
}
@@ -3648,8 +3639,6 @@ void FileSystemDock::_tree_gui_input(Ref<InputEvent> p_event) {
_tree_rmb_option(FILE_COPY_PATH);
} else if (ED_IS_SHORTCUT("filesystem_dock/copy_absolute_path", p_event)) {
_tree_rmb_option(FILE_COPY_ABSOLUTE_PATH);
} else if (ED_IS_SHORTCUT("filesystem_dock/copy_name", p_event)) {
_tree_rmb_option(FILE_COPY_NAME);
} else if (ED_IS_SHORTCUT("filesystem_dock/copy_uid", p_event)) {
_tree_rmb_option(FILE_COPY_UID);
} else if (ED_IS_SHORTCUT("filesystem_dock/delete", p_event)) {
@@ -3733,8 +3722,6 @@ void FileSystemDock::_file_list_gui_input(Ref<InputEvent> p_event) {
_file_list_rmb_option(FILE_COPY_PATH);
} else if (ED_IS_SHORTCUT("filesystem_dock/copy_absolute_path", p_event)) {
_file_list_rmb_option(FILE_COPY_ABSOLUTE_PATH);
} else if (ED_IS_SHORTCUT("filesystem_dock/copy_name", p_event)) {
_tree_rmb_option(FILE_COPY_NAME);
} else if (ED_IS_SHORTCUT("filesystem_dock/delete", p_event)) {
_file_list_rmb_option(FILE_REMOVE);
} else if (ED_IS_SHORTCUT("filesystem_dock/rename", p_event)) {
@@ -4055,7 +4042,6 @@ FileSystemDock::FileSystemDock() {
// `KeyModifierMask::CMD_OR_CTRL | Key::C` conflicts with other editor shortcuts.
ED_SHORTCUT("filesystem_dock/copy_path", TTRC("Copy Path"), KeyModifierMask::CMD_OR_CTRL | KeyModifierMask::SHIFT | Key::C);
ED_SHORTCUT("filesystem_dock/copy_absolute_path", TTRC("Copy Absolute Path"), KeyModifierMask::CMD_OR_CTRL | KeyModifierMask::ALT | Key::C);
ED_SHORTCUT("filesystem_dock/copy_name", TTR("Copy Name"));
ED_SHORTCUT("filesystem_dock/copy_uid", TTRC("Copy UID"), KeyModifierMask::CMD_OR_CTRL | KeyModifierMask::ALT | KeyModifierMask::SHIFT | Key::C);
ED_SHORTCUT("filesystem_dock/duplicate", TTRC("Duplicate..."), KeyModifierMask::CMD_OR_CTRL | Key::D);
ED_SHORTCUT("filesystem_dock/delete", TTRC("Delete"), Key::KEY_DELETE);

View File

@@ -121,7 +121,6 @@ private:
FILE_OPEN_IN_TERMINAL,
FILE_COPY_PATH,
FILE_COPY_ABSOLUTE_PATH,
FILE_COPY_NAME,
FILE_COPY_UID,
FOLDER_EXPAND_ALL,
FOLDER_COLLAPSE_ALL,