diff --git a/crates/sidebar/src/sidebar.rs b/crates/sidebar/src/sidebar.rs index 17a82997e26fca9c3670d1e4924b2945989e912c..fe1f97112c2e2f8231971da3aae24e0c73eab710 100644 --- a/crates/sidebar/src/sidebar.rs +++ b/crates/sidebar/src/sidebar.rs @@ -45,7 +45,7 @@ use util::ResultExt as _; use util::path_list::{PathList, SerializedPathList}; use workspace::{ AddFolderToProject, CloseWindow, FocusWorkspaceSidebar, MoveWorkspaceToNewWindow, - MultiWorkspace, MultiWorkspaceEvent, NextProjectGroup, NextThread, Open, PreviousProjectGroup, + MultiWorkspace, MultiWorkspaceEvent, NextProject, NextThread, Open, PreviousProject, PreviousThread, ShowFewerThreads, ShowMoreThreads, Sidebar as WorkspaceSidebar, SidebarSide, ToggleWorkspaceSidebar, Workspace, WorkspaceId, sidebar_side_context_menu, }; @@ -3084,7 +3084,7 @@ impl Sidebar { Some(mw.workspace().read(cx).project_group_key(cx)) } - fn cycle_project_group_impl( + fn cycle_project_impl( &mut self, forward: bool, window: &mut Window, @@ -3134,22 +3134,22 @@ impl Sidebar { } } - fn on_next_project_group( + fn on_next_project( &mut self, - _: &NextProjectGroup, + _: &NextProject, window: &mut Window, cx: &mut Context, ) { - self.cycle_project_group_impl(true, window, cx); + self.cycle_project_impl(true, window, cx); } - fn on_previous_project_group( + fn on_previous_project( &mut self, - _: &PreviousProjectGroup, + _: &PreviousProject, window: &mut Window, cx: &mut Context, ) { - self.cycle_project_group_impl(false, window, cx); + self.cycle_project_impl(false, window, cx); } fn cycle_thread_impl(&mut self, forward: bool, window: &mut Window, cx: &mut Context) { @@ -3842,8 +3842,8 @@ impl WorkspaceSidebar for Sidebar { self.toggle_thread_switcher_impl(select_last, window, cx); } - fn cycle_project_group(&mut self, forward: bool, window: &mut Window, cx: &mut Context) { - self.cycle_project_group_impl(forward, window, cx); + fn cycle_project(&mut self, forward: bool, window: &mut Window, cx: &mut Context) { + self.cycle_project_impl(forward, window, cx); } fn cycle_thread(&mut self, forward: bool, window: &mut Window, cx: &mut Context) { @@ -3949,8 +3949,8 @@ impl Render for Sidebar { .on_action(cx.listener(Self::toggle_archive)) .on_action(cx.listener(Self::focus_sidebar_filter)) .on_action(cx.listener(Self::on_toggle_thread_switcher)) - .on_action(cx.listener(Self::on_next_project_group)) - .on_action(cx.listener(Self::on_previous_project_group)) + .on_action(cx.listener(Self::on_next_project)) + .on_action(cx.listener(Self::on_previous_project)) .on_action(cx.listener(Self::on_next_thread)) .on_action(cx.listener(Self::on_previous_thread)) .on_action(cx.listener(Self::on_show_more_threads)) diff --git a/crates/workspace/src/multi_workspace.rs b/crates/workspace/src/multi_workspace.rs index a52246d3c40288e08e70ca5da3789d4493df3a44..19699bcd9743ffb5098636e4b2091c30e1091574 100644 --- a/crates/workspace/src/multi_workspace.rs +++ b/crates/workspace/src/multi_workspace.rs @@ -40,10 +40,10 @@ actions!( CloseWorkspaceSidebar, /// Moves focus to or from the workspace sidebar without closing it. FocusWorkspaceSidebar, - /// Activates the next project group in the sidebar. - NextProjectGroup, - /// Activates the previous project group in the sidebar. - PreviousProjectGroup, + /// Activates the next project in the sidebar. + NextProject, + /// Activates the previous project in the sidebar. + PreviousProject, /// Activates the next thread in sidebar order. NextThread, /// Activates the previous thread in sidebar order. @@ -130,7 +130,7 @@ pub trait Sidebar: Focusable + Render + EventEmitter + Sized { } /// Activates the next or previous project group. - fn cycle_project_group( + fn cycle_project( &mut self, _forward: bool, _window: &mut Window, @@ -169,7 +169,7 @@ pub trait SidebarHandle: 'static + Send + Sync { fn to_any(&self) -> AnyView; fn entity_id(&self) -> EntityId; fn toggle_thread_switcher(&self, select_last: bool, window: &mut Window, cx: &mut App); - fn cycle_project_group(&self, forward: bool, window: &mut Window, cx: &mut App); + fn cycle_project(&self, forward: bool, window: &mut Window, cx: &mut App); fn cycle_thread(&self, forward: bool, window: &mut Window, cx: &mut App); fn move_workspace_to_new_window(&self, window: &mut Window, cx: &mut App); @@ -232,11 +232,11 @@ impl SidebarHandle for Entity { }); } - fn cycle_project_group(&self, forward: bool, window: &mut Window, cx: &mut App) { + fn cycle_project(&self, forward: bool, window: &mut Window, cx: &mut App) { let entity = self.clone(); window.defer(cx, move |window, cx| { entity.update(cx, |this, cx| { - this.cycle_project_group(forward, window, cx); + this.cycle_project(forward, window, cx); }); }); } @@ -1514,16 +1514,16 @@ impl Render for MultiWorkspace { }, )) .on_action( - cx.listener(|this: &mut Self, _: &NextProjectGroup, window, cx| { + cx.listener(|this: &mut Self, _: &NextProject, window, cx| { if let Some(sidebar) = &this.sidebar { - sidebar.cycle_project_group(true, window, cx); + sidebar.cycle_project(true, window, cx); } - }), - ) + }, + )) .on_action(cx.listener( - |this: &mut Self, _: &PreviousProjectGroup, window, cx| { + |this: &mut Self, _: &PreviousProject, window, cx| { if let Some(sidebar) = &this.sidebar { - sidebar.cycle_project_group(false, window, cx); + sidebar.cycle_project(false, window, cx); } }, )) diff --git a/crates/workspace/src/workspace.rs b/crates/workspace/src/workspace.rs index ba4c81592d3b6e4030d45cb5da1dc4299673d14a..a5d0048ad89f500d78a1376b2c4700708718f6d0 100644 --- a/crates/workspace/src/workspace.rs +++ b/crates/workspace/src/workspace.rs @@ -32,8 +32,8 @@ pub use crate::notifications::NotificationFrame; pub use dock::Panel; pub use multi_workspace::{ CloseWorkspaceSidebar, DraggedSidebar, FocusWorkspaceSidebar, MoveWorkspaceToNewWindow, - MultiWorkspace, MultiWorkspaceEvent, NewThread, NextProjectGroup, NextThread, - PreviousProjectGroup, PreviousThread, ShowFewerThreads, ShowMoreThreads, Sidebar, SidebarEvent, + MultiWorkspace, MultiWorkspaceEvent, NewThread, NextProject, NextThread, PreviousProject, + PreviousThread, ShowFewerThreads, ShowMoreThreads, Sidebar, SidebarEvent, SidebarHandle, SidebarRenderState, SidebarSide, ToggleWorkspaceSidebar, sidebar_side_context_menu, };