Skip to content
This repository was archived by the owner on Feb 16, 2025. It is now read-only.

Commit 0068744

Browse files
committed
fix: use new interface
1 parent 7cd1187 commit 0068744

File tree

2 files changed

+17
-16
lines changed

2 files changed

+17
-16
lines changed

Diff for: src/desktop_entry.rs

+15-14
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
//! This type implements the [D-Bus standard interfaces], (`org.freedesktop.DBus.*`) for which the
1212
//! following zbus API can be used:
1313
//!
14-
//! * [`zbus::fdo::IntrospectableProxy`]
15-
//! * [`zbus::fdo::PropertiesProxy`]
1614
//! * [`zbus::fdo::PeerProxy`]
15+
//! * [`zbus::fdo::PropertiesProxy`]
16+
//! * [`zbus::fdo::IntrospectableProxy`]
1717
//!
1818
//! Consequently `zbus-xmlgen` did not generate code for the above interfaces.
1919
//!
@@ -26,20 +26,21 @@ use zbus::proxy;
2626
assume_defaults = true
2727
)]
2828
trait DesktopEntry {
29-
/// RegisterChangeHandler method
30-
fn register_change_handler(&self, pid: u32) -> zbus::Result<()>;
29+
/// NewPersistentEntry method
30+
fn new_persistent_entry(&self, appid: &str, entry: &str) -> zbus::Result<()>;
31+
32+
/// NewPersistentIcon method
33+
fn new_persistent_icon(&self, name: &str, data: &[u8]) -> zbus::Result<()>;
3134

32-
/// RegisterEntry method
33-
fn register_entry(&self, appid: &str, entry: &str) -> zbus::Result<()>;
35+
/// NewProcessEntry method
36+
fn new_process_entry(&self, appid: &str, entry: &str) -> zbus::Result<()>;
3437

35-
/// RegisterIcon method
36-
fn register_icon(&self, name: &str, data: &[u8]) -> zbus::Result<()>;
38+
/// NewProcessIcon method
39+
fn new_process_icon(&self, name: &str, data: &[u8]) -> zbus::Result<()>;
3740

38-
/// EntryChanged signal
39-
#[zbus(signal)]
40-
fn entry_changed(&self, appid: &str) -> zbus::Result<()>;
41+
/// NewSessionEntry method
42+
fn new_session_entry(&self, appid: &str, entry: &str) -> zbus::Result<()>;
4143

42-
/// IconChanged signal
43-
#[zbus(signal)]
44-
fn icon_changed(&self, icon_name: &str) -> zbus::Result<()>;
44+
/// NewSessionIcon method
45+
fn new_session_icon(&self, name: &str, data: &[u8]) -> zbus::Result<()>;
4546
}

Diff for: src/server.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ async fn set_up_client(
156156
continue; // We don't want to push NoDisplay entries into our host
157157
}
158158

159-
match proxy.register_entry(&entry.appid, &file_text).await {
159+
match proxy.new_session_entry(&entry.appid, &file_text).await {
160160
Ok(_) => {
161161
log::info!("Daemon registered entry: {}", entry.appid);
162162
if let Some(icon_name) = entry.icon() {
@@ -173,7 +173,7 @@ async fn set_up_client(
173173
Some("png" | "svg") => {
174174
let file_bytes = read(icon_path).unwrap();
175175
match proxy
176-
.register_icon(icon_name, file_bytes.as_slice())
176+
.new_session_icon(icon_name, file_bytes.as_slice())
177177
.await
178178
{
179179
Ok(_) => {

0 commit comments

Comments
 (0)