feat: use libcosmic::init
This commit is contained in:
parent
a96decd24b
commit
98813824d4
37 changed files with 396 additions and 295 deletions
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue