mirror of
https://github.com/Xetibo/ReSet.git
synced 2025-12-15 10:01:39 +01:00
feat: Add saved WifiList
This commit is contained in:
parent
bbfd07688d
commit
9cad376a40
13 changed files with 372 additions and 126 deletions
52
src/components/wifi/savedWifiEntryImpl.rs
Normal file
52
src/components/wifi/savedWifiEntryImpl.rs
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
use std::cell::RefCell;
|
||||
|
||||
use dbus::Path;
|
||||
use gtk::subclass::prelude::*;
|
||||
use gtk::{glib, Button, CompositeTemplate, Label};
|
||||
|
||||
use super::savedWifiEntry;
|
||||
|
||||
#[allow(non_snake_case)]
|
||||
#[derive(Default, CompositeTemplate)]
|
||||
#[template(resource = "/org/Xetibo/ReSet/resetSavedWifiEntry.ui")]
|
||||
pub struct SavedWifiEntry {
|
||||
#[template_child]
|
||||
pub resetDeleteSavedWifiButton: TemplateChild<Button>,
|
||||
#[template_child]
|
||||
pub resetEditSavedWifiButton: TemplateChild<Button>,
|
||||
#[template_child]
|
||||
pub resetSavedWifiLabel: TemplateChild<Label>,
|
||||
pub resetConnectionPath: RefCell<Path<'static>>,
|
||||
}
|
||||
|
||||
unsafe impl Send for SavedWifiEntry {}
|
||||
unsafe impl Sync for SavedWifiEntry {}
|
||||
|
||||
#[glib::object_subclass]
|
||||
impl ObjectSubclass for SavedWifiEntry {
|
||||
const NAME: &'static str = "resetSavedWifiEntry";
|
||||
type Type = savedWifiEntry::SavedWifiEntry;
|
||||
type ParentType = gtk::Box;
|
||||
|
||||
fn class_init(klass: &mut Self::Class) {
|
||||
klass.bind_template();
|
||||
}
|
||||
|
||||
fn instance_init(obj: &glib::subclass::InitializingObject<Self>) {
|
||||
obj.init_template();
|
||||
}
|
||||
}
|
||||
|
||||
impl ObjectImpl for SavedWifiEntry {
|
||||
fn constructed(&self) {
|
||||
self.parent_constructed();
|
||||
}
|
||||
}
|
||||
|
||||
impl BoxImpl for SavedWifiEntry {}
|
||||
|
||||
impl WidgetImpl for SavedWifiEntry {}
|
||||
|
||||
impl WindowImpl for SavedWifiEntry {}
|
||||
|
||||
impl ApplicationWindowImpl for SavedWifiEntry {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue