Reveal in files instead of Finder (#13432)
fixes: #12776 Release Notes: - Renamed `editor::RevealInFinder` to `editor::RevealInFileManager` --------- Co-authored-by: Mikayla Maki <mikayla@zed.dev>
This commit is contained in:
parent
f44e81b3b5
commit
2dd486733b
9 changed files with 38 additions and 21 deletions
|
@ -57,7 +57,7 @@ actions!(
|
|||
CollapseAllEntries,
|
||||
CopyPath,
|
||||
CopyRelativePath,
|
||||
RevealInFinder,
|
||||
RevealInFileManager,
|
||||
Open,
|
||||
ToggleFocus,
|
||||
UnfoldDirectory,
|
||||
|
@ -796,7 +796,12 @@ impl OutlinePanel {
|
|||
|
||||
let context_menu = ContextMenu::build(cx, |menu, _| {
|
||||
menu.context(self.focus_handle.clone())
|
||||
.action("Reveal in Finder", Box::new(RevealInFinder))
|
||||
.when(cfg!(target_os = "macos"), |menu| {
|
||||
menu.action("Reveal in Finder", Box::new(RevealInFileManager))
|
||||
})
|
||||
.when(cfg!(not(target_os = "macos")), |menu| {
|
||||
menu.action("Reveal in File Manager", Box::new(RevealInFileManager))
|
||||
})
|
||||
.action("Open in Terminal", Box::new(OpenInTerminal))
|
||||
.when(is_unfoldable, |menu| {
|
||||
menu.action("Unfold Directory", Box::new(UnfoldDirectory))
|
||||
|
@ -1079,7 +1084,7 @@ impl OutlinePanel {
|
|||
}
|
||||
}
|
||||
|
||||
fn reveal_in_finder(&mut self, _: &RevealInFinder, cx: &mut ViewContext<Self>) {
|
||||
fn reveal_in_finder(&mut self, _: &RevealInFileManager, cx: &mut ViewContext<Self>) {
|
||||
if let Some(abs_path) = self
|
||||
.selected_entry
|
||||
.as_ref()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue