[gnome-control-center] network: hide airplane switch when g-s-d says so
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] network: hide airplane switch when g-s-d says so
- Date: Mon, 22 Sep 2014 20:12:09 +0000 (UTC)
commit 436d220f88f05d1e1eadd70a5addc8be624b6a2c
Author: Cosimo Cecchi <cosimo endlessm com>
Date: Mon Sep 8 14:44:22 2014 -0700
network: hide airplane switch when g-s-d says so
https://bugzilla.gnome.org/show_bug.cgi?id=736291
panels/network/cc-network-panel.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/panels/network/cc-network-panel.c b/panels/network/cc-network-panel.c
index 01fe0a9..90b265e 100644
--- a/panels/network/cc-network-panel.c
+++ b/panels/network/cc-network-panel.c
@@ -291,14 +291,17 @@ static void
sync_airplane_mode_switch (CcNetworkPanel *panel)
{
GVariant *result;
- gboolean enabled;
+ gboolean enabled, should_show;
gboolean hw_enabled;
result = g_dbus_proxy_get_cached_property (panel->priv->rfkill_proxy, "HasAirplaneMode");
enabled = g_variant_get_boolean (result);
- gtk_widget_set_visible (GTK_WIDGET (panel->priv->kill_switch_header), enabled);
- if (!enabled)
+ result = g_dbus_proxy_get_cached_property (panel->priv->rfkill_proxy, "ShouldShowAirplaneMode");
+ should_show = g_variant_get_boolean (result);
+
+ gtk_widget_set_visible (GTK_WIDGET (panel->priv->kill_switch_header), enabled && should_show);
+ if (!enabled || !should_show)
return;
result = g_dbus_proxy_get_cached_property (panel->priv->rfkill_proxy, "AirplaneMode");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]