summaryrefslogtreecommitdiffstats
path: root/MainPanel.c
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2020-12-17 19:08:56 -0300
committerBenBE <BenBE@geshi.org>2020-12-19 16:02:34 +0100
commite8c6994f40c9c69089e9f80abb2f895d2e077c7e (patch)
tree7e5078da157f8efba1b3d3b82c95fed6c3276f9c /MainPanel.c
parent3d1703f16faf5bd3c73976909e1b6e03061a7f72 (diff)
Add "Tree view is always sorted by PID" option to mimic htop 2 behavior
Diffstat (limited to 'MainPanel.c')
-rw-r--r--MainPanel.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/MainPanel.c b/MainPanel.c
index 6c0c9fd1..f2b71e68 100644
--- a/MainPanel.c
+++ b/MainPanel.c
@@ -25,7 +25,7 @@ static const char* const MainFunctions[] = {"Help ", "Setup ", "Search", "Filt
void MainPanel_updateTreeFunctions(MainPanel* this, bool mode) {
FunctionBar* bar = MainPanel_getFunctionBar(this);
- FunctionBar_setLabel(bar, KEY_F(5), mode ? "Sorted" : "Tree ");
+ FunctionBar_setLabel(bar, KEY_F(5), mode ? "List " : "Tree ");
}
void MainPanel_pidSearch(MainPanel* this, int ch) {
@@ -65,6 +65,9 @@ static HandlerResult MainPanel_eventHandler(Panel* super, int ch) {
} else {
reaction |= Action_setSortKey(settings, field);
}
+ if (settings->treeViewAlwaysByPID) {
+ settings->treeView = false;
+ }
reaction |= HTOP_RECALCULATE | HTOP_REDRAW_BAR | HTOP_SAVE_SETTINGS;
result = HANDLED;
} else if (ch != ERR && this->inc->active) {

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