mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
create separated wrappers for history, close action group
This commit is contained in:
parent
4afa2c204c
commit
8113022cd4
22 changed files with 557 additions and 335 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue