mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-02-11 02:44:15 +00:00
return new mod object as arc pointer
This commit is contained in:
parent
652671407e
commit
daf276c006
@ -19,13 +19,13 @@ pub struct Browser {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Browser {
|
impl Browser {
|
||||||
// Construct new browser
|
// Construct
|
||||||
pub fn new(
|
pub fn new(
|
||||||
app: &Application,
|
app: &Application,
|
||||||
connection: Arc<sqlite::Connection>, // @TODO glib clone macro?
|
connection: Arc<sqlite::Connection>,
|
||||||
default_width: i32,
|
default_width: i32,
|
||||||
default_height: i32,
|
default_height: i32,
|
||||||
) -> Browser {
|
) -> Arc<Browser> {
|
||||||
// Init components
|
// Init components
|
||||||
let db = db::Browser::new(connection);
|
let db = db::Browser::new(connection);
|
||||||
let header = header::Header::new();
|
let header = header::Header::new();
|
||||||
@ -62,12 +62,12 @@ impl Browser {
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
// Return
|
// Return
|
||||||
Self {
|
Arc::new(Self {
|
||||||
db,
|
db,
|
||||||
widget,
|
widget,
|
||||||
header,
|
header,
|
||||||
main,
|
main,
|
||||||
}
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// Getters
|
// Getters
|
||||||
|
Loading…
x
Reference in New Issue
Block a user