cleanup(bluetooth): remove some dbg! statements & fix typos
This commit is contained in:
parent
5c725dd7a1
commit
cac438a786
3 changed files with 26 additions and 26 deletions
|
|
@ -1,12 +1,12 @@
|
||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Name=Cosmic Applet Network
|
Name=Cosmic Applet Bluetooth
|
||||||
Comment=Write a GTK + Rust application
|
Comment=COSMIC Panel Applet for managing bluetooth
|
||||||
Type=Application
|
Type=Application
|
||||||
Exec=cosmic-applet-bluetooth
|
Exec=cosmic-applet-bluetooth
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Categories=GNOME;GTK;
|
Categories=COSMIC;Iced;
|
||||||
Keywords=Gnome;GTK;
|
Keywords=COSMIC;Iced;
|
||||||
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
|
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
|
||||||
Icon=com.system76.CosmicAppletNetwork.svg
|
Icon=com.system76.CosmicAppletBluetooth.svg
|
||||||
StartupNotify=true
|
StartupNotify=true
|
||||||
NoDisplay=true
|
NoDisplay=true
|
||||||
|
|
|
||||||
|
|
@ -165,44 +165,44 @@ impl Application for CosmicBluetoothApplet {
|
||||||
}
|
}
|
||||||
// TODO handle agent events
|
// TODO handle agent events
|
||||||
BluerEvent::AgentEvent(event) => match event {
|
BluerEvent::AgentEvent(event) => match event {
|
||||||
crate::bluetooth::BluerAgentEvent::DisplayPinCode(d, code) => {
|
crate::bluetooth::BluerAgentEvent::DisplayPinCode(_d, _code) => {
|
||||||
dbg!((d.name, code));
|
// dbg!((d.name, code));
|
||||||
}
|
}
|
||||||
crate::bluetooth::BluerAgentEvent::DisplayPasskey(d, code) => {
|
crate::bluetooth::BluerAgentEvent::DisplayPasskey(_d, _code) => {
|
||||||
dbg!((d.name, code));
|
// dbg!((d.name, code));
|
||||||
}
|
}
|
||||||
crate::bluetooth::BluerAgentEvent::RequestPinCode(d) => {
|
crate::bluetooth::BluerAgentEvent::RequestPinCode(_d) => {
|
||||||
// TODO anything to be done here?
|
// TODO anything to be done here?
|
||||||
dbg!("request pin code", d.name);
|
// dbg!("request pin code", d.name);
|
||||||
}
|
}
|
||||||
crate::bluetooth::BluerAgentEvent::RequestPasskey(d) => {
|
crate::bluetooth::BluerAgentEvent::RequestPasskey(_d) => {
|
||||||
// TODO anything to be done here?
|
// TODO anything to be done here?
|
||||||
dbg!("request passkey", d.name);
|
// dbg!("request passkey", d.name);
|
||||||
}
|
}
|
||||||
crate::bluetooth::BluerAgentEvent::RequestConfirmation(d, code, tx) => {
|
crate::bluetooth::BluerAgentEvent::RequestConfirmation(d, code, tx) => {
|
||||||
dbg!("request confirmation", &d.name, &code);
|
// dbg!("request confirmation", &d.name, &code);
|
||||||
self.request_confirmation.replace((d, code, tx));
|
self.request_confirmation.replace((d, code, tx));
|
||||||
// let _ = tx.send(false);
|
// let _ = tx.send(false);
|
||||||
}
|
}
|
||||||
crate::bluetooth::BluerAgentEvent::RequestDeviceAuthorization(d, _tx) => {
|
crate::bluetooth::BluerAgentEvent::RequestDeviceAuthorization(_d, _tx) => {
|
||||||
// TODO anything to be done here?
|
// TODO anything to be done here?
|
||||||
dbg!("request device authorization", d.name);
|
// dbg!("request device authorization", d.name);
|
||||||
// let_ = tx.send(false);
|
// let_ = tx.send(false);
|
||||||
}
|
}
|
||||||
crate::bluetooth::BluerAgentEvent::RequestServiceAuthorization(
|
crate::bluetooth::BluerAgentEvent::RequestServiceAuthorization(
|
||||||
d,
|
_d,
|
||||||
service,
|
_service,
|
||||||
_tx,
|
_tx,
|
||||||
) => {
|
) => {
|
||||||
// my headphones seem to always request this
|
// my headphones seem to always request this
|
||||||
// doesn't seem to be defined in the UX mockups
|
// doesn't seem to be defined in the UX mockups
|
||||||
dbg!(
|
// dbg!(
|
||||||
"request service authorization",
|
// "request service authorization",
|
||||||
d.name,
|
// d.name,
|
||||||
bluer::id::Service::try_from(service)
|
// bluer::id::Service::try_from(service)
|
||||||
.map(|s| s.to_string())
|
// .map(|s| s.to_string())
|
||||||
.unwrap_or_else(|_| "unknown".to_string())
|
// .unwrap_or_else(|_| "unknown".to_string())
|
||||||
);
|
// );
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
pub const APP_ID: &str = "com.system76.CosmicAppletNetwork";
|
pub const APP_ID: &str = "com.system76.CosmicAppletBluetooth";
|
||||||
pub const PROFILE: &str = "";
|
pub const PROFILE: &str = "";
|
||||||
pub const VERSION: &str = "0.1.0";
|
pub const VERSION: &str = "0.1.0";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue