diff options
-rw-r--r-- | apps/bookmark.c | 2 | ||||
-rw-r--r-- | apps/cuesheet.c | 2 | ||||
-rw-r--r-- | apps/debug_menu.c | 2 | ||||
-rw-r--r-- | apps/filetypes.c | 2 | ||||
-rw-r--r-- | apps/gui/list.c | 44 | ||||
-rw-r--r-- | apps/gui/list.h | 13 | ||||
-rw-r--r-- | apps/gui/option_select.c | 2 | ||||
-rw-r--r-- | apps/menu.c | 2 | ||||
-rw-r--r-- | apps/menus/settings_menu.c | 2 | ||||
-rw-r--r-- | apps/playlist_catalog.c | 2 | ||||
-rw-r--r-- | apps/playlist_viewer.c | 7 | ||||
-rw-r--r-- | apps/plugin.h | 8 | ||||
-rw-r--r-- | apps/plugins/chessbox/chessbox_pgn.c | 2 | ||||
-rw-r--r-- | apps/plugins/lib/oldmenuapi.c | 2 | ||||
-rw-r--r-- | apps/plugins/properties.c | 2 | ||||
-rw-r--r-- | apps/plugins/random_folder_advance_config.c | 2 | ||||
-rw-r--r-- | apps/plugins/shortcuts/shortcuts_view.c | 2 | ||||
-rw-r--r-- | apps/plugins/text_editor.c | 2 | ||||
-rw-r--r-- | apps/recorder/radio.c | 2 | ||||
-rw-r--r-- | apps/screens.c | 4 | ||||
-rw-r--r-- | apps/tree.c | 14 |
21 files changed, 61 insertions, 59 deletions
diff --git a/apps/bookmark.c b/apps/bookmark.c index b2c2713716..4522859f57 100644 --- a/apps/bookmark.c +++ b/apps/bookmark.c | |||
@@ -659,7 +659,7 @@ static char* select_bookmark(const char* bookmark_file_name, bool show_dont_resu | |||
659 | } | 659 | } |
660 | 660 | ||
661 | action = get_action(CONTEXT_BOOKMARKSCREEN, HZ / 2); | 661 | action = get_action(CONTEXT_BOOKMARKSCREEN, HZ / 2); |
662 | gui_synclist_do_button(&list, action, LIST_WRAP_UNLESS_HELD); | 662 | gui_synclist_do_button(&list, &action, LIST_WRAP_UNLESS_HELD); |
663 | item = gui_synclist_get_sel_pos(&list) / 2; | 663 | item = gui_synclist_get_sel_pos(&list) / 2; |
664 | 664 | ||
665 | if (bookmarks->show_dont_resume) | 665 | if (bookmarks->show_dont_resume) |
diff --git a/apps/cuesheet.c b/apps/cuesheet.c index 79a07a73c6..d5fbc54f73 100644 --- a/apps/cuesheet.c +++ b/apps/cuesheet.c | |||
@@ -296,7 +296,7 @@ void browse_cuesheet(struct cuesheet *cue) | |||
296 | { | 296 | { |
297 | gui_synclist_draw(&lists); | 297 | gui_synclist_draw(&lists); |
298 | action = get_action(CONTEXT_LIST,TIMEOUT_BLOCK); | 298 | action = get_action(CONTEXT_LIST,TIMEOUT_BLOCK); |
299 | if (gui_synclist_do_button(&lists,action,LIST_WRAP_UNLESS_HELD)) | 299 | if (gui_synclist_do_button(&lists, &action, LIST_WRAP_UNLESS_HELD)) |
300 | continue; | 300 | continue; |
301 | switch (action) | 301 | switch (action) |
302 | { | 302 | { |
diff --git a/apps/debug_menu.c b/apps/debug_menu.c index d5c0b8171d..40c0fcc9b0 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c | |||
@@ -162,7 +162,7 @@ static bool dbg_list(struct action_callback_info *info) | |||
162 | { | 162 | { |
163 | gui_syncstatusbar_draw(&statusbars, true); | 163 | gui_syncstatusbar_draw(&statusbars, true); |
164 | action = get_action(CONTEXT_STD, HZ/5); | 164 | action = get_action(CONTEXT_STD, HZ/5); |
165 | if (gui_synclist_do_button(&lists, action, LIST_WRAP_UNLESS_HELD)) | 165 | if (gui_synclist_do_button(&lists, &action, LIST_WRAP_UNLESS_HELD)) |
166 | continue; | 166 | continue; |
167 | if (info->action_callback) | 167 | if (info->action_callback) |
168 | action = info->action_callback(action, info); | 168 | action = info->action_callback(action, info); |
diff --git a/apps/filetypes.c b/apps/filetypes.c index 21ce17ce40..5e72fca5a1 100644 --- a/apps/filetypes.c +++ b/apps/filetypes.c | |||
@@ -476,7 +476,7 @@ int filetype_list_viewers(const char* current_file) | |||
476 | gui_syncstatusbar_draw(&statusbars, true); | 476 | gui_syncstatusbar_draw(&statusbars, true); |
477 | action = get_action(CONTEXT_MAINMENU,HZ); | 477 | action = get_action(CONTEXT_MAINMENU,HZ); |
478 | if ((action == ACTION_NONE) || | 478 | if ((action == ACTION_NONE) || |
479 | gui_synclist_do_button(&lists, action, LIST_WRAP_UNLESS_HELD)) | 479 | gui_synclist_do_button(&lists, &action, LIST_WRAP_UNLESS_HELD)) |
480 | continue; | 480 | continue; |
481 | else if (action == ACTION_STD_OK) | 481 | else if (action == ACTION_STD_OK) |
482 | { | 482 | { |
diff --git a/apps/gui/list.c b/apps/gui/list.c index f12d8a3d91..a8bbce8cda 100644 --- a/apps/gui/list.c +++ b/apps/gui/list.c | |||
@@ -889,9 +889,10 @@ static void gui_synclist_scroll_left(struct gui_synclist * lists) | |||
889 | 889 | ||
890 | extern intptr_t get_action_data(void); | 890 | extern intptr_t get_action_data(void); |
891 | 891 | ||
892 | unsigned gui_synclist_do_button(struct gui_synclist * lists, | 892 | bool gui_synclist_do_button(struct gui_synclist * lists, |
893 | unsigned button,enum list_wrap wrap) | 893 | unsigned *actionptr, enum list_wrap wrap) |
894 | { | 894 | { |
895 | int action = *actionptr; | ||
895 | #ifdef HAVE_LCD_BITMAP | 896 | #ifdef HAVE_LCD_BITMAP |
896 | static bool scrolling_left = false; | 897 | static bool scrolling_left = false; |
897 | #endif | 898 | #endif |
@@ -937,16 +938,16 @@ unsigned gui_synclist_do_button(struct gui_synclist * lists, | |||
937 | gui_synclist_limit_scroll(lists, true); | 938 | gui_synclist_limit_scroll(lists, true); |
938 | break; | 939 | break; |
939 | case LIST_WRAP_UNLESS_HELD: | 940 | case LIST_WRAP_UNLESS_HELD: |
940 | if (button == ACTION_STD_PREVREPEAT || | 941 | if (action == ACTION_STD_PREVREPEAT || |
941 | button == ACTION_STD_NEXTREPEAT || | 942 | action == ACTION_STD_NEXTREPEAT || |
942 | button == ACTION_LISTTREE_PGUP || | 943 | action == ACTION_LISTTREE_PGUP || |
943 | button == ACTION_LISTTREE_PGDOWN) | 944 | action == ACTION_LISTTREE_PGDOWN) |
944 | gui_synclist_limit_scroll(lists, true); | 945 | gui_synclist_limit_scroll(lists, true); |
945 | else gui_synclist_limit_scroll(lists, false); | 946 | else gui_synclist_limit_scroll(lists, false); |
946 | break; | 947 | break; |
947 | }; | 948 | }; |
948 | 949 | ||
949 | switch(button) | 950 | switch (action) |
950 | { | 951 | { |
951 | #ifdef HAVE_VOLUME_IN_LIST | 952 | #ifdef HAVE_VOLUME_IN_LIST |
952 | case ACTION_LIST_VOLUP: | 953 | case ACTION_LIST_VOLUP: |
@@ -955,7 +956,7 @@ unsigned gui_synclist_do_button(struct gui_synclist * lists, | |||
955 | case ACTION_LIST_VOLDOWN: | 956 | case ACTION_LIST_VOLDOWN: |
956 | global_settings.volume--; | 957 | global_settings.volume--; |
957 | setvol(); | 958 | setvol(); |
958 | return button; | 959 | return true; |
959 | #endif | 960 | #endif |
960 | case ACTION_STD_PREV: | 961 | case ACTION_STD_PREV: |
961 | case ACTION_STD_PREVREPEAT: | 962 | case ACTION_STD_PREVREPEAT: |
@@ -968,7 +969,8 @@ unsigned gui_synclist_do_button(struct gui_synclist * lists, | |||
968 | gui_synclist_draw(lists); | 969 | gui_synclist_draw(lists); |
969 | } | 970 | } |
970 | yield(); | 971 | yield(); |
971 | return ACTION_STD_PREV; | 972 | *actionptr = ACTION_STD_PREV; |
973 | return true; | ||
972 | 974 | ||
973 | case ACTION_STD_NEXT: | 975 | case ACTION_STD_NEXT: |
974 | case ACTION_STD_NEXTREPEAT: | 976 | case ACTION_STD_NEXTREPEAT: |
@@ -981,13 +983,14 @@ unsigned gui_synclist_do_button(struct gui_synclist * lists, | |||
981 | gui_synclist_draw(lists); | 983 | gui_synclist_draw(lists); |
982 | } | 984 | } |
983 | yield(); | 985 | yield(); |
984 | return ACTION_STD_NEXT; | 986 | *actionptr = ACTION_STD_NEXT; |
987 | return true; | ||
985 | 988 | ||
986 | #ifdef HAVE_LCD_BITMAP | 989 | #ifdef HAVE_LCD_BITMAP |
987 | case ACTION_TREE_PGRIGHT: | 990 | case ACTION_TREE_PGRIGHT: |
988 | gui_synclist_scroll_right(lists); | 991 | gui_synclist_scroll_right(lists); |
989 | gui_synclist_draw(lists); | 992 | gui_synclist_draw(lists); |
990 | return ACTION_TREE_PGRIGHT; | 993 | return true; |
991 | case ACTION_TREE_ROOT_INIT: | 994 | case ACTION_TREE_ROOT_INIT: |
992 | /* After this button press ACTION_TREE_PGLEFT is allowed | 995 | /* After this button press ACTION_TREE_PGLEFT is allowed |
993 | to skip to root. ACTION_TREE_ROOT_INIT must be defined in the | 996 | to skip to root. ACTION_TREE_ROOT_INIT must be defined in the |
@@ -997,16 +1000,21 @@ unsigned gui_synclist_do_button(struct gui_synclist * lists, | |||
997 | if (lists->gui_list[0].offset_position == 0) | 1000 | if (lists->gui_list[0].offset_position == 0) |
998 | { | 1001 | { |
999 | scrolling_left = false; | 1002 | scrolling_left = false; |
1000 | return ACTION_STD_CANCEL; | 1003 | *actionptr = ACTION_STD_CANCEL; |
1004 | return true; | ||
1001 | } | 1005 | } |
1006 | *actionptr = ACTION_TREE_PGLEFT; | ||
1002 | case ACTION_TREE_PGLEFT: | 1007 | case ACTION_TREE_PGLEFT: |
1003 | if(!scrolling_left && (lists->gui_list[0].offset_position == 0)) | 1008 | if(!scrolling_left && (lists->gui_list[0].offset_position == 0)) |
1004 | return ACTION_STD_CANCEL; | 1009 | { |
1010 | *actionptr = ACTION_STD_CANCEL; | ||
1011 | return false; | ||
1012 | } | ||
1005 | gui_synclist_scroll_left(lists); | 1013 | gui_synclist_scroll_left(lists); |
1006 | gui_synclist_draw(lists); | 1014 | gui_synclist_draw(lists); |
1007 | scrolling_left = true; /* stop ACTION_TREE_PAGE_LEFT | 1015 | scrolling_left = true; /* stop ACTION_TREE_PAGE_LEFT |
1008 | skipping to root */ | 1016 | skipping to root */ |
1009 | return ACTION_TREE_PGLEFT; | 1017 | return true; |
1010 | #endif | 1018 | #endif |
1011 | 1019 | ||
1012 | /* for pgup / pgdown, we are obliged to have a different behaviour depending | 1020 | /* for pgup / pgdown, we are obliged to have a different behaviour depending |
@@ -1023,8 +1031,9 @@ unsigned gui_synclist_do_button(struct gui_synclist * lists, | |||
1023 | gui_synclist_select_previous_page(lists, screen); | 1031 | gui_synclist_select_previous_page(lists, screen); |
1024 | gui_synclist_draw(lists); | 1032 | gui_synclist_draw(lists); |
1025 | yield(); | 1033 | yield(); |
1034 | *actionptr = ACTION_STD_NEXT; | ||
1026 | } | 1035 | } |
1027 | return ACTION_STD_NEXT; | 1036 | return true; |
1028 | 1037 | ||
1029 | case ACTION_LISTTREE_PGDOWN: | 1038 | case ACTION_LISTTREE_PGDOWN: |
1030 | { | 1039 | { |
@@ -1037,8 +1046,9 @@ unsigned gui_synclist_do_button(struct gui_synclist * lists, | |||
1037 | gui_synclist_select_next_page(lists, screen); | 1046 | gui_synclist_select_next_page(lists, screen); |
1038 | gui_synclist_draw(lists); | 1047 | gui_synclist_draw(lists); |
1039 | yield(); | 1048 | yield(); |
1049 | *actionptr = ACTION_STD_PREV; | ||
1040 | } | 1050 | } |
1041 | return ACTION_STD_PREV; | 1051 | return true; |
1042 | } | 1052 | } |
1043 | return 0; | 1053 | return false; |
1044 | } | 1054 | } |
diff --git a/apps/gui/list.h b/apps/gui/list.h index d0bc59b7bc..1046492b0d 100644 --- a/apps/gui/list.h +++ b/apps/gui/list.h | |||
@@ -218,16 +218,11 @@ extern void gui_synclist_hide_selection_marker(struct gui_synclist *lists, | |||
218 | bool hide); | 218 | bool hide); |
219 | /* | 219 | /* |
220 | * Do the action implied by the given button, | 220 | * Do the action implied by the given button, |
221 | * returns the action taken if any, 0 else | 221 | * returns true if the action was handled. |
222 | * - lists : the synchronized lists | 222 | * NOTE: *action may be changed regardless of return value |
223 | * - button : the keycode of a pressed button | ||
224 | * - specifies weather to allow the list to wrap or not, values at top of page | ||
225 | * returned value : | ||
226 | * - ACTION_STD_NEXT when moving forward (next item or pgup) | ||
227 | * - ACTION_STD_PREV when moving backward (previous item or pgdown) | ||
228 | */ | 223 | */ |
229 | extern unsigned gui_synclist_do_button(struct gui_synclist * lists, | 224 | extern bool gui_synclist_do_button(struct gui_synclist * lists, |
230 | unsigned button, | 225 | unsigned *action, |
231 | enum list_wrap); | 226 | enum list_wrap); |
232 | 227 | ||
233 | #endif /* _GUI_LIST_H_ */ | 228 | #endif /* _GUI_LIST_H_ */ |
diff --git a/apps/gui/option_select.c b/apps/gui/option_select.c index 474c459ff1..b8b1cc505b 100644 --- a/apps/gui/option_select.c +++ b/apps/gui/option_select.c | |||
@@ -381,7 +381,7 @@ bool option_screen(struct settings_list *setting, | |||
381 | action = get_action(CONTEXT_LIST, TIMEOUT_BLOCK); | 381 | action = get_action(CONTEXT_LIST, TIMEOUT_BLOCK); |
382 | if (action == ACTION_NONE) | 382 | if (action == ACTION_NONE) |
383 | continue; | 383 | continue; |
384 | if (gui_synclist_do_button(&lists,action, | 384 | if (gui_synclist_do_button(&lists, &action, |
385 | allow_wrap? LIST_WRAP_UNLESS_HELD: LIST_WRAP_OFF)) | 385 | allow_wrap? LIST_WRAP_UNLESS_HELD: LIST_WRAP_OFF)) |
386 | { | 386 | { |
387 | selected = gui_synclist_get_sel_pos(&lists); | 387 | selected = gui_synclist_get_sel_pos(&lists); |
diff --git a/apps/menu.c b/apps/menu.c index 201bbdff0e..e369f4d390 100644 --- a/apps/menu.c +++ b/apps/menu.c | |||
@@ -345,7 +345,7 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected) | |||
345 | } | 345 | } |
346 | } | 346 | } |
347 | 347 | ||
348 | if (gui_synclist_do_button(&lists,action,LIST_WRAP_UNLESS_HELD)) | 348 | if (gui_synclist_do_button(&lists, &action, LIST_WRAP_UNLESS_HELD)) |
349 | { | 349 | { |
350 | talk_menu_item(menu, &lists); | 350 | talk_menu_item(menu, &lists); |
351 | continue; | 351 | continue; |
diff --git a/apps/menus/settings_menu.c b/apps/menus/settings_menu.c index a85024e3d2..bbc2505a51 100644 --- a/apps/menus/settings_menu.c +++ b/apps/menus/settings_menu.c | |||
@@ -491,7 +491,7 @@ int usbdriver_menuitem(void) | |||
491 | { | 491 | { |
492 | gui_syncstatusbar_draw(&statusbars, true); | 492 | gui_syncstatusbar_draw(&statusbars, true); |
493 | action = get_action(CONTEXT_STD, HZ/5); | 493 | action = get_action(CONTEXT_STD, HZ/5); |
494 | if (gui_synclist_do_button(&lists, action, LIST_WRAP_UNLESS_HELD)) | 494 | if (gui_synclist_do_button(&lists, &action, LIST_WRAP_UNLESS_HELD)) |
495 | continue; | 495 | continue; |
496 | if (action == ACTION_STD_CANCEL) | 496 | if (action == ACTION_STD_CANCEL) |
497 | { | 497 | { |
diff --git a/apps/playlist_catalog.c b/apps/playlist_catalog.c index 266da7cc6f..fda91bb1ee 100644 --- a/apps/playlist_catalog.c +++ b/apps/playlist_catalog.c | |||
@@ -249,7 +249,7 @@ static int display_playlists(char* playlist, bool view) | |||
249 | int button = get_action(CONTEXT_LIST,HZ/2); | 249 | int button = get_action(CONTEXT_LIST,HZ/2); |
250 | char* sel_file; | 250 | char* sel_file; |
251 | 251 | ||
252 | gui_synclist_do_button(&playlist_lists, button,LIST_WRAP_UNLESS_HELD); | 252 | gui_synclist_do_button(&playlist_lists, &button,LIST_WRAP_UNLESS_HELD); |
253 | 253 | ||
254 | sel_file = playlists[gui_synclist_get_sel_pos(&playlist_lists)]; | 254 | sel_file = playlists[gui_synclist_get_sel_pos(&playlist_lists)]; |
255 | 255 | ||
diff --git a/apps/playlist_viewer.c b/apps/playlist_viewer.c index a466b7e730..8452f4369a 100644 --- a/apps/playlist_viewer.c +++ b/apps/playlist_viewer.c | |||
@@ -605,14 +605,13 @@ bool playlist_viewer_ex(char* filename) | |||
605 | 605 | ||
606 | /* Timeout so we can determine if play status has changed */ | 606 | /* Timeout so we can determine if play status has changed */ |
607 | button = get_action(CONTEXT_TREE,HZ/2); | 607 | button = get_action(CONTEXT_TREE,HZ/2); |
608 | int list_action; | 608 | if( (gui_synclist_do_button(&playlist_lists, &button,LIST_WRAP_UNLESS_HELD)) ) |
609 | if( (list_action=gui_synclist_do_button(&playlist_lists, button,LIST_WRAP_UNLESS_HELD))!=0 ) | ||
610 | { | 609 | { |
611 | viewer.selected_track=gui_synclist_get_sel_pos(&playlist_lists); | 610 | viewer.selected_track=gui_synclist_get_sel_pos(&playlist_lists); |
612 | if(playlist_buffer_needs_reload(&viewer.buffer, | 611 | if(playlist_buffer_needs_reload(&viewer.buffer, |
613 | viewer.selected_track)) | 612 | viewer.selected_track)) |
614 | playlist_buffer_load_entries_screen(&viewer.buffer, | 613 | playlist_buffer_load_entries_screen(&viewer.buffer, |
615 | list_action==ACTION_STD_NEXT? | 614 | button==ACTION_STD_NEXT? |
616 | FORWARD | 615 | FORWARD |
617 | : | 616 | : |
618 | BACKWARD | 617 | BACKWARD |
@@ -778,7 +777,7 @@ bool search_playlist(void) | |||
778 | while (!exit) | 777 | while (!exit) |
779 | { | 778 | { |
780 | button = get_action(CONTEXT_LIST,TIMEOUT_BLOCK); | 779 | button = get_action(CONTEXT_LIST,TIMEOUT_BLOCK); |
781 | if (gui_synclist_do_button(&playlist_lists, button,LIST_WRAP_UNLESS_HELD)) | 780 | if (gui_synclist_do_button(&playlist_lists, &button, LIST_WRAP_UNLESS_HELD)) |
782 | continue; | 781 | continue; |
783 | switch (button) | 782 | switch (button) |
784 | { | 783 | { |
diff --git a/apps/plugin.h b/apps/plugin.h index 2580d43eb0..3971a1357c 100644 --- a/apps/plugin.h +++ b/apps/plugin.h | |||
@@ -112,12 +112,12 @@ | |||
112 | #define PLUGIN_MAGIC 0x526F634B /* RocK */ | 112 | #define PLUGIN_MAGIC 0x526F634B /* RocK */ |
113 | 113 | ||
114 | /* increase this every time the api struct changes */ | 114 | /* increase this every time the api struct changes */ |
115 | #define PLUGIN_API_VERSION 73 | 115 | #define PLUGIN_API_VERSION 74 |
116 | 116 | ||
117 | /* update this to latest version if a change to the api struct breaks | 117 | /* update this to latest version if a change to the api struct breaks |
118 | backwards compatibility (and please take the opportunity to sort in any | 118 | backwards compatibility (and please take the opportunity to sort in any |
119 | new function which are "waiting" at the end of the function table) */ | 119 | new function which are "waiting" at the end of the function table) */ |
120 | #define PLUGIN_MIN_API_VERSION 73 | 120 | #define PLUGIN_MIN_API_VERSION 74 |
121 | 121 | ||
122 | /* plugin return codes */ | 122 | /* plugin return codes */ |
123 | enum plugin_status { | 123 | enum plugin_status { |
@@ -280,8 +280,8 @@ struct plugin_api { | |||
280 | void (*gui_synclist_del_item)(struct gui_synclist * lists); | 280 | void (*gui_synclist_del_item)(struct gui_synclist * lists); |
281 | void (*gui_synclist_limit_scroll)(struct gui_synclist * lists, bool scroll); | 281 | void (*gui_synclist_limit_scroll)(struct gui_synclist * lists, bool scroll); |
282 | void (*gui_synclist_flash)(struct gui_synclist * lists); | 282 | void (*gui_synclist_flash)(struct gui_synclist * lists); |
283 | unsigned (*gui_synclist_do_button)(struct gui_synclist * lists, | 283 | bool (*gui_synclist_do_button)(struct gui_synclist * lists, |
284 | unsigned button,enum list_wrap wrap); | 284 | unsigned *action, enum list_wrap wrap); |
285 | void (*gui_synclist_set_title)(struct gui_synclist *lists, char* title, int icon); | 285 | void (*gui_synclist_set_title)(struct gui_synclist *lists, char* title, int icon); |
286 | 286 | ||
287 | /* button */ | 287 | /* button */ |
diff --git a/apps/plugins/chessbox/chessbox_pgn.c b/apps/plugins/chessbox/chessbox_pgn.c index fb04f6ac38..3780e32466 100644 --- a/apps/plugins/chessbox/chessbox_pgn.c +++ b/apps/plugins/chessbox/chessbox_pgn.c | |||
@@ -808,7 +808,7 @@ struct pgn_game_node* pgn_show_game_list(struct plugin_api* api, | |||
808 | rb->gui_synclist_draw(&games_list); | 808 | rb->gui_synclist_draw(&games_list); |
809 | curr_selection = rb->gui_synclist_get_sel_pos(&games_list); | 809 | curr_selection = rb->gui_synclist_get_sel_pos(&games_list); |
810 | button = rb->get_action(CONTEXT_LIST,TIMEOUT_BLOCK); | 810 | button = rb->get_action(CONTEXT_LIST,TIMEOUT_BLOCK); |
811 | if (rb->gui_synclist_do_button(&games_list,button,LIST_WRAP_OFF)){ | 811 | if (rb->gui_synclist_do_button(&games_list,&button,LIST_WRAP_OFF)){ |
812 | continue; | 812 | continue; |
813 | } | 813 | } |
814 | switch (button) { | 814 | switch (button) { |
diff --git a/apps/plugins/lib/oldmenuapi.c b/apps/plugins/lib/oldmenuapi.c index 742d394a50..07681a0b18 100644 --- a/apps/plugins/lib/oldmenuapi.c +++ b/apps/plugins/lib/oldmenuapi.c | |||
@@ -107,7 +107,7 @@ int menu_show(int m) | |||
107 | */ | 107 | */ |
108 | if( menus[m].callback != NULL ) | 108 | if( menus[m].callback != NULL ) |
109 | key = menus[m].callback(key, m); | 109 | key = menus[m].callback(key, m); |
110 | rb->gui_synclist_do_button(&(menus[m].synclist), key,LIST_WRAP_UNLESS_HELD); | 110 | rb->gui_synclist_do_button(&(menus[m].synclist), &key,LIST_WRAP_UNLESS_HELD); |
111 | switch( key ) { | 111 | switch( key ) { |
112 | case ACTION_STD_OK: | 112 | case ACTION_STD_OK: |
113 | return rb->gui_synclist_get_sel_pos(&(menus[m].synclist)); | 113 | return rb->gui_synclist_get_sel_pos(&(menus[m].synclist)); |
diff --git a/apps/plugins/properties.c b/apps/plugins/properties.c index 932e5bc71e..ca18d49f50 100644 --- a/apps/plugins/properties.c +++ b/apps/plugins/properties.c | |||
@@ -318,7 +318,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* file) | |||
318 | while(!quit) | 318 | while(!quit) |
319 | { | 319 | { |
320 | button = rb->get_action(CONTEXT_LIST,TIMEOUT_BLOCK); | 320 | button = rb->get_action(CONTEXT_LIST,TIMEOUT_BLOCK); |
321 | if (rb->gui_synclist_do_button(&properties_lists,button,LIST_WRAP_ON)) | 321 | if (rb->gui_synclist_do_button(&properties_lists,&button,LIST_WRAP_ON)) |
322 | continue; | 322 | continue; |
323 | switch(button) | 323 | switch(button) |
324 | { | 324 | { |
diff --git a/apps/plugins/random_folder_advance_config.c b/apps/plugins/random_folder_advance_config.c index 6ed36c6065..656daeaaf8 100644 --- a/apps/plugins/random_folder_advance_config.c +++ b/apps/plugins/random_folder_advance_config.c | |||
@@ -288,7 +288,7 @@ void edit_list(void) | |||
288 | { | 288 | { |
289 | rb->gui_synclist_draw(&lists); | 289 | rb->gui_synclist_draw(&lists); |
290 | button = rb->get_action(CONTEXT_LIST,TIMEOUT_BLOCK); | 290 | button = rb->get_action(CONTEXT_LIST,TIMEOUT_BLOCK); |
291 | if (rb->gui_synclist_do_button(&lists,button,LIST_WRAP_UNLESS_HELD)) | 291 | if (rb->gui_synclist_do_button(&lists,&button,LIST_WRAP_UNLESS_HELD)) |
292 | continue; | 292 | continue; |
293 | selection = rb->gui_synclist_get_sel_pos(&lists); | 293 | selection = rb->gui_synclist_get_sel_pos(&lists); |
294 | switch (button) | 294 | switch (button) |
diff --git a/apps/plugins/shortcuts/shortcuts_view.c b/apps/plugins/shortcuts/shortcuts_view.c index 3b28b4b34c..f61177f37a 100644 --- a/apps/plugins/shortcuts/shortcuts_view.c +++ b/apps/plugins/shortcuts/shortcuts_view.c | |||
@@ -59,7 +59,7 @@ enum sc_list_action_type draw_sc_list(struct gui_synclist gui_sc) | |||
59 | rb->gui_syncstatusbar_draw(rb->statusbars, true); | 59 | rb->gui_syncstatusbar_draw(rb->statusbars, true); |
60 | /* user input */ | 60 | /* user input */ |
61 | button = rb->get_action(CONTEXT_LIST, TIMEOUT_BLOCK); | 61 | button = rb->get_action(CONTEXT_LIST, TIMEOUT_BLOCK); |
62 | if (rb->gui_synclist_do_button(&gui_sc, button, | 62 | if (rb->gui_synclist_do_button(&gui_sc, &button, |
63 | LIST_WRAP_UNLESS_HELD)) { | 63 | LIST_WRAP_UNLESS_HELD)) { |
64 | /* automatic handling of user input. | 64 | /* automatic handling of user input. |
65 | * _UNLESS_HELD can be _ON or _OFF also | 65 | * _UNLESS_HELD can be _ON or _OFF also |
diff --git a/apps/plugins/text_editor.c b/apps/plugins/text_editor.c index 3ac8cab3f2..dd5f4b7b53 100644 --- a/apps/plugins/text_editor.c +++ b/apps/plugins/text_editor.c | |||
@@ -374,7 +374,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) | |||
374 | rb->gui_synclist_draw(&lists); | 374 | rb->gui_synclist_draw(&lists); |
375 | cur_sel = rb->gui_synclist_get_sel_pos(&lists); | 375 | cur_sel = rb->gui_synclist_get_sel_pos(&lists); |
376 | button = rb->get_action(CONTEXT_LIST,TIMEOUT_BLOCK); | 376 | button = rb->get_action(CONTEXT_LIST,TIMEOUT_BLOCK); |
377 | if (rb->gui_synclist_do_button(&lists,button,LIST_WRAP_UNLESS_HELD)) | 377 | if (rb->gui_synclist_do_button(&lists,&button,LIST_WRAP_UNLESS_HELD)) |
378 | continue; | 378 | continue; |
379 | switch (button) | 379 | switch (button) |
380 | { | 380 | { |
diff --git a/apps/recorder/radio.c b/apps/recorder/radio.c index b95bffe696..5042305967 100644 --- a/apps/recorder/radio.c +++ b/apps/recorder/radio.c | |||
@@ -1266,7 +1266,7 @@ static int handle_radio_presets(void) | |||
1266 | gui_syncstatusbar_draw(&statusbars, true); | 1266 | gui_syncstatusbar_draw(&statusbars, true); |
1267 | action = get_action(CONTEXT_STD, HZ); | 1267 | action = get_action(CONTEXT_STD, HZ); |
1268 | 1268 | ||
1269 | gui_synclist_do_button(&lists, action, LIST_WRAP_UNLESS_HELD); | 1269 | gui_synclist_do_button(&lists, &action, LIST_WRAP_UNLESS_HELD); |
1270 | switch (action) | 1270 | switch (action) |
1271 | { | 1271 | { |
1272 | case ACTION_STD_MENU: | 1272 | case ACTION_STD_MENU: |
diff --git a/apps/screens.c b/apps/screens.c index ee804b2f9b..b725beaa7a 100644 --- a/apps/screens.c +++ b/apps/screens.c | |||
@@ -1282,7 +1282,7 @@ bool browse_id3(void) | |||
1282 | gui_syncstatusbar_draw(&statusbars, false); | 1282 | gui_syncstatusbar_draw(&statusbars, false); |
1283 | key = get_action(CONTEXT_LIST,HZ/2); | 1283 | key = get_action(CONTEXT_LIST,HZ/2); |
1284 | if(key!=ACTION_NONE && key!=ACTION_UNKNOWN | 1284 | if(key!=ACTION_NONE && key!=ACTION_UNKNOWN |
1285 | && !gui_synclist_do_button(&id3_lists, key,LIST_WRAP_UNLESS_HELD)) | 1285 | && !gui_synclist_do_button(&id3_lists, &key,LIST_WRAP_UNLESS_HELD)) |
1286 | { | 1286 | { |
1287 | return(default_event_handler(key) == SYS_USB_CONNECTED); | 1287 | return(default_event_handler(key) == SYS_USB_CONNECTED); |
1288 | } | 1288 | } |
@@ -1342,7 +1342,7 @@ bool view_runtime(void) | |||
1342 | gui_synclist_draw(&lists); | 1342 | gui_synclist_draw(&lists); |
1343 | gui_syncstatusbar_draw(&statusbars, true); | 1343 | gui_syncstatusbar_draw(&statusbars, true); |
1344 | action = get_action(CONTEXT_STD, HZ); | 1344 | action = get_action(CONTEXT_STD, HZ); |
1345 | gui_synclist_do_button(&lists, action, LIST_WRAP_UNLESS_HELD); | 1345 | gui_synclist_do_button(&lists, &action, LIST_WRAP_UNLESS_HELD); |
1346 | if(action == ACTION_STD_CANCEL) | 1346 | if(action == ACTION_STD_CANCEL) |
1347 | break; | 1347 | break; |
1348 | if(action == ACTION_STD_OK) { | 1348 | if(action == ACTION_STD_OK) { |
diff --git a/apps/tree.c b/apps/tree.c index 5122f55a82..fb2ed8d320 100644 --- a/apps/tree.c +++ b/apps/tree.c | |||
@@ -552,7 +552,7 @@ static int dirbrowse() | |||
552 | int numentries=0; | 552 | int numentries=0; |
553 | char buf[MAX_PATH]; | 553 | char buf[MAX_PATH]; |
554 | int lasti = -1; | 554 | int lasti = -1; |
555 | unsigned button, returned_button; | 555 | unsigned button, oldbutton; |
556 | bool reload_root = false; | 556 | bool reload_root = false; |
557 | int lastfilter = *tc.dirfilter; | 557 | int lastfilter = *tc.dirfilter; |
558 | bool lastsortcase = global_settings.sort_case; | 558 | bool lastsortcase = global_settings.sort_case; |
@@ -605,12 +605,8 @@ static int dirbrowse() | |||
605 | } | 605 | } |
606 | #endif | 606 | #endif |
607 | button = get_action(CONTEXT_TREE,HZ/5); | 607 | button = get_action(CONTEXT_TREE,HZ/5); |
608 | returned_button = gui_synclist_do_button(&tree_lists, button,LIST_WRAP_UNLESS_HELD); | 608 | oldbutton = button; |
609 | if (returned_button) | 609 | need_update = gui_synclist_do_button(&tree_lists, &button,LIST_WRAP_UNLESS_HELD); |
610 | need_update = true; | ||
611 | if (returned_button == ACTION_STD_CANCEL) | ||
612 | button = ACTION_STD_CANCEL; | ||
613 | |||
614 | tc.selected_item = gui_synclist_get_sel_pos(&tree_lists); | 610 | tc.selected_item = gui_synclist_get_sel_pos(&tree_lists); |
615 | switch ( button ) { | 611 | switch ( button ) { |
616 | case ACTION_STD_OK: | 612 | case ACTION_STD_OK: |
@@ -640,9 +636,11 @@ static int dirbrowse() | |||
640 | if ((*tc.dirfilter == SHOW_ID3DB && tc.dirlevel == 0) || | 636 | if ((*tc.dirfilter == SHOW_ID3DB && tc.dirlevel == 0) || |
641 | ((*tc.dirfilter != SHOW_ID3DB && !strcmp(currdir,"/")))) | 637 | ((*tc.dirfilter != SHOW_ID3DB && !strcmp(currdir,"/")))) |
642 | { | 638 | { |
643 | if (returned_button == ACTION_STD_CANCEL) | 639 | #ifdef HAVE_LCD_BITMAP /* charcell doesnt have ACTION_TREE_PGLEFT so this isnt needed */ |
640 | if (oldbutton == ACTION_TREE_PGLEFT) | ||
644 | break; | 641 | break; |
645 | else | 642 | else |
643 | #endif | ||
646 | return GO_TO_ROOT; | 644 | return GO_TO_ROOT; |
647 | } | 645 | } |
648 | 646 | ||