use crate::components::wifi::wifiBox; use adw::{ActionRow, ComboRow, NavigationView, PreferencesGroup}; use dbus::Path; use gtk::subclass::prelude::*; use gtk::{glib, CompositeTemplate, Switch}; use gtk::{prelude::*, StringList}; use std::cell::RefCell; use std::collections::HashMap; use std::sync::{Arc, Mutex, RwLock}; use ReSet_Lib::network::network::WifiDevice; use crate::components::base::listEntry::ListEntry; use crate::components::wifi::wifiEntry::WifiEntry; #[allow(non_snake_case)] #[derive(Default, CompositeTemplate)] #[template(resource = "/org/Xetibo/ReSet/resetWiFi.ui")] pub struct WifiBox { #[template_child] pub resetWifiNavigation: TemplateChild, #[template_child] pub resetWifiDetails: TemplateChild, #[template_child] pub resetWiFiDevice: TemplateChild, #[template_child] pub resetSavedNetworks: TemplateChild, #[template_child] pub resetWifiSwitch: TemplateChild, #[template_child] pub resetWifiList: TemplateChild, #[template_child] pub resetStoredWifiList: TemplateChild, #[template_child] pub resetAvailableNetworks: TemplateChild, pub wifiEntries: Arc, Arc>>>, pub wifiEntriesPath: Arc, Arc>>>, pub savedWifiEntries: Arc>>, pub resetWifiDevices: Arc>>, pub resetCurrentWifiDevice: Arc>, pub resetModelList: Arc>, pub resetModelIndex: Arc>, } unsafe impl Send for WifiBox {} 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; fn class_init(klass: &mut Self::Class) { WifiEntry::ensure_type(); ListEntry::ensure_type(); klass.bind_template(); } fn instance_init(obj: &glib::subclass::InitializingObject) { obj.init_template(); } } impl ObjectImpl for WifiBox { fn constructed(&self) { self.parent_constructed(); let obj = self.obj(); obj.setupCallbacks(); } } impl BoxImpl for WifiBox {} impl WidgetImpl for WifiBox {} impl WindowImpl for WifiBox {} impl ApplicationWindowImpl for WifiBox {}