summaryrefslogtreecommitdiffstats
path: root/ColorsPanel.c
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2015-02-03 22:30:05 +0100
committerHisham Muhammad <hisham@gobolinux.org>2015-02-03 22:30:05 +0100
commitf5f29ceeb99bf56c477e41a61cdb5d55d2e988d2 (patch)
treeb145c3949354294bd1f5b56c52c3349fdc42b655 /ColorsPanel.c
parentc3a7b2f134a9eb311bbd771333f000c1b9f9bed9 (diff)
Make the implementation of color schemes declarative.
Diffstat (limited to 'ColorsPanel.c')
-rw-r--r--ColorsPanel.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ColorsPanel.c b/ColorsPanel.c
index 81144950..c4255f87 100644
--- a/ColorsPanel.c
+++ b/ColorsPanel.c
@@ -16,7 +16,7 @@ in the source distribution for its full text.
// TO ADD A NEW SCHEME:
// * Increment the size of bool check in ColorsPanel.h
-// * Add the entry in the ColorSchemes array below in the file
+// * Add the entry in the ColorSchemeNames array below in the file
// * Add a define in CRT.h that matches the order of the array
// * Add the colors in CRT_setColors
@@ -34,7 +34,7 @@ typedef struct ColorsPanel_ {
}*/
-static const char* ColorSchemes[] = {
+static const char* ColorSchemeNames[] = {
"Default",
"Monochromatic",
"Black on White",
@@ -63,7 +63,7 @@ static HandlerResult ColorsPanel_eventHandler(Panel* super, int ch) {
case KEY_ENTER:
case KEY_MOUSE:
case ' ':
- for (int i = 0; ColorSchemes[i] != NULL; i++)
+ for (int i = 0; ColorSchemeNames[i] != NULL; i++)
CheckItem_set((CheckItem*)Panel_get(super, i), false);
CheckItem_set((CheckItem*)Panel_get(super, mark), true);
this->settings->colorScheme = mark;
@@ -100,8 +100,8 @@ ColorsPanel* ColorsPanel_new(Settings* settings, ScreenManager* scr) {
this->scr = scr;
Panel_setHeader(super, "Colors");
- for (int i = 0; ColorSchemes[i] != NULL; i++) {
- Panel_add(super, (Object*) CheckItem_new(strdup(ColorSchemes[i]), NULL, false));
+ for (int i = 0; ColorSchemeNames[i] != NULL; i++) {
+ Panel_add(super, (Object*) CheckItem_new(strdup(ColorSchemeNames[i]), NULL, false));
}
CheckItem_set((CheckItem*)Panel_get(super, settings->colorScheme), true);
return this;

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