feat: Add Wifi Device Changes

This commit is contained in:
Fabio Lenherr / DashieTM 2023-11-25 16:26:48 +01:00
parent 5c99e7e59a
commit 75fbb062fc
21 changed files with 21 additions and 2 deletions

View file

@ -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;

View file

@ -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;

View file

@ -204,7 +204,6 @@ pub fn start_event_listener(listeners: Arc<Listeners>, wifi_box: Arc<WifiBox>) {
.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<Listeners>, wifi_box: Arc<WifiBox>) {
}
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 || {

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;