mirror of
https://github.com/xzeldon/htop.git
synced 2024-12-23 22:55:46 +00:00
simplify code
This commit is contained in:
parent
9f29e92777
commit
539b32dc31
@ -8,21 +8,18 @@
|
||||
#include <assert.h>
|
||||
|
||||
static HandlerResult AffinityPanel_eventHandler(Panel* this, int ch) {
|
||||
HandlerResult result = IGNORED;
|
||||
CheckItem* selected = (CheckItem*) Panel_getSelected(this);
|
||||
switch(ch) {
|
||||
case KEY_MOUSE:
|
||||
case ' ':
|
||||
CheckItem_set(selected, ! (CheckItem_get(selected)) );
|
||||
result = HANDLED;
|
||||
break;
|
||||
return HANDLED;
|
||||
case 0x0a:
|
||||
case 0x0d:
|
||||
case KEY_ENTER:
|
||||
result = BREAK_LOOP;
|
||||
break;
|
||||
return BREAK_LOOP;
|
||||
}
|
||||
return result;
|
||||
return IGNORED;
|
||||
}
|
||||
|
||||
Panel* AffinityPanel_new(ProcessList* pl, Affinity* affinity) {
|
||||
|
Loading…
Reference in New Issue
Block a user