Remove cx param

This commit is contained in:
Conrad Irwin 2023-12-04 23:35:31 +00:00
parent c82fea375d
commit 1c9b984738
7 changed files with 31 additions and 64 deletions

View file

@ -1531,24 +1531,17 @@ impl Pane {
menu.action(
"Close Active Item",
CloseActiveItem { save_intent: None }.boxed_clone(),
cx,
)
.action("Close Inactive Items", CloseInactiveItems.boxed_clone(), cx)
.action("Close Clean Items", CloseCleanItems.boxed_clone(), cx)
.action(
"Close Items To The Left",
CloseItemsToTheLeft.boxed_clone(),
cx,
)
.action("Close Inactive Items", CloseInactiveItems.boxed_clone())
.action("Close Clean Items", CloseCleanItems.boxed_clone())
.action("Close Items To The Left", CloseItemsToTheLeft.boxed_clone())
.action(
"Close Items To The Right",
CloseItemsToTheRight.boxed_clone(),
cx,
)
.action(
"Close All Items",
CloseAllItems { save_intent: None }.boxed_clone(),
cx,
)
})
})
@ -1627,17 +1620,12 @@ impl Pane {
.child(IconButton::new("plus", Icon::Plus).on_click(
cx.listener(|this, _, cx| {
let menu = ContextMenu::build(cx, |menu, cx| {
menu.action("New File", NewFile.boxed_clone(), cx)
menu.action("New File", NewFile.boxed_clone())
.action(
"New Terminal",
NewCenterTerminal.boxed_clone(),
cx,
)
.action(
"New Search",
NewSearch.boxed_clone(),
cx,
)
.action("New Search", NewSearch.boxed_clone())
});
cx.subscribe(
&menu,
@ -1661,14 +1649,10 @@ impl Pane {
.child(IconButton::new("split", Icon::Split).on_click(
cx.listener(|this, _, cx| {
let menu = ContextMenu::build(cx, |menu, cx| {
menu.action(
"Split Right",
SplitRight.boxed_clone(),
cx,
)
.action("Split Left", SplitLeft.boxed_clone(), cx)
.action("Split Up", SplitUp.boxed_clone(), cx)
.action("Split Down", SplitDown.boxed_clone(), cx)
menu.action("Split Right", SplitRight.boxed_clone())
.action("Split Left", SplitLeft.boxed_clone())
.action("Split Up", SplitUp.boxed_clone())
.action("Split Down", SplitDown.boxed_clone())
});
cx.subscribe(
&menu,