mirror of
https://github.com/zed-industries/zed.git
synced 2024-10-24 15:42:53 +00:00
Renamed open recent action to match menu
This commit is contained in:
parent
070b89243f
commit
ca2e0256e1
3 changed files with 4 additions and 4 deletions
|
@ -38,7 +38,7 @@
|
||||||
"cmd-n": "workspace::NewFile",
|
"cmd-n": "workspace::NewFile",
|
||||||
"cmd-shift-n": "workspace::NewWindow",
|
"cmd-shift-n": "workspace::NewWindow",
|
||||||
"cmd-o": "workspace::Open",
|
"cmd-o": "workspace::Open",
|
||||||
"alt-cmd-o": "recent_projects::Toggle",
|
"alt-cmd-o": "projects::OpenRecent",
|
||||||
"ctrl-`": "workspace::NewTerminal"
|
"ctrl-`": "workspace::NewTerminal"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -13,7 +13,7 @@ use picker::{Picker, PickerDelegate};
|
||||||
use settings::Settings;
|
use settings::Settings;
|
||||||
use workspace::{OpenPaths, Workspace, WorkspaceLocation, WORKSPACE_DB};
|
use workspace::{OpenPaths, Workspace, WorkspaceLocation, WORKSPACE_DB};
|
||||||
|
|
||||||
actions!(recent_projects, [Toggle]);
|
actions!(projects, [OpenRecent]);
|
||||||
|
|
||||||
pub fn init(cx: &mut MutableAppContext) {
|
pub fn init(cx: &mut MutableAppContext) {
|
||||||
cx.add_action(RecentProjectsView::toggle);
|
cx.add_action(RecentProjectsView::toggle);
|
||||||
|
@ -40,7 +40,7 @@ impl RecentProjectsView {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn toggle(_: &mut Workspace, _: &Toggle, cx: &mut ViewContext<Workspace>) {
|
fn toggle(_: &mut Workspace, _: &OpenRecent, cx: &mut ViewContext<Workspace>) {
|
||||||
cx.spawn(|workspace, mut cx| async move {
|
cx.spawn(|workspace, mut cx| async move {
|
||||||
let workspace_locations = cx
|
let workspace_locations = cx
|
||||||
.background()
|
.background()
|
||||||
|
|
|
@ -81,7 +81,7 @@ pub fn menus() -> Vec<Menu<'static>> {
|
||||||
},
|
},
|
||||||
MenuItem::Action {
|
MenuItem::Action {
|
||||||
name: "Open Recent...",
|
name: "Open Recent...",
|
||||||
action: Box::new(recent_projects::Toggle),
|
action: Box::new(recent_projects::OpenRecent),
|
||||||
},
|
},
|
||||||
MenuItem::Separator,
|
MenuItem::Separator,
|
||||||
MenuItem::Action {
|
MenuItem::Action {
|
||||||
|
|
Loading…
Reference in a new issue