Add copy-on-click to diagnostic messages
This commit is contained in:
parent
6ed86781b2
commit
11125a62c7
5 changed files with 49 additions and 20 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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue