revert X Property change, and cleanup formatting
This commit is contained in:
parent
5a4a802751
commit
65f43a9300
32 changed files with 459 additions and 429 deletions
|
|
@ -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!(),
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue