mirror of
https://github.com/Xetibo/ReSet.git
synced 2025-04-14 09:08:33 +02:00
44 lines
971 B
Rust
44 lines
971 B
Rust
use gtk::{CompositeTemplate, glib, ListBox};
|
|
use gtk::prelude::*;
|
|
use gtk::subclass::prelude::*;
|
|
use crate::wifi::WifiEntry;
|
|
|
|
|
|
#[allow(non_snake_case)]
|
|
#[derive(Default, CompositeTemplate)]
|
|
#[template(resource = "/org/xetibo/reset/resetWiFi.ui")]
|
|
pub struct WifiBox {
|
|
#[template_child]
|
|
pub resetWifiList: TemplateChild<ListBox>,
|
|
}
|
|
|
|
#[glib::object_subclass]
|
|
impl ObjectSubclass for WifiBox {
|
|
const NAME: &'static str = "resetWifi";
|
|
type Type = super::WifiBox;
|
|
type ParentType = gtk::Box;
|
|
|
|
fn class_init(klass: &mut Self::Class) {
|
|
WifiEntry::ensure_type();
|
|
klass.bind_template();
|
|
}
|
|
|
|
fn instance_init(obj: &glib::subclass::InitializingObject<Self>) {
|
|
obj.init_template();
|
|
}
|
|
}
|
|
|
|
impl ObjectImpl for WifiBox {
|
|
fn constructed(&self) {
|
|
self.parent_constructed();
|
|
}
|
|
}
|
|
|
|
impl BoxImpl for WifiBox {}
|
|
|
|
impl WidgetImpl for WifiBox {}
|
|
|
|
impl WindowImpl for WifiBox {}
|
|
|
|
impl ApplicationWindowImpl for WifiBox {}
|