chore: update zbus

This commit is contained in:
Ashley Wulber 2024-05-16 15:36:53 -04:00 • committed by Michael Murphy
parent 54eb5487b4
commit 78a137214d
4 changed files with 13 additions and 13 deletions

View file

@ -65,21 +65,21 @@ xdg-portal = ["ashpd"]
[dependencies] [dependencies]
apply = "0.3.0" apply = "0.3.0"
ashpd = { version = "0.7.0", default-features = false, optional = true } ashpd = { version = "0.8.1", default-features = false, optional = true }
async-fs = { version = "2.1", optional = true } async-fs = { version = "2.1", optional = true }
cctk = { git = "https://github.com/pop-os/cosmic-protocols", package = "cosmic-client-toolkit", rev = "e4e6f8c", optional = true } cctk = { git = "https://github.com/pop-os/cosmic-protocols", package = "cosmic-client-toolkit", rev = "e4e6f8c", optional = true }
chrono = "0.4.35" chrono = "0.4.35"
cosmic-config = { path = "cosmic-config" } cosmic-config = { path = "cosmic-config" }
cosmic-settings-daemon = { git = "https://github.com/pop-os/dbus-settings-bindings", branch = "cosmic-settings-daemon", optional = true } cosmic-settings-daemon = { git = "https://github.com/pop-os/dbus-settings-bindings", optional = true }
css-color = "0.2.5" css-color = "0.2.5"
derive_setters = "0.1.5" derive_setters = "0.1.5"
fraction = "0.14.0" fraction = "0.14.0"
image = { version = "0.24.6", optional = true } image = { version = "0.25.1", optional = true }
lazy_static = "1.4.0" lazy_static = "1.4.0"
mime = { version = "0.3.17", optional = true } mime = { version = "0.3.17", optional = true }
nix = { version = "0.27", features = ["process"], optional = true } nix = { version = "0.27", features = ["process"], optional = true }
palette = "0.7.3" palette = "0.7.3"
rfd = { version = "0.13.0", optional = true } rfd = { version = "0.14.0", optional = true }
serde = { version = "1.0.180", optional = true } serde = { version = "1.0.180", optional = true }
slotmap = "1.0.6" slotmap = "1.0.6"
thiserror = "1.0.44" thiserror = "1.0.44"
@ -87,7 +87,7 @@ tokio = { version = "1.24.2", optional = true }
tracing = "0.1" tracing = "0.1"
unicode-segmentation = "1.6" unicode-segmentation = "1.6"
url = "2.4.0" url = "2.4.0"
zbus = { version = "3.14.1", default-features = false, optional = true } zbus = { version = "4.2.1", default-features = false, optional = true }
[target.'cfg(unix)'.dependencies] [target.'cfg(unix)'.dependencies]
freedesktop-icons = "0.2.5" freedesktop-icons = "0.2.5"

View file

@ -10,7 +10,8 @@ macro = ["cosmic-config-derive"]
subscription = ["iced_futures"] subscription = ["iced_futures"]
[dependencies] [dependencies]
zbus = { version = "3.14.1", default-features = false, optional = true } cosmic-settings-daemon = { git = "https://github.com/pop-os/dbus-settings-bindings", optional = true }
zbus = { version = "4.2.1", default-features = false, optional = true }
atomicwrites = { git = "https://github.com/jackpot51/rust-atomicwrites" } atomicwrites = { git = "https://github.com/jackpot51/rust-atomicwrites" }
calloop = { version = "0.13.0", optional = true } calloop = { version = "0.13.0", optional = true }
notify = "6.0.0" notify = "6.0.0"
@ -20,7 +21,6 @@ cosmic-config-derive = { path = "../cosmic-config-derive/", optional = true }
iced = { path = "../iced/", default-features = false, optional = true } iced = { path = "../iced/", default-features = false, optional = true }
iced_futures = { path = "../iced/futures/", default-features = false, optional = true } iced_futures = { path = "../iced/futures/", default-features = false, optional = true }
once_cell = "1.19.0" once_cell = "1.19.0"
cosmic-settings-daemon = { git = "https://github.com/pop-os/dbus-settings-bindings", branch = "cosmic-settings-daemon", optional = true }
futures-util = { version = "0.3", optional = true } futures-util = { version = "0.3", optional = true }
dirs.workspace = true dirs.workspace = true
tokio = { version = "1.0", optional = true, features = ["time"] } tokio = { version = "1.0", optional = true, features = ["time"] }

