[gnome-control-center] network: hide the security cell renderer if there's no icon to display



commit b3af71f37f30f63ea4283d5d72213319db899fca
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Tue Mar 29 14:33:49 2011 -0400

    network: hide the security cell renderer if there's no icon to display
    
    This allows the mode renderer which is on the left to slide in and
    replace it in case.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=646140

 panels/network/panel-cell-renderer-security.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/panels/network/panel-cell-renderer-security.c b/panels/network/panel-cell-renderer-security.c
index 558a1ff..debce36 100644
--- a/panels/network/panel-cell-renderer-security.c
+++ b/panels/network/panel-cell-renderer-security.c
@@ -68,7 +68,17 @@ panel_cell_renderer_set_name (PanelCellRendererSecurity *renderer)
             renderer->security != NM_AP_SEC_NONE)
                 icon_name = "network-wireless-encrypted-symbolic";
 
-        g_object_set (renderer, "icon-name", icon_name, NULL);
+        if (icon_name != NULL) {
+                g_object_set (renderer,
+                              "icon-name", icon_name,
+                              "visible", TRUE,
+                              NULL);
+        } else {
+                g_object_set (renderer,
+                              "icon-name", NULL,
+                              "visible", FALSE,
+                              NULL);
+        }
 }
 
 /**



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