diff options
Diffstat (limited to 'apps/gui/list.c')
-rw-r--r-- | apps/gui/list.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/apps/gui/list.c b/apps/gui/list.c index 0653343604..1f23ca5e68 100644 --- a/apps/gui/list.c +++ b/apps/gui/list.c | |||
@@ -720,18 +720,32 @@ void gui_synclist_scroll_left(struct gui_synclist * lists) | |||
720 | } | 720 | } |
721 | #endif /* HAVE_LCD_BITMAP */ | 721 | #endif /* HAVE_LCD_BITMAP */ |
722 | 722 | ||
723 | unsigned gui_synclist_do_button(struct gui_synclist * lists, unsigned button) | 723 | unsigned gui_synclist_do_button(struct gui_synclist * lists, |
724 | unsigned button,enum list_wrap wrap) | ||
724 | { | 725 | { |
725 | #ifdef HAVE_LCD_BITMAP | 726 | #ifdef HAVE_LCD_BITMAP |
726 | static bool scrolling_left = false; | 727 | static bool scrolling_left = false; |
727 | #endif | 728 | #endif |
728 | 729 | ||
729 | gui_synclist_limit_scroll(lists, true); | 730 | switch (wrap) |
731 | { | ||
732 | case LIST_WRAP_ON: | ||
733 | gui_synclist_limit_scroll(lists, false); | ||
734 | break; | ||
735 | case LIST_WRAP_OFF: | ||
736 | gui_synclist_limit_scroll(lists, true); | ||
737 | break; | ||
738 | case LIST_WRAP_UNLESS_HELD: | ||
739 | if (button == ACTION_STD_PREVREPEAT || | ||
740 | button == ACTION_STD_NEXTREPEAT) | ||
741 | gui_synclist_limit_scroll(lists, true); | ||
742 | else gui_synclist_limit_scroll(lists, false); | ||
743 | break; | ||
744 | }; | ||
745 | |||
730 | switch(button) | 746 | switch(button) |
731 | { | 747 | { |
732 | case ACTION_STD_PREV: | 748 | case ACTION_STD_PREV: |
733 | gui_synclist_limit_scroll(lists, false); | ||
734 | |||
735 | case ACTION_STD_PREVREPEAT: | 749 | case ACTION_STD_PREVREPEAT: |
736 | gui_synclist_select_previous(lists); | 750 | gui_synclist_select_previous(lists); |
737 | gui_synclist_draw(lists); | 751 | gui_synclist_draw(lists); |
@@ -739,8 +753,6 @@ unsigned gui_synclist_do_button(struct gui_synclist * lists, unsigned button) | |||
739 | return ACTION_STD_PREV; | 753 | return ACTION_STD_PREV; |
740 | 754 | ||
741 | case ACTION_STD_NEXT: | 755 | case ACTION_STD_NEXT: |
742 | gui_synclist_limit_scroll(lists, false); | ||
743 | |||
744 | case ACTION_STD_NEXTREPEAT: | 756 | case ACTION_STD_NEXTREPEAT: |
745 | gui_synclist_select_next(lists); | 757 | gui_synclist_select_next(lists); |
746 | gui_synclist_draw(lists); | 758 | gui_synclist_draw(lists); |