Add wifiOptions (ui only)

This commit is contained in:
takotori 2023-11-18 17:26:56 +01:00
parent 1080a03b8b
commit 5311bb8c4c
12 changed files with 847 additions and 50 deletions

View file

@ -122,7 +122,7 @@ pub fn populate_sinks(output_box: Arc<SinkBox>) {
sink,
));
let sink_clone = sink_entry.clone();
let entry = Arc::new(ListEntry::new(&*sink_entry));
let entry = Arc::new(ListEntry::new(&*sink_entry, ));
entry.set_activatable(false);
list.insert(index, (entry.clone(), sink_clone, alias));
output_box_imp.resetSinks.append(&*entry);
@ -217,7 +217,7 @@ pub fn populate_inputstreams(output_box: Arc<SinkBox>) {
for stream in streams {
let index = stream.index;
let input_stream = Arc::new(InputStreamEntry::new(output_box.clone(), stream));
let entry = Arc::new(ListEntry::new(&*input_stream));
let entry = Arc::new(ListEntry::new(&*input_stream, ));
entry.set_activatable(false);
list.insert(index, (entry.clone(), input_stream.clone()));
output_box_imp.resetInputStreams.append(&*entry);
@ -359,7 +359,7 @@ pub fn start_output_box_listener(conn: Connection, sink_box: Arc<SinkBox>) -> Co
ir.sink,
));
let sink_clone = sink_entry.clone();
let entry = Arc::new(ListEntry::new(&*sink_entry));
let entry = Arc::new(ListEntry::new(&*sink_entry, ));
entry.set_activatable(false);
list.insert(sink_index, (entry.clone(), sink_clone, alias.clone()));
output_box_imp.resetSinks.append(&*entry);
@ -462,7 +462,7 @@ pub fn start_output_box_listener(conn: Connection, sink_box: Arc<SinkBox>) -> Co
let mut list = output_box_imp.resetInputStreamList.write().unwrap();
let index = ir.stream.index;
let input_stream = Arc::new(InputStreamEntry::new(output_box.clone(), ir.stream));
let entry = Arc::new(ListEntry::new(&*input_stream));
let entry = Arc::new(ListEntry::new(&*input_stream, ));
entry.set_activatable(false);
list.insert(index, (entry.clone(), input_stream.clone()));
output_box_imp.resetInputStreams.append(&*entry);

View file

@ -5,3 +5,5 @@ pub mod wifiBox;
pub mod wifiBoxImpl;
pub mod wifiEntry;
pub mod wifiEntryImpl;
pub mod wifiOptions;
pub mod wifiOptionsImpl;

View file

@ -15,6 +15,7 @@ use dbus::arg::{AppendAll, ReadAll, RefArg};
use dbus::blocking::Connection;
use dbus::Error;
use dbus::Path;
use glib::ObjectExt;
use gtk::gio;
use gtk::glib::Variant;
use gtk::prelude::ActionableExt;
@ -74,7 +75,7 @@ pub fn scanForWifi(listeners: Arc<Listeners>, wifiBox: Arc<WifiBox>) {
let selfImp = wifibox_ref.imp();
for accessPoint in accessPoints {
let ssid = accessPoint.ssid.clone();
let entry = Arc::new(ListEntry::new(&*WifiEntry::new(accessPoint)));
let entry = Arc::new(ListEntry::new(&*WifiEntry::new(accessPoint, selfImp)));
wifiEntries.insert(ssid, entry.clone());
selfImp.resetWifiList.append(&*entry);
}
@ -123,7 +124,7 @@ pub fn scanForWifi(listeners: Arc<Listeners>, wifiBox: Arc<WifiBox>) {
return;
}
let entry =
Arc::new(ListEntry::new(&*WifiEntry::new(access_point.0)));
Arc::new(ListEntry::new(&*WifiEntry::new(access_point.0, wifiBoxImpl.imp())));
wifiEntries.insert(ssid, entry.clone());
wifiBoxImpl.imp().resetWifiList.append(&*entry);
});

View file

