Make Hints directly deserializable
This commit is contained in:
parent
fdf36c4a66
commit
deb72c42af
1 changed files with 3 additions and 2 deletions
|
|
@ -111,7 +111,7 @@ impl NotificationsInterface {
|
||||||
summary: String,
|
summary: String,
|
||||||
body: String,
|
body: String,
|
||||||
actions: Vec<String>,
|
actions: Vec<String>,
|
||||||
hints: HashMap<String, OwnedValue>,
|
hints: Hints,
|
||||||
expire_timeout: i32,
|
expire_timeout: i32,
|
||||||
) -> u32 {
|
) -> u32 {
|
||||||
u32::from(self.handle_notify(
|
u32::from(self.handle_notify(
|
||||||
|
|
@ -121,7 +121,7 @@ impl NotificationsInterface {
|
||||||
summary,
|
summary,
|
||||||
body,
|
body,
|
||||||
actions,
|
actions,
|
||||||
Hints(hints),
|
hints,
|
||||||
expire_timeout,
|
expire_timeout,
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
@ -191,6 +191,7 @@ glib::wrapper! {
|
||||||
pub struct Notifications(ObjectSubclass<NotificationsInner>);
|
pub struct Notifications(ObjectSubclass<NotificationsInner>);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(zvariant::Type, serde::Deserialize)]
|
||||||
struct Hints(HashMap<String, OwnedValue>);
|
struct Hints(HashMap<String, OwnedValue>);
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue