summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2008-05-07 23:01:45 +0000
committerHisham Muhammad <hisham@gobolinux.org>2008-05-07 23:01:45 +0000
commit15ab0ad706465775ab7b7780862cb5096379967d (patch)
tree4c2dbc76459bbf0ecb4894ae6f04ca42a28ae255
parent23615d63a80a2c66e6856001c8c75dd1f73422c6 (diff)
Let mouseclicks tick/untick checkboxes
-rw-r--r--AffinityPanel.c1
-rw-r--r--ColorsPanel.c1
-rw-r--r--DisplayOptionsPanel.c1
-rw-r--r--ScreenManager.c3
4 files changed, 3 insertions, 3 deletions
diff --git a/AffinityPanel.c b/AffinityPanel.c
index bfd10e28..47791ff1 100644
--- a/AffinityPanel.c
+++ b/AffinityPanel.c
@@ -11,6 +11,7 @@ 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;
diff --git a/ColorsPanel.c b/ColorsPanel.c
index bab23fc8..cdc01662 100644
--- a/ColorsPanel.c
+++ b/ColorsPanel.c
@@ -54,6 +54,7 @@ static HandlerResult ColorsPanel_EventHandler(Panel* super, int ch) {
case 0x0a:
case 0x0d:
case KEY_ENTER:
+ case KEY_MOUSE:
case ' ':
for (int i = 0; ColorSchemes[i] != NULL; i++)
CheckItem_set((CheckItem*)Panel_get(super, i), false);
diff --git a/DisplayOptionsPanel.c b/DisplayOptionsPanel.c
index f87dd044..0deae46f 100644
--- a/DisplayOptionsPanel.c
+++ b/DisplayOptionsPanel.c
@@ -37,6 +37,7 @@ static HandlerResult DisplayOptionsPanel_eventHandler(Panel* super, int ch) {
case 0x0a:
case 0x0d:
case KEY_ENTER:
+ case KEY_MOUSE:
case ' ':
CheckItem_set(selected, ! (CheckItem_get(selected)) );
result = HANDLED;
diff --git a/ScreenManager.c b/ScreenManager.c
index fcf8dbe9..5b1713e7 100644
--- a/ScreenManager.c
+++ b/ScreenManager.c
@@ -144,7 +144,6 @@ void ScreenManager_run(ScreenManager* this, Panel** lastFocus, int* lastKey) {
ch = getch();
- bool loop = false;
if (ch == KEY_MOUSE) {
MEVENT mevent;
int ok = getmouse(&mevent);
@@ -159,14 +158,12 @@ void ScreenManager_run(ScreenManager* this, Panel** lastFocus, int* lastKey) {
focus = i;
panelFocus = panel;
Panel_setSelected(panel, mevent.y - panel->y + panel->scrollV - 1);
- loop = true;
break;
}
}
}
}
}
- if (loop) continue;
if (panelFocus->eventHandler) {
HandlerResult result = panelFocus->eventHandler(panelFocus, ch);

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