Action: remove trivial wrapper function

This commit is contained in:
Christian Göttsche 2021-01-01 21:31:30 +01:00
parent 2c06566405
commit f6aa5d29bb
1 changed files with 3 additions and 7 deletions

View File

@ -162,7 +162,9 @@ Htop_Reaction Action_setSortKey(Settings* settings, ProcessField sortKey) {
return HTOP_REFRESH | HTOP_SAVE_SETTINGS | HTOP_UPDATE_PANELHDR | HTOP_KEEP_FOLLOWING; return HTOP_REFRESH | HTOP_SAVE_SETTINGS | HTOP_UPDATE_PANELHDR | HTOP_KEEP_FOLLOWING;
} }
static Htop_Reaction sortBy(State* st) { // ----------------------------------------
static Htop_Reaction actionSetSortColumn(State* st) {
Htop_Reaction reaction = HTOP_OK; Htop_Reaction reaction = HTOP_OK;
Panel* sortPanel = Panel_new(0, 0, 0, 0, true, Class(ListItem), FunctionBar_newEnterEsc("Sort ", "Cancel ")); Panel* sortPanel = Panel_new(0, 0, 0, 0, true, Class(ListItem), FunctionBar_newEnterEsc("Sort ", "Cancel "));
Panel_setHeader(sortPanel, "Sort by"); Panel_setHeader(sortPanel, "Sort by");
@ -187,8 +189,6 @@ static Htop_Reaction sortBy(State* st) {
return reaction | HTOP_REFRESH | HTOP_REDRAW_BAR | HTOP_UPDATE_PANELHDR; return reaction | HTOP_REFRESH | HTOP_REDRAW_BAR | HTOP_UPDATE_PANELHDR;
} }
// ----------------------------------------
static Htop_Reaction actionResize(State* st) { static Htop_Reaction actionResize(State* st) {
clear(); clear();
Panel_resize(st->panel, COLS, LINES - (st->panel->y) - 1); Panel_resize(st->panel, COLS, LINES - (st->panel->y) - 1);
@ -271,10 +271,6 @@ static Htop_Reaction actionInvertSortOrder(State* st) {
return HTOP_REFRESH | HTOP_SAVE_SETTINGS; return HTOP_REFRESH | HTOP_SAVE_SETTINGS;
} }
static Htop_Reaction actionSetSortColumn(State* st) {
return sortBy(st);
}
static Htop_Reaction actionExpandOrCollapse(State* st) { static Htop_Reaction actionExpandOrCollapse(State* st) {
bool changed = expandCollapse(st->panel); bool changed = expandCollapse(st->panel);
return changed ? HTOP_RECALCULATE : HTOP_OK; return changed ? HTOP_RECALCULATE : HTOP_OK;