mirror of
https://github.com/Xetibo/ReSet.git
synced 2025-04-17 10:18:32 +02:00
53 lines
1.4 KiB
Rust
53 lines
1.4 KiB
Rust
use crate::components::wifi::wifiRouteEntry;
|
|
use adw::{EntryRow, ExpanderRow};
|
|
use gtk::subclass::prelude::*;
|
|
use gtk::{glib, Button, CompositeTemplate};
|
|
|
|
#[allow(non_snake_case)]
|
|
#[derive(Default, CompositeTemplate)]
|
|
#[template(resource = "/org/Xetibo/ReSet/resetWifiRouteEntry.ui")]
|
|
pub struct WifiRouteEntryImpl {
|
|
#[template_child]
|
|
pub resetRouteRow: TemplateChild<ExpanderRow>,
|
|
#[template_child]
|
|
pub resetRouteAddress: TemplateChild<EntryRow>,
|
|
#[template_child]
|
|
pub resetRouteNetmask: TemplateChild<EntryRow>,
|
|
#[template_child]
|
|
pub resetRouteGateway: TemplateChild<EntryRow>,
|
|
#[template_child]
|
|
pub resetRouteMetric: TemplateChild<EntryRow>,
|
|
#[template_child]
|
|
pub resetRouteRemove: TemplateChild<Button>,
|
|
}
|
|
|
|
#[glib::object_subclass]
|
|
impl ObjectSubclass for WifiRouteEntryImpl {
|
|
const ABSTRACT: bool = false;
|
|
const NAME: &'static str = "resetWifiRouteEntry";
|
|
type Type = wifiRouteEntry::WifiRouteEntry;
|
|
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 WifiRouteEntryImpl {
|
|
fn constructed(&self) {
|
|
self.parent_constructed();
|
|
}
|
|
}
|
|
|
|
impl BoxImpl for WifiRouteEntryImpl {}
|
|
|
|
impl WidgetImpl for WifiRouteEntryImpl {}
|
|
|
|
impl WindowImpl for WifiRouteEntryImpl {}
|
|
|
|
impl ApplicationWindowImpl for WifiRouteEntryImpl {}
|