diff options
Diffstat (limited to 'apps/gui')
-rw-r--r-- | apps/gui/bitmap/list.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/apps/gui/bitmap/list.c b/apps/gui/bitmap/list.c index ee9cab2da7..bf0d22df32 100644 --- a/apps/gui/bitmap/list.c +++ b/apps/gui/bitmap/list.c | |||
@@ -282,7 +282,7 @@ void list_draw(struct screen *display, struct viewport *parent, | |||
282 | * This also assumes the whole screen is used, which is a bad assumption but | 282 | * This also assumes the whole screen is used, which is a bad assumption but |
283 | * fine until customizable lists comes in... | 283 | * fine until customizable lists comes in... |
284 | */ | 284 | */ |
285 | static unsigned int prev_line=0; | 285 | static bool scrolling=false; |
286 | 286 | ||
287 | unsigned gui_synclist_do_touchpad(struct gui_synclist * gui_list, struct viewport *parent) | 287 | unsigned gui_synclist_do_touchpad(struct gui_synclist * gui_list, struct viewport *parent) |
288 | { | 288 | { |
@@ -335,7 +335,7 @@ unsigned gui_synclist_do_touchpad(struct gui_synclist * gui_list, struct viewpor | |||
335 | * | Pressing an item will select it and "enter" it. | | 335 | * | Pressing an item will select it and "enter" it. | |
336 | * | | | 336 | * | | |
337 | * | Pressing and holding your pen down will scroll through | | 337 | * | Pressing and holding your pen down will scroll through | |
338 | * | the list of items, releasing your pen will "enter" it. | | 338 | * | the list of items. | |
339 | * | | | 339 | * | | |
340 | * | Pressing and holding your pen down on a single item | | 340 | * | Pressing and holding your pen down on a single item | |
341 | * | will bring up the context menu of it. | | 341 | * | will bring up the context menu of it. | |
@@ -360,32 +360,32 @@ unsigned gui_synclist_do_touchpad(struct gui_synclist * gui_list, struct viewpor | |||
360 | if(line == -1) | 360 | if(line == -1) |
361 | return ACTION_NONE; | 361 | return ACTION_NONE; |
362 | 362 | ||
363 | /* BUTTON_TOUCHPAD represents a button press*/ | ||
364 | if (line != gui_list->selected_item - gui_list->start_item[SCREEN_MAIN] && button ^ BUTTON_REL) | 363 | if (line != gui_list->selected_item - gui_list->start_item[SCREEN_MAIN] && button ^ BUTTON_REL) |
365 | { | 364 | { |
366 | if (gui_list->start_item[SCREEN_MAIN]+line > gui_list->nb_items) | 365 | if (gui_list->start_item[SCREEN_MAIN]+line > gui_list->nb_items) |
367 | return ACTION_NONE; | 366 | return ACTION_NONE; |
367 | if(button & BUTTON_REPEAT) | ||
368 | scrolling = true; | ||
368 | gui_synclist_select_item(gui_list, gui_list->start_item[SCREEN_MAIN]+line); | 369 | gui_synclist_select_item(gui_list, gui_list->start_item[SCREEN_MAIN]+line); |
369 | return ACTION_REDRAW; | 370 | return ACTION_REDRAW; |
370 | } | 371 | } |
371 | 372 | ||
372 | if (button == (BUTTON_REPEAT|BUTTON_REL)) | 373 | if (button == (BUTTON_REPEAT|BUTTON_REL)) |
373 | { | 374 | { |
374 | if(prev_line == (unsigned)line) | 375 | if(!scrolling) |
375 | { | 376 | { |
376 | /* Pen was hold on the same line as the previously selected one | 377 | /* Pen was hold on the same line as the previously selected one |
377 | * => simulate long button press | 378 | * => simulate long button press |
378 | */ | 379 | */ |
379 | prev_line = -1; | ||
380 | return ACTION_STD_CONTEXT; | 380 | return ACTION_STD_CONTEXT; |
381 | } | 381 | } |
382 | else | 382 | else |
383 | { | 383 | { |
384 | /* Pen was moved across several lines and then released on this one | 384 | /* Pen was moved across several lines and then released on this one |
385 | * => simulate short button press | 385 | * => do nothing |
386 | */ | 386 | */ |
387 | prev_line = line; | 387 | scrolling = false; |
388 | return ACTION_STD_OK; | 388 | return ACTION_NONE; |
389 | } | 389 | } |
390 | } | 390 | } |
391 | else if(button == BUTTON_REL) | 391 | else if(button == BUTTON_REL) |