Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zbus: move to non-deprecated attribute macros #103

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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