summaryrefslogtreecommitdiffstats
path: root/ColorsPanel.c
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2008-03-09 08:58:38 +0000
committerHisham Muhammad <hisham@gobolinux.org>2008-03-09 08:58:38 +0000
commitda23c8c5a188324455c8f417293c10d85f65cb63 (patch)
treed7a4b8cb0af705de6650e20e00ba3da04d84b27f /ColorsPanel.c
parent12f4f09e6ed288bdedc86e4ef22f3cc34f0e787a (diff)
Clean up headers by using 'static' whenever possible.
Reduces resulting code size.
Diffstat (limited to 'ColorsPanel.c')
-rw-r--r--ColorsPanel.c39
1 files changed, 19 insertions, 20 deletions
diff --git a/ColorsPanel.c b/ColorsPanel.c
index 00868457..bab23fc8 100644
--- a/ColorsPanel.c
+++ b/ColorsPanel.c
@@ -37,32 +37,14 @@ static char* ColorSchemes[] = {
NULL
};
-ColorsPanel* ColorsPanel_new(Settings* settings, ScreenManager* scr) {
- ColorsPanel* this = (ColorsPanel*) malloc(sizeof(ColorsPanel));
- Panel* super = (Panel*) this;
- Panel_init(super, 1, 1, 1, 1, CHECKITEM_CLASS, true);
- ((Object*)this)->delete = ColorsPanel_delete;
-
- this->settings = settings;
- this->scr = scr;
- super->eventHandler = ColorsPanel_EventHandler;
-
- Panel_setHeader(super, "Colors");
- for (int i = 0; ColorSchemes[i] != NULL; i++) {
- Panel_add(super, (Object*) CheckItem_new(String_copy(ColorSchemes[i]), NULL, false));
- }
- CheckItem_set((CheckItem*)Panel_get(super, settings->colorScheme), true);
- return this;
-}
-
-void ColorsPanel_delete(Object* object) {
+static void ColorsPanel_delete(Object* object) {
Panel* super = (Panel*) object;
ColorsPanel* this = (ColorsPanel*) object;
Panel_done(super);
free(this);
}
-HandlerResult ColorsPanel_EventHandler(Panel* super, int ch) {
+static HandlerResult ColorsPanel_EventHandler(Panel* super, int ch) {
ColorsPanel* this = (ColorsPanel*) super;
HandlerResult result = IGNORED;
@@ -93,3 +75,20 @@ HandlerResult ColorsPanel_EventHandler(Panel* super, int ch) {
return result;
}
+ColorsPanel* ColorsPanel_new(Settings* settings, ScreenManager* scr) {
+ ColorsPanel* this = (ColorsPanel*) malloc(sizeof(ColorsPanel));
+ Panel* super = (Panel*) this;
+ Panel_init(super, 1, 1, 1, 1, CHECKITEM_CLASS, true);
+ ((Object*)this)->delete = ColorsPanel_delete;
+
+ this->settings = settings;
+ this->scr = scr;
+ super->eventHandler = ColorsPanel_EventHandler;
+
+ Panel_setHeader(super, "Colors");
+ for (int i = 0; ColorSchemes[i] != NULL; i++) {
+ Panel_add(super, (Object*) CheckItem_new(String_copy(ColorSchemes[i]), NULL, false));
+ }
+ CheckItem_set((CheckItem*)Panel_get(super, settings->colorScheme), true);
+ return this;
+}

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