mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
init profile in constructor
This commit is contained in:
parent
25b63c0e02
commit
a0201ea83b
4 changed files with 21 additions and 28 deletions
19
src/main.rs
19
src/main.rs
|
|
@ -2,29 +2,12 @@ mod action;
|
|||
mod app;
|
||||
mod profile;
|
||||
|
||||
use crate::profile::Profile;
|
||||
use app::App;
|
||||
use gtk::glib::ExitCode;
|
||||
use std::rc::Rc;
|
||||
|
||||
const VENDOR: &str = "YGGverse";
|
||||
const APP_ID: &str = "Yoda";
|
||||
const BRANCH: &str = "master";
|
||||
|
||||
fn main() -> ExitCode {
|
||||
match gtk::init() {
|
||||
Ok(_) => App::new(Rc::new(Profile::new(
|
||||
VENDOR,
|
||||
APP_ID,
|
||||
BRANCH,
|
||||
format!(
|
||||
"{}.{}",
|
||||
env!("CARGO_PKG_VERSION_MAJOR"),
|
||||
env!("CARGO_PKG_VERSION_MINOR")
|
||||
)
|
||||
.as_str(),
|
||||
)))
|
||||
.run(),
|
||||
Ok(_) => App::new().run(),
|
||||
Err(_) => ExitCode::FAILURE,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue