[gnome-control-center/wip/benzea/wifi-panel: 21/21] wifi: Show WEP with a broken security icon



commit b38b6447bf579d98d7a1abe5b5017b281fe15304
Author: Benjamin Berg <bberg redhat com>
Date:   Thu Jan 3 16:51:02 2019 +0100

    wifi: Show WEP with a broken security icon
    
    WEP is rather insecure, and using it is a bad idea in general. So show
    it as insecure rather than falsely advertising it as being secure.

 panels/network/cc-wifi-connection-row.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/panels/network/cc-wifi-connection-row.c b/panels/network/cc-wifi-connection-row.c
index 68d49850a..e0619d9d8 100644
--- a/panels/network/cc-wifi-connection-row.c
+++ b/panels/network/cc-wifi-connection-row.c
@@ -232,9 +232,21 @@ update_ui (CcWifiConnectionRow *self)
   gtk_widget_set_visible (GTK_WIDGET (self->active_icon), active);
 
   if (security != NM_AP_SEC_UNKNOWN && security != NM_AP_SEC_NONE)
-    gtk_widget_set_opacity (GTK_WIDGET (self->encrypted_icon), 1.0);
+    {
+      gchar *icon_name;
+
+      gtk_widget_set_opacity (GTK_WIDGET (self->encrypted_icon), 1.0);
+      if (security == NM_AP_SEC_WEP)
+        icon_name = "channel-insecure-symbolic";
+      else
+        icon_name = "network-wireless-encrypted-symbolic";
+
+      g_object_set (self->encrypted_icon, "icon-name", icon_name, NULL);
+    }
   else
-    gtk_widget_set_opacity (GTK_WIDGET (self->encrypted_icon), 0.0);
+    {
+      gtk_widget_set_opacity (GTK_WIDGET (self->encrypted_icon), 0.0);
+    }
 
   if (best_ap)
     {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]