create separated wrapper for home action

This commit is contained in:
yggverse 2024-11-10 10:46:46 +02:00
parent b4dee17768
commit 4afa2c204c
15 changed files with 136 additions and 62 deletions

View file

@ -32,7 +32,6 @@ impl Browser {
profile: Rc<Profile>,
action_page_close: SimpleAction,
action_page_close_all: SimpleAction,
action_page_home: SimpleAction,
action_page_history_back: SimpleAction,
action_page_history_forward: SimpleAction,
) -> Browser {
@ -42,7 +41,6 @@ impl Browser {
action.clone(),
action_page_close.clone(),
action_page_close_all.clone(),
action_page_home.clone(),
action_page_history_back.clone(),
action_page_history_forward.clone(),
));
@ -53,7 +51,6 @@ impl Browser {
&[
action_page_close.clone(),
action_page_close_all.clone(),
action_page_home.clone(),
action_page_history_back.clone(),
action_page_history_forward.clone(),
],
@ -127,13 +124,6 @@ impl Browser {
}
});
action_page_home.connect_activate({
let window = window.clone();
move |this, _| {
window.tab_page_home(page_position_from_action_state(this));
}
});
action_page_history_back.connect_activate({
let window = window.clone();
move |this, _| {