m2jean/ToothTray

connection indication

bostonnico opened this issue · 2 comments

Brilliant! So exciting to find this, thanks a mil for your efforts!

Executable working smoothly as-is for connecting/disconnecting a paired device on Win 11,
but is there any way to change the source (simple parameter) to indicate when a device is connected or not?
Not terribly familiar with C, so asking first. That would be extremely useful, if yes, i'm sure for many..
If no answer, I will dig in, in the coming weeks when free...

Thanks!

The simplest way is to indicate their states in the popup menu. When the tray icon is right clicked, ToothTrayMenu.BuildMenu is called to construct the popup menu items ToothTrayMenu::MenuData. ToothTrayMenu::MenuData can be modified to dynamically generate the menu item texts based on the result of BluetoothConnector.IsConnected().

Thank you, this worked well!