mirror of
https://github.com/Xetibo/ReSet.git
synced 2025-04-19 02:58:33 +02:00
merge dashie
This commit is contained in:
parent
a3866294af
commit
55a6e247fa
|
@ -5,7 +5,7 @@ use std::time::{Duration, SystemTime};
|
||||||
|
|
||||||
use adw::glib;
|
use adw::glib;
|
||||||
use adw::glib::Object;
|
use adw::glib::Object;
|
||||||
use adw::prelude::ComboRowExt;
|
use adw::prelude::{ComboRowExt, ListModelExtManual};
|
||||||
use adw::subclass::prelude::ObjectSubclassIsExt;
|
use adw::subclass::prelude::ObjectSubclassIsExt;
|
||||||
use dbus::blocking::Connection;
|
use dbus::blocking::Connection;
|
||||||
use dbus::message::SignalArgs;
|
use dbus::message::SignalArgs;
|
||||||
|
@ -13,7 +13,7 @@ use dbus::{Error, Path};
|
||||||
use glib::{clone, Cast};
|
use glib::{clone, Cast};
|
||||||
use gtk::glib::Variant;
|
use gtk::glib::Variant;
|
||||||
use gtk::prelude::{ActionableExt, BoxExt, ListBoxRowExt, WidgetExt};
|
use gtk::prelude::{ActionableExt, BoxExt, ListBoxRowExt, WidgetExt};
|
||||||
use gtk::{gio, StringObject};
|
use gtk::{gio, StringObject, Widget};
|
||||||
use ReSet_Lib::bluetooth::bluetooth::{BluetoothAdapter, BluetoothDevice};
|
use ReSet_Lib::bluetooth::bluetooth::{BluetoothAdapter, BluetoothDevice};
|
||||||
use ReSet_Lib::signals::{BluetoothDeviceAdded, BluetoothDeviceChanged, BluetoothDeviceRemoved};
|
use ReSet_Lib::signals::{BluetoothDeviceAdded, BluetoothDeviceChanged, BluetoothDeviceRemoved};
|
||||||
|
|
||||||
|
@ -58,7 +58,13 @@ fn setupCallbacks(
|
||||||
imp.resetBluetoothSwitch.connect_state_set(move |_, state| {
|
imp.resetBluetoothSwitch.connect_state_set(move |_, state| {
|
||||||
if !state {
|
if !state {
|
||||||
let imp = bluetooth_box_ref.imp();
|
let imp = bluetooth_box_ref.imp();
|
||||||
imp.resetBluetoothConnectedDevices.remove_all();
|
for x in imp.resetBluetoothConnectedDevices.observe_children().iter::<Object>() {
|
||||||
|
if let Ok(entry) = x { // todo test this
|
||||||
|
if let Some(item) = entry.downcast_ref::<Widget>() {
|
||||||
|
imp.resetBluetoothAvailableDevices.remove(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
listeners.bluetooth_listener.store(false, Ordering::SeqCst);
|
listeners.bluetooth_listener.store(false, Ordering::SeqCst);
|
||||||
set_adapter_enabled(
|
set_adapter_enabled(
|
||||||
imp.resetCurrentBluetoothAdapter.borrow().path.clone(),
|
imp.resetCurrentBluetoothAdapter.borrow().path.clone(),
|
||||||
|
|
|
@ -204,9 +204,7 @@ pub fn click_new_network(entry: Arc<WifiEntry>) {
|
||||||
let imp = entry_ref.imp();
|
let imp = entry_ref.imp();
|
||||||
imp.resetWifiPopup.popdown();
|
imp.resetWifiPopup.popdown();
|
||||||
imp.resetWifiEditButton.set_sensitive(true);
|
imp.resetWifiEditButton.set_sensitive(true);
|
||||||
imp.resetWifiConnected
|
imp.resetWifiConnected.set_text("Connected");
|
||||||
.get()
|
|
||||||
.set_from_icon_name(Some("network-wireless-connected-symbolic"));
|
|
||||||
imp.connected.replace(true);
|
imp.connected.replace(true);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -12,9 +12,7 @@ use dbus::arg::PropMap;
|
||||||
use glib::{clone, PropertySet};
|
use glib::{clone, PropertySet};
|
||||||
use gtk::prelude::{ButtonExt, EditableExt, WidgetExt};
|
use gtk::prelude::{ButtonExt, EditableExt, WidgetExt};
|
||||||
use ReSet_Lib::network::connection::{Connection, DNSMethod4, DNSMethod6, Enum, TypeSettings};
|
use ReSet_Lib::network::connection::{Connection, DNSMethod4, DNSMethod6, Enum, TypeSettings};
|
||||||
use ReSet_Lib::network::network::AccessPoint;
|
|
||||||
use IpProtocol::{IPv4, IPv6};
|
use IpProtocol::{IPv4, IPv6};
|
||||||
use ReSet_Lib::network::connection::{Connection, DNSMethod4, DNSMethod6, Enum, TypeSettings};
|
|
||||||
|
|
||||||
use crate::components::wifi::utils::IpProtocol;
|
use crate::components::wifi::utils::IpProtocol;
|
||||||
use crate::components::wifi::wifiAddressEntry::WifiAddressEntry;
|
use crate::components::wifi::wifiAddressEntry::WifiAddressEntry;
|
||||||
|
|
Loading…
Reference in a new issue