Implement all but the UI

This commit is contained in:
Mikayla 2023-11-28 15:18:19 -08:00
parent 8faa1f6e58
commit d927c2f497
No known key found for this signature in database
11 changed files with 468 additions and 428 deletions

View file

@ -1808,22 +1808,22 @@ impl Workspace {
pane
}
// pub fn add_item_to_center(
// &mut self,
// item: Box<dyn ItemHandle>,
// cx: &mut ViewContext<Self>,
// ) -> bool {
// if let Some(center_pane) = self.last_active_center_pane.clone() {
// if let Some(center_pane) = center_pane.upgrade(cx) {
// center_pane.update(cx, |pane, cx| pane.add_item(item, true, true, None, cx));
// true
// } else {
// false
// }
// } else {
// false
// }
// }
pub fn add_item_to_center(
&mut self,
item: Box<dyn ItemHandle>,
cx: &mut ViewContext<Self>,
) -> bool {
if let Some(center_pane) = self.last_active_center_pane.clone() {
if let Some(center_pane) = center_pane.upgrade() {
center_pane.update(cx, |pane, cx| pane.add_item(item, true, true, None, cx));
true
} else {
false
}
} else {
false
}
}
pub fn add_item(&mut self, item: Box<dyn ItemHandle>, cx: &mut ViewContext<Self>) {
self.active_pane