After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 728511 - network: hw rfkill indication
network: hw rfkill indication
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Network
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-04-18 15:31 UTC by Matthias Clasen
Modified: 2014-04-22 13:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
network: don't pretend we can overrule hw rfkill (1.80 KB, patch)
2014-04-21 22:16 UTC, Matthias Clasen
committed Details | Review

Description Matthias Clasen 2014-04-18 15:31:36 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
Comment 1 Matthias Clasen 2014-04-21 22:16:58 UTC
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.
Comment 2 Bastien Nocera 2014-04-22 06:19:57 UTC
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?
Comment 3 Matthias Clasen 2014-04-22 11:34:55 UTC
I think g_variant_get_boolean is guaranteed to only return TRUE or FALSE
Comment 4 Bastien Nocera 2014-04-22 12:52:49 UTC
It returns:
return data != NULL ? *data != 0 : FALSE;

I'm not certain whether that's equivalent to TRUE/FALSE.
Comment 5 Matthias Clasen 2014-04-22 13:54:25 UTC
Fixed with the !! added

Attachment 274853 [details] pushed as 4ad9970 - network: don't pretend we can overrule hw rfkill