Port all dbus server/client to to zbus

Seems to generally be working well. May still need a few fixes.
This commit is contained in:
Ian Douglas Scott 2021-12-10 16:32:17 -08:00 committed by Ian Douglas Scott
parent 8b5e1a7f12
commit 8b2a9c6359
13 changed files with 592 additions and 821 deletions

View file

@ -36,7 +36,10 @@ impl ObjectImpl for NotificationListInner {
..set_parent(obj);
..connect_row_activated(clone!(@weak obj => move |_, row| {
if let Some(id) = obj.id_for_row(row) {
obj.inner().notifications.invoke_action(id, "default");
let notifications = obj.inner().notifications.clone();
glib::MainContext::default().spawn_local(async move {
notifications.invoke_action(id, "default").await;
});
}
}));
};
@ -66,7 +69,7 @@ impl NotificationList {
obj.inner().notifications.set(notifications.clone());
*obj.inner().ids.borrow_mut() = vec![
notifications.connect_notification_recieved(clone!(@weak obj => move |notification| {
notifications.connect_notification_received(clone!(@weak obj => move |notification| {
obj.handle_notification(&notification);
})),
notifications.connect_notification_closed(clone!(@weak obj => move |id| {