Merge branch 'main' into collab-titlebar-2
This commit is contained in:
commit
76366422a6
129 changed files with 5610 additions and 1796 deletions
|
@ -140,9 +140,11 @@ pub struct OpenPaths {
|
|||
#[derive(Clone, Deserialize, PartialEq)]
|
||||
pub struct ActivatePane(pub usize);
|
||||
|
||||
#[derive(Deserialize)]
|
||||
pub struct Toast {
|
||||
id: usize,
|
||||
msg: Cow<'static, str>,
|
||||
#[serde(skip)]
|
||||
on_click: Option<(Cow<'static, str>, Arc<dyn Fn(&mut WindowContext)>)>,
|
||||
}
|
||||
|
||||
|
@ -183,9 +185,9 @@ impl Clone for Toast {
|
|||
}
|
||||
}
|
||||
|
||||
pub type WorkspaceId = i64;
|
||||
impl_actions!(workspace, [ActivatePane, Toast]);
|
||||
|
||||
impl_actions!(workspace, [ActivatePane]);
|
||||
pub type WorkspaceId = i64;
|
||||
|
||||
pub fn init_settings(cx: &mut AppContext) {
|
||||
settings::register::<WorkspaceSettings>(cx);
|
||||
|
@ -553,6 +555,10 @@ impl Workspace {
|
|||
}
|
||||
}
|
||||
|
||||
project::Event::Notification(message) => this.show_notification(0, cx, |cx| {
|
||||
cx.add_view(|_| MessageNotification::new(message.clone()))
|
||||
}),
|
||||
|
||||
_ => {}
|
||||
}
|
||||
cx.notify()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue