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.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/apps/gui/list.c b/apps/gui/list.c
index 8663abe8a0..eb5f298316 100644
--- a/apps/gui/list.c
+++ b/apps/gui/list.c
@@ -625,7 +625,7 @@ bool gui_synclist_do_button(struct gui_synclist * lists,
625{ 625{
626 int action = *actionptr; 626 int action = *actionptr;
627#ifdef HAVE_LCD_BITMAP 627#ifdef HAVE_LCD_BITMAP
628 static bool scrolling_left = false; 628 static bool pgleft_allow_cancel = false;
629#endif 629#endif
630 630
631#ifdef HAVE_WHEEL_ACCELERATION 631#ifdef HAVE_WHEEL_ACCELERATION
@@ -735,24 +735,26 @@ bool gui_synclist_do_button(struct gui_synclist * lists,
735 to skip to root. ACTION_TREE_ROOT_INIT must be defined in the 735 to skip to root. ACTION_TREE_ROOT_INIT must be defined in the
736 keymaps as a repeated button press (the same as the repeated 736 keymaps as a repeated button press (the same as the repeated
737 ACTION_TREE_PGLEFT) with the pre condition being the non-repeated 737 ACTION_TREE_PGLEFT) with the pre condition being the non-repeated
738 button press */ 738 button press. Leave out ACTION_TREE_ROOT_INIT in your keymaps to
739 disable cancel action by PGLEFT key (e.g. if PGLEFT and CANCEL
740 are mapped to different keys) */
739 if (lists->offset_position[0] == 0) 741 if (lists->offset_position[0] == 0)
740 { 742 {
741 scrolling_left = false; 743 pgleft_allow_cancel = true;
742 *actionptr = ACTION_STD_CANCEL; 744 *actionptr = ACTION_STD_CANCEL;
743 return true; 745 return true;
744 } 746 }
745 *actionptr = ACTION_TREE_PGLEFT; 747 *actionptr = ACTION_TREE_PGLEFT;
746 case ACTION_TREE_PGLEFT: 748 case ACTION_TREE_PGLEFT:
747 if(!scrolling_left && (lists->offset_position[0] == 0)) 749 if(pgleft_allow_cancel && (lists->offset_position[0] == 0))
748 { 750 {
749 *actionptr = ACTION_STD_CANCEL; 751 *actionptr = ACTION_STD_CANCEL;
750 return false; 752 return false;
751 } 753 }
752 gui_synclist_scroll_left(lists); 754 gui_synclist_scroll_left(lists);
753 gui_synclist_draw(lists); 755 gui_synclist_draw(lists);
754 scrolling_left = true; /* stop ACTION_TREE_PAGE_LEFT 756 pgleft_allow_cancel = false; /* stop ACTION_TREE_PAGE_LEFT
755 skipping to root */ 757 skipping to root */
756 return true; 758 return true;
757#endif 759#endif
758/* for pgup / pgdown, we are obliged to have a different behaviour depending 760/* for pgup / pgdown, we are obliged to have a different behaviour depending