aboutsummaryrefslogtreecommitdiffstats
path: root/ColorsPanel.c
diff options
context:
space:
mode:
Diffstat (limited to 'ColorsPanel.c')
-rw-r--r--ColorsPanel.c11
1 files changed, 5 insertions, 6 deletions
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 <assert.h>
#include <stdbool.h>
#include <stdlib.h>
#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);

© 2014-2024 Faster IT GmbH | imprint | privacy policy