mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
create separated wrapper for pin action
This commit is contained in:
parent
e47c22ac92
commit
33b22ca30a
11 changed files with 152 additions and 54 deletions
|
|
@ -36,7 +36,6 @@ impl Browser {
|
|||
action_page_history_back: SimpleAction,
|
||||
action_page_history_forward: SimpleAction,
|
||||
action_page_reload: SimpleAction,
|
||||
action_page_pin: SimpleAction,
|
||||
) -> Browser {
|
||||
// Init components
|
||||
let action = Rc::new(Action::new());
|
||||
|
|
@ -48,7 +47,6 @@ impl Browser {
|
|||
action_page_history_back.clone(),
|
||||
action_page_history_forward.clone(),
|
||||
action_page_reload.clone(),
|
||||
action_page_pin.clone(),
|
||||
));
|
||||
|
||||
// Init widget
|
||||
|
|
@ -61,7 +59,6 @@ impl Browser {
|
|||
action_page_history_back.clone(),
|
||||
action_page_history_forward.clone(),
|
||||
action_page_reload.clone(),
|
||||
action_page_pin.clone(),
|
||||
],
|
||||
));
|
||||
|
||||
|
|
@ -159,13 +156,6 @@ impl Browser {
|
|||
move |this, _| window.tab_page_reload(page_position_from_action_state(this))
|
||||
});
|
||||
|
||||
action_page_pin.connect_activate({
|
||||
let window = window.clone();
|
||||
move |this, _| {
|
||||
window.tab_pin(page_position_from_action_state(this));
|
||||
}
|
||||
});
|
||||
|
||||
// Return new activated `Self`
|
||||
Self {
|
||||
action,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue