optimize clone semantics, enshort namespaces

This commit is contained in:
yggverse 2025-01-11 20:56:53 +02:00
parent fd9f69a9f0
commit eabd16aaf7
20 changed files with 134 additions and 114 deletions

View file

@ -8,8 +8,7 @@ use menu::Menu;
use tab::Tab;
use widget::Widget;
use crate::app::browser::action::Action as BrowserAction;
use crate::app::browser::window::action::Action as WindowAction;
use super::{BrowserAction, Profile, WindowAction};
use adw::TabView;
use std::rc::Rc;
@ -21,13 +20,13 @@ impl Bar {
// Constructors
pub fn new(
browser_action: Rc<BrowserAction>,
window_action: Rc<WindowAction>,
(browser_action, window_action): (&Rc<BrowserAction>, &Rc<WindowAction>),
profile: &Rc<Profile>,
view: &TabView,
) -> Self {
let control = Control::new();
let tab = Tab::new(window_action.clone(), view);
let menu = Menu::new(browser_action, window_action);
let tab = Tab::new(window_action, view);
let menu = Menu::new((browser_action, window_action), profile);
Self {
widget: Rc::new(Widget::new(
&control.widget.gobject,