Pane context menus & focus shenanigans
Co-Authored-By: Conrad Irwin <conrad@zed.dev>
This commit is contained in:
parent
21dfe58ad9
commit
d516ae0d8a
3 changed files with 176 additions and 133 deletions
|
@ -3587,87 +3587,6 @@ fn open_items(
|
|||
})
|
||||
}
|
||||
|
||||
// todo!()
|
||||
// fn notify_of_new_dock(workspace: &WeakView<Workspace>, cx: &mut AsyncAppContext) {
|
||||
// const NEW_PANEL_BLOG_POST: &str = "https://zed.dev/blog/new-panel-system";
|
||||
// const NEW_DOCK_HINT_KEY: &str = "show_new_dock_key";
|
||||
// const MESSAGE_ID: usize = 2;
|
||||
|
||||
// if workspace
|
||||
// .read_with(cx, |workspace, cx| {
|
||||
// workspace.has_shown_notification_once::<MessageNotification>(MESSAGE_ID, cx)
|
||||
// })
|
||||
// .unwrap_or(false)
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// if db::kvp::KEY_VALUE_STORE
|
||||
// .read_kvp(NEW_DOCK_HINT_KEY)
|
||||
// .ok()
|
||||
// .flatten()
|
||||
// .is_some()
|
||||
// {
|
||||
// if !workspace
|
||||
// .read_with(cx, |workspace, cx| {
|
||||
// workspace.has_shown_notification_once::<MessageNotification>(MESSAGE_ID, cx)
|
||||
// })
|
||||
// .unwrap_or(false)
|
||||
// {
|
||||
// cx.update(|cx| {
|
||||
// cx.update_global::<NotificationTracker, _, _>(|tracker, _| {
|
||||
// let entry = tracker
|
||||
// .entry(TypeId::of::<MessageNotification>())
|
||||
// .or_default();
|
||||
// if !entry.contains(&MESSAGE_ID) {
|
||||
// entry.push(MESSAGE_ID);
|
||||
// }
|
||||
// });
|
||||
// });
|
||||
// }
|
||||
|
||||
// return;
|
||||
// }
|
||||
|
||||
// cx.spawn(|_| async move {
|
||||
// db::kvp::KEY_VALUE_STORE
|
||||
// .write_kvp(NEW_DOCK_HINT_KEY.to_string(), "seen".to_string())
|
||||
// .await
|
||||
// .ok();
|
||||
// })
|
||||
// .detach();
|
||||
|
||||
// workspace
|
||||
// .update(cx, |workspace, cx| {
|
||||
// workspace.show_notification_once(2, cx, |cx| {
|
||||
// cx.build_view(|_| {
|
||||
// MessageNotification::new_element(|text, _| {
|
||||
// Text::new(
|
||||
// "Looking for the dock? Try ctrl-`!\nshift-escape now zooms your pane.",
|
||||
// text,
|
||||
// )
|
||||
// .with_custom_runs(vec![26..32, 34..46], |_, bounds, cx| {
|
||||
// let code_span_background_color = settings::get::<ThemeSettings>(cx)
|
||||
// .theme
|
||||
// .editor
|
||||
// .document_highlight_read_background;
|
||||
|
||||
// cx.scene().push_quad(gpui::Quad {
|
||||
// bounds,
|
||||
// background: Some(code_span_background_color),
|
||||
// border: Default::default(),
|
||||
// corner_radii: (2.0).into(),
|
||||
// })
|
||||
// })
|
||||
// .into_any()
|
||||
// })
|
||||
// .with_click_message("Read more about the new panel system")
|
||||
// .on_click(|cx| cx.platform().open_url(NEW_PANEL_BLOG_POST))
|
||||
// })
|
||||
// })
|
||||
// })
|
||||
// .ok();
|
||||
|
||||
fn notify_if_database_failed(workspace: WindowHandle<Workspace>, cx: &mut AsyncAppContext) {
|
||||
const REPORT_ISSUE_URL: &str ="https://github.com/zed-industries/community/issues/new?assignees=&labels=defect%2Ctriage&template=2_bug_report.yml";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue