From 69f439eff387a6ecb52734e400b297a3c85f2285 Mon Sep 17 00:00:00 2001 From: Daniel Lange Date: Tue, 21 Sep 2021 08:35:19 +0200 Subject: New upstream version 3.1.0 --- ColorsPanel.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'ColorsPanel.c') diff --git a/ColorsPanel.c b/ColorsPanel.c index c076adc..79f001c 100644 --- a/ColorsPanel.c +++ b/ColorsPanel.c @@ -7,17 +7,16 @@ in the source distribution for its full text. #include "ColorsPanel.h" +#include #include #include #include "CRT.h" #include "FunctionBar.h" -#include "Header.h" +#include "Macros.h" #include "Object.h" #include "OptionItem.h" #include "ProvideCurses.h" -#include "RichString.h" -#include "Vector.h" // TO ADD A NEW SCHEME: @@ -51,7 +50,7 @@ static HandlerResult ColorsPanel_eventHandler(Panel* super, int ch) { ColorsPanel* this = (ColorsPanel*) super; HandlerResult result = IGNORED; - int mark = Panel_getSelectedIndex(super); + int mark; switch(ch) { case 0x0a: @@ -60,6 +59,7 @@ static HandlerResult ColorsPanel_eventHandler(Panel* super, int ch) { case KEY_MOUSE: case KEY_RECLICK: case ' ': + mark = Panel_getSelectedIndex(super); assert(mark >= 0); assert(mark < LAST_COLORSCHEME); for (int i = 0; ColorSchemeNames[i] != NULL; i++) @@ -86,14 +86,13 @@ const PanelClass ColorsPanel_class = { .eventHandler = ColorsPanel_eventHandler }; -ColorsPanel* ColorsPanel_new(Settings* settings, ScreenManager* scr) { +ColorsPanel* ColorsPanel_new(Settings* settings) { ColorsPanel* this = AllocThis(ColorsPanel); Panel* super = (Panel*) this; FunctionBar* fuBar = FunctionBar_new(ColorsFunctions, NULL, NULL); Panel_init(super, 1, 1, 1, 1, Class(CheckItem), true, fuBar); this->settings = settings; - this->scr = scr; assert(ARRAYSIZE(ColorSchemeNames) == LAST_COLORSCHEME + 1); -- cgit v1.2.3