summaryrefslogtreecommitdiffstats
path: root/ColorsPanel.c
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2007-11-08 23:23:01 +0000
committerHisham Muhammad <hisham@gobolinux.org>2007-11-08 23:23:01 +0000
commita7c2aedcecd3763464e83f80bd6c4f1216f58428 (patch)
tree9dad109961beaf321bf352ef58881a0625c893ae /ColorsPanel.c
parent46631b59fbc01fb65fa752a00ba9382a730aa1aa (diff)
Improve construction of tree view, properly nesting threads.
Add CPU affinity screen ('a' key). BUGFIX: Correct display of TPGID field. Add TGID field.
Diffstat (limited to 'ColorsPanel.c')
-rw-r--r--ColorsPanel.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/ColorsPanel.c b/ColorsPanel.c
index e62583cd..00868457 100644
--- a/ColorsPanel.c
+++ b/ColorsPanel.c
@@ -23,7 +23,6 @@ typedef struct ColorsPanel_ {
Settings* settings;
ScreenManager* scr;
- bool check[5];
} ColorsPanel;
}*/
@@ -50,10 +49,9 @@ ColorsPanel* ColorsPanel_new(Settings* settings, ScreenManager* scr) {
Panel_setHeader(super, "Colors");
for (int i = 0; ColorSchemes[i] != NULL; i++) {
- Panel_add(super, (Object*) CheckItem_new(String_copy(ColorSchemes[i]), &(this->check[i])));
- this->check[i] = false;
+ Panel_add(super, (Object*) CheckItem_new(String_copy(ColorSchemes[i]), NULL, false));
}
- this->check[settings->colorScheme] = true;
+ CheckItem_set((CheckItem*)Panel_get(super, settings->colorScheme), true);
return this;
}
@@ -75,10 +73,9 @@ HandlerResult ColorsPanel_EventHandler(Panel* super, int ch) {
case 0x0d:
case KEY_ENTER:
case ' ':
- for (int i = 0; ColorSchemes[i] != NULL; i++) {
- this->check[i] = false;
- }
- this->check[mark] = true;
+ for (int i = 0; ColorSchemes[i] != NULL; i++)
+ CheckItem_set((CheckItem*)Panel_get(super, i), false);
+ CheckItem_set((CheckItem*)Panel_get(super, mark), true);
this->settings->colorScheme = mark;
result = HANDLED;
}

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