Skip to content

Ui rework / hotplugging fixups #92

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Nov 22, 2019
Merged

Conversation

itzexor
Copy link
Contributor

@itzexor itzexor commented Nov 1, 2019

Note: Hardware RF switch untested. I expect it works as usual though, it should show a page identical to bluetooth disabled in the screenshot below except with the additional "by hardware switch" text.

UI cleanup:

  • Reworks UI to have less wasted space by moving everything into a header bar except the bluetooth widget and status page.
  • Static UI layout done with glade/gtkbuilder.

gnome-bluetooth BluetoothSettingsWidget override fix:
Widget override code now loops through widgets to find them instead of using a hardcoded "path". It's still fragile. Adding version-specific code is probably the best approach if it breaks again.

Better support for hotpluggable devices:

  • Always looks for an adapter instead of only starting if we have an adapter and stopping once when we lose it.
  • Supports first device index being above 9, which can happen easily with a single hotpluggable device(USB)
  • "No adapters" status page now uses dialog-info icon

Better rfkill error state presentation:
Previously, when the user did not have permission to /dev/rfkill, the main status page was used to show an error state with a bluetooth disabled icon and the switch set to off and insensitive. This would likely be reached most often by a user attempting to disable bluetooth. This layout may be misleading because it could suggest that bluetooth is disabled when it's actually still enabled and discoverable, and that the application no longer worked because of rfkill permission issues.

The new layout places an rfkill-error-specific image which shows a dialog-error icon next to the toggle switch when an enable/disable operation fails. The error is explained by the image's tooltip which may have low discoverability. A new message was added that explains having a udev rule or being in the rfkill group can fix permissions issues.

This rfkill-specific error state no longer modifies the powered or present states for bluetooth adapter status, which allows the application to work as expected regardless of rfkill permissions.

rfkill-error
Screenshot from 2019-10-31 17-37-17
Screenshot from 2019-10-31 17-37-07
Screenshot from 2019-10-31 17-34-51
Screenshot from 2019-10-31 17-34-46

-main status icon and bluetooth switch now inside a header bar
-settings page converted into a popover on a menu button

"under the hood":
-statuc ui components designed with glade/gtkbuilder
-single stack page for status: there is just a status label and
a status icon to be updated and a "status-page" to switch to
when things are disabled or unplugged instead of one stack page
per device state.
by unconditionally starting the event monitor and handling finding
and losing devices.
we can get there quick with a single hotpluggable bluetooth device
instead of using the status stack page which prevents use of the
bluetooth widget, we now show an error icon next to the switch
and disable it while not changing any other state. If bluetooth
is blocked then we end up in a bluetooth disabled + switch disabled
state, otherwise we end up in a normal view with the switch disabled.
@clefebvre clefebvre changed the title [RFC/Testing] Ui rework / hotplugging fixups Ui rework / hotplugging fixups Nov 22, 2019
@clefebvre clefebvre merged commit 4d8ed87 into linuxmint:master Nov 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants