mirror of
https://github.com/Xetibo/ReSet.git
synced 2025-07-07 18:47:45 +02:00
feat: Add Wifi Device Changes
This commit is contained in:
parent
5c99e7e59a
commit
75fbb062fc
21 changed files with 21 additions and 2 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 || {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue