summaryrefslogtreecommitdiff
path: root/apps/gui/list.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui/list.c')
-rw-r--r--apps/gui/list.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/apps/gui/list.c b/apps/gui/list.c
index 4779d5309a..713942af18 100644
--- a/apps/gui/list.c
+++ b/apps/gui/list.c
@@ -525,11 +525,6 @@ static void gui_synclist_select_previous_page(struct gui_synclist * lists,
525 gui_list_select_at_offset(lists, -nb_lines); 525 gui_list_select_at_offset(lists, -nb_lines);
526} 526}
527 527
528void gui_synclist_limit_scroll(struct gui_synclist * lists, bool scroll)
529{
530 lists->limit_scroll = scroll;
531}
532
533/* 528/*
534 * Makes all the item in the list scroll by one step to the right. 529 * Makes all the item in the list scroll by one step to the right.
535 * Should stop increasing the value when reaching the widest item value 530 * Should stop increasing the value when reaching the widest item value
@@ -650,19 +645,20 @@ bool gui_synclist_do_button(struct gui_synclist * lists,
650 switch (wrap) 645 switch (wrap)
651 { 646 {
652 case LIST_WRAP_ON: 647 case LIST_WRAP_ON:
653 gui_synclist_limit_scroll(lists, !(lists->wraparound)); 648 lists->limit_scroll = !lists->wraparound;
654 break; 649 break;
655 case LIST_WRAP_OFF: 650 case LIST_WRAP_OFF:
656 gui_synclist_limit_scroll(lists, true); 651 lists->limit_scroll = true;
657 break; 652 break;
658 case LIST_WRAP_UNLESS_HELD: 653 case LIST_WRAP_UNLESS_HELD:
659 if (action == ACTION_STD_PREVREPEAT || 654 if (action == ACTION_STD_PREVREPEAT ||
660 action == ACTION_STD_NEXTREPEAT || 655 action == ACTION_STD_NEXTREPEAT ||
661 action == ACTION_LISTTREE_PGUP || 656 action == ACTION_LISTTREE_PGUP ||
662 action == ACTION_LISTTREE_PGDOWN) 657 action == ACTION_LISTTREE_PGDOWN)
663 gui_synclist_limit_scroll(lists, true); 658 lists->limit_scroll = true;
664 else gui_synclist_limit_scroll(lists, !(lists->wraparound)); 659 else
665 break; 660 lists->limit_scroll = !lists->wraparound;
661 break;
666 }; 662 };
667 663
668 switch (action) 664 switch (action)