mirror of
https://github.com/Xetibo/ReSet.git
synced 2025-12-15 10:01:39 +01:00
feat: Add gesture click to wifi -> dbus connection
This commit is contained in:
parent
eb4c9bb2a6
commit
2228c11c3c
13 changed files with 347 additions and 82 deletions
|
|
@ -1,4 +1,5 @@
|
|||
use std::cell::RefCell;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use gtk::{Button, CompositeTemplate, glib, ListBox, Switch};
|
||||
use gtk::prelude::*;
|
||||
use gtk::subclass::prelude::*;
|
||||
|
|
@ -7,6 +8,8 @@ use crate::components::wifi::wifiBox;
|
|||
use crate::components::wifi::wifiEntry::WifiEntry;
|
||||
use crate::components::base::listEntry::ListEntry;
|
||||
|
||||
use super::wifiBox::scanForWifi;
|
||||
|
||||
#[allow(non_snake_case)]
|
||||
#[derive(Default, CompositeTemplate)]
|
||||
#[template(resource = "/org/Xetibo/ReSet/resetWiFi.ui")]
|
||||
|
|
@ -23,9 +26,12 @@ pub struct WifiBox {
|
|||
pub resetWifiList: TemplateChild<ListBox>,
|
||||
#[template_child]
|
||||
pub resetWifiAdvanced: TemplateChild<Button>,
|
||||
pub wifiEntries: RefCell<Vec<ListEntry>>,
|
||||
pub wifiEntries: Arc<Mutex<Vec<ListEntry>>>,
|
||||
}
|
||||
|
||||
unsafe impl Send for WifiBox {}
|
||||
unsafe impl Sync for WifiBox {}
|
||||
|
||||
#[glib::object_subclass]
|
||||
impl ObjectSubclass for WifiBox {
|
||||
const NAME: &'static str = "resetWifi";
|
||||
|
|
@ -49,7 +55,6 @@ impl ObjectImpl for WifiBox {
|
|||
|
||||
let obj = self.obj();
|
||||
obj.setupCallbacks();
|
||||
obj.scanForWifi();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue