Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 protected]> * Add the public-facing Bluetooth API Signed-off-by: Evan Maddock <[email protected]> * Fix last TODO item Signed-off-by: Evan Maddock <[email protected]> * Fix warnings Signed-off-by: Evan Maddock <[email protected]> * WIP: Redo Bluetooth indicator and popover Signed-off-by: Evan Maddock <[email protected]> * Fix Bluetooth setup Signed-off-by: Evan Maddock <[email protected]> * 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 protected]> * Follow Vala naming conventions It'll automagically figure it out for DBus. Signed-off-by: Evan Maddock <[email protected]> * Add new Bluetooth popover layout Signed-off-by: Evan Maddock <[email protected]> * Add widgets for Bluetooth devices Signed-off-by: Evan Maddock <[email protected]> * Pack popover header like the new network popover header Signed-off-by: Evan Maddock <[email protected]> * Remove device wrapper class Signed-off-by: Evan Maddock <[email protected]> * Make sure connection button is clickable if the device is now paired Signed-off-by: Evan Maddock <[email protected]> * Implement pairing and forgetting Bluetooth devices Signed-off-by: Evan Maddock <[email protected]> * Set a filter for Bluetooth discovery so we only get actual discoverable devices Signed-off-by: Evan Maddock <[email protected]> * Start/stop discovery on all adapters instead of the first one found Signed-off-by: Evan Maddock <[email protected]> * Ensure that the correct height is given to the listbox Signed-off-by: Evan Maddock <[email protected]> * 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 protected]> * Use better wording for pairing button Signed-off-by: Evan Maddock <[email protected]> * Reset revealer state when DBus operations are successful Signed-off-by: Evan Maddock <[email protected]> * 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 protected]> * Forget about Bluetooth pairing; leave it to the Settings Signed-off-by: Evan Maddock <[email protected]> * Remove forget device button because dialogs from the panel are Bad TM Signed-off-by: Evan Maddock <[email protected]> * Make Bluetooth row widget subclass ListBoxRow Signed-off-by: Evan Maddock <[email protected]> * Add slightly more spacing around separators Signed-off-by: Evan Maddock <[email protected]> * Minor style enhancements Signed-off-by: Evan Maddock <[email protected]> * Filter out unpaired Bluetooth devices Signed-off-by: Evan Maddock <[email protected]> * Rename row widget to be shorter and add consistent style classes Signed-off-by: Evan Maddock <[email protected]> * Add an expander indicator to Bluetooth device rows Signed-off-by: Evan Maddock <[email protected]> * Show connected devices, paired or not Signed-off-by: Evan Maddock <[email protected]> * Implement power display for Bluetooth devices Signed-off-by: Evan Maddock <[email protected]> * Use correct icon name for generic bluetooth items At least so far as there is a correct icon... Signed-off-by: Evan Maddock <[email protected]> * Add styling to Bluetooth applet Signed-off-by: Evan Maddock <[email protected]> * Redesign of Bluetooth device rows Signed-off-by: Evan Maddock <[email protected]> * Update the name of a Bluetooth device if it changes Signed-off-by: Evan Maddock <[email protected]> * Add a placeholder widget if there are no Bluetooth devices Signed-off-by: Evan Maddock <[email protected]> * Make setting a new UPower device more robust Signed-off-by: Evan Maddock <[email protected]> * 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 protected]> * Don't rely on theme to pad revealer Signed-off-by: Evan Maddock <[email protected]> * Refine dis/connection code flow Signed-off-by: Evan Maddock <[email protected]> * Show or hide the panel widget based on if a Bluetooth adapter is present Signed-off-by: Evan Maddock <[email protected]> * Remove extra separator in Bluetooth popover Signed-off-by: Evan Maddock <[email protected]> * Format style change Signed-off-by: Evan Maddock <[email protected]> * Ensure that state hinging on connection status is always updated Signed-off-by: Evan Maddock <[email protected]> * Make things less embiggened Signed-off-by: Evan Maddock <[email protected]> * Refine battery display for new device row layout Signed-off-by: Evan Maddock <[email protected]> * Update the tray icon when Bluetooth is enabled or disabled Signed-off-by: Evan Maddock <[email protected]> * bluetooth-indicator: Invalidate the device filter whenever we invalidate the sorting Signed-off-by: Evan Maddock <[email protected]> * bluetooth-indicator: Final (I hope) design edit to the device row layout Signed-off-by: Evan Maddock <[email protected]> * 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 protected]> * [WIP] bluetooth-indicator: Implement support for file sending Signed-off-by: Evan Maddock <[email protected]> * 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 protected]> * bluetooth-indicator: Use label attributes to achieve consistent styling across all themes Signed-off-by: Evan Maddock <[email protected]> * build: Reintroduce option to compile without Bluetooth Signed-off-by: Evan Maddock <[email protected]> * WIP - sendto implementation Signed-off-by: Evan Maddock <[email protected]> * [WIP] bluetooth: Implement bluetooth sendto functionality Signed-off-by: Evan Maddock <[email protected]> * sendto: Fix command line arguments Signed-off-by: Evan Maddock <[email protected]> * sendto: Better description for files arg Signed-off-by: Evan Maddock <[email protected]> * sendto: Remember to remove comment Signed-off-by: Evan Maddock <[email protected]> * sendto: Properly exit if the file picker or scan dialog is closed Signed-off-by: Evan Maddock <[email protected]> * bluetooth-indicator: Hook up file send button in the header Signed-off-by: Evan Maddock <[email protected]> * sendto: Implement file receiving, which manages to break everything Signed-off-by: Evan Maddock <[email protected]> * 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 protected]> * sendto: Correct attribution in file headers Signed-off-by: Evan Maddock <[email protected]> * sendto: Add spacing in dialogs Signed-off-by: Evan Maddock <[email protected]> * 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 protected]> * bluetooth-indicator: Use symbolic icons for the tray item Signed-off-by: Evan Maddock <[email protected]> * sendto: Filter devices in the device chooser by connected state Signed-off-by: Evan Maddock <[email protected]> * sendto: Let's actually use the grid we're creating for the header Signed-off-by: Evan Maddock <[email protected]> * sendto: Somehow these files were using spaces instead of tabs Signed-off-by: Evan Maddock <[email protected]> * sendto: Add titles and margins to send and receive dialogs Signed-off-by: Evan Maddock <[email protected]> * sendto: Cleanup Signed-off-by: Evan Maddock <[email protected]> * sendto: Use the correct property when looking for changes Signed-off-by: Evan Maddock <[email protected]> * sendto: Refactor format_time function Signed-off-by: Evan Maddock <[email protected]> * Apply suggestions from code review Co-authored-by: Joshua Strobl <[email protected]> * 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 protected]> * bluetooth-indicator: Address feedback from fossfreedom Signed-off-by: Evan Maddock <[email protected]> * sendto, bluetooth-indicator: Support sending files to a specific device Signed-off-by: Evan Maddock <[email protected]> * bluetooth-indicator: Fix button relief and device class checks Signed-off-by: Evan Maddock <[email protected]> * bluetooth-indicator: Hide the device's battery status when disconnected Signed-off-by: Evan Maddock <[email protected]> * bluetooth-indicator: Remove debugging message Signed-off-by: Evan Maddock <[email protected]> --------- Signed-off-by: Evan Maddock <[email protected]> Co-authored-by: Joshua Strobl <[email protected]>
- Loading branch information