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



commit 770f44ee781b1a6d18a7e5c6b115863d36ca9c0e
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 0337d27ca..da535b82f 100644
--- a/panels/network/cc-wifi-connection-row.c
+++ b/panels/network/cc-wifi-connection-row.c
@@ -239,9 +239,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]