mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 00:55:28 +00:00
rename constructors
This commit is contained in:
parent
941b1cc283
commit
edb385f903
36 changed files with 266 additions and 180 deletions
10
src/app.rs
10
src/app.rs
|
|
@ -20,15 +20,17 @@ pub struct App {
|
|||
}
|
||||
|
||||
impl App {
|
||||
// Construct
|
||||
pub fn new(profile: Rc<Profile>) -> Self {
|
||||
// Constructors
|
||||
|
||||
/// Build new `Self`
|
||||
pub fn build(profile: &Rc<Profile>) -> Self {
|
||||
// Init GTK
|
||||
let application = Application::builder()
|
||||
.application_id(APPLICATION_ID)
|
||||
.build();
|
||||
|
||||
// Init components
|
||||
let browser = Rc::new(Browser::new(profile.clone()));
|
||||
let browser = Rc::new(Browser::build(profile));
|
||||
|
||||
// Init events
|
||||
application.connect_activate({
|
||||
|
|
@ -250,7 +252,7 @@ impl App {
|
|||
|
||||
// Return activated App struct
|
||||
Self {
|
||||
profile,
|
||||
profile: profile.clone(),
|
||||
application,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue