From 65357c8c46154de4e4eca14075bfe5523bb5fc14 Mon Sep 17 00:00:00 2001 From: Daniel Lange Date: Mon, 7 Dec 2020 10:26:01 +0100 Subject: New upstream version 3.0.3 --- CategoriesPanel.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) (limited to 'CategoriesPanel.c') diff --git a/CategoriesPanel.c b/CategoriesPanel.c index 8a1e16d..4ee1ad4 100644 --- a/CategoriesPanel.c +++ b/CategoriesPanel.c @@ -1,21 +1,27 @@ /* htop - CategoriesPanel.c (C) 2004-2011 Hisham H. Muhammad -Released under the GNU GPL, see the COPYING file +Released under the GNU GPLv2, see the COPYING file in the source distribution for its full text. */ #include "CategoriesPanel.h" +#include +#include +#include + +#include "AvailableColumnsPanel.h" #include "AvailableMetersPanel.h" -#include "MetersPanel.h" -#include "DisplayOptionsPanel.h" -#include "ColumnsPanel.h" #include "ColorsPanel.h" -#include "AvailableColumnsPanel.h" - -#include -#include +#include "ColumnsPanel.h" +#include "DisplayOptionsPanel.h" +#include "FunctionBar.h" +#include "ListItem.h" +#include "MetersPanel.h" +#include "Object.h" +#include "ProvideCurses.h" +#include "Vector.h" static const char* const CategoriesFunctions[] = {" ", " ", " ", " ", " ", " ", " ", " ", " ", "Done ", NULL}; @@ -81,7 +87,7 @@ static HandlerResult CategoriesPanel_eventHandler(Panel* super, int ch) { break; } default: - if (ch < 255 && isalpha(ch)) + if (0 < ch && ch < 255 && isgraph((unsigned char)ch)) result = Panel_selectByTyping(super, ch); if (result == BREAK_LOOP) result = IGNORED; @@ -91,6 +97,7 @@ static HandlerResult CategoriesPanel_eventHandler(Panel* super, int ch) { int size = ScreenManager_size(this->scr); for (int i = 1; i < size; i++) ScreenManager_remove(this->scr, 1); + switch (selected) { case 0: CategoriesPanel_makeMetersPage(this); @@ -109,7 +116,7 @@ static HandlerResult CategoriesPanel_eventHandler(Panel* super, int ch) { return result; } -PanelClass CategoriesPanel_class = { +const PanelClass CategoriesPanel_class = { .super = { .extends = Class(Panel), .delete = CategoriesPanel_delete -- cgit v1.2.3