Skip to content

Commit

Permalink
zbus: move to non-deprecated attribute macros
Browse files Browse the repository at this point in the history
  • Loading branch information
Ferdi265 committed Sep 14, 2024
1 parent dbb8b72 commit 361ea7c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/client/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ use gtk::{gio::ApplicationFlags, Application};
use gtk::{glib, prelude::*};
use std::env::args_os;
use std::path::PathBuf;
use zbus::{blocking::Connection, dbus_proxy};
use zbus::{blocking::Connection, proxy};

#[dbus_proxy(
#[proxy(
interface = "org.erikreider.swayosd",
default_service = "org.erikreider.swayosd-server",
default_path = "/org/erikreider/swayosd"
Expand Down
6 changes: 3 additions & 3 deletions src/input-backend/dbus_server.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use zbus::{dbus_interface, Connection, ConnectionBuilder, SignalContext};
use zbus::{interface, Connection, ConnectionBuilder, SignalContext};

use crate::config::{DBUS_BACKEND_NAME, DBUS_PATH};

pub struct DbusServer;

#[dbus_interface(name = "org.erikreider.swayosd")]
#[interface(name = "org.erikreider.swayosd")]
impl DbusServer {
#[dbus_interface(signal)]
#[zbus(signal)]
pub async fn key_pressed(
signal_ctxt: &SignalContext<'_>,
key_code: u16,
Expand Down
4 changes: 2 additions & 2 deletions src/server/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ use std::future::pending;
use std::path::PathBuf;
use std::str::FromStr;
use utils::{get_system_css_path, user_style_path};
use zbus::{dbus_interface, ConnectionBuilder};
use zbus::{interface, ConnectionBuilder};

struct DbusServer {
sender: Sender<(ArgTypes, String)>,
}

#[dbus_interface(name = "org.erikreider.swayosd")]
#[interface(name = "org.erikreider.swayosd")]
impl DbusServer {
pub fn handle_action(&self, arg_type: String, data: String) -> bool {
let arg_type = match ArgTypes::from_str(&arg_type) {
Expand Down

0 comments on commit 361ea7c

Please sign in to comment.