The ability to tweak the state property was mainly introduced in
order to implement delayed state change via the state-set signal.
Since GTK 4.9.3[1] the active and state properties are no more
interchangeable.
[1] https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/5442
This should significantly simplify these panels, by not forcing
them to override GObject.constructed all the time. Most panels
were quite straightfoward.
Fix a state where toggling the main Bluetooth switch in the header will
always show "Bluetooth turned off", whichever state it's in.
To reproduce, with Bluetooth enabled and working, run
"hciconfig hci0 down" as root, and launch the Bluetooth panel.
See https://gitlab.gnome.org/GNOME/gnome-bluetooth/-/merge_requests/102
This commit changes the switch to do a proper delayed state change using
the state-set signal. Also changed is that we always update the switch
state rather than avoiding an update when it is not powered.
Avoiding this update was introduced in commit 4a009da483 (bluetooth:
Don't change the switch status when transitioning), however, the current
implementation causes us to get stuck in the wrong visual state
sometimes. Also, with this patch I am unable to see any visual glitch on
hardware that should be affected, and even if there was a glitch,
getting the final state right is more important.
Closes: #607, #1272
Make the panel class provide a cancellable that will be cancelled when the panel
is destroyed. Panel implementations can use this and not have to mangage the
cancellable themselves. Consolidate cases where panels had multiple cancellables
that were all being used for this behaviour.
For the new or alternative version of Control Center, the Bluetooth
empty state will be vertically alligned to the center for any
app window size. Otherwise when the Bluetooh is powered and available,
the align will be as always.
This changes do not affect to the old version because the windows
size (for the old version) is always the same and small
enought to be in the center in any case.
https://bugzilla.gnome.org/show_bug.cgi?id=784720
When transitioning from an enabled platform rfkill to disabled, the
Bluetooth adapter's power will lag behind. Make sure to not change the
switch's status when we get into this temporary state.
https://bugzilla.gnome.org/show_bug.cgi?id=760168
When enabling Bluetooth, and with older versions of the rfkill
gnome-settings-daemon D-Bus service, we could get into a state where the
Bluetooth rfkill was off, but the hciX rfkill associated with the
adapter is blocked.
Avoid showing filler text in that case.
https://bugzilla.gnome.org/show_bug.cgi?id=760168
We now offere separate "Bluetooth is off" and "Airplane mode is on"
pages. The "Airplane mode is on" offers to turn off airplane mode
altogether.
We also have better explanations for all the other modes, and a filler
Bluetooth logo to make the page seem less empty.
https://bugzilla.gnome.org/show_bug.cgi?id=751483
It was used by a test plugin we ship ourselves for Geoclue 1.x,
and NetworkManager. Given that NetworkManager doesn't make use
of it anymore, let's remove it.
If a connection is on-going, make sure to cancel it before
when finalizing the panel, or we will be crashing once
we've finished connecting/disconnecting.
https://bugzilla.gnome.org/show_bug.cgi?id=708478
This makes loading faster, with less I/O, avoids unnecessary
code duplication (around 1k lines shaved), and ensures that
all the panels link and work appropriately.
By the same token, it will stop external panels from being
created, and loaded.
https://bugzilla.gnome.org/show_bug.cgi?id=690036
Rather than having an unusable switch (which wouldn't represent
the real state of the connection), show a spinner until the
connection is finished doing.