Skip to content

Commit

Permalink
chore: bump zbus and slint
Browse files Browse the repository at this point in the history
  • Loading branch information
Decodetalkers committed Mar 7, 2024
1 parent d3b49a9 commit 3751d46
Show file tree
Hide file tree
Showing 11 changed files with 215 additions and 82 deletions.
217 changes: 175 additions & 42 deletions Cargo.lock

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ members = ["libs/screenshotdialog", "libs/accessdialog", "."]
screenshotdialog = { path = "libs/screenshotdialog" }
accessdialog = { path = "libs/accessdialog" }

zbus = { version = "3", default-features = false, features = ["tokio", "url"] }
tokio = { version = "1.35.1", features = ["full"] }
serde = { version = "1.0.195", features = ["derive"] }
zbus = { version = "4", default-features = false, features = ["tokio", "url"] }
tokio = { version = "1.36.0", features = ["full"] }
serde = { version = "1.0.197", features = ["derive"] }
tracing = "0.1.40"
tracing-subscriber = "0.3.18"
url = { version = "2.5", features = ["serde"] }
Expand All @@ -25,19 +25,19 @@ image = { version = "0.24", default-features = false, features = [
] }

bitflags = "2.4.2"
enumflags2 = "0.7.8"
enumflags2 = "0.7.9"
once_cell = "1.19.0"
anyhow = "1.0.79"
anyhow = "1.0.80"

# pipewire
pipewire = "0.7.2"
libspa-sys = "0.7.2"

libwayshot = { version = "0.3.0" }
rustix = { version = "0.38.30", features = ["fs", "use-libc"] }
rustix = { version = "0.38.31", features = ["fs", "use-libc"] }

