summaryrefslogtreecommitdiffstats
path: root/Process.c
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2010-06-17 19:02:03 +0000
committerHisham Muhammad <hisham@gobolinux.org>2010-06-17 19:02:03 +0000
commit9eb912149e17ba74ddc429e093abfaccab02bb7a (patch)
tree4428e8ff56809756cff8ddc1e17d1f3e89c7cd2e /Process.c
parentbc4f7147ccb72244ddb8eb256a0b6ae1684aa2bd (diff)
expand/collapse tree
Diffstat (limited to 'Process.c')
-rw-r--r--Process.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Process.c b/Process.c
index 4aae75eb..6389f741 100644
--- a/Process.c
+++ b/Process.c
@@ -79,6 +79,7 @@ typedef struct Process_ {
int indent;
char state;
bool tag;
+ bool showChildren;
pid_t ppid;
unsigned int pgrp;
unsigned int session;
@@ -331,9 +332,9 @@ static void Process_writeField(Process* this, RichString* str, ProcessField fiel
n -= 4;
}
if (this->pl->direction == 1)
- snprintf(buf, n, " `- ");
+ snprintf(buf, n, " `%s ", this->showChildren ? "-" : "+" );
else
- snprintf(buf, n, " ,- ");
+ snprintf(buf, n, " ,%s ", this->showChildren ? "-" : "+" );
RichString_append(str, CRT_colors[PROCESS_TREE], buffer);
Process_writeCommand(this, attr, baseattr, str);
return;
@@ -460,6 +461,7 @@ Process* Process_new(struct ProcessList_ *pl) {
this->pid = 0;
this->pl = pl;
this->tag = false;
+ this->showChildren = true;
this->updated = false;
this->utime = 0;
this->stime = 0;

© 2014-2024 Faster IT GmbH | imprint | privacy policy