feat: use libcosmic::init

This commit is contained in:
Ashley Wulber 2022-08-16 14:36:31 -04:00
parent a96decd24b
commit 98813824d4
No known key found for this signature in database
GPG key ID: 5216D4F46A90A820
37 changed files with 396 additions and 295 deletions

View file

@ -8,6 +8,7 @@ license = "GPL-3.0-or-later"
futures-util = "0.3.21"
gtk4 = { git = "https://github.com/gtk-rs/gtk4-rs" }
adw = { git = "https://gitlab.gnome.org/World/Rust/libadwaita-rs", package = "libadwaita"}
libcosmic = { git = "https://github.com/pop-os/libcosmic", default-features = false }
libcosmic-applet = { path = "../../libcosmic-applet" }
logind-zbus = "3.0.1"
nix = "0.24.1"

View file

@ -3,9 +3,9 @@
#[macro_use]
extern crate relm4_macros;
pub mod cosmic_session;
pub mod session_manager;
pub mod ui;
pub mod cosmic_session;
use gtk4::{gio::ApplicationFlags, prelude::*, Align, Button, Label, Orientation, Separator};
use once_cell::sync::Lazy;
@ -15,13 +15,9 @@ use tokio::runtime::Runtime;
static RT: Lazy<Runtime> = Lazy::new(|| Runtime::new().expect("failed to build tokio runtime"));
fn main() {
let _ = gtk4::init();
adw::init();
let application = gtk4::Application::new(
None,
ApplicationFlags::default(),
);
let _ = libcosmic::init();
let application = gtk4::Application::new(None, ApplicationFlags::default());
application.connect_activate(build_ui);
application.run();
}