create separated wrappers for history, close action group

This commit is contained in:
yggverse 2024-11-10 11:53:43 +02:00
parent 4afa2c204c
commit 8113022cd4
22 changed files with 557 additions and 335 deletions

View file

@ -7,7 +7,6 @@ use widget::Widget;
use crate::app::browser::action::Action as BrowserAction;
use crate::app::browser::window::action::Action as WindowAction;
use adw::{TabView, ToolbarView};
use gtk::gio::SimpleAction;
use std::rc::Rc;
pub struct Header {
@ -20,23 +19,11 @@ impl Header {
// Actions
browser_action: Rc<BrowserAction>,
window_action: Rc<WindowAction>,
action_page_close: SimpleAction,
action_page_close_all: SimpleAction,
action_page_history_back: SimpleAction,
action_page_history_forward: SimpleAction,
// Widgets
tab_view: &TabView,
) -> Rc<Self> {
// Init components
let bar = Bar::new_rc(
browser_action,
window_action,
action_page_close,
action_page_close_all,
action_page_history_back,
action_page_history_forward,
tab_view,
);
let bar = Bar::new_rc(browser_action, window_action, tab_view);
// Return new struct
Rc::new(Self {