revert X Property change, and cleanup formatting

This commit is contained in:
Ashley Wulber 2021-12-29 17:31:01 -05:00
parent 5a4a802751
commit 65f43a9300
32 changed files with 459 additions and 429 deletions

View file

@ -1,12 +1,12 @@
use std::cell::RefCell;
use std::rc::Rc;
use glib::{FromVariant, ParamFlags, ParamSpec, ToVariant, Value, Variant, VariantTy};
use gtk4::glib;
use gtk4::prelude::*;
use gtk4::subclass::prelude::*;
use once_cell::sync::Lazy;
use std::cell::RefCell;
use std::rc::Rc;
use super::AppGroupData;
// Object holding the state
@ -142,7 +142,7 @@ impl ObjectImpl for AppGroup {
.get::<Variant>()
.expect("The icon needs to be a Variant"),
)
.expect("The icon variant needs to be a Vec<String>");
.expect("The icon variant needs to be a Vec<String>");
self.data.borrow_mut().app_names = appnames;
}
_ => unimplemented!(),

View file

@ -1,5 +1,3 @@
mod imp;
use glib::Object;
use glib::ObjectExt;
use glib::ToVariant;
@ -7,6 +5,8 @@ use gtk4::glib;
use gtk4::subclass::prelude::*;
use serde::{Deserialize, Serialize};
mod imp;
glib::wrapper! {
pub struct AppGroup(ObjectSubclass<imp::AppGroup>);
}
@ -20,7 +20,7 @@ impl AppGroup {
("icon", &data.icon),
("category", &data.category),
])
.expect("Failed to create `ApplicationObject`.");
.expect("Failed to create `ApplicationObject`.");
if let Err(e) = self_.set_property("appnames", data.app_names.to_variant()) {
println!("failed to set category icon property");
dbg!(e);