[gnome-system-monitor/migrateui] Collapse kthreadd by default on linuxes in process tree mode.
- From: Robert Roth <robertroth src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-system-monitor/migrateui] Collapse kthreadd by default on linuxes in process tree mode.
- Date: Sat, 21 Jul 2012 07:39:26 +0000 (UTC)
commit f37aaefe4bf1ef2af00d48d5219b168f9fbb5b78
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]