GNOME Bugzilla – Bug 728511
network: hw rfkill indication
Last modified: 2014-04-22 13:54:34 UTC
when the hw rfkill switch is toggled, the network panel still shows the switch, giving the impression that one could toggle airplane mode there - which doesn't work. gnome-shell hides the switch and says 'Use hardware switch to turn off' in this case. We should do the same
Created attachment 274853 [details] [review] network: don't pretend we can overrule hw rfkill If the airplane mode is forced by the hw switch, make the switch in the network panel insensitive, so we don't give the wrong impression.
Review of attachment 274853 [details] [review]: Rest looks fine. ::: panels/network/cc-network-panel.c @@ +306,3 @@ + + result = g_dbus_proxy_get_cached_property (panel->priv->rfkill_proxy, "HardwareAirplaneMode"); + hw_enabled = g_variant_get_boolean (result); Should we do "!!" on the value to make sure that the bitwise operation is correct below?
I think g_variant_get_boolean is guaranteed to only return TRUE or FALSE
It returns: return data != NULL ? *data != 0 : FALSE; I'm not certain whether that's equivalent to TRUE/FALSE.
Fixed with the !! added Attachment 274853 [details] pushed as 4ad9970 - network: don't pretend we can overrule hw rfkill