Remove unused dock code
This commit is contained in:
parent
0a4633f88f
commit
fe6a1886c1
1 changed files with 2 additions and 32 deletions
|
@ -14,7 +14,7 @@ use futures::{
|
||||||
channel::{mpsc, oneshot},
|
channel::{mpsc, oneshot},
|
||||||
FutureExt, SinkExt, StreamExt,
|
FutureExt, SinkExt, StreamExt,
|
||||||
};
|
};
|
||||||
use gpui::{Action, App, AppContext, AssetSource, AsyncAppContext, Task, ViewContext};
|
use gpui::{Action, App, AppContext, AssetSource, AsyncAppContext, Task};
|
||||||
use isahc::{config::Configurable, Request};
|
use isahc::{config::Configurable, Request};
|
||||||
use language::{LanguageRegistry, Point};
|
use language::{LanguageRegistry, Point};
|
||||||
use log::LevelFilter;
|
use log::LevelFilter;
|
||||||
|
@ -43,7 +43,6 @@ use std::{
|
||||||
time::{Duration, SystemTime, UNIX_EPOCH},
|
time::{Duration, SystemTime, UNIX_EPOCH},
|
||||||
};
|
};
|
||||||
use sum_tree::Bias;
|
use sum_tree::Bias;
|
||||||
use terminal_view::{get_working_directory, TerminalSettings, TerminalView};
|
|
||||||
use util::{
|
use util::{
|
||||||
channel::ReleaseChannel,
|
channel::ReleaseChannel,
|
||||||
http::{self, HttpClient},
|
http::{self, HttpClient},
|
||||||
|
@ -56,7 +55,7 @@ use fs::RealFs;
|
||||||
#[cfg(debug_assertions)]
|
#[cfg(debug_assertions)]
|
||||||
use staff_mode::StaffMode;
|
use staff_mode::StaffMode;
|
||||||
use util::{channel::RELEASE_CHANNEL, paths, ResultExt, TryFutureExt};
|
use util::{channel::RELEASE_CHANNEL, paths, ResultExt, TryFutureExt};
|
||||||
use workspace::{item::ItemHandle, notifications::NotifyResultExt, AppState, Workspace};
|
use workspace::AppState;
|
||||||
use zed::{
|
use zed::{
|
||||||
assets::Assets,
|
assets::Assets,
|
||||||
build_window_options, handle_keymap_file_changes, initialize_workspace, languages, menus,
|
build_window_options, handle_keymap_file_changes, initialize_workspace, languages, menus,
|
||||||
|
@ -922,35 +921,6 @@ async fn handle_cli_connection(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn dock_default_item_factory(
|
|
||||||
workspace: &mut Workspace,
|
|
||||||
cx: &mut ViewContext<Workspace>,
|
|
||||||
) -> Option<Box<dyn ItemHandle>> {
|
|
||||||
let strategy = settings::get::<TerminalSettings>(cx)
|
|
||||||
.working_directory
|
|
||||||
.clone();
|
|
||||||
let working_directory = get_working_directory(workspace, cx, strategy);
|
|
||||||
|
|
||||||
let window = cx.window();
|
|
||||||
let terminal = workspace
|
|
||||||
.project()
|
|
||||||
.update(cx, |project, cx| {
|
|
||||||
project.create_terminal(working_directory, window, cx)
|
|
||||||
})
|
|
||||||
.notify_err(workspace, cx)?;
|
|
||||||
|
|
||||||
let terminal_view = cx.add_view(|cx| {
|
|
||||||
TerminalView::new(
|
|
||||||
terminal,
|
|
||||||
workspace.weak_handle(),
|
|
||||||
workspace.database_id(),
|
|
||||||
cx,
|
|
||||||
)
|
|
||||||
});
|
|
||||||
|
|
||||||
Some(Box::new(terminal_view))
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn background_actions() -> &'static [(&'static str, &'static dyn Action)] {
|
pub fn background_actions() -> &'static [(&'static str, &'static dyn Action)] {
|
||||||
&[
|
&[
|
||||||
("Go to file", &file_finder::Toggle),
|
("Go to file", &file_finder::Toggle),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue