diff --git a/crates/editor/src/actions.rs b/crates/editor/src/actions.rs index c3a994ed96db6..b8f8c7dfbb62a 100644 --- a/crates/editor/src/actions.rs +++ b/crates/editor/src/actions.rs @@ -237,7 +237,7 @@ gpui::actions!( Copy, CopyFileLocation, CopyFileName, - CopyFileNameWithExtension, + CopyFileNameWithoutExtension, CopyHighlightJson, CopyPath, CopyPermalinkToLine, diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index 3e15a63639dce..17b882314059d 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -11334,7 +11334,7 @@ impl Editor { } } - pub fn copy_file_name(&mut self, _: &CopyFileName, cx: &mut ViewContext) { + pub fn copy_file_name_without_extension(&mut self, _: &CopyFileNameWithoutExtension, cx: &mut ViewContext) { if let Some(file) = self.target_file(cx) { if let Some(file_stem) = file.path().file_stem() { if let Some(name) = file_stem.to_str() { @@ -11344,7 +11344,7 @@ impl Editor { } } - pub fn copy_file_name_with_extension(&mut self, _: &CopyFileNameWithExtension, cx: &mut ViewContext) { + pub fn copy_file_name(&mut self, _: &CopyFileName, cx: &mut ViewContext) { if let Some(file) = self.target_file(cx) { if let Some(file_name) = file.path().file_name() { if let Some(name) = file_name.to_str() { diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs index 5544effae27e5..25b0836b67a81 100644 --- a/crates/editor/src/element.rs +++ b/crates/editor/src/element.rs @@ -375,7 +375,7 @@ impl EditorElement { register_action(view, cx, Editor::copy_path); register_action(view, cx, Editor::copy_relative_path); register_action(view, cx, Editor::copy_file_name); - register_action(view, cx, Editor::copy_file_name_with_extension); + register_action(view, cx, Editor::copy_file_name_without_extension); register_action(view, cx, Editor::copy_highlight_json); register_action(view, cx, Editor::copy_permalink_to_line); register_action(view, cx, Editor::open_permalink_to_line); diff --git a/crates/project_panel/src/project_panel.rs b/crates/project_panel/src/project_panel.rs index 40b5ac3fcae25..c97fc474a186c 100644 --- a/crates/project_panel/src/project_panel.rs +++ b/crates/project_panel/src/project_panel.rs @@ -178,7 +178,7 @@ actions!( CopyPath, CopyRelativePath, CopyFileName, - CopyFileNameWithExtension, + CopyFileNameWithoutExtension, Duplicate, RevealInFileManager, RemoveFromProject, @@ -679,8 +679,8 @@ impl ProjectPanel { .separator() .action("Copy Path", Box::new(CopyPath)) .action("Copy Relative Path", Box::new(CopyRelativePath)) - .action("Copy File Name", Box::new(CopyFileName)) - .action("Copy File Name with Extension", Box::new(CopyFileNameWithExtension)) + .action("Copy File Name without Extension", Box::new(CopyFileName)) + .action("Copy File Name", Box::new(CopyFileNameWithoutExtension)) .separator() .action("Rename", Box::new(Rename)) .when(!is_root & !is_remote, |menu| { @@ -1963,7 +1963,7 @@ impl ProjectPanel { } } - fn copy_file_name(&mut self, _: &CopyFileName, cx: &mut ViewContext) { + fn copy_file_name_without_extension(&mut self, _: &CopyFileNameWithoutExtension, cx: &mut ViewContext) { let file_names = { let project = self.project.read(cx); self.marked_entries() @@ -1980,7 +1980,7 @@ impl ProjectPanel { } } - fn copy_file_name_with_extension(&mut self, _: &CopyFileNameWithExtension, cx: &mut ViewContext) { + fn copy_file_name(&mut self, _: &CopyFileName, cx: &mut ViewContext) { let file_names = { let project = self.project.read(cx); self.marked_entries() @@ -3964,7 +3964,7 @@ impl Render for ProjectPanel { .on_action(cx.listener(Self::copy_path)) .on_action(cx.listener(Self::copy_relative_path)) .on_action(cx.listener(Self::copy_file_name)) - .on_action(cx.listener(Self::copy_file_name_with_extension)) + .on_action(cx.listener(Self::copy_file_name_without_extension)) .on_action(cx.listener(Self::new_search_in_directory)) .on_action(cx.listener(Self::unfold_directory)) .on_action(cx.listener(Self::fold_directory)) diff --git a/crates/workspace/src/pane.rs b/crates/workspace/src/pane.rs index 005ee485febcd..6fed08df1068a 100644 --- a/crates/workspace/src/pane.rs +++ b/crates/workspace/src/pane.rs @@ -7,7 +7,7 @@ use crate::{ notifications::NotifyResultExt, toolbar::Toolbar, workspace_settings::{AutosaveSetting, TabBarSettings, WorkspaceSettings}, - CloseWindow, CopyPath, CopyRelativePath, CopyFileName, CopyFileNameWithExtension, NewFile, NewTerminal, OpenInTerminal, OpenTerminal, + CloseWindow, CopyPath, CopyRelativePath, CopyFileName, CopyFileNameWithoutExtension, NewFile, NewTerminal, OpenInTerminal, OpenTerminal, OpenVisible, SplitDirection, ToggleFileFinder, ToggleProjectSymbols, ToggleZoom, Workspace, }; use anyhow::Result; @@ -2372,8 +2372,8 @@ impl Pane { }) .when_some(relative_path.clone(), |menu, relative_path| { menu.entry( - "Copy File Name with Extension", - Some(Box::new(CopyFileNameWithExtension)), + "Copy File Name without Extension", + Some(Box::new(CopyFileNameWithoutExtension)), cx.handler_for(&pane, move |_, cx| { if let Some(name) = relative_path.file_name() { cx.write_to_clipboard(ClipboardItem::new_string( diff --git a/crates/workspace/src/workspace.rs b/crates/workspace/src/workspace.rs index a3194c25e40fe..f9df9060269d2 100644 --- a/crates/workspace/src/workspace.rs +++ b/crates/workspace/src/workspace.rs @@ -136,7 +136,7 @@ actions!( CopyPath, CopyRelativePath, CopyFileName, - CopyFileNameWithExtension, + CopyFileNameWithoutExtension, Feedback, FollowNextCollaborator, NewCenterTerminal,