From ce9e7fd14f58467e3062b76d0132ebeb973a5e11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Sat, 2 Jan 2021 23:51:53 +0100 Subject: Panel_new: reorder arguments Reorder owner and type so they match the order of Panel_init --- Action.c | 4 ++-- InfoScreen.c | 2 +- Panel.c | 2 +- Panel.h | 2 +- SignalsPanel.c | 2 +- linux/IOPriorityPanel.c | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Action.c b/Action.c index e6e35e72..81e9121d 100644 --- a/Action.c +++ b/Action.c @@ -166,7 +166,7 @@ Htop_Reaction Action_setSortKey(Settings* settings, ProcessField sortKey) { static Htop_Reaction actionSetSortColumn(State* st) { 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, Class(ListItem), true, FunctionBar_newEnterEsc("Sort ", "Cancel ")); Panel_setHeader(sortPanel, "Sort by"); ProcessField* fields = st->settings->fields; for (int i = 0; fields[i]; i++) { @@ -336,7 +336,7 @@ static Htop_Reaction actionKill(State* st) { } static Htop_Reaction actionFilterByUser(State* st) { - Panel* usersPanel = Panel_new(0, 0, 0, 0, true, Class(ListItem), FunctionBar_newEnterEsc("Show ", "Cancel ")); + Panel* usersPanel = Panel_new(0, 0, 0, 0, Class(ListItem), true, FunctionBar_newEnterEsc("Show ", "Cancel ")); Panel_setHeader(usersPanel, "Show processes of:"); UsersTable_foreach(st->ut, addUserToVector, usersPanel); Vector_insertionSort(usersPanel->items); diff --git a/InfoScreen.c b/InfoScreen.c index 51bc1587..3681088a 100644 --- a/InfoScreen.c +++ b/InfoScreen.c @@ -26,7 +26,7 @@ InfoScreen* InfoScreen_init(InfoScreen* this, const Process* process, FunctionBa if (!bar) { bar = FunctionBar_new(InfoScreenFunctions, InfoScreenKeys, InfoScreenEvents); } - this->display = Panel_new(0, 1, COLS, height, false, Class(ListItem), bar); + this->display = Panel_new(0, 1, COLS, height, Class(ListItem), false, bar); this->inc = IncSet_new(bar); this->lines = Vector_new(this->display->items->type, true, DEFAULT_SIZE); Panel_setHeader(this->display, panelHeader); diff --git a/Panel.c b/Panel.c index c76909cd..5d103753 100644 --- a/Panel.c +++ b/Panel.c @@ -30,7 +30,7 @@ const PanelClass Panel_class = { .eventHandler = Panel_selectByTyping, }; -Panel* Panel_new(int x, int y, int w, int h, bool owner, const ObjectClass* type, FunctionBar* fuBar) { +Panel* Panel_new(int x, int y, int w, int h, const ObjectClass* type, bool owner, FunctionBar* fuBar) { Panel* this; this = xMalloc(sizeof(Panel)); Object_setClass(this, Class(Panel)); diff --git a/Panel.h b/Panel.h index 6b442793..945718ae 100644 --- a/Panel.h +++ b/Panel.h @@ -78,7 +78,7 @@ struct Panel_ { extern const PanelClass Panel_class; -Panel* Panel_new(int x, int y, int w, int h, bool owner, const ObjectClass* type, FunctionBar* fuBar); +Panel* Panel_new(int x, int y, int w, int h, const ObjectClass* type, bool owner, FunctionBar* fuBar); void Panel_delete(Object* cast); diff --git a/SignalsPanel.c b/SignalsPanel.c index 436fc579..055e3e65 100644 --- a/SignalsPanel.c +++ b/SignalsPanel.c @@ -19,7 +19,7 @@ in the source distribution for its full text. Panel* SignalsPanel_new() { - Panel* this = Panel_new(1, 1, 1, 1, true, Class(ListItem), FunctionBar_newEnterEsc("Send ", "Cancel ")); + Panel* this = Panel_new(1, 1, 1, 1, Class(ListItem), true, FunctionBar_newEnterEsc("Send ", "Cancel ")); const int defaultSignal = SIGTERM; int defaultPosition = 15; unsigned int i; diff --git a/linux/IOPriorityPanel.c b/linux/IOPriorityPanel.c index c5a4a4c9..25d2199d 100644 --- a/linux/IOPriorityPanel.c +++ b/linux/IOPriorityPanel.c @@ -17,7 +17,7 @@ in the source distribution for its full text. Panel* IOPriorityPanel_new(IOPriority currPrio) { - Panel* this = Panel_new(1, 1, 1, 1, true, Class(ListItem), FunctionBar_newEnterEsc("Set ", "Cancel ")); + Panel* this = Panel_new(1, 1, 1, 1, Class(ListItem), true, FunctionBar_newEnterEsc("Set ", "Cancel ")); Panel_setHeader(this, "IO Priority:"); Panel_add(this, (Object*) ListItem_new("None (based on nice)", IOPriority_None)); -- cgit v1.2.3