mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 17:15:28 +00:00
update app launcher
This commit is contained in:
parent
3179b6a33a
commit
3cc6b9a76a
2 changed files with 17 additions and 21 deletions
36
src/main.rs
36
src/main.rs
|
|
@ -2,29 +2,25 @@ mod app;
|
|||
mod profile;
|
||||
mod tool;
|
||||
|
||||
use app::App;
|
||||
use gtk::glib::ExitCode;
|
||||
use profile::Profile;
|
||||
use std::rc::Rc;
|
||||
|
||||
fn main() -> ExitCode {
|
||||
match Profile::new() {
|
||||
Ok(profile) => {
|
||||
if let Err(e) = gtk::init() {
|
||||
eprintln!("Failed to initialize GTK: {e}");
|
||||
return ExitCode::FAILURE;
|
||||
}
|
||||
match App::build(&Rc::new(profile)).run() {
|
||||
Ok(result) => result,
|
||||
Err(e) => {
|
||||
eprintln!("Failed to initialize application: {e}");
|
||||
ExitCode::FAILURE
|
||||
}
|
||||
}
|
||||
}
|
||||
Err(e) => {
|
||||
eprintln!("Failed to initialize profile: {e}");
|
||||
ExitCode::FAILURE
|
||||
}
|
||||
use app::App;
|
||||
use std::rc::Rc;
|
||||
|
||||
if let Err(e) = gtk::init() {
|
||||
eprintln!("Failed to initialize GTK: {e}");
|
||||
return ExitCode::FAILURE;
|
||||
}
|
||||
|
||||
match Profile::init() {
|
||||
Ok(profile) => match App::build(&Rc::new(profile)).run() {
|
||||
Ok(app) => return app,
|
||||
Err(e) => eprintln!("Failed to initialize application: {e}"),
|
||||
},
|
||||
Err(e) => eprintln!("Failed to initialize profile: {e}"),
|
||||
}
|
||||
|
||||
ExitCode::FAILURE
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue