title_bar: Remove dependency on vcs_menu (#21011)

This PR removes the `title_bar` crate's dependency on the `vcs_menu`.

The `vcs_menu::OpenRecent` action now resides at
`zed_actions::branches::OpenRecent`.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-11-21 14:56:02 -05:00 committed by GitHub
parent 6b2f1cc543
commit 4c7b48b35d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 15 additions and 12 deletions

View file

@ -27,7 +27,6 @@ use ui::{
IconSize, IconWithIndicator, Indicator, PopoverMenu, Tooltip,
};
use util::ResultExt;
use vcs_menu::{BranchList, OpenRecent as ToggleVcsMenu};
use workspace::{notifications::NotifyResultExt, Workspace};
use zed_actions::{OpenBrowser, OpenRecent, OpenRemote};
@ -442,14 +441,14 @@ impl TitleBar {
.tooltip(move |cx| {
Tooltip::with_meta(
"Recent Branches",
Some(&ToggleVcsMenu),
Some(&zed_actions::branches::OpenRecent),
"Local branches only",
cx,
)
})
.on_click(move |_, cx| {
let _ = workspace.update(cx, |this, cx| {
BranchList::open(this, &Default::default(), cx);
let _ = workspace.update(cx, |_this, cx| {
cx.dispatch_action(zed_actions::branches::OpenRecent.boxed_clone());
});
}),
)