Rename {project_panel,contacts_panel}::Toggle
to ToggleFocus
This commit is contained in:
parent
6dc0907745
commit
545f12362c
5 changed files with 12 additions and 8 deletions
|
@ -308,7 +308,7 @@
|
||||||
"cmd-p": "file_finder::Toggle",
|
"cmd-p": "file_finder::Toggle",
|
||||||
"cmd-shift-p": "command_palette::Toggle",
|
"cmd-shift-p": "command_palette::Toggle",
|
||||||
"cmd-shift-m": "diagnostics::Deploy",
|
"cmd-shift-m": "diagnostics::Deploy",
|
||||||
"cmd-shift-e": "project_panel::Toggle",
|
"cmd-shift-e": "project_panel::ToggleFocus",
|
||||||
"cmd-alt-s": "workspace::SaveAll"
|
"cmd-alt-s": "workspace::SaveAll"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -393,7 +393,7 @@
|
||||||
{
|
{
|
||||||
"context": "Workspace",
|
"context": "Workspace",
|
||||||
"bindings": {
|
"bindings": {
|
||||||
"cmd-shift-c": "contacts_panel::Toggle",
|
"cmd-shift-c": "contacts_panel::ToggleFocus",
|
||||||
"cmd-shift-b": "workspace::ToggleRightSidebar"
|
"cmd-shift-b": "workspace::ToggleRightSidebar"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -26,7 +26,7 @@ use std::{ops::DerefMut, sync::Arc};
|
||||||
use theme::IconButton;
|
use theme::IconButton;
|
||||||
use workspace::{sidebar::SidebarItem, JoinProject, ToggleProjectOnline, Workspace};
|
use workspace::{sidebar::SidebarItem, JoinProject, ToggleProjectOnline, Workspace};
|
||||||
|
|
||||||
actions!(contacts_panel, [Toggle]);
|
actions!(contacts_panel, [ToggleFocus]);
|
||||||
|
|
||||||
impl_actions!(
|
impl_actions!(
|
||||||
contacts_panel,
|
contacts_panel,
|
||||||
|
|
|
@ -111,7 +111,7 @@ actions!(
|
||||||
Paste,
|
Paste,
|
||||||
Delete,
|
Delete,
|
||||||
Rename,
|
Rename,
|
||||||
Toggle
|
ToggleFocus
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
impl_internal_actions!(project_panel, [Open, ToggleExpanded, DeployContextMenu]);
|
impl_internal_actions!(project_panel, [Open, ToggleExpanded, DeployContextMenu]);
|
||||||
|
|
|
@ -242,11 +242,11 @@ pub fn menus() -> Vec<Menu<'static>> {
|
||||||
MenuItem::Separator,
|
MenuItem::Separator,
|
||||||
MenuItem::Action {
|
MenuItem::Action {
|
||||||
name: "Project Panel",
|
name: "Project Panel",
|
||||||
action: Box::new(project_panel::Toggle),
|
action: Box::new(project_panel::ToggleFocus),
|
||||||
},
|
},
|
||||||
MenuItem::Action {
|
MenuItem::Action {
|
||||||
name: "Contacts Panel",
|
name: "Contacts Panel",
|
||||||
action: Box::new(contacts_panel::Toggle),
|
action: Box::new(contacts_panel::ToggleFocus),
|
||||||
},
|
},
|
||||||
MenuItem::Action {
|
MenuItem::Action {
|
||||||
name: "Command Palette",
|
name: "Command Palette",
|
||||||
|
|
|
@ -201,12 +201,16 @@ pub fn init(app_state: &Arc<AppState>, cx: &mut gpui::MutableAppContext) {
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
cx.add_action(
|
cx.add_action(
|
||||||
|workspace: &mut Workspace, _: &project_panel::Toggle, cx: &mut ViewContext<Workspace>| {
|
|workspace: &mut Workspace,
|
||||||
|
_: &project_panel::ToggleFocus,
|
||||||
|
cx: &mut ViewContext<Workspace>| {
|
||||||
workspace.toggle_sidebar_item_focus(Side::Left, 0, cx);
|
workspace.toggle_sidebar_item_focus(Side::Left, 0, cx);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
cx.add_action(
|
cx.add_action(
|
||||||
|workspace: &mut Workspace, _: &contacts_panel::Toggle, cx: &mut ViewContext<Workspace>| {
|
|workspace: &mut Workspace,
|
||||||
|
_: &contacts_panel::ToggleFocus,
|
||||||
|
cx: &mut ViewContext<Workspace>| {
|
||||||
workspace.toggle_sidebar_item_focus(Side::Right, 0, cx);
|
workspace.toggle_sidebar_item_focus(Side::Right, 0, cx);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue