[gnome-system-monitor] proctable: if SELinux is absent exclude relative column



commit 53b848ece0b2b6b48e2990666ae82165d5b02481
Author: Stefano Facchini <stefano facchini gmail com>
Date:   Tue Aug 13 15:53:17 2013 +0200

    proctable: if SELinux is absent exclude relative column
    
    Use GsmTreeView API instead of doing that manually.

 src/proctable.cpp |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/src/proctable.cpp b/src/proctable.cpp
index 14c908a..ee63edb 100644
--- a/src/proctable.cpp
+++ b/src/proctable.cpp
@@ -554,14 +554,10 @@ proctable_new (GsmApplication * const app)
         gsm_tree_view_add_excluded_column (GSM_TREE_VIEW (proctree), COL_OWNER);
     }
 
-    gsm_tree_view_load_state (GSM_TREE_VIEW (proctree));
+    if (!can_show_security_context_column ())
+        gsm_tree_view_add_excluded_column (GSM_TREE_VIEW (proctree), COL_SECURITYCONTEXT);
 
-    /* Override column settings by hiding this column if it's meaningless: */
-    if (!can_show_security_context_column ()) {
-        GtkTreeViewColumn *column;
-        column = gsm_tree_view_get_column_from_id (GSM_TREE_VIEW (proctree), COL_SECURITYCONTEXT);
-        gtk_tree_view_column_set_visible (column, FALSE);
-    }
+    gsm_tree_view_load_state (GSM_TREE_VIEW (proctree));
 
     GtkIconTheme* theme = gtk_icon_theme_get_default();
     g_signal_connect(G_OBJECT (theme), "changed", G_CALLBACK (cb_refresh_icons), app);


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