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

@ -14,15 +14,14 @@ 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 _ = libcosmic::init();
view! {
window = libcosmic_applet::AppletWindow {
set_title: Some("COSMIC Network Applet"),
#[wrap(Some)]
set_child: button = &libcosmic_applet::AppletButton {
set_button_icon_name: "preferences-system-network",
set_button_icon_name: "network-workgroup-symbolic",
#[wrap(Some)]
set_popover_child: main_box = &gtk4::Box {
set_orientation: Orientation::Vertical,

View file

@ -11,7 +11,7 @@ use gtk4::{
prelude::*,
Image, ListBox, ListBoxRow, Separator,
};
use libcosmic_widgets::{relm4::RelmContainerExt, LabeledItem};
use libcosmic::widgets::{relm4::RelmContainerExt, LabeledItem};
use std::{
cell::RefCell,
collections::{BTreeMap, HashMap},