summaryrefslogtreecommitdiffstats
path: root/ProcessList.c
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2014-11-19 23:17:52 -0200
committerHisham Muhammad <hisham@gobolinux.org>2014-11-19 23:17:52 -0200
commit9faf4938b8195a0fb5d62cf1702f9f5c07523031 (patch)
tree84732ab7ef1bf66d55feefaf97216ccfc9bf2fad /ProcessList.c
parent300af4b829c6552d7efdfcde43220cf318b5a265 (diff)
Refactored key handlers.
Made the logic more modular, hopefully easier to follow, and removed repeated code. Plus, some optimization in RichString code.
Diffstat (limited to 'ProcessList.c')
-rw-r--r--ProcessList.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/ProcessList.c b/ProcessList.c
index 7559623c..7841e0a3 100644
--- a/ProcessList.c
+++ b/ProcessList.c
@@ -1047,16 +1047,12 @@ void ProcessList_expandTree(ProcessList* this) {
}
}
-void ProcessList_rebuildPanel(ProcessList* this, bool flags, int following, bool userOnly, uid_t userId, const char* incFilter) {
+void ProcessList_rebuildPanel(ProcessList* this, bool flags, int following, const char* incFilter) {
if (!flags) {
following = this->following;
- userOnly = this->userOnly;
- userId = this->userId;
incFilter = this->incFilter;
} else {
this->following = following;
- this->userOnly = userOnly;
- this->userId = userId;
this->incFilter = incFilter;
}
@@ -1072,7 +1068,7 @@ void ProcessList_rebuildPanel(ProcessList* this, bool flags, int following, bool
Process* p = ProcessList_get(this, i);
if ( (!p->show)
- || (userOnly && (p->st_uid != userId))
+ || (this->userOnly && (p->st_uid != this->userId))
|| (incFilter && !(String_contains_i(p->comm, incFilter)))
|| (this->pidWhiteList && !Hashtable_get(this->pidWhiteList, p->pid)) )
hidden = true;

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