@ -4,6 +4,7 @@ use gtk::subclass::prelude::*;
use gtk::{glib, CompositeTemplate, ListBox, Switch};
use std::collections::HashMap;
use std::sync::{Arc, Mutex};
use adw::NavigationView;
use crate::components::base::listEntry::ListEntry;
use crate::components::wifi::wifiEntry::WifiEntry;
@ -12,6 +13,8 @@ use crate::components::wifi::wifiEntry::WifiEntry;
#[derive(Default, CompositeTemplate)]
#[template(resource = "/org/Xetibo/ReSet/resetWiFi.ui")]
pub struct WifiBox {
#[template_child]
pub resetWifiNavigation: TemplateChild<NavigationView>,
#[template_child]
pub resetWifiDetails: TemplateChild<ListBox>,
#[template_child]

View file

@ -13,9 +13,10 @@ use gtk::prelude::{ListBoxRowExt, WidgetExt};
use gtk::{gio, AlertDialog, GestureClick};
use ReSet_Lib::network::network::{AccessPoint, WifiStrength};
use crate::components::base::listEntry::ListEntry;
use crate::components::wifi::{wifiEntryImpl};
use crate::components::wifi::wifiBox::getConnectionSettings;
use crate::components::wifi::wifiEntryImpl;
use crate::components::wifi::wifiBoxImpl::WifiBox;
use crate::components::wifi::wifiOptions::WifiOptions;
use super::savedWifiEntry::SavedWifiEntry;
@ -29,7 +30,7 @@ unsafe impl Send for WifiEntry {}
unsafe impl Sync for WifiEntry {}
impl WifiEntry {
pub fn new(access_point: AccessPoint) -> Arc<Self> {
pub fn new(access_point: AccessPoint, wifiBox: &WifiBox) -> Arc<Self> {
let entry: Arc<WifiEntry> = Arc::new(Object::builder().build());
let stored_entry = entry.clone();
let new_entry = entry.clone();
@ -77,14 +78,15 @@ impl WifiEntry {
}
}));
entry.add_controller(gesture);
entry.setupCallbacks(wifiBox);
entry
}
pub fn setupCallbacks(&self) {
pub fn setupCallbacks(&self, wifiBox: &WifiBox) {
let selfImp = self.imp();
selfImp.resetWifiEditButton.connect_clicked(clone!(@ weak selfImp => move |_| {
// TODO open navigationpage
selfImp.resetWifiEditButton.connect_clicked(clone!(@ weak selfImp, @ weak wifiBox => move |_| {
let _option = getConnectionSettings(selfImp.accessPoint.borrow().associated_connection.clone());
wifiBox.resetWifiNavigation.push(&WifiOptions::new(_option));
}));
}
}

View file

@ -50,9 +50,6 @@ impl ObjectSubclass for WifiEntry {
impl ObjectImpl for WifiEntry {
fn constructed(&self) {
self.parent_constructed();
let obj = self.obj();
obj.setupCallbacks();
}
}

View file

@ -0,0 +1,21 @@
use adw::glib;
use adw::glib::Object;
use adw::subclass::prelude::ObjectSubclassIsExt;
use glib::PropertySet;
use ReSet_Lib::network::connection::Connection;
use crate::components::wifi::{wifiOptionsImpl};
glib::wrapper! {
pub struct WifiOptions(ObjectSubclass<wifiOptionsImpl::WifiOptions>)
@extends adw::NavigationPage, gtk::Widget,
@implements gtk::Accessible, gtk::Buildable, gtk::ConstraintTarget;
}
impl WifiOptions {
pub fn new(option: Option<Connection>) -> Self {
let wifiOption: WifiOptions = Object::builder().build();
wifiOption.imp().options.set(option);
wifiOption
}
}

View file

@ -0,0 +1,45 @@
use std::cell::RefCell;
use adw::NavigationPage;
use adw::subclass::prelude::NavigationPageImpl;
use crate::components::wifi::{wifiOptions};
use gtk::subclass::prelude::*;
use gtk::{glib, CompositeTemplate};
use ReSet_Lib::network::connection::Connection;
#[allow(non_snake_case)]
#[derive(Default, CompositeTemplate)]
#[template(resource = "/org/Xetibo/ReSet/resetWifiOptions.ui")]
pub struct WifiOptions {
pub options: RefCell<Option<Connection>> // Option<Rc<RefCell<Connection>>>
}
#[glib::object_subclass]
impl ObjectSubclass for WifiOptions {
const NAME: &'static str = "resetWifiOptions";
type Type = wifiOptions::WifiOptions;
type ParentType = NavigationPage;
fn class_init(klass: &mut Self::Class) {
klass.bind_template();
}
fn instance_init(obj: &glib::subclass::InitializingObject<Self>) {
obj.init_template();
}
}
impl NavigationPageImpl for WifiOptions {}
impl ObjectImpl for WifiOptions {
fn constructed(&self) {
self.parent_constructed();
}
}
impl BoxImpl for WifiOptions {}
impl WidgetImpl for WifiOptions {}
impl WindowImpl for WifiOptions {}
impl ApplicationWindowImpl for WifiOptions {}

View file

@ -18,7 +18,8 @@
(17,1,None,"resetSavedWifiEntry.ui",None,None,None,None,None,None,None),
(18,1,None,"resetSinkEntry.ui",None,None,None,None,None,None,None),
(19,1,None,"resetSourceEntry.ui",None,None,None,None,None,None,None),
(20,1,None,"resetCardEntry.ui",None,None,None,None,None,None,None)
(20,8,None,"resetWifiOptions.ui",None,None,None,None,None,None,None)
(21,1,None,"resetCardEntry.ui",None,None,None,None,None,None,None)
</ui>
<object>
(3,1,"AdwApplicationWindow","resetUI",None,None,None,None,-1," &lt;child&gt;\n &lt;object id=\"resetSidebarBreakpoint\" class=\"AdwBreakpoint\"&gt;\n &lt;/object&gt;\n &lt;/child&gt;"),
@ -53,7 +54,7 @@
(3,50,"GtkLabel",None,34,None,None,None,3,None),
(3,51,"GtkButton","resetShortcutsButton",36,None,None,None,None,None),
(4,7,"GtkBox","resetWifi",None,None,None,None,None,None),
(4,152,"AdwNavigationView",None,7,None,None,None,1,None),
(4,152,"AdwNavigationView","resetWifiNavigation",7,None,None,None,1,None),
(4,153,"AdwNavigationPage",None,152,None,None,None,None,None),
(4,154,"GtkBox",None,153,None,None,None,None,None),
(4,155,"GtkListBox","resetWifiDetails",154,None,None,None,1,None),
@ -275,11 +276,104 @@
(19,9,"GtkLabel","resetVolumePercentage",5,None,None,None,2,None),
(19,10,"GtkProgressBar","resetVolumeMeter",1,None,None,None,2,None),
(19,12,"GtkAdjustment",None,7,None,None,None,-1,None),
(20,1,"GtkBox","resetCardEntry",None,None,None,None,None,None),
(20,2,"GtkBox",None,1,None,None,None,None,None),
(20,3,"GtkLabel","resetCardName",2,None,None,None,None,None),
(20,5,"GtkDropDown","resetCardDropdown",2,None,None,None,1,None),
(20,6,"GtkStringList","resetCardList",5,None,None,None,-1,None)
(20,8,"AdwNavigationPage","resetWifiOptions",None,None,None,None,-1,None),
(20,9,"GtkNotebook",None,8,None,None,None,None,None),
(20,10,"GtkBox",None,9,None,None,None,None,None),
(20,11,"GtkLabel",None,9,None,"tab",None,1,None),
(20,15,"GtkBox",None,9,None,None,None,4,None),
(20,16,"GtkBox",None,9,None,None,None,6,None),
(20,18,"GtkLabel",None,9,None,"tab",None,5,None),
(20,19,"GtkLabel",None,9,None,"tab",None,7,None),
(20,29,"AdwPreferencesGroup",None,10,None,None,None,-1,None),
(20,30,"AdwActionRow",None,29,None,None,None,None,None),
(20,31,"AdwActionRow",None,29,None,None,None,1,None),
(20,32,"AdwActionRow",None,29,None,None,None,2,None),
(20,37,"AdwSwitchRow",None,29,None,None,None,3,None),
(20,38,"AdwSwitchRow",None,29,None,None,None,4,None),
(20,137,"AdwPreferencesGroup",None,15,None,None,None,None,None),
(20,138,"AdwComboRow",None,137,None,None,None,None,None),
(20,139,"GtkStringList",None,138,None,None,None,None,None),
(20,140,"AdwPreferencesGroup",None,15,None,None,None,1,None),
(20,141,"GtkListBoxRow",None,140,None,None,None,None,None),
(20,142,"GtkBox",None,141,None,None,None,None,None),
(20,143,"GtkEntry",None,142,None,None,None,None,None),
(20,144,"GtkSeparator",None,142,None,None,None,1,None),
(20,145,"GtkEntry",None,142,None,None,None,2,None),
(20,146,"GtkSeparator",None,142,None,None,None,3,None),
(20,147,"GtkEntry",None,142,None,None,None,4,None),
(20,148,"GtkSeparator",None,142,None,None,None,5,None),
(20,149,"GtkButton",None,142,None,None,None,6,None),
(20,150,"AdwPreferencesGroup",None,15,None,None,None,2,None),
(20,151,"GtkListBoxRow",None,150,None,None,None,None,None),
(20,152,"GtkBox",None,151,None,None,None,None,None),
(20,153,"GtkEntry",None,152,None,None,None,None,None),
(20,154,"GtkLabel",None,152,None,None,None,1,None),
(20,155,"AdwPreferencesGroup",None,15,None,None,None,3,None),
(20,156,"GtkListBoxRow",None,155,None,None,None,None,None),
(20,157,"GtkBox",None,156,None,None,None,None,None),
(20,158,"GtkEntry",None,157,None,None,None,None,None),
(20,159,"GtkSeparator",None,157,None,None,None,1,None),
(20,160,"GtkEntry",None,157,None,None,None,2,None),
(20,161,"GtkSeparator",None,157,None,None,None,3,None),
(20,162,"GtkEntry",None,157,None,None,None,4,None),
(20,163,"GtkSeparator",None,157,None,None,None,5,None),
(20,164,"GtkEntry",None,157,None,None,None,6,None),
(20,165,"GtkSeparator",None,157,None,None,None,7,None),
(20,166,"GtkButton",None,157,None,None,None,8,None),
(20,182,"AdwPreferencesGroup",None,16,None,None,None,None,None),
(20,183,"AdwComboRow",None,182,None,None,None,None,None),
(20,184,"GtkStringList",None,183,None,None,None,None,None),
(20,185,"AdwPasswordEntryRow",None,182,None,None,None,1,None),
(20,186,"GtkBox",None,155,None,None,None,-1,None),
(20,187,"GtkLabel",None,186,None,None,None,None,None),
(20,188,"GtkSwitch",None,186,None,None,None,1,None),
(20,189,"GtkBox",None,150,None,None,None,-1,None),
(20,190,"GtkLabel",None,189,None,None,None,None,None),
(20,191,"GtkSwitch",None,189,None,None,None,1,None),
(20,192,"GtkBox",None,9,None,None,None,2,None),
(20,193,"AdwPreferencesGroup",None,192,None,None,None,None,None),
(20,194,"AdwComboRow",None,193,None,None,None,None,None),
(20,195,"GtkStringList",None,194,None,None,None,None,None),
(20,196,"AdwPreferencesGroup",None,192,None,None,None,1,None),
(20,197,"GtkListBoxRow",None,196,None,None,None,None,None),
(20,198,"GtkBox",None,197,None,None,None,None,None),
(20,199,"GtkEntry",None,198,None,None,None,None,None),
(20,200,"GtkSeparator",None,198,None,None,None,1,None),
(20,201,"GtkEntry",None,198,None,None,None,2,None),
(20,202,"GtkSeparator",None,198,None,None,None,3,None),
(20,203,"GtkEntry",None,198,None,None,None,4,None),
(20,204,"GtkSeparator",None,198,None,None,None,5,None),
(20,205,"GtkButton",None,198,None,None,None,6,None),
(20,206,"AdwPreferencesGroup",None,192,None,None,None,2,None),
(20,207,"GtkBox",None,206,None,None,None,None,None),
(20,208,"GtkLabel",None,207,None,None,None,None,None),
(20,209,"GtkSwitch",None,207,None,None,None,1,None),
(20,210,"GtkListBoxRow",None,206,None,None,None,None,None),
(20,211,"GtkBox",None,210,None,None,None,None,None),
(20,212,"GtkEntry",None,211,None,None,None,None,None),
(20,213,"GtkLabel",None,211,None,None,None,1,None),
(20,214,"AdwPreferencesGroup",None,192,None,None,None,3,None),
(20,215,"GtkBox",None,214,None,None,None,None,None),
(20,216,"GtkLabel",None,215,None,None,None,None,None),
(20,217,"GtkSwitch",None,215,None,None,None,1,None),
(20,218,"GtkListBoxRow",None,214,None,None,None,None,None),
(20,219,"GtkBox",None,218,None,None,None,None,None),
(20,220,"GtkEntry",None,219,None,None,None,None,None),
(20,221,"GtkSeparator",None,219,None,None,None,1,None),
(20,222,"GtkEntry",None,219,None,None,None,2,None),
(20,223,"GtkSeparator",None,219,None,None,None,3,None),
(20,224,"GtkEntry",None,219,None,None,None,4,None),
(20,225,"GtkSeparator",None,219,None,None,None,5,None),
(20,226,"GtkEntry",None,219,None,None,None,6,None),
(20,227,"GtkSeparator",None,219,None,None,None,7,None),
(20,228,"GtkButton",None,219,None,None,None,8,None),
(20,229,"GtkLabel",None,9,None,"tab",None,3,None),
(20,230,"AdwEntryRow",None,193,None,None,None,1,None)
(21,1,"GtkBox","resetCardEntry",None,None,None,None,None,None),
(21,2,"GtkBox",None,1,None,None,None,None,None),
(21,3,"GtkLabel","resetCardName",2,None,None,None,None,None),
(21,5,"GtkDropDown","resetCardDropdown",2,None,None,None,1,None),
(21,6,"GtkStringList","resetCardList",5,None,None,None,-1,None)
</object>
<object_property>
(3,1,"GtkWidget","height-request","200",None,None,None,None,None,None,None,None,None),
@ -901,23 +995,135 @@
(19,12,"GtkAdjustment","page-increment","2005.4016",None,None,None,None,None,None,None,None,None),
(19,12,"GtkAdjustment","step-increment","2005.4016",None,None,None,None,None,None,None,None,None),
(19,12,"GtkAdjustment","upper","100270.08",None,None,None,None,None,None,None,None,None),
(20,1,"GtkOrientable","orientation","vertical",None,None,None,None,None,None,None,None,None),
(20,1,"GtkWidget","margin-bottom","5",None,None,None,None,None,None,None,None,None),
(20,1,"GtkWidget","margin-end","5",None,None,None,None,None,None,None,None,None),
(20,1,"GtkWidget","margin-start","5",None,None,None,None,None,None,None,None,None),
(20,1,"GtkWidget","margin-top","5",None,None,None,None,None,None,None,None,None),
(20,2,"GtkWidget","margin-bottom","5",None,None,None,None,None,None,None,None,None),
(20,3,"GtkLabel","label","text",None,None,None,None,None,None,None,None,None),
(20,3,"GtkLabel","wrap","True",None,None,None,None,None,None,None,None,None),
(20,3,"GtkWidget","margin-start","5",None,None,None,None,None,None,None,None,None),
(20,5,"GtkDropDown","model",None,None,None,None,None,6,None,None,None,None),
(20,5,"GtkWidget","halign","end",None,None,None,None,None,None,None,None,None),
(20,5,"GtkWidget","hexpand","True",None,None,None,None,None,None,None,None,None),
(20,5,"GtkWidget","hexpand-set","True",None,None,None,None,None,None,None,None,None)
(20,9,"GtkNotebook","page","0",None,None,None,None,None,None,None,None,None),
(20,9,"GtkNotebook","scrollable","True",None,None,None,None,None,None,None,None,None),
(20,9,"GtkNotebook","show-border","False",None,None,None,None,None,None,None,None,None),
(20,10,"GtkOrientable","orientation","vertical",None,None,None,None,None,None,None,None,None),
(20,11,"GtkLabel","label","General",None,None,None,None,None,None,None,None,None),
(20,15,"GtkOrientable","orientation","vertical",None,None,None,None,None,None,None,None,None),
(20,15,"GtkWidget","width-request","500",None,None,None,None,None,None,None,None,None),
(20,16,"GtkOrientable","orientation","vertical",None,None,None,None,None,None,None,None,None),
(20,18,"GtkLabel","label","IPv6",None,None,None,None,None,None,None,None,None),
(20,19,"GtkLabel","label","Security",None,None,None,None,None,None,None,None,None),
(20,30,"AdwActionRow","subtitle","asdf",None,None,None,None,None,None,None,None,None),
(20,30,"AdwPreferencesRow","title","WiFi Name",None,None,None,None,None,None,None,None,None),
(20,30,"GtkWidget","css-classes","property",None,None,None,None,None,None,None,None,None),
(20,30,"GtkWidget","margin-bottom","5",None,None,None,None,None,None,None,None,None),
(20,30,"GtkWidget","margin-end","5",None,None,None,None,None,None,None,None,None),
(20,30,"GtkWidget","margin-start","5",None,None,None,None,None,None,None,None,None),
(20,30,"GtkWidget","margin-top","5",None,None,None,None,None,None,None,None,None),
(20,31,"AdwActionRow","subtitle","stronk",None,None,None,None,None,None,None,None,None),
(20,31,"AdwPreferencesRow","title","Signal Strength",None,None,None,None,None,None,None,None,None),
(20,31,"GtkWidget","css-classes","property",None,None,None,None,None,None,None,None,None),
(20,32,"AdwActionRow","subtitle","AA:BB:CC:DD:EE:FF",None,None,None,None,None,None,None,None,None),
(20,32,"AdwPreferencesRow","title","MAC-Address",None,None,None,None,None,None,None,None,None),
(20,32,"GtkWidget","css-classes","property",None,None,None,None,None,None,None,None,None),
(20,37,"AdwPreferencesRow","title","Connect automatically",None,None,None,None,None,None,None,None,None),
(20,38,"AdwPreferencesRow","title","Metered Connection",None,None,None,None,None,None,None,None,None),
(20,138,"AdwComboRow","model",None,None,None,None,None,139,None,None,None,None),
(20,138,"AdwPreferencesRow","title","IPv6 Method",None,None,None,None,None,None,None,None,None),
(20,140,"AdwPreferencesGroup","title","Addresses",None,None,None,None,None,None,None,None,None),
(20,140,"GtkWidget","margin-top","10",None,None,None,None,None,None,None,None,None),
(20,141,"GtkListBoxRow","activatable","False",None,None,None,None,None,None,None,None,None),
(20,143,"GtkEntry","placeholder-text","Address",None,None,None,None,None,None,None,None,None),
(20,143,"GtkWidget","hexpand","True",None,None,None,None,None,None,None,None,None),
(20,145,"GtkEntry","placeholder-text","Prefix",None,None,None,None,None,None,None,None,None),
(20,145,"GtkWidget","hexpand","True",None,None,None,None,None,None,None,None,None),
(20,147,"GtkEntry","placeholder-text","Gateway",None,None,None,None,None,None,None,None,None),
(20,147,"GtkWidget","hexpand","True",None,None,None,None,None,None,None,None,None),
(20,149,"GtkButton","icon-name","edit-delete-symbolic",None,None,None,None,None,None,None,None,None),
(20,150,"AdwPreferencesGroup","header-suffix",None,None,None,None,None,189,None,None,None,None),
(20,150,"AdwPreferencesGroup","title","DNS",None,None,None,None,None,None,None,None,None),
(20,150,"GtkWidget","margin-top","10",None,None,None,None,None,None,None,None,None),
(20,151,"GtkListBoxRow","activatable","False",None,None,None,None,None,None,None,None,None),
(20,152,"GtkOrientable","orientation","vertical",None,None,None,None,None,None,None,None,None),
(20,154,"GtkLabel","label","seperate ip by comma",None,None,None,None,None,None,None,None,None),
(20,154,"GtkWidget","halign","start",None,None,None,None,None,None,None,None,None),
(20,155,"AdwPreferencesGroup","header-suffix",None,None,None,None,None,186,None,None,None,None),
(20,155,"AdwPreferencesGroup","title","Routes",None,None,None,None,None,None,None,None,None),
(20,155,"GtkWidget","margin-top","10",None,None,None,None,None,None,None,None,None),
(20,156,"GtkListBoxRow","activatable","False",None,None,None,None,None,None,None,None,None),
(20,158,"GtkEntry","placeholder-text","Address",None,None,None,None,None,None,None,None,None),
(20,158,"GtkWidget","hexpand","True",None,None,None,None,None,None,None,None,None),
(20,160,"GtkEntry","placeholder-text","Prefix",None,None,None,None,None,None,None,None,None),
(20,160,"GtkWidget","hexpand","True",None,None,None,None,None,None,None,None,None),
(20,162,"GtkEntry","placeholder-text","Gateway",None,None,None,None,None,None,None,None,None),
(20,162,"GtkWidget","hexpand","True",None,None,None,None,None,None,None,None,None),
(20,164,"GtkEditable","max-width-chars","5",None,None,None,None,None,None,None,None,None),
(20,164,"GtkEntry","placeholder-text","Metric",None,None,None,None,None,None,None,None,None),
(20,164,"GtkWidget","width-request","50",None,None,None,None,None,None,None,None,None),
(20,166,"GtkButton","icon-name","edit-delete-symbolic",None,None,None,None,None,None,None,None,None),
(20,183,"AdwComboRow","model",None,None,None,None,None,184,None,None,None,None),
(20,183,"AdwPreferencesRow","title","Security",None,None,None,None,None,None,None,None,None),
(20,185,"AdwPreferencesRow","title","Password",None,None,None,None,None,None,None,None,None),
(20,187,"GtkLabel","label","Automatic",None,None,None,None,None,None,None,None,None),
(20,187,"GtkWidget","margin-end","5",None,None,None,None,None,None,None,None,None),
(20,188,"GtkWidget","valign","center",None,None,None,None,None,None,None,None,None),
(20,190,"GtkLabel","label","Automatic",None,None,None,None,None,None,None,None,None),
(20,190,"GtkWidget","margin-end","5",None,None,None,None,None,None,None,None,None),
(20,191,"GtkWidget","valign","center",None,None,None,None,None,None,None,None,None),
(20,192,"GtkOrientable","orientation","vertical",None,None,None,None,None,None,None,None,None),
(20,192,"GtkWidget","width-request","500",None,None,None,None,None,None,None,None,None),
(20,194,"AdwComboRow","model",None,None,None,None,None,195,None,None,None,None),
(20,194,"AdwPreferencesRow","title","IPv4 Method",None,None,None,None,None,None,None,None,None),
(20,196,"AdwPreferencesGroup","title","Addresses",None,None,None,None,None,None,None,None,None),
(20,196,"GtkWidget","margin-top","10",None,None,None,None,None,None,None,None,None),
(20,197,"GtkListBoxRow","activatable","False",None,None,None,None,None,None,None,None,None),
(20,199,"GtkEntry","max-length","1",None,None,None,None,None,None,None,None,None),
(20,199,"GtkEntry","placeholder-text","Address",None,None,None,None,None,None,None,None,None),
(20,199,"GtkWidget","hexpand","True",None,None,None,None,None,None,None,None,None),
(20,201,"GtkEntry","placeholder-text","Netmask",None,None,None,None,None,None,None,None,None),
(20,201,"GtkWidget","hexpand","True",None,None,None,None,None,None,None,None,None),
(20,203,"GtkEntry","placeholder-text","Gateway",None,None,None,None,None,None,None,None,None),
(20,203,"GtkWidget","hexpand","True",None,None,None,None,None,None,None,None,None),
(20,205,"GtkButton","icon-name","edit-delete-symbolic",None,None,None,None,None,None,None,None,None),
(20,206,"AdwPreferencesGroup","header-suffix",None,None,None,None,None,207,None,None,None,None),
(20,206,"AdwPreferencesGroup","title","DNS",None,None,None,None,None,None,None,None,None),
(20,206,"GtkWidget","margin-top","10",None,None,None,None,None,None,None,None,None),
(20,208,"GtkLabel","label","Automatic",None,None,None,None,None,None,None,None,None),
(20,208,"GtkWidget","margin-end","5",None,None,None,None,None,None,None,None,None),
(20,209,"GtkWidget","valign","center",None,None,None,None,None,None,None,None,None),
(20,210,"GtkListBoxRow","activatable","False",None,None,None,None,None,None,None,None,None),
(20,211,"GtkOrientable","orientation","vertical",None,None,None,None,None,None,None,None,None),
(20,213,"GtkLabel","label","seperate ip by comma",None,None,None,None,None,None,None,None,None),
(20,213,"GtkWidget","halign","start",None,None,None,None,None,None,None,None,None),
(20,214,"AdwPreferencesGroup","header-suffix",None,None,None,None,None,215,None,None,None,None),
(20,214,"AdwPreferencesGroup","title","Routes",None,None,None,None,None,None,None,None,None),
(20,214,"GtkWidget","margin-top","10",None,None,None,None,None,None,None,None,None),
(20,216,"GtkLabel","label","Automatic",None,None,None,None,None,None,None,None,None),
(20,216,"GtkWidget","margin-end","5",None,None,None,None,None,None,None,None,None),
(20,217,"GtkWidget","valign","center",None,None,None,None,None,None,None,None,None),
(20,218,"GtkListBoxRow","activatable","False",None,None,None,None,None,None,None,None,None),
(20,220,"GtkEntry","placeholder-text","Address",None,None,None,None,None,None,None,None,None),
(20,220,"GtkWidget","hexpand","True",None,None,None,None,None,None,None,None,None),
(20,222,"GtkEntry","placeholder-text","Netmask",None,None,None,None,None,None,None,None,None),
(20,222,"GtkWidget","hexpand","True",None,None,None,None,None,None,None,None,None),
(20,224,"GtkEntry","placeholder-text","Gateway",None,None,None,None,None,None,None,None,None),
(20,224,"GtkWidget","hexpand","True",None,None,None,None,None,None,None,None,None),
(20,226,"GtkEditable","max-width-chars","5",None,None,None,None,None,None,None,None,None),
(20,226,"GtkEntry","placeholder-text","Metric",None,None,None,None,None,None,None,None,None),
(20,226,"GtkWidget","width-request","50",None,None,None,None,None,None,None,None,None),
(20,228,"GtkButton","icon-name","edit-delete-symbolic",None,None,None,None,None,None,None,None,None),
(20,229,"GtkLabel","label","IPv4",None,None,None,None,None,None,None,None,None),
(20,230,"AdwPreferencesRow","title","DNS (separate IP by comma)",None,None,None,None,None,None,None,None,None)
(21,1,"GtkOrientable","orientation","vertical",None,None,None,None,None,None,None,None,None),
(21,1,"GtkWidget","margin-bottom","5",None,None,None,None,None,None,None,None,None),
(21,1,"GtkWidget","margin-end","5",None,None,None,None,None,None,None,None,None),
(21,1,"GtkWidget","margin-start","5",None,None,None,None,None,None,None,None,None),
(21,1,"GtkWidget","margin-top","5",None,None,None,None,None,None,None,None,None),
(21,2,"GtkWidget","margin-bottom","5",None,None,None,None,None,None,None,None,None),
(21,3,"GtkLabel","label","text",None,None,None,None,None,None,None,None,None),
(21,3,"GtkLabel","wrap","True",None,None,None,None,None,None,None,None,None),
(21,3,"GtkWidget","margin-start","5",None,None,None,None,None,None,None,None,None),
(21,5,"GtkDropDown","model",None,None,None,None,None,6,None,None,None,None),
(21,5,"GtkWidget","halign","end",None,None,None,None,None,None,None,None,None),
(21,5,"GtkWidget","hexpand","True",None,None,None,None,None,None,None,None,None),
(21,5,"GtkWidget","hexpand-set","True",None,None,None,None,None,None,None,None,None)
</object_property>
<object_data>
(3,42,"GtkWidget",1,1,None,None,None,None,None,None),
(3,42,"GtkWidget",2,2,None,1,None,None,None,None),
(3,42,"GtkWidget",1,1,None,None,None,None,None,None),
(7,9,"GtkScale",1,1,None,None,None,None,None,None),
(7,9,"GtkScale",2,2,"100%",1,None,None,None,None),
(8,99,"GtkScale",1,1,None,None,None,None,None,None),
@ -930,6 +1136,29 @@
(18,7,"GtkScale",2,2,"100%",1,None,None,None,None),
(19,7,"GtkScale",1,1,None,None,None,None,None,None),
(19,7,"GtkScale",2,2,"100%",1,None,None,None,None)
(20,139,"GtkStringList",1,1,None,None,None,None,None,None),
(20,139,"GtkStringList",2,2,"Automatic",1,None,None,None,None),
(20,139,"GtkStringList",2,3,"Automatic (DHCP only)",1,None,None,None,None),
(20,139,"GtkStringList",2,4,"Manual",1,None,None,None,None),
(20,139,"GtkStringList",2,5,"Shared to other computers",1,None,None,None,None),
(20,139,"GtkStringList",2,6,"Link-Local Only",1,None,None,None,None),
(20,139,"GtkStringList",2,7,"Disabled",1,None,None,None,None),
(20,184,"GtkStringList",2,10,"WPA3 Personal",1,None,None,None,None),
(20,184,"GtkStringList",2,9,"WPA &amp; WPA2 Enterprise",1,None,None,None,None),
(20,184,"GtkStringList",2,8,"WPA &amp; WPA2 Personal",1,None,None,None,None),
(20,184,"GtkStringList",2,7,"Dynamic WEP (802.1X)",1,None,None,None,None),
(20,184,"GtkStringList",1,1,None,None,None,None,None,None),
(20,184,"GtkStringList",2,2,"None",1,None,None,None,None),
(20,184,"GtkStringList",2,3,"Enhanced Open",1,None,None,None,None),
(20,184,"GtkStringList",2,4,"WEP 40/128-bit Key (Hex or ASCII)",1,None,None,None,None),
(20,184,"GtkStringList",2,5,"WEP 128-bit Passphrase",1,None,None,None,None),
(20,184,"GtkStringList",2,6,"LEAP",1,None,None,None,None),
(20,195,"GtkStringList",1,1,None,None,None,None,None,None),
(20,195,"GtkStringList",2,2,"Automatic (DHCP)",1,None,None,None,None),
(20,195,"GtkStringList",2,3,"Manual",1,None,None,None,None),
(20,195,"GtkStringList",2,4,"Shared to other computers",1,None,None,None,None),
(20,195,"GtkStringList",2,5,"Link-Local Only",1,None,None,None,None),
(20,195,"GtkStringList",2,6,"Disabled",1,None,None,None,None)
</object_data>
<object_data_arg>
(7,9,"GtkScale",2,2,"value","65536.0"),

View file

@ -30,7 +30,7 @@
</object>
</child>
<child>
<object class="AdwNavigationView">
<object class="AdwNavigationView" id="resetWifiNavigation">
<child>
<object class="AdwNavigationPage">
<property name="tag">main</property>

View file

@ -0,0 +1,490 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- Created with Cambalache 0.17.0 -->
<interface>
<requires lib="gtk" version="4.12"/>
<requires lib="libadwaita" version="1.4"/>
<template class="resetWifiOptions" parent="AdwNavigationPage">
<child>
<object class="GtkNotebook">
<property name="page">0</property>
<property name="scrollable">True</property>
<property name="show-border">False</property>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<child>
<object class="AdwPreferencesGroup">
<child>
<object class="AdwActionRow">
<property name="css-classes">property</property>
<property name="margin-bottom">5</property>
<property name="margin-end">5</property>
<property name="margin-start">5</property>
<property name="margin-top">5</property>
<property name="subtitle">asdf</property>
<property name="title">WiFi Name</property>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="css-classes">property</property>
<property name="subtitle">stronk</property>
<property name="title">Signal Strength</property>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="css-classes">property</property>
<property name="subtitle">AA:BB:CC:DD:EE:FF</property>
<property name="title">MAC-Address</property>
</object>
</child>
<child>
<object class="AdwSwitchRow">
<property name="title">Connect automatically</property>
</object>
</child>
<child>
<object class="AdwSwitchRow">
<property name="title">Metered Connection</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child type="tab">
<object class="GtkLabel">
<property name="label">General</property>
</object>
</child>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="width-request">500</property>
<child>
<object class="AdwPreferencesGroup">
<child>
<object class="AdwComboRow">
<property name="model">
<object class="GtkStringList">
<items>
<item>Automatic (DHCP)</item>
<item>Manual</item>
<item>Shared to other computers</item>
<item>Link-Local Only</item>
<item>Disabled</item>
</items>
</object>
</property>
<property name="title">IPv4 Method</property>
</object>
</child>
<child>
<object class="AdwEntryRow">
<property name="title">DNS (separate IP by comma)</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup">
<property name="margin-top">10</property>
<property name="title">Addresses</property>
<child>
<object class="GtkListBoxRow">
<property name="activatable">False</property>
<child>
<object class="GtkBox">
<child>
<object class="GtkEntry">
<property name="hexpand">True</property>
<property name="max-length">1</property>
<property name="placeholder-text">Address</property>
</object>
</child>
<child>
<object class="GtkSeparator"/>
</child>
<child>
<object class="GtkEntry">
<property name="hexpand">True</property>
<property name="placeholder-text">Netmask</property>
</object>
</child>
<child>
<object class="GtkSeparator"/>
</child>
<child>
<object class="GtkEntry">
<property name="hexpand">True</property>
<property name="placeholder-text">Gateway</property>
</object>
</child>
<child>
<object class="GtkSeparator"/>
</child>
<child>
<object class="GtkButton">
<property name="icon-name">edit-delete-symbolic</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup">
<property name="header-suffix">
<object class="GtkBox">
<child>
<object class="GtkLabel">
<property name="label">Automatic</property>
<property name="margin-end">5</property>
</object>
</child>
<child>
<object class="GtkSwitch">
<property name="valign">center</property>
</object>
</child>
</object>
</property>
<property name="margin-top">10</property>
<property name="title">DNS</property>
<child>
<object class="GtkListBoxRow">
<property name="activatable">False</property>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<child>
<object class="GtkEntry"/>
</child>
<child>
<object class="GtkLabel">
<property name="halign">start</property>
<property name="label">seperate ip by comma</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup">
<property name="header-suffix">
<object class="GtkBox">
<child>
<object class="GtkLabel">
<property name="label">Automatic</property>
<property name="margin-end">5</property>
</object>
</child>
<child>
<object class="GtkSwitch">
<property name="valign">center</property>
</object>
</child>
</object>
</property>
<property name="margin-top">10</property>
<property name="title">Routes</property>
<child>
<object class="GtkListBoxRow">
<property name="activatable">False</property>
<child>
<object class="GtkBox">
<child>
<object class="GtkEntry">
<property name="hexpand">True</property>
<property name="placeholder-text">Address</property>
</object>
</child>
<child>
<object class="GtkSeparator"/>
</child>
<child>
<object class="GtkEntry">
<property name="hexpand">True</property>
<property name="placeholder-text">Netmask</property>
</object>
</child>
<child>
<object class="GtkSeparator"/>
</child>
<child>
<object class="GtkEntry">
<property name="hexpand">True</property>
<property name="placeholder-text">Gateway</property>
</object>
</child>
<child>
<object class="GtkSeparator"/>
</child>
<child>
<object class="GtkEntry">
<property name="max-width-chars">5</property>
<property name="placeholder-text">Metric</property>
<property name="width-request">50</property>
</object>
</child>
<child>
<object class="GtkSeparator"/>
</child>
<child>
<object class="GtkButton">
<property name="icon-name">edit-delete-symbolic</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
<child type="tab">
<object class="GtkLabel">
<property name="label">IPv4</property>
</object>
</child>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="width-request">500</property>
<child>
<object class="AdwPreferencesGroup">
<child>
<object class="AdwComboRow">
<property name="model">
<object class="GtkStringList">
<items>
<item>Automatic</item>
<item>Automatic (DHCP only)</item>
<item>Manual</item>
<item>Shared to other computers</item>
<item>Link-Local Only</item>
<item>Disabled</item>
</items>
</object>
</property>
<property name="title">IPv6 Method</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup">
<property name="margin-top">10</property>
<property name="title">Addresses</property>
<child>
<object class="GtkListBoxRow">
<property name="activatable">False</property>
<child>
<object class="GtkBox">
<child>
<object class="GtkEntry">
<property name="hexpand">True</property>
<property name="placeholder-text">Address</property>
</object>
</child>
<child>
<object class="GtkSeparator"/>
</child>
<child>
<object class="GtkEntry">
<property name="hexpand">True</property>
<property name="placeholder-text">Prefix</property>
</object>
</child>
<child>
<object class="GtkSeparator"/>
</child>
<child>
<object class="GtkEntry">
<property name="hexpand">True</property>
<property name="placeholder-text">Gateway</property>
</object>
</child>
<child>
<object class="GtkSeparator"/>
</child>
<child>
<object class="GtkButton">
<property name="icon-name">edit-delete-symbolic</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup">
<property name="header-suffix">
<object class="GtkBox">
<child>
<object class="GtkLabel">
<property name="label">Automatic</property>
<property name="margin-end">5</property>
</object>
</child>
<child>
<object class="GtkSwitch">
<property name="valign">center</property>
</object>
</child>
</object>
</property>
<property name="margin-top">10</property>
<property name="title">DNS</property>
<child>
<object class="GtkListBoxRow">
<property name="activatable">False</property>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<child>
<object class="GtkEntry"/>
</child>
<child>
<object class="GtkLabel">
<property name="halign">start</property>
<property name="label">seperate ip by comma</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup">
<property name="header-suffix">
<object class="GtkBox">
<child>
<object class="GtkLabel">
<property name="label">Automatic</property>
<property name="margin-end">5</property>
</object>
</child>
<child>
<object class="GtkSwitch">
<property name="valign">center</property>
</object>
</child>
</object>
</property>
<property name="margin-top">10</property>
<property name="title">Routes</property>
<child>
<object class="GtkListBoxRow">
<property name="activatable">False</property>
<child>
<object class="GtkBox">
<child>
<object class="GtkEntry">
<property name="hexpand">True</property>
<property name="placeholder-text">Address</property>
</object>
</child>
<child>
<object class="GtkSeparator"/>
</child>
<child>
<object class="GtkEntry">
<property name="hexpand">True</property>
<property name="placeholder-text">Prefix</property>
</object>
</child>
<child>
<object class="GtkSeparator"/>
</child>
<child>
<object class="GtkEntry">
<property name="hexpand">True</property>
<property name="placeholder-text">Gateway</property>
</object>
</child>
<child>
<object class="GtkSeparator"/>
</child>
<child>
<object class="GtkEntry">
<property name="max-width-chars">5</property>
<property name="placeholder-text">Metric</property>
<property name="width-request">50</property>
</object>
</child>
<child>
<object class="GtkSeparator"/>
</child>
<child>
<object class="GtkButton">
<property name="icon-name">edit-delete-symbolic</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
<child type="tab">
<object class="GtkLabel">
<property name="label">IPv6</property>
</object>
</child>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<child>
<object class="AdwPreferencesGroup">
<child>
<object class="AdwComboRow">
<property name="model">
<object class="GtkStringList">
<items>
<item>None</item>
<item>Enhanced Open</item>
<item>WEP 40/128-bit Key (Hex or ASCII)</item>
<item>WEP 128-bit Passphrase</item>
<item>LEAP</item>
<item>Dynamic WEP (802.1X)</item>
<item>WPA &amp; WPA2 Personal</item>
<item>WPA &amp; WPA2 Enterprise</item>
<item>WPA3 Personal</item>
</items>
</object>
</property>
<property name="title">Security</property>
</object>
</child>
<child>
<object class="AdwPasswordEntryRow">
<property name="title">Password</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child type="tab">
<object class="GtkLabel">
<property name="label">Security</property>
</object>
</child>
</object>
</child>
</template>
</interface>

View file

@ -1,21 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/org/Xetibo/ReSet/">
<!--Main window-->
<file compressed="true" preprocess="xml-stripblanks">resetMainWindow.ui</file>
<file compressed="true" preprocess="xml-stripblanks">resetSidebarEntry.ui</file>
<file compressed="true" preprocess="xml-stripblanks">resetSettingBox.ui</file>
<file compressed="true" preprocess="xml-stripblanks">resetListBoxRow.ui</file>
<!--WiFi-->
<file compressed="true" preprocess="xml-stripblanks">resetWiFi.ui</file>
<file compressed="true" preprocess="xml-stripblanks">resetWifiEntry.ui</file>
<file compressed="true" preprocess="xml-stripblanks">resetSavedWifiEntry.ui</file>
<file compressed="true" preprocess="xml-stripblanks">resetWifiOptions.ui</file>
<!--Bluetooth-->
<file compressed="true" preprocess="xml-stripblanks">resetBluetooth.ui</file>
<file compressed="true" preprocess="xml-stripblanks">resetBluetoothEntry.ui</file>
<!--Output-->
<file compressed="true" preprocess="xml-stripblanks">resetAudioOutput.ui</file>
<file compressed="true" preprocess="xml-stripblanks">resetOutputStreamEntry.ui</file>
<file compressed="true" preprocess="xml-stripblanks">resetSinkEntry.ui</file>
<!--Input-->
<file compressed="true" preprocess="xml-stripblanks">resetAudioInput.ui</file>
<file compressed="true" preprocess="xml-stripblanks">resetInputStreamEntry.ui</file>
<file compressed="true" preprocess="xml-stripblanks">resetSinkEntry.ui</file>
<file compressed="true" preprocess="xml-stripblanks">resetSourceEntry.ui</file>
<!--Misc-->
<file compressed="true" preprocess="xml-stripblanks">resetPopup.ui</file>
<file compressed="true" preprocess="xml-stripblanks">resetCardEntry.ui</file>
</gresource>