bluetooth: Show the Bluetooth menu when there were setup devices
If we detected that Bluetooth devices were setup, show the Bluetooth menu so that users can easily turn Bluetooth back on. This is a bit of a hack, as we cannot detect whether there is a Bluetooth adapter at all when it's disabled, so we cannot tell whether there were any Bluetooth devices setup, at some point. This state is saved in the gnome-shell GSettings in the had-bluetooth-devices-setup key. Checking whether we saw Bluetooth devices at one point is a good enough guess of whether there will be some in the future. https://bugzilla.gnome.org/show_bug.cgi?id=723848
This commit is contained in:
@ -72,6 +72,16 @@
|
||||
This key sets the default state of the checkbox.
|
||||
</_description>
|
||||
</key>
|
||||
<key name="had-bluetooth-devices-setup" type="b">
|
||||
<default>false</default>
|
||||
<_summary>Whether the default Bluetooth adapter had set up devices associated to it</_summary>
|
||||
<_description>
|
||||
The shell will only show a Bluetooth menu item if a Bluetooth
|
||||
adapter is powered, or if there were devices set up associated
|
||||
with the default adapter. This will be reset if the default
|
||||
adapter is ever seen not to have devices associated to it.
|
||||
</_description>
|
||||
</key>
|
||||
<child name="calendar" schema="org.gnome.shell.calendar"/>
|
||||
<child name="keybindings" schema="org.gnome.shell.keybindings"/>
|
||||
<child name="keyboard" schema="org.gnome.shell.keyboard"/>
|
||||
|
Reference in New Issue
Block a user