From 75fbb062fcadf23d20f2ab34964674d7c5ad1856 Mon Sep 17 00:00:00 2001 From: Fabio Lenherr / DashieTM Date: Sat, 25 Nov 2023 16:26:48 +0100 Subject: [PATCH] feat: Add Wifi Device Changes --- src/components/base/cardEntryImpl.rs | 1 + src/components/base/listEntryImpl.rs | 1 + src/components/base/popupImpl.rs | 1 + src/components/base/settingBoxImpl.rs | 1 + src/components/bluetooth/bluetoothBoxImpl.rs | 1 + src/components/bluetooth/bluetoothEntryImpl.rs | 1 + src/components/input/outputStreamEntryImpl.rs | 1 + src/components/input/sourceBoxImpl.rs | 1 + src/components/input/sourceEntryImpl.rs | 1 + src/components/output/inputStreamEntryImpl.rs | 1 + src/components/output/sinkBoxImpl.rs | 1 + src/components/output/sinkEntryImpl.rs | 1 + src/components/wifi/savedWifiEntryImpl.rs | 1 + src/components/wifi/wifiAddressEntryImpl.rs | 1 + src/components/wifi/wifiBox.rs | 2 -- src/components/wifi/wifiBoxImpl.rs | 1 + src/components/wifi/wifiEntryImpl.rs | 2 ++ src/components/wifi/wifiOptionsImpl.rs | 1 + src/components/wifi/wifiRouteEntryImpl.rs | 1 + src/components/window/sidebarEntryImpl.rs | 1 + src/components/window/windowImpl.rs | 1 + 21 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/components/base/cardEntryImpl.rs b/src/components/base/cardEntryImpl.rs index df61a08..8d15944 100644 --- a/src/components/base/cardEntryImpl.rs +++ b/src/components/base/cardEntryImpl.rs @@ -21,6 +21,7 @@ pub struct CardEntry { #[glib::object_subclass] impl ObjectSubclass for CardEntry { + const ABSTRACT: bool = false; const NAME: &'static str = "resetCardEntry"; type Type = cardEntry::CardEntry; type ParentType = ComboRow; diff --git a/src/components/base/listEntryImpl.rs b/src/components/base/listEntryImpl.rs index 0cb1c74..932df7f 100644 --- a/src/components/base/listEntryImpl.rs +++ b/src/components/base/listEntryImpl.rs @@ -9,6 +9,7 @@ pub struct ListEntry {} #[glib::object_subclass] impl ObjectSubclass for ListEntry { + const ABSTRACT: bool = false; const NAME: &'static str = "resetListBoxRow"; type Type = listEntry::ListEntry; type ParentType = gtk::ListBoxRow; diff --git a/src/components/base/popupImpl.rs b/src/components/base/popupImpl.rs index cab6fa4..35dfa2a 100644 --- a/src/components/base/popupImpl.rs +++ b/src/components/base/popupImpl.rs @@ -24,6 +24,7 @@ unsafe impl Sync for Popup {} #[glib::object_subclass] impl ObjectSubclass for Popup { + const ABSTRACT: bool = false; const NAME: &'static str = "resetPopup"; type Type = popup::Popup; type ParentType = Popover; diff --git a/src/components/base/settingBoxImpl.rs b/src/components/base/settingBoxImpl.rs index b446b44..03a21f2 100644 --- a/src/components/base/settingBoxImpl.rs +++ b/src/components/base/settingBoxImpl.rs @@ -9,6 +9,7 @@ pub struct SettingBox {} #[glib::object_subclass] impl ObjectSubclass for SettingBox { + const ABSTRACT: bool = false; const NAME: &'static str = "resetSettingBox"; type Type = settingBox::SettingBox; type ParentType = gtk::Box; diff --git a/src/components/bluetooth/bluetoothBoxImpl.rs b/src/components/bluetooth/bluetoothBoxImpl.rs index 0df46af..a718625 100644 --- a/src/components/bluetooth/bluetoothBoxImpl.rs +++ b/src/components/bluetooth/bluetoothBoxImpl.rs @@ -31,6 +31,7 @@ pub struct BluetoothBox { #[glib::object_subclass] impl ObjectSubclass for BluetoothBox { + const ABSTRACT: bool = false; const NAME: &'static str = "resetBluetooth"; type Type = bluetoothBox::BluetoothBox; type ParentType = gtk::Box; diff --git a/src/components/bluetooth/bluetoothEntryImpl.rs b/src/components/bluetooth/bluetoothEntryImpl.rs index 7dfe7bc..5846ade 100644 --- a/src/components/bluetooth/bluetoothEntryImpl.rs +++ b/src/components/bluetooth/bluetoothEntryImpl.rs @@ -31,6 +31,7 @@ pub struct BluetoothEntry { #[glib::object_subclass] impl ObjectSubclass for BluetoothEntry { + const ABSTRACT: bool = false; const NAME: &'static str = "resetBluetoothEntry"; type Type = bluetoothEntry::BluetoothEntry; type ParentType = gtk::Box; diff --git a/src/components/input/outputStreamEntryImpl.rs b/src/components/input/outputStreamEntryImpl.rs index 3a3bed1..641db53 100644 --- a/src/components/input/outputStreamEntryImpl.rs +++ b/src/components/input/outputStreamEntryImpl.rs @@ -30,6 +30,7 @@ pub struct OutputStreamEntry { #[glib::object_subclass] impl ObjectSubclass for OutputStreamEntry { + const ABSTRACT: bool = false; const NAME: &'static str = "resetOutputStreamEntry"; type Type = outputStreamEntry::OutputStreamEntry; type ParentType = gtk::Box; diff --git a/src/components/input/sourceBoxImpl.rs b/src/components/input/sourceBoxImpl.rs index 4209436..2a1cdae 100644 --- a/src/components/input/sourceBoxImpl.rs +++ b/src/components/input/sourceBoxImpl.rs @@ -56,6 +56,7 @@ pub struct SourceBox { #[glib::object_subclass] impl ObjectSubclass for SourceBox { + const ABSTRACT: bool = false; const NAME: &'static str = "resetAudioInput"; type Type = sourceBox::SourceBox; type ParentType = gtk::Box; diff --git a/src/components/input/sourceEntryImpl.rs b/src/components/input/sourceEntryImpl.rs index 1d4f516..0309485 100644 --- a/src/components/input/sourceEntryImpl.rs +++ b/src/components/input/sourceEntryImpl.rs @@ -30,6 +30,7 @@ pub struct SourceEntry { #[glib::object_subclass] impl ObjectSubclass for SourceEntry { + const ABSTRACT: bool = false; const NAME: &'static str = "resetSourceEntry"; type Type = sourceEntry::SourceEntry; type ParentType = gtk::Box; diff --git a/src/components/output/inputStreamEntryImpl.rs b/src/components/output/inputStreamEntryImpl.rs index b42e0db..1b0c383 100644 --- a/src/components/output/inputStreamEntryImpl.rs +++ b/src/components/output/inputStreamEntryImpl.rs @@ -31,6 +31,7 @@ pub struct InputStreamEntry { #[glib::object_subclass] impl ObjectSubclass for InputStreamEntry { + const ABSTRACT: bool = false; const NAME: &'static str = "resetInputStreamEntry"; type Type = inputStreamEntry::InputStreamEntry; type ParentType = gtk::Box; diff --git a/src/components/output/sinkBoxImpl.rs b/src/components/output/sinkBoxImpl.rs index 26aa88e..c1d1b98 100644 --- a/src/components/output/sinkBoxImpl.rs +++ b/src/components/output/sinkBoxImpl.rs @@ -59,6 +59,7 @@ pub struct SinkBox { #[glib::object_subclass] impl ObjectSubclass for SinkBox { + const ABSTRACT: bool = false; const NAME: &'static str = "resetAudioOutput"; type Type = sinkBox::SinkBox; type ParentType = gtk::Box; diff --git a/src/components/output/sinkEntryImpl.rs b/src/components/output/sinkEntryImpl.rs index 661817a..0531391 100644 --- a/src/components/output/sinkEntryImpl.rs +++ b/src/components/output/sinkEntryImpl.rs @@ -29,6 +29,7 @@ pub struct SinkEntry { #[glib::object_subclass] impl ObjectSubclass for SinkEntry { + const ABSTRACT: bool = false; const NAME: &'static str = "resetSinkEntry"; type Type = sinkEntry::SinkEntry; type ParentType = gtk::Box; diff --git a/src/components/wifi/savedWifiEntryImpl.rs b/src/components/wifi/savedWifiEntryImpl.rs index baef5f9..6958d5d 100644 --- a/src/components/wifi/savedWifiEntryImpl.rs +++ b/src/components/wifi/savedWifiEntryImpl.rs @@ -27,6 +27,7 @@ unsafe impl Sync for SavedWifiEntry {} #[glib::object_subclass] impl ObjectSubclass for SavedWifiEntry { + const ABSTRACT: bool = false; const NAME: &'static str = "resetSavedWifiEntry"; type Type = savedWifiEntry::SavedWifiEntry; type ParentType = ActionRow; diff --git a/src/components/wifi/wifiAddressEntryImpl.rs b/src/components/wifi/wifiAddressEntryImpl.rs index 1e48982..fa34157 100644 --- a/src/components/wifi/wifiAddressEntryImpl.rs +++ b/src/components/wifi/wifiAddressEntryImpl.rs @@ -19,6 +19,7 @@ pub struct WifiAddressEntryImpl { #[glib::object_subclass] impl ObjectSubclass for WifiAddressEntryImpl { + const ABSTRACT: bool = false; const NAME: &'static str = "resetWifiAddressEntry"; type Type = wifiAddressEntry::WifiAddressEntry; type ParentType = gtk::Box; diff --git a/src/components/wifi/wifiBox.rs b/src/components/wifi/wifiBox.rs index ea7df37..ecab1a0 100644 --- a/src/components/wifi/wifiBox.rs +++ b/src/components/wifi/wifiBox.rs @@ -204,7 +204,6 @@ pub fn start_event_listener(listeners: Arc, wifi_box: Arc) { .static_clone(); let res = conn.add_match(access_point_added, move |ir: AccessPointAdded, _, _| { println!("received added event"); - // TODO handle add let wifi_box = added_ref.clone(); glib::spawn_future(async move { glib::idle_add_once(move || { @@ -230,7 +229,6 @@ pub fn start_event_listener(listeners: Arc, wifi_box: Arc) { } let res = conn.add_match(access_point_removed, move |ir: AccessPointRemoved, _, _| { println!("received removed event"); - // TODO handle remove let wifi_box = removed_ref.clone(); glib::spawn_future(async move { glib::idle_add_once(move || { diff --git a/src/components/wifi/wifiBoxImpl.rs b/src/components/wifi/wifiBoxImpl.rs index 60a6c1a..4824aac 100644 --- a/src/components/wifi/wifiBoxImpl.rs +++ b/src/components/wifi/wifiBoxImpl.rs @@ -40,6 +40,7 @@ unsafe impl Sync for WifiBox {} #[glib::object_subclass] impl ObjectSubclass for WifiBox { + const ABSTRACT: bool = false; const NAME: &'static str = "resetWifi"; type Type = wifiBox::WifiBox; type ParentType = gtk::Box; diff --git a/src/components/wifi/wifiEntryImpl.rs b/src/components/wifi/wifiEntryImpl.rs index b5bb30c..c60ce62 100644 --- a/src/components/wifi/wifiEntryImpl.rs +++ b/src/components/wifi/wifiEntryImpl.rs @@ -8,6 +8,7 @@ use adw::subclass::preferences_row::PreferencesRowImpl; use adw::subclass::prelude::ActionRowImpl; use ReSet_Lib::network::network::{AccessPoint, WifiStrength}; +#[allow(non_snake_case)] #[derive(Default, CompositeTemplate)] #[template(resource = "/org/Xetibo/ReSet/resetWifiEntry.ui")] pub struct WifiEntry { @@ -33,6 +34,7 @@ unsafe impl Sync for WifiEntry {} #[glib::object_subclass] impl ObjectSubclass for WifiEntry { + const ABSTRACT: bool = false; const NAME: &'static str = "resetWifiEntry"; type Type = wifiEntry::WifiEntry; type ParentType = ActionRow; diff --git a/src/components/wifi/wifiOptionsImpl.rs b/src/components/wifi/wifiOptionsImpl.rs index 25790ca..5c0cee7 100644 --- a/src/components/wifi/wifiOptionsImpl.rs +++ b/src/components/wifi/wifiOptionsImpl.rs @@ -59,6 +59,7 @@ pub struct WifiOptions { #[glib::object_subclass] impl ObjectSubclass for WifiOptions { + const ABSTRACT: bool = false; const NAME: &'static str = "resetWifiOptions"; type Type = wifiOptions::WifiOptions; type ParentType = NavigationPage; diff --git a/src/components/wifi/wifiRouteEntryImpl.rs b/src/components/wifi/wifiRouteEntryImpl.rs index 26bb261..d71e543 100644 --- a/src/components/wifi/wifiRouteEntryImpl.rs +++ b/src/components/wifi/wifiRouteEntryImpl.rs @@ -23,6 +23,7 @@ pub struct WifiRouteEntryImpl { #[glib::object_subclass] impl ObjectSubclass for WifiRouteEntryImpl { + const ABSTRACT: bool = false; const NAME: &'static str = "resetWifiRouteEntry"; type Type = wifiRouteEntry::WifiRouteEntry; type ParentType = gtk::Box; diff --git a/src/components/window/sidebarEntryImpl.rs b/src/components/window/sidebarEntryImpl.rs index 38520a4..3c47197 100644 --- a/src/components/window/sidebarEntryImpl.rs +++ b/src/components/window/sidebarEntryImpl.rs @@ -47,6 +47,7 @@ impl Default for SidebarAction { #[glib::object_subclass] impl ObjectSubclass for SidebarEntry { + const ABSTRACT: bool = false; const NAME: &'static str = "resetSidebarEntry"; type Type = sidebarEntry::SidebarEntry; type ParentType = ListBoxRow; diff --git a/src/components/window/windowImpl.rs b/src/components/window/windowImpl.rs index 4c096d1..a1168be 100644 --- a/src/components/window/windowImpl.rs +++ b/src/components/window/windowImpl.rs @@ -48,6 +48,7 @@ unsafe impl Sync for Window {} #[glib::object_subclass] impl ObjectSubclass for Window { + const ABSTRACT: bool = false; const NAME: &'static str = "resetUI"; type Type = window::Window; type ParentType = adw::ApplicationWindow;