diff options
author | Daniel Lange <DLange@git.local> | 2022-04-14 16:44:51 +0200 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2022-04-14 16:44:51 +0200 |
commit | 99aa906bc5a61c71275bef7c7a2e94c0c3a017f3 (patch) | |
tree | f266eac5c4d74ea77d4555801912b89ac01d9673 /MainPanel.c | |
parent | df955c8991949334c72d33c8349646d4301edbce (diff) | |
parent | c6f946edd259e4222d6910d16ceaa5db60972819 (diff) |
Merge branch 'improve-filter-label' into main
Diffstat (limited to 'MainPanel.c')
-rw-r--r-- | MainPanel.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/MainPanel.c b/MainPanel.c index aeabe753..44915dfd 100644 --- a/MainPanel.c +++ b/MainPanel.c @@ -24,9 +24,10 @@ in the source distribution for its full text. static const char* const MainFunctions[] = {"Help ", "Setup ", "Search", "Filter", "Tree ", "SortBy", "Nice -", "Nice +", "Kill ", "Quit ", NULL}; static const char* const MainFunctions_ro[] = {"Help ", "Setup ", "Search", "Filter", "Tree ", "SortBy", " ", " ", " ", "Quit ", NULL}; -void MainPanel_updateTreeFunctions(MainPanel* this, bool mode) { +void MainPanel_updateLabels(MainPanel* this, bool list, bool filter) { FunctionBar* bar = MainPanel_getFunctionBar(this); - FunctionBar_setLabel(bar, KEY_F(5), mode ? "List " : "Tree "); + FunctionBar_setLabel(bar, KEY_F(5), list ? "List " : "Tree "); + FunctionBar_setLabel(bar, KEY_F(4), filter ? "FILTER" : "Filter"); } static void MainPanel_pidSearch(MainPanel* this, int ch) { @@ -122,7 +123,7 @@ static HandlerResult MainPanel_eventHandler(Panel* super, int ch) { } if (reaction & HTOP_REDRAW_BAR) { - MainPanel_updateTreeFunctions(this, settings->ss->treeView); + MainPanel_updateLabels(this, settings->ss->treeView, this->state->pl->incFilter); } if (reaction & HTOP_RESIZE) { result |= RESIZE; |