From da23c8c5a188324455c8f417293c10d85f65cb63 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Sun, 9 Mar 2008 08:58:38 +0000 Subject: Clean up headers by using 'static' whenever possible. Reduces resulting code size. --- AffinityPanel.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'AffinityPanel.c') diff --git a/AffinityPanel.c b/AffinityPanel.c index 007b0590..bfd10e28 100644 --- a/AffinityPanel.c +++ b/AffinityPanel.c @@ -7,6 +7,23 @@ #include "debug.h" #include +static HandlerResult AffinityPanel_eventHandler(Panel* this, int ch) { + HandlerResult result = IGNORED; + CheckItem* selected = (CheckItem*) Panel_getSelected(this); + switch(ch) { + case ' ': + CheckItem_set(selected, ! (CheckItem_get(selected)) ); + result = HANDLED; + break; + case 0x0a: + case 0x0d: + case KEY_ENTER: + result = BREAK_LOOP; + break; + } + return result; +} + Panel* AffinityPanel_new(int processorCount, unsigned long mask) { Panel* this = Panel_new(1, 1, 1, 1, CHECKITEM_CLASS, true, ListItem_compare); this->eventHandler = AffinityPanel_eventHandler; @@ -29,20 +46,3 @@ unsigned long AffinityPanel_getAffinity(Panel* this) { } return mask; } - -HandlerResult AffinityPanel_eventHandler(Panel* this, int ch) { - HandlerResult result = IGNORED; - CheckItem* selected = (CheckItem*) Panel_getSelected(this); - switch(ch) { - case ' ': - CheckItem_set(selected, ! (CheckItem_get(selected)) ); - result = HANDLED; - break; - case 0x0a: - case 0x0d: - case KEY_ENTER: - result = BREAK_LOOP; - break; - } - return result; -} -- cgit v1.2.3