Detailed changes
@@ -308,7 +308,7 @@
"cmd-p": "file_finder::Toggle",
"cmd-shift-p": "command_palette::Toggle",
"cmd-shift-m": "diagnostics::Deploy",
- "cmd-shift-e": "project_panel::Toggle",
+ "cmd-shift-e": "project_panel::ToggleFocus",
"cmd-alt-s": "workspace::SaveAll"
}
},
@@ -393,7 +393,7 @@
{
"context": "Workspace",
"bindings": {
- "cmd-shift-c": "contacts_panel::Toggle",
+ "cmd-shift-c": "contacts_panel::ToggleFocus",
"cmd-shift-b": "workspace::ToggleRightSidebar"
}
},
@@ -26,7 +26,7 @@ use std::{ops::DerefMut, sync::Arc};
use theme::IconButton;
use workspace::{sidebar::SidebarItem, JoinProject, ToggleProjectOnline, Workspace};
-actions!(contacts_panel, [Toggle]);
+actions!(contacts_panel, [ToggleFocus]);
impl_actions!(
contacts_panel,
@@ -111,7 +111,7 @@ actions!(
Paste,
Delete,
Rename,
- Toggle
+ ToggleFocus
]
);
impl_internal_actions!(project_panel, [Open, ToggleExpanded, DeployContextMenu]);
@@ -242,11 +242,11 @@ pub fn menus() -> Vec<Menu<'static>> {
MenuItem::Separator,
MenuItem::Action {
name: "Project Panel",
- action: Box::new(project_panel::Toggle),
+ action: Box::new(project_panel::ToggleFocus),
},
MenuItem::Action {
name: "Contacts Panel",
- action: Box::new(contacts_panel::Toggle),
+ action: Box::new(contacts_panel::ToggleFocus),
},
MenuItem::Action {
name: "Command Palette",
@@ -201,12 +201,16 @@ pub fn init(app_state: &Arc<AppState>, cx: &mut gpui::MutableAppContext) {
},
);
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);
},
);
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);
},
);