mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
follow new construction protocol
This commit is contained in:
parent
c03bef9f15
commit
1db706aa5b
7 changed files with 25 additions and 30 deletions
|
|
@ -21,7 +21,7 @@ pub struct Page {
|
|||
// GTK
|
||||
widget: Box,
|
||||
// Components
|
||||
navigation: Navigation,
|
||||
navigation: Arc<Navigation>,
|
||||
content: Arc<Content>,
|
||||
// Extras
|
||||
meta: Arc<RefCell<Meta>>,
|
||||
|
|
@ -29,10 +29,10 @@ pub struct Page {
|
|||
|
||||
impl Page {
|
||||
// Construct
|
||||
pub fn new(name: GString) -> Arc<Page> {
|
||||
pub fn new(name: GString) -> Page {
|
||||
// Init components
|
||||
let content = Content::new();
|
||||
let navigation = Navigation::new();
|
||||
let content = Arc::new(Content::new());
|
||||
let navigation = Arc::new(Navigation::new());
|
||||
|
||||
// Init widget
|
||||
let widget = Box::builder()
|
||||
|
|
@ -47,12 +47,12 @@ impl Page {
|
|||
let meta = Arc::new(RefCell::new(Meta::new()));
|
||||
|
||||
// Result
|
||||
Arc::new(Self {
|
||||
Self {
|
||||
widget,
|
||||
content,
|
||||
navigation,
|
||||
meta,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// Actions
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue