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,7 +8,6 @@ license = "GPL-3.0-or-later"
futures = "0.3.21"
futures-util = "0.3.21"
libcosmic-applet = { path = "../../libcosmic-applet" }
libcosmic-widgets = { git = "https://github.com/pop-os/libcosmic", branch = "relm4-next" }
libpulse-binding = "2.26.0"
libpulse-glib-binding = "2.25.0"
tracker = "0.1.1"
@ -21,6 +20,7 @@ relm4-macros = { git = "https://github.com/relm4/relm4", branch = "next" }
once_cell = "1.10.0"
gtk4 = { git = "https://github.com/gtk-rs/gtk4-rs", features = ["v4_2"] }
adw = { git = "https://gitlab.gnome.org/World/Rust/libadwaita-rs", package = "libadwaita"}
libcosmic = { git = "https://github.com/pop-os/libcosmic", default-features = false, features = ["widgets"] }
async-io = "1.6.0"
[features]

View file

@ -1,6 +1,5 @@
use gtk4::{glib::clone, prelude::*, Button, Label, ListBox};
use libcosmic_widgets::{relm4::RelmContainerExt, LabeledItem};
use std::rc::Rc;
use libcosmic::widgets::{relm4::RelmContainerExt, LabeledItem};
use crate::pa::{DeviceInfo, PA};

View file

@ -36,12 +36,8 @@ 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 = Application::new(
None,
ApplicationFlags::default(),
);
let _ = libcosmic::init();
let application = Application::new(None, ApplicationFlags::default());
application.connect_activate(app);
application.run();
}

View file

@ -1,6 +1,5 @@
use gtk4::{glib::clone, prelude::*, Button, Label, ListBox};
use libcosmic_widgets::{relm4::RelmContainerExt, LabeledItem};
use std::rc::Rc;
use libcosmic::widgets::{relm4::RelmContainerExt, LabeledItem};
use crate::pa::{DeviceInfo, PA};