Detailed changes
@@ -7,7 +7,7 @@ use db2::sqlez::{
statement::Statement,
};
use gpui2::{
- point, size, AnyElement, AnyView, AnyWeakView, Bounds, Model, Pixels, Point, View, ViewContext,
+ point, size, AnyElement, AnyWeakView, Bounds, Model, Pixels, Point, View, ViewContext,
};
use parking_lot::Mutex;
use project2::Project;
@@ -2,8 +2,8 @@ use std::any::TypeId;
use crate::{ItemHandle, Pane};
use gpui2::{
- div, AnyView, Component, Div, Element, ParentElement, Render, Styled, Subscription, View,
- ViewContext, WindowContext,
+ div, AnyView, Component, Div, ParentElement, Render, Styled, Subscription, View, ViewContext,
+ WindowContext,
};
use theme2::ActiveTheme;
use util::ResultExt;
@@ -1,5 +1,7 @@
use crate::ItemHandle;
-use gpui2::{AnyView, AppContext, EventEmitter, Render, View, ViewContext, WindowContext};
+use gpui2::{
+ AnyView, AppContext, Entity, EntityId, EventEmitter, Render, View, ViewContext, WindowContext,
+};
pub trait ToolbarItemView: Render + EventEmitter {
fn set_active_pane_item(
@@ -28,7 +30,7 @@ pub trait ToolbarItemView: Render + EventEmitter {
}
trait ToolbarItemViewHandle: Send {
- fn id(&self) -> usize;
+ fn id(&self) -> EntityId;
fn to_any(&self) -> AnyView;
fn set_active_pane_item(
&self,
@@ -258,8 +260,8 @@ impl Toolbar {
}
impl<T: ToolbarItemView> ToolbarItemViewHandle for View<T> {
- fn id(&self) -> usize {
- self.id()
+ fn id(&self) -> EntityId {
+ self.entity_id()
}
fn to_any(&self) -> AnyView {
@@ -1,3 +1,6 @@
+#![allow(unused_variables, dead_code, unused_mut)]
+// todo!() this is to make transition easier.
+
pub mod dock;
pub mod item;
pub mod notifications;
@@ -2999,7 +3002,7 @@ impl Workspace {
}
Some(())
- });
+ })?;
}
Ok(())
}
@@ -1,3 +1,6 @@
+#![allow(unused_variables, dead_code, unused_mut)]
+// todo!() this is to make transition easier.
+
// Allow binary to be called Zed for a nice application menu when running executable directly
#![allow(non_snake_case)]
@@ -24,7 +27,7 @@ use settings::{
default_settings, handle_settings_file_changes, watch_config_file, Settings, SettingsStore,
};
use simplelog::ConfigBuilder;
-use smol::{future::FutureExt, process::Command};
+use smol::process::Command;
use std::{
env,
ffi::OsStr,
@@ -1,3 +1,6 @@
+#![allow(unused_variables, dead_code, unused_mut)]
+// todo!() this is to make transition easier.
+
mod assets;
pub mod languages;
mod only_instance;
@@ -5,7 +8,6 @@ mod open_listener;
pub use assets::*;
use collections::HashMap;
-use client::{Client, UserStore};
use gpui::{
point, px, AppContext, AsyncAppContext, AsyncWindowContext, Point, Task, TitlebarOptions,
WeakView, WindowBounds, WindowKind, WindowOptions,