mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-01-15 17:20:08 +00:00
enshort namespaces, give name to gobject
This commit is contained in:
parent
a1617b2b1b
commit
dd5fada7c7
@ -33,7 +33,7 @@ impl Browser {
|
|||||||
|
|
||||||
// Init widget
|
// Init widget
|
||||||
let widget = Rc::new(Widget::new(
|
let widget = Rc::new(Widget::new(
|
||||||
&window.widget.gobject,
|
&window.widget.g_box,
|
||||||
&[
|
&[
|
||||||
// Connect action groups (to apply accels)
|
// Connect action groups (to apply accels)
|
||||||
(
|
(
|
||||||
@ -53,7 +53,7 @@ impl Browser {
|
|||||||
action.about.connect_activate({
|
action.about.connect_activate({
|
||||||
let window = window.clone();
|
let window = window.clone();
|
||||||
move || {
|
move || {
|
||||||
About::new().present(Some(&window.widget.gobject));
|
About::new().present(Some(&window.widget.g_box));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ use sqlite::Transaction;
|
|||||||
use tab::Tab;
|
use tab::Tab;
|
||||||
use widget::Widget;
|
use widget::Widget;
|
||||||
|
|
||||||
use crate::app::browser::action::Action as BrowserAction;
|
use super::Action as BrowserAction;
|
||||||
use crate::Profile;
|
use crate::Profile;
|
||||||
use gtk::glib::GString;
|
use gtk::glib::GString;
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
|
@ -4,8 +4,7 @@ mod widget;
|
|||||||
use bar::Bar;
|
use bar::Bar;
|
||||||
use widget::Widget;
|
use widget::Widget;
|
||||||
|
|
||||||
use crate::app::browser::action::Action as BrowserAction;
|
use super::{Action as WindowAction, BrowserAction};
|
||||||
use crate::app::browser::window::action::Action as WindowAction;
|
|
||||||
use adw::TabView;
|
use adw::TabView;
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
|
|
||||||
|
@ -2,16 +2,16 @@ use adw::{TabView, ToolbarView};
|
|||||||
use gtk::{prelude::BoxExt, Box, Orientation};
|
use gtk::{prelude::BoxExt, Box, Orientation};
|
||||||
|
|
||||||
pub struct Widget {
|
pub struct Widget {
|
||||||
pub gobject: Box,
|
pub g_box: Box,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Widget {
|
impl Widget {
|
||||||
// Construct
|
// Construct
|
||||||
pub fn new(header: &ToolbarView, tab: &TabView) -> Self {
|
pub fn new(header: &ToolbarView, tab: &TabView) -> Self {
|
||||||
let gobject = Box::builder().orientation(Orientation::Vertical).build();
|
let g_box = Box::builder().orientation(Orientation::Vertical).build();
|
||||||
gobject.append(header);
|
g_box.append(header);
|
||||||
gobject.append(tab);
|
g_box.append(tab);
|
||||||
|
|
||||||
Self { gobject }
|
Self { g_box }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user