summaryrefslogtreecommitdiffstats
path: root/Panel.c
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2008-03-05 06:54:30 +0000
committerHisham Muhammad <hisham@gobolinux.org>2008-03-05 06:54:30 +0000
commit5ed2b85c847995da3f4dc01c4d2790358adeb03d (patch)
tree386a0ef517d60d82d3d0f715c057725f01bba1b8 /Panel.c
parent062433fe04ae35ddd61e476deb7c6fe924235058 (diff)
Make clicks on leftmost panel in the Setup screen change setup pages,
like the keyboard navigation does. Fixes bug reported by Tero Keinanen. https://sourceforge.net/tracker/index.php?func=detail&aid=1754735&group_id=108839&atid=651633
Diffstat (limited to 'Panel.c')
-rw-r--r--Panel.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Panel.c b/Panel.c
index 8c1bf560..14f542bc 100644
--- a/Panel.c
+++ b/Panel.c
@@ -31,6 +31,8 @@ typedef enum HandlerResult_ {
BREAK_LOOP
} HandlerResult;
+#define EVENT_SETSELECTED -1
+
typedef HandlerResult(*Panel_EventHandler)(Panel*, int);
struct Panel_ {
@@ -222,6 +224,9 @@ void Panel_setSelected(Panel* this, int selected) {
selected = MAX(0, MIN(Vector_size(this->items) - 1, selected));
this->selected = selected;
+ if (this->eventHandler) {
+ this->eventHandler(this, EVENT_SETSELECTED);
+ }
}
void Panel_draw(Panel* this, bool focus) {

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