mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05: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
|
|
@ -11,7 +11,7 @@ use widget::Widget;
|
|||
use crate::app::browser::action::Action as BrowserAction;
|
||||
use crate::app::browser::window::action::Action as WindowAction;
|
||||
use adw::TabView;
|
||||
use gtk::{gio::SimpleAction, Box};
|
||||
use gtk::Box;
|
||||
use std::rc::Rc;
|
||||
|
||||
pub struct Bar {
|
||||
|
|
@ -23,23 +23,12 @@ impl Bar {
|
|||
pub fn new_rc(
|
||||
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,
|
||||
view: &TabView,
|
||||
) -> Rc<Self> {
|
||||
// Init components
|
||||
let control = Control::new_rc();
|
||||
let tab = Tab::new_rc(window_action.clone(), view);
|
||||
let menu = Menu::new_rc(
|
||||
browser_action,
|
||||
window_action,
|
||||
action_page_close,
|
||||
action_page_close_all,
|
||||
action_page_history_back,
|
||||
action_page_history_forward,
|
||||
);
|
||||
let menu = Menu::new_rc(browser_action, window_action);
|
||||
|
||||
// Build result
|
||||
Rc::new(Self {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue