From e065fe6e979f5e646ffe1ce062f7c05417221653 Mon Sep 17 00:00:00 2001 From: Fabio Lenherr / DashieTM Date: Thu, 28 Mar 2024 18:08:01 +0100 Subject: [PATCH] chore: Re-add object path definition --- src/utils/plugin_setup.rs | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/utils/plugin_setup.rs b/src/utils/plugin_setup.rs index ecd5573..7118ce6 100644 --- a/src/utils/plugin_setup.rs +++ b/src/utils/plugin_setup.rs @@ -11,10 +11,7 @@ use once_cell::sync::Lazy; use crate::{create_config, write_log_to_file, ErrorLevel, ERROR}; -use super::{ - dbus_utils::DBUS_PATH, - plugin::{PluginCapabilities, PluginImplementation, PluginTestFunc, SidebarInfo}, -}; +use super::plugin::{PluginCapabilities, PluginImplementation, PluginTestFunc, SidebarInfo}; pub static mut FRONTEND_PLUGINS: Lazy> = Lazy::new(|| { SETUP_LIBS(); @@ -281,8 +278,17 @@ impl<'a> CrossWrapper<'a> { self.0.register(name.into(), token) } - pub fn insert(&mut self, interfaces: &[IfaceToken], data: T) { - self.0.insert(DBUS_PATH, interfaces, data); + pub fn insert( + &mut self, + object_name: impl Into, + interfaces: &[IfaceToken], + data: T, + ) { + self.0.insert( + "/org/Xebito/ReSet/Plugins/".to_string() + &object_name.into(), + interfaces, + data, + ); } }