[gnome-system-monitor] Collapse kthreadd by default on linuxes in process tree mode.
- From: Chris KÃhl <chriskuehl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-system-monitor] Collapse kthreadd by default on linuxes in process tree mode.
- Date: Tue, 21 Feb 2012 01:42:17 +0000 (UTC)
commit e0d1da0eccda35a22038726fc574b8ab92f05ff0
Author: Robert Roth <robert roth off gmail com>
Date: Sun Jan 29 10:39:51 2012 +0200
Collapse kthreadd by default on linuxes in process tree mode.
https://bugzilla.gnome.org/show_bug.cgi?id=667830
src/proctable.cpp | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/proctable.cpp b/src/proctable.cpp
index 0b2e693..5c400e7 100644
--- a/src/proctable.cpp
+++ b/src/proctable.cpp
@@ -679,7 +679,12 @@ insert_info_to_tree (ProcInfo *info, ProcData *procdata, bool forced = false)
GtkTreePath *parent_node = gtk_tree_model_get_path(model, &parent->node);
gtk_tree_store_insert(GTK_TREE_STORE(model), &info->node, &parent->node, 0);
- if (!gtk_tree_view_row_expanded(GTK_TREE_VIEW(procdata->tree), parent_node))
+ if (!gtk_tree_view_row_expanded(GTK_TREE_VIEW(procdata->tree), parent_node)
+#ifdef __linux__
+ // on linuxes we don't want to expand kthreadd by default (always has pid 2)
+ && (parent->pid != 2)
+#endif
+ )
gtk_tree_view_expand_row(GTK_TREE_VIEW(procdata->tree), parent_node, FALSE);
gtk_tree_path_free(parent_node);
} else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]