Allow actions to be deserialized from JSON

Introduce separate macro for implementing 'internal' actions which
are not intended to be loaded from keymaps.
This commit is contained in:
Max Brunsfeld 2022-04-08 15:32:56 -07:00
parent 1778622960
commit fd4b81c8fc
26 changed files with 559 additions and 335 deletions

View file

@ -1,5 +1,7 @@
use super::Workspace;
use gpui::{elements::*, impl_actions, platform::CursorStyle, AnyViewHandle, RenderContext};
use gpui::{
elements::*, impl_internal_actions, platform::CursorStyle, AnyViewHandle, RenderContext,
};
use std::{cell::RefCell, rc::Rc};
use theme::Theme;
@ -27,7 +29,7 @@ pub struct ToggleSidebarItem(pub SidebarItemId);
#[derive(Clone)]
pub struct ToggleSidebarItemFocus(pub SidebarItemId);
impl_actions!(workspace, [ToggleSidebarItem, ToggleSidebarItemFocus]);
impl_internal_actions!(workspace, [ToggleSidebarItem, ToggleSidebarItemFocus]);
#[derive(Clone)]
pub struct SidebarItemId {