diff options
author | Benny Baumann <BenBE@geshi.org> | 2023-11-23 12:22:02 +0100 |
---|---|---|
committer | BenBE <BenBE@geshi.org> | 2023-12-26 15:14:19 +0100 |
commit | 6aa9ef2726e42c4ae062b55be4d5cc015767d997 (patch) | |
tree | d5bd033946b404fa99b70b0b1c560725cef302bf /ColorsPanel.c | |
parent | a98fc47ffe67e88b1a83f94382795b8787a9bfe8 (diff) |
Fix code style
Diffstat (limited to 'ColorsPanel.c')
-rw-r--r-- | ColorsPanel.c | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/ColorsPanel.c b/ColorsPanel.c index 59008842..c00981e0 100644 --- a/ColorsPanel.c +++ b/ColorsPanel.c @@ -50,30 +50,31 @@ static HandlerResult ColorsPanel_eventHandler(Panel* super, int ch) { ColorsPanel* this = (ColorsPanel*) super; HandlerResult result = IGNORED; - int mark; switch (ch) { - case 0x0a: - case 0x0d: - case KEY_ENTER: - 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++) - CheckItem_set((CheckItem*)Panel_get(super, i), false); - CheckItem_set((CheckItem*)Panel_get(super, mark), true); - - this->settings->colorScheme = mark; - this->settings->changed = true; - this->settings->lastUpdate++; - - CRT_setColors(mark); - clear(); - - result = HANDLED | REDRAW; + case 0x0a: + case 0x0d: + case KEY_ENTER: + case KEY_MOUSE: + case KEY_RECLICK: + case ' ': { + int mark = Panel_getSelectedIndex(super); + assert(mark >= 0); + assert(mark < LAST_COLORSCHEME); + + 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; + this->settings->changed = true; + this->settings->lastUpdate++; + + CRT_setColors(mark); + clear(); + + result = HANDLED | REDRAW; + } } return result; |