mirror of
https://github.com/Xetibo/ReSet.git
synced 2025-07-07 18:47:45 +02:00
feat: Add all audio events
This commit is contained in:
parent
a84c71d9e1
commit
6ad3f07cf3
13 changed files with 785 additions and 345 deletions
|
@ -32,10 +32,8 @@ impl SavedWifiEntry {
|
|||
let res: Result<(bool,), Error> = proxy.method_call("org.xetibo.ReSet", "DeleteConnection", (entry.imp().resetConnectionPath.take(),));
|
||||
if res.is_err() || res.unwrap() == (false,) {
|
||||
// TODO handle error -> inform user
|
||||
println!("no worky");
|
||||
return;
|
||||
}
|
||||
println!("worked, should be ded");
|
||||
let parent = entry.parent().unwrap();
|
||||
parent.set_visible(false);
|
||||
parent.unparent();
|
||||
|
|
|
@ -108,7 +108,6 @@ pub fn scanForWifi(listeners: Arc<Listeners>, wifiBox: Arc<WifiBox>) {
|
|||
{
|
||||
break;
|
||||
}
|
||||
println!("receiving!");
|
||||
let res = receiver.recv();
|
||||
if res.is_ok() {
|
||||
let access_point = res.unwrap();
|
||||
|
@ -211,7 +210,6 @@ pub fn get_stored_connections() -> Vec<(Path<'static>, Vec<u8>)> {
|
|||
return Vec::new();
|
||||
}
|
||||
let (connections,) = res.unwrap();
|
||||
dbg!(connections.clone());
|
||||
connections
|
||||
}
|
||||
|
||||
|
@ -227,13 +225,11 @@ pub fn getConnectionSettings(path: Path<'static>) -> Option<ResetConnection> {
|
|||
Error,
|
||||
> = proxy.method_call("org.xetibo.ReSet", "GetConnectionSettings", (path,));
|
||||
if res.is_err() {
|
||||
println!("lol not work");
|
||||
return None;
|
||||
}
|
||||
let (res,) = res.unwrap();
|
||||
let res = ResetConnection::convert_from_propmap(res);
|
||||
if res.is_err() {
|
||||
println!("lol none");
|
||||
return None;
|
||||
}
|
||||
Some(res.unwrap())
|
||||
|
|
|
@ -80,7 +80,6 @@ impl WifiEntry {
|
|||
selfImp.resetWifiEditButton.connect_clicked(clone!(@ weak selfImp => move |_| {
|
||||
// TODO open navigationpage
|
||||
let option = getConnectionSettings(selfImp.accessPoint.borrow().associated_connection.clone());
|
||||
dbg!(option);
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
@ -120,7 +119,6 @@ pub fn click_stored_network(entry: Arc<WifiEntry>) {
|
|||
}
|
||||
return;
|
||||
}
|
||||
dbg!(access_point.clone());
|
||||
let res: Result<(bool,), Error> = proxy.method_call(
|
||||
"org.xetibo.ReSet",
|
||||
"ConnectToKnownAccessPoint",
|
||||
|
@ -214,8 +212,4 @@ pub fn click_new_network(entry: Arc<WifiEntry>) {
|
|||
}),
|
||||
);
|
||||
entryImp.resetWifiPopup.popup();
|
||||
println!(
|
||||
"result is {}",
|
||||
result.load(std::sync::atomic::Ordering::SeqCst)
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue