aboutsummaryrefslogtreecommitdiffstats
path: root/HeaderOptionsPanel.c
diff options
context:
space:
mode:
Diffstat (limited to 'HeaderOptionsPanel.c')
-rw-r--r--HeaderOptionsPanel.c46
1 files changed, 24 insertions, 22 deletions
diff --git a/HeaderOptionsPanel.c b/HeaderOptionsPanel.c
index 25d1ddb..7b5c81b 100644
--- a/HeaderOptionsPanel.c
+++ b/HeaderOptionsPanel.c
@@ -5,6 +5,8 @@ Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
+#include "config.h" // IWYU pragma: keep
+
#include "HeaderOptionsPanel.h"
#include <assert.h>
@@ -33,30 +35,30 @@ static HandlerResult HeaderOptionsPanel_eventHandler(Panel* super, int ch) {
HeaderOptionsPanel* this = (HeaderOptionsPanel*) 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_HEADER_LAYOUT);
-
- for (int i = 0; i < LAST_HEADER_LAYOUT; i++)
- CheckItem_set((CheckItem*)Panel_get(super, i), false);
- CheckItem_set((CheckItem*)Panel_get(super, mark), true);
-
- Header_setLayout(this->scr->header, mark);
- this->settings->changed = true;
- this->settings->lastUpdate++;
-
- ScreenManager_resize(this->scr);
-
- result = HANDLED;
+ 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_HEADER_LAYOUT);
+
+ for (int i = 0; i < LAST_HEADER_LAYOUT; i++)
+ CheckItem_set((CheckItem*)Panel_get(super, i), false);
+ CheckItem_set((CheckItem*)Panel_get(super, mark), true);
+
+ Header_setLayout(this->scr->header, mark);
+ this->settings->changed = true;
+ this->settings->lastUpdate++;
+
+ ScreenManager_resize(this->scr);
+
+ result = HANDLED;
+ }
}
return result;

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