small comment changes
This commit is contained in:
parent
cad7827158
commit
852e23dc7c
1 changed files with 3 additions and 4 deletions
|
@ -14,6 +14,7 @@ mod ui_code;
|
||||||
const APP_ID: &str = "net.nickiel.joystick-controller-client";
|
const APP_ID: &str = "net.nickiel.joystick-controller-client";
|
||||||
|
|
||||||
fn main() -> glib::ExitCode {
|
fn main() -> glib::ExitCode {
|
||||||
|
// set the environment var to make gtk use window's default action bar
|
||||||
env::set_var("gtk_csd", "0");
|
env::set_var("gtk_csd", "0");
|
||||||
|
|
||||||
if let Err(e) = SimpleLogger::init(simplelog::LevelFilter::Debug, simplelog::Config::default())
|
if let Err(e) = SimpleLogger::init(simplelog::LevelFilter::Debug, simplelog::Config::default())
|
||||||
|
@ -24,19 +25,17 @@ fn main() -> glib::ExitCode {
|
||||||
let rt = runtime::Runtime::new().expect("Could not start tokio runtime");
|
let rt = runtime::Runtime::new().expect("Could not start tokio runtime");
|
||||||
let handle = rt.handle().clone();
|
let handle = rt.handle().clone();
|
||||||
|
|
||||||
// Create a new application
|
|
||||||
let app = Application::builder().application_id(APP_ID).build();
|
let app = Application::builder().application_id(APP_ID).build();
|
||||||
|
|
||||||
// Connect to "activate" signal of `app`
|
|
||||||
app.connect_startup(|_| load_css());
|
app.connect_startup(|_| load_css());
|
||||||
|
|
||||||
app.connect_activate(move |app| {
|
app.connect_activate(move |app| {
|
||||||
ui_code::build_ui(app, handle.clone());
|
ui_code::build_ui(app, handle.clone());
|
||||||
});
|
});
|
||||||
|
|
||||||
// Run the application
|
|
||||||
let exit_code = app.run();
|
let exit_code = app.run();
|
||||||
|
|
||||||
info!("Closing down");
|
info!("Gtk application has closed");
|
||||||
|
|
||||||
rt.block_on(async {});
|
rt.block_on(async {});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue