title_bar: Remove dependency on recent_projects (#20942)

Use actions defined in zed_actions to interface with that crate instead.
One drawback of this is that we now hide call controls when any modal is
visible (we used to hide them just when ssh modal was deployed).

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2024-11-21 00:43:03 +01:00 committed by GitHub
parent 33bed8d680
commit 335b112abd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 22 additions and 30 deletions

View file

@ -40,6 +40,7 @@ ui.workspace = true
util.workspace = true
workspace.workspace = true
paths.workspace = true
zed_actions.workspace = true
[dev-dependencies]
editor = { workspace = true, features = ["test-support"] }

View file

@ -16,7 +16,6 @@ use picker::{
Picker, PickerDelegate,
};
pub use remote_servers::RemoteServerProjects;
use serde::Deserialize;
use settings::Settings;
pub use ssh_connections::SshSettings;
use std::{
@ -29,19 +28,7 @@ use workspace::{
CloseIntent, ModalView, OpenOptions, SerializedWorkspaceLocation, Workspace, WorkspaceId,
WORKSPACE_DB,
};
#[derive(PartialEq, Clone, Deserialize, Default)]
pub struct OpenRecent {
#[serde(default = "default_create_new_window")]
pub create_new_window: bool,
}
fn default_create_new_window() -> bool {
false
}
gpui::impl_actions!(projects, [OpenRecent]);
gpui::actions!(projects, [OpenRemote]);
use zed_actions::{OpenRecent, OpenRemote};
pub fn init(cx: &mut AppContext) {
SshSettings::register(cx);