# REMOTE
wayland-protocols = { version = "0.31.0", default-features = false, features = [
wayland-protocols = { version = "0.31.2", default-features = false, features = [
"unstable",
"client",
] }
Expand All @@ -47,13 +47,13 @@ wayland-protocols = { version = "0.31.0", default-features = false, features = [
wayland-protocols-wlr = { version = "0.2.0", default-features = false, features = [
"client",
] }
wayland-client = { version = "0.31.1" }
wayland-client = { version = "0.31.2" }

wayland-protocols-misc = { version = "0.2.0", features = ["client"] }
xkbcommon = "0.7.0"
tempfile = "3.9.0"
thiserror = "1.0.56"
toml = "0.8.8"
tempfile = "3.10.1"
thiserror = "1.0.57"
toml = "0.8.10"
csscolorparser = "0.6.2"
notify = "6.1.1"
futures = "0.3.30"
Expand Down
4 changes: 2 additions & 2 deletions libs/accessdialog/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
slint = "1.3.2"
slint = "1.4.1"

[build-dependencies]
slint-build = "1.3.2"
slint-build = "1.4.1"
4 changes: 2 additions & 2 deletions libs/screenshotdialog/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
slint = "1.3.2"
slint = "1.4.1"

[build-dependencies]
slint-build = "1.3.2"
slint-build = "1.4.1"
4 changes: 2 additions & 2 deletions src/access.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::collections::HashMap;

use zbus::{
dbus_interface, fdo,
interface, fdo,
zvariant::{DeserializeDict, ObjectPath, OwnedValue, SerializeDict, Type},
};

Expand Down Expand Up @@ -30,7 +30,7 @@ pub struct Choice(String, String, Vec<(String, String)>, String);
#[derive(Debug)]
pub struct AccessBackend;

#[dbus_interface(name = "org.freedesktop.impl.portal.Access")]
#[interface(name = "org.freedesktop.impl.portal.Access")]
impl AccessBackend {
#[allow(clippy::too_many_arguments)]
async fn access_dialog(
Expand Down
8 changes: 4 additions & 4 deletions src/remotedesktop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use remote_thread::RemoteControl;
use std::collections::HashMap;

use enumflags2::BitFlags;
use zbus::dbus_interface;
use zbus::interface;

use zbus::zvariant::{DeserializeDict, ObjectPath, OwnedValue, SerializeDict, Type, Value};

Expand Down Expand Up @@ -93,14 +93,14 @@ pub async fn remove_remote_session(path: &str) {

pub struct RemoteDesktopBackend;

#[dbus_interface(name = "org.freedesktop.impl.portal.RemoteDesktop")]
#[interface(name = "org.freedesktop.impl.portal.RemoteDesktop")]
impl RemoteDesktopBackend {
#[dbus_interface(property, name = "version")]
#[zbus(property, name = "version")]
fn version(&self) -> u32 {
2
}

#[dbus_interface(property)]
#[zbus(property)]
fn available_device_types(&self) -> u32 {
(DeviceType::Keyboard | DeviceType::Pointer).bits()
}
Expand Down
4 changes: 2 additions & 2 deletions src/request.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use zbus::{dbus_interface, zvariant::OwnedObjectPath};
use zbus::{interface, zvariant::OwnedObjectPath};

pub struct RequestInterface {
pub handle_path: OwnedObjectPath,
}

#[dbus_interface(name = "org.freedesktop.impl.portal.Request")]
#[interface(name = "org.freedesktop.impl.portal.Request")]
impl RequestInterface {
async fn close(
&self,
Expand Down
10 changes: 5 additions & 5 deletions src/screencast.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::collections::HashMap;

use zbus::dbus_interface;
use zbus::interface;

use zbus::zvariant::{DeserializeDict, ObjectPath, OwnedValue, SerializeDict, Type, Value};

Expand Down Expand Up @@ -90,19 +90,19 @@ pub async fn remove_cast_session(path: &str) {

pub struct ScreenCastBackend;

#[dbus_interface(name = "org.freedesktop.impl.portal.ScreenCast")]
#[interface(name = "org.freedesktop.impl.portal.ScreenCast")]
impl ScreenCastBackend {
#[dbus_interface(property, name = "version")]
#[zbus(property, name = "version")]
fn version(&self) -> u32 {
4
}

#[dbus_interface(property)]
#[zbus(property)]
fn available_cursor_modes(&self) -> u32 {
(CursorMode::Hidden | CursorMode::Embedded).bits()
}

#[dbus_interface(property)]
#[zbus(property)]
fn available_source_types(&self) -> u32 {
BitFlags::from_flag(SourceType::Monitor).bits()
}
Expand Down
6 changes: 3 additions & 3 deletions src/screenshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use screenshotdialog::ScreenInfo;
use screenshotdialog::SlintSelection;
use std::collections::HashMap;
use zbus::zvariant::{DeserializeDict, SerializeDict, Type, Value};
use zbus::{dbus_interface, fdo, zvariant::ObjectPath};
use zbus::{interface, fdo, zvariant::ObjectPath};

use crate::utils::USER_RUNNING_DIR;
use crate::PortalResponse;
Expand Down Expand Up @@ -33,9 +33,9 @@ pub struct ScreenshotOption {
#[derive(Debug)]
pub struct ScreenShotBackend;

#[dbus_interface(name = "org.freedesktop.impl.portal.Screenshot")]
#[interface(name = "org.freedesktop.impl.portal.Screenshot")]
impl ScreenShotBackend {
#[dbus_interface(property, name = "version")]
#[zbus(property, name = "version")]
fn version(&self) -> u32 {
1
}
Expand Down
8 changes: 4 additions & 4 deletions src/session.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use enumflags2::{bitflags, BitFlags};
use zbus::{dbus_interface, zvariant::OwnedObjectPath, SignalContext};
use zbus::{interface, zvariant::OwnedObjectPath, SignalContext};

use serde::{Deserialize, Serialize};
use serde_repr::{Deserialize_repr, Serialize_repr};
Expand Down Expand Up @@ -154,7 +154,7 @@ impl Session {
}
}

#[dbus_interface(name = "org.freedesktop.impl.portal.Session")]
#[interface(name = "org.freedesktop.impl.portal.Session")]
impl Session {
async fn close(
&self,
Expand All @@ -169,11 +169,11 @@ impl Session {
Ok(())
}

#[dbus_interface(property, name = "version")]
#[zbus(property, name = "version")]
fn version(&self) -> u32 {
2
}

#[dbus_interface(signal)]
#[zbus(signal)]
async fn closed(signal_ctxt: &SignalContext<'_>, message: &str) -> zbus::Result<()>;
}
10 changes: 5 additions & 5 deletions src/settings.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
mod config;
use tokio::sync::Mutex;
use zbus::{dbus_interface, fdo, SignalContext};
use zbus::{fdo, interface, SignalContext};

use zbus::zvariant::{Array, DeserializeDict, OwnedValue, SerializeDict, Signature, Type};

Expand Down Expand Up @@ -34,16 +34,16 @@ impl From<AccentColor> for OwnedValue {
for col in val.color {
array.append(col.into()).unwrap();
}
OwnedValue::from(array)
OwnedValue::try_from(array).unwrap()
}
}

#[derive(Debug)]
pub struct SettingsBackend;

#[dbus_interface(name = "org.freedesktop.impl.portal.Settings")]
#[interface(name = "org.freedesktop.impl.portal.Settings")]
impl SettingsBackend {
#[dbus_interface(property, name = "version")]
#[zbus(property, name = "version")]
fn version(&self) -> u32 {
1
}
Expand Down Expand Up @@ -82,7 +82,7 @@ impl SettingsBackend {
Ok(output.into())
}

#[dbus_interface(signal)]
#[zbus(signal)]
pub async fn setting_changed(
ctxt: &SignalContext<'_>,
namespace: String,
Expand Down

0 comments on commit 3751d46

Please sign in to comment.