mirror of
https://github.com/Xetibo/ReSet.git
synced 2025-04-08 22:52:01 +02:00
feat: Add Wifi Device Changes
This commit is contained in:
parent
5c99e7e59a
commit
75fbb062fc
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue