Implement a new Bluetooth indicator (#459)
* Implement the private portion of the Bluetooth API
(I hope... The organization is a mess.)
Signed-off-by: Evan Maddock <email address hidden>
* Add the public-facing Bluetooth API
Signed-off-by: Evan Maddock <email address hidden>
* Fix last TODO item
Signed-off-by: Evan Maddock <email address hidden>
* Fix warnings
Signed-off-by: Evan Maddock <email address hidden>
* WIP: Redo Bluetooth indicator and popover
Signed-off-by: Evan Maddock <email address hidden>
* Fix Bluetooth setup
Signed-off-by: Evan Maddock <email address hidden>
* Greatly simplify the BluetoothClient API
At this time, I have no idea how to integrate the UPower aspect with the Bluetooth devices. Moreover, I can't test if it's working even if I did, because none of my Bluetooth devices trigger the UPower signals.
Signed-off-by: Evan Maddock <email address hidden>
* Follow Vala naming conventions
It'll automagically figure it out for DBus.
Signed-off-by: Evan Maddock <email address hidden>
* Add new Bluetooth popover layout
Signed-off-by: Evan Maddock <email address hidden>
* Add widgets for Bluetooth devices
Signed-off-by: Evan Maddock <email address hidden>
* Pack popover header like the new network popover header
Signed-off-by: Evan Maddock <email address hidden>
* Remove device wrapper class
Signed-off-by: Evan Maddock <email address hidden>
* Make sure connection button is clickable if the device is now paired
Signed-off-by: Evan Maddock <email address hidden>
* Implement pairing and forgetting Bluetooth devices
Signed-off-by: Evan Maddock <email address hidden>
* Set a filter for Bluetooth discovery so we only get actual discoverable devices
Signed-off-by: Evan Maddock <email address hidden>
* Start/stop discovery on all adapters instead of the first one found
Signed-off-by: Evan Maddock <email address hidden>
* Ensure that the correct height is given to the listbox
Signed-off-by: Evan Maddock <email address hidden>
* Remove the Meson option for Bluetooth
The reason for the option's addition no longer applies; the new Bluetooth indicator uses Bluez directly instead of gnome-bluetooth.
Signed-off-by: Evan Maddock <email address hidden>
* Use better wording for pairing button
Signed-off-by: Evan Maddock <email address hidden>
* Reset revealer state when DBus operations are successful
Signed-off-by: Evan Maddock <email address hidden>
* Always set adapters to be discovering
While not ideal, I suspect this is the only way to reliably pair devices.
Signed-off-by: Evan Maddock <email address hidden>
* Forget about Bluetooth pairing; leave it to the Settings
Signed-off-by: Evan Maddock <email address hidden>
* Remove forget device button because dialogs from the panel are Bad TM
Signed-off-by: Evan Maddock <email address hidden>
* Make Bluetooth row widget subclass ListBoxRow
Signed-off-by: Evan Maddock <email address hidden>
* Add slightly more spacing around separators
Signed-off-by: Evan Maddock <email address hidden>
* Minor style enhancements
Signed-off-by: Evan Maddock <email address hidden>
* Filter out unpaired Bluetooth devices
Signed-off-by: Evan Maddock <email address hidden>
* Rename row widget to be shorter and add consistent style classes
Signed-off-by: Evan Maddock <email address hidden>
* Add an expander indicator to Bluetooth device rows
Signed-off-by: Evan Maddock <email address hidden>
* Show connected devices, paired or not
Signed-off-by: Evan Maddock <email address hidden>
* Implement power display for Bluetooth devices
Signed-off-by: Evan Maddock <email address hidden>
* Use correct icon name for generic bluetooth items
At least so far as there is a correct icon...
Signed-off-by: Evan Maddock <email address hidden>
* Add styling to Bluetooth applet
Signed-off-by: Evan Maddock <email address hidden>
* Redesign of Bluetooth device rows
Signed-off-by: Evan Maddock <email address hidden>
* Update the name of a Bluetooth device if it changes
Signed-off-by: Evan Maddock <email address hidden>
* Add a placeholder widget if there are no Bluetooth devices
Signed-off-by: Evan Maddock <email address hidden>
* Make setting a new UPower device more robust
Signed-off-by: Evan Maddock <email address hidden>
* Updating the battery state when the UPower device is null closes the revealer
We want to do this, so put it above the null check.
Signed-off-by: Evan Maddock <email address hidden>
* Don't rely on theme to pad revealer
Signed-off-by: Evan Maddock <email address hidden>
* Refine dis/connection code flow
Signed-off-by: Evan Maddock <email address hidden>
* Show or hide the panel widget based on if a Bluetooth adapter is present
Signed-off-by: Evan Maddock <email address hidden>
* Remove extra separator in Bluetooth popover
Signed-off-by: Evan Maddock <email address hidden>
* Format style change
Signed-off-by: Evan Maddock <email address hidden>
* Ensure that state hinging on connection status is always updated
Signed-off-by: Evan Maddock <email address hidden>
* Make things less embiggened
Signed-off-by: Evan Maddock <email address hidden>
* Refine battery display for new device row layout
Signed-off-by: Evan Maddock <email address hidden>
* Update the tray icon when Bluetooth is enabled or disabled
Signed-off-by: Evan Maddock <email address hidden>
* bluetooth-indicator: Invalidate the device filter whenever we invalidate the sorting
Signed-off-by: Evan Maddock <email address hidden>
* bluetooth-indicator: Final (I hope) design edit to the device row layout
Signed-off-by: Evan Maddock <email address hidden>
* bluetooth-indicator: Use an icon button for the disconnect button
Also fixes some spacing issues when not using built-in theme.
Signed-off-by: Evan Maddock <email address hidden>
* [WIP] bluetooth-indicator: Implement support for file sending
Signed-off-by: Evan Maddock <email address hidden>
* bluetooth-indicator: Use rfkill to enable/disable Bluetooth
Yes, the DBus interface for it is provided by Gnome Settings Daemon, but that's always going to be present anyways and this makes life way simpler.
Signed-off-by: Evan Maddock <email address hidden>
* bluetooth-indicator: Use label attributes to achieve consistent styling across all themes
Signed-off-by: Evan Maddock <email address hidden>
* build: Reintroduce option to compile without Bluetooth
Signed-off-by: Evan Maddock <email address hidden>
* WIP - sendto implementation
Signed-off-by: Evan Maddock <email address hidden>
* [WIP] bluetooth: Implement bluetooth sendto functionality
Signed-off-by: Evan Maddock <email address hidden>
* sendto: Fix command line arguments
Signed-off-by: Evan Maddock <email address hidden>
* sendto: Better description for files arg
Signed-off-by: Evan Maddock <email address hidden>
* sendto: Remember to remove comment
Signed-off-by: Evan Maddock <email address hidden>
* sendto: Properly exit if the file picker or scan dialog is closed
Signed-off-by: Evan Maddock <email address hidden>
* bluetooth-indicator: Hook up file send button in the header
Signed-off-by: Evan Maddock <email address hidden>
* sendto: Implement file receiving, which manages to break everything
Signed-off-by: Evan Maddock <email address hidden>
* bluetooth/sendto: Fix issues with no transfer dialog windows being shown
Also fixes saving received files to the Downloads folder.
Signed-off-by: Evan Maddock <email address hidden>
* sendto: Correct attribution in file headers
Signed-off-by: Evan Maddock <email address hidden>
* sendto: Add spacing in dialogs
Signed-off-by: Evan Maddock <email address hidden>
* sendto: Cancel the transfer on cancel/reject
This means that the sending device will no longer still send the file, even if the transfer was rejected.
Signed-off-by: Evan Maddock <email address hidden>
* bluetooth-indicator: Use symbolic icons for the tray item
Signed-off-by: Evan Maddock <email address hidden>
* sendto: Filter devices in the device chooser by connected state
Signed-off-by: Evan Maddock <email address hidden>
* sendto: Let's actually use the grid we're creating for the header
Signed-off-by: Evan Maddock <email address hidden>
* sendto: Somehow these files were using spaces instead of tabs
Signed-off-by: Evan Maddock <email address hidden>
* sendto: Add titles and margins to send and receive dialogs
Signed-off-by: Evan Maddock <email address hidden>
* sendto: Cleanup
Signed-off-by: Evan Maddock <email address hidden>
* sendto: Use the correct property when looking for changes
Signed-off-by: Evan Maddock <email address hidden>
* sendto: Refactor format_time function
Signed-off-by: Evan Maddock <email address hidden>
* Apply suggestions from code review
Co-authored-by: Joshua Strobl <email address hidden>
* sendto: Add new base dialog class
Both the send and receive dialogs are almost the same, the main difference being in the background implementation and wording of strings. This causes some duplicated logic, especially around the formatting of times remaining.
This adds a new base class that both dialogs can derive from while still having their own implementations for doing the work, leading to less duplicated code.
Signed-off-by: Evan Maddock <email address hidden>
* bluetooth-indicator: Address feedback from fossfreedom
Signed-off-by: Evan Maddock <email address hidden>
* sendto, bluetooth-indicator: Support sending files to a specific device
Signed-off-by: Evan Maddock <email address hidden>
* bluetooth-indicator: Fix button relief and device class checks
Signed-off-by: Evan Maddock <email address hidden>
* bluetooth-indicator: Hide the device's battery status when disconnected
Signed-off-by: Evan Maddock <email address hidden>
* bluetooth-indicator: Remove debugging message
Signed-off-by: Evan Maddock <email address hidden>
---------
Signed-off-by: Evan Maddock <email address hidden>
Co-authored-by: Joshua Strobl <email address hidden>