View file

@ -29,7 +29,7 @@ impl Watcher {
version: u64, version: u64,
) -> zbus::Result<Self> { ) -> zbus::Result<Self> {
let (path, name) = settings_daemon_proxy.watch_config(id, version).await?; let (path, name) = settings_daemon_proxy.watch_config(id, version).await?;
ConfigProxy::builder(settings_daemon_proxy.connection()) ConfigProxy::builder(settings_daemon_proxy.inner().connection())
.path(path)? .path(path)?
.destination(name)? .destination(name)?
.build() .build()
@ -43,7 +43,7 @@ impl Watcher {
version: u64, version: u64,
) -> zbus::Result<Self> { ) -> zbus::Result<Self> {
let (path, name) = settings_daemon_proxy.watch_state(id, version).await?; let (path, name) = settings_daemon_proxy.watch_state(id, version).await?;
ConfigProxy::builder(settings_daemon_proxy.connection()) ConfigProxy::builder(settings_daemon_proxy.inner().connection())
.path(path)? .path(path)?
.destination(name)? .destination(name)?
.build() .build()
@ -140,7 +140,7 @@ pub fn watcher_subscription<T: CosmicConfigEntry + Send + Sync + Default + 'stat
let mut changes = changes.map(Change::Changes).fuse(); let mut changes = changes.map(Change::Changes).fuse();
let Ok(owner_changed) = watcher.receive_owner_changed().await else { let Ok(owner_changed) = watcher.inner().receive_owner_changed().await else {
tracing::error!("Failed to listen for owner changes for {config_id}"); tracing::error!("Failed to listen for owner changes for {config_id}");
#[cfg(feature = "tokio")] #[cfg(feature = "tokio")]
::tokio::time::sleep(::tokio::time::Duration::from_secs(2_u64.pow(attempts))).await; ::tokio::time::sleep(::tokio::time::Duration::from_secs(2_u64.pow(attempts))).await;

View file

@ -61,7 +61,7 @@ use {
iced_futures::futures::SinkExt, iced_futures::futures::SinkExt,
std::any::TypeId, std::any::TypeId,
std::collections::HashMap, std::collections::HashMap,
zbus::{dbus_interface, dbus_proxy, zvariant::Value}, zbus::{interface, proxy, zvariant::Value},
}; };
pub(crate) fn iced_settings<App: Application>( pub(crate) fn iced_settings<App: Application>(
@ -221,7 +221,7 @@ impl DbusActivation {
} }
#[cfg(feature = "single-instance")] #[cfg(feature = "single-instance")]
#[dbus_proxy(interface = "org.freedesktop.DbusActivation", assume_defaults = true)] #[proxy(interface = "org.freedesktop.DbusActivation", assume_defaults = true)]
pub trait DbusActivationInterface { pub trait DbusActivationInterface {
/// Activate the application. /// Activate the application.
fn activate(&mut self, platform_data: HashMap<&str, Value<'_>>) -> zbus::Result<()>; fn activate(&mut self, platform_data: HashMap<&str, Value<'_>>) -> zbus::Result<()>;
@ -243,7 +243,7 @@ pub trait DbusActivationInterface {
} }
#[cfg(feature = "single-instance")] #[cfg(feature = "single-instance")]
#[dbus_interface(name = "org.freedesktop.DbusActivation")] #[interface(name = "org.freedesktop.DbusActivation")]
impl DbusActivation { impl DbusActivation {
async fn activate(&mut self, platform_data: HashMap<&str, Value<'_>>) { async fn activate(&mut self, platform_data: HashMap<&str, Value<'_>>) {
if let Some(tx) = &mut self.0 { if let Some(tx) = &mut self.0 {