diff options
39 files changed, 343 insertions, 110 deletions
diff --git a/apps/enc_config.c b/apps/enc_config.c index 7741c293f0..a971343cab 100644 --- a/apps/enc_config.c +++ b/apps/enc_config.c | |||
@@ -40,9 +40,11 @@ | |||
40 | if (fn) fn(__VA_ARGS__) | 40 | if (fn) fn(__VA_ARGS__) |
41 | 41 | ||
42 | static int enc_menuitem_callback(int action, | 42 | static int enc_menuitem_callback(int action, |
43 | const struct menu_item_ex *this_item); | 43 | const struct menu_item_ex *this_item, |
44 | struct gui_synclist *this_list); | ||
44 | static int enc_menuitem_enteritem(int action, | 45 | static int enc_menuitem_enteritem(int action, |
45 | const struct menu_item_ex *this_item); | 46 | const struct menu_item_ex *this_item, |
47 | struct gui_synclist *this_list); | ||
46 | static void enc_rec_settings_changed(struct encoder_config *cfg); | 48 | static void enc_rec_settings_changed(struct encoder_config *cfg); |
47 | /* this is used by all encoder menu items, | 49 | /* this is used by all encoder menu items, |
48 | MUST be initialised before the call to do_menu() */ | 50 | MUST be initialised before the call to do_menu() */ |
@@ -262,9 +264,11 @@ static inline bool rec_format_ok(int rec_format) | |||
262 | /* This is called before entering the menu with the encoder settings | 264 | /* This is called before entering the menu with the encoder settings |
263 | Its needed to make sure the settings can take effect. */ | 265 | Its needed to make sure the settings can take effect. */ |
264 | static int enc_menuitem_enteritem(int action, | 266 | static int enc_menuitem_enteritem(int action, |
265 | const struct menu_item_ex *this_item) | 267 | const struct menu_item_ex *this_item, |
268 | struct gui_synclist *this_list) | ||
266 | { | 269 | { |
267 | (void)this_item; | 270 | (void)this_item; |
271 | (void)this_list; | ||
268 | /* this struct must be init'ed before calling do_menu() so this is safe */ | 272 | /* this struct must be init'ed before calling do_menu() so this is safe */ |
269 | struct menucallback_data *data = &menu_callback_data; | 273 | struct menucallback_data *data = &menu_callback_data; |
270 | if (action == ACTION_STD_OK) /* entering the item */ | 274 | if (action == ACTION_STD_OK) /* entering the item */ |
@@ -277,8 +281,10 @@ static int enc_menuitem_enteritem(int action, | |||
277 | /* this is called when a encoder setting is exited | 281 | /* this is called when a encoder setting is exited |
278 | It is used to update the status bar and save the setting */ | 282 | It is used to update the status bar and save the setting */ |
279 | static int enc_menuitem_callback(int action, | 283 | static int enc_menuitem_callback(int action, |
280 | const struct menu_item_ex *this_item) | 284 | const struct menu_item_ex *this_item, |
285 | struct gui_synclist *this_list) | ||
281 | { | 286 | { |
287 | (void)this_list; | ||
282 | struct menucallback_data *data = | 288 | struct menucallback_data *data = |
283 | (struct menucallback_data*)this_item->function->param; | 289 | (struct menucallback_data*)this_item->function->param; |
284 | 290 | ||
diff --git a/apps/menu.c b/apps/menu.c index 929a14e9f0..5a388522fa 100644 --- a/apps/menu.c +++ b/apps/menu.c | |||
@@ -192,7 +192,7 @@ static void init_menu_lists(const struct menu_item_ex *menu, | |||
192 | if (menu_callback) | 192 | if (menu_callback) |
193 | { | 193 | { |
194 | if (menu_callback(ACTION_REQUEST_MENUITEM, | 194 | if (menu_callback(ACTION_REQUEST_MENUITEM, |
195 | type==MT_RETURN_ID ? (void*)(intptr_t)i: menu->submenus[i]) | 195 | type==MT_RETURN_ID ? (void*)(intptr_t)i: menu->submenus[i], lists) |
196 | != ACTION_EXIT_MENUITEM) | 196 | != ACTION_EXIT_MENUITEM) |
197 | { | 197 | { |
198 | current_subitems[current_subitems_count] = i; | 198 | current_subitems[current_subitems_count] = i; |
@@ -246,7 +246,7 @@ static void init_menu_lists(const struct menu_item_ex *menu, | |||
246 | 246 | ||
247 | get_menu_callback(menu,&menu_callback); | 247 | get_menu_callback(menu,&menu_callback); |
248 | if (callback && menu_callback) | 248 | if (callback && menu_callback) |
249 | menu_callback(ACTION_ENTER_MENUITEM,menu); | 249 | menu_callback(ACTION_ENTER_MENUITEM, menu, lists); |
250 | } | 250 | } |
251 | 251 | ||
252 | static int talk_menu_item(int selected_item, void *data) | 252 | static int talk_menu_item(int selected_item, void *data) |
@@ -430,7 +430,7 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected, | |||
430 | if (menu_callback) | 430 | if (menu_callback) |
431 | { | 431 | { |
432 | int old_action = action; | 432 | int old_action = action; |
433 | action = menu_callback(action, menu); | 433 | action = menu_callback(action, menu, &lists); |
434 | if (action == ACTION_EXIT_AFTER_THIS_MENUITEM) | 434 | if (action == ACTION_EXIT_AFTER_THIS_MENUITEM) |
435 | { | 435 | { |
436 | action = old_action; | 436 | action = old_action; |
@@ -560,7 +560,7 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected, | |||
560 | /* might be leaving list, so stop scrolling */ | 560 | /* might be leaving list, so stop scrolling */ |
561 | gui_synclist_scroll_stop(&lists); | 561 | gui_synclist_scroll_stop(&lists); |
562 | if (menu_callback) | 562 | if (menu_callback) |
563 | menu_callback(ACTION_EXIT_MENUITEM, menu); | 563 | menu_callback(ACTION_EXIT_MENUITEM, menu, &lists); |
564 | 564 | ||
565 | if (menu->flags&MENU_EXITAFTERTHISMENU) | 565 | if (menu->flags&MENU_EXITAFTERTHISMENU) |
566 | done = true; | 566 | done = true; |
@@ -612,7 +612,7 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected, | |||
612 | get_menu_callback(temp, &menu_callback); | 612 | get_menu_callback(temp, &menu_callback); |
613 | if (menu_callback) | 613 | if (menu_callback) |
614 | { | 614 | { |
615 | action = menu_callback(ACTION_ENTER_MENUITEM,temp); | 615 | action = menu_callback(ACTION_ENTER_MENUITEM, temp, &lists); |
616 | if (action == ACTION_EXIT_MENUITEM) | 616 | if (action == ACTION_EXIT_MENUITEM) |
617 | break; | 617 | break; |
618 | } | 618 | } |
@@ -688,7 +688,7 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected, | |||
688 | if (type != MT_MENU) | 688 | if (type != MT_MENU) |
689 | { | 689 | { |
690 | if (menu_callback) | 690 | if (menu_callback) |
691 | menu_callback(ACTION_EXIT_MENUITEM,temp); | 691 | menu_callback(ACTION_EXIT_MENUITEM, temp, &lists); |
692 | } | 692 | } |
693 | if (current_submenus_menu != menu) | 693 | if (current_submenus_menu != menu) |
694 | init_menu_lists(menu,&lists,selected,true,vps); | 694 | init_menu_lists(menu,&lists,selected,true,vps); |
@@ -730,9 +730,11 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected, | |||
730 | if (redraw_lists && !done) | 730 | if (redraw_lists && !done) |
731 | { | 731 | { |
732 | if (menu_callback) | 732 | if (menu_callback) |
733 | menu_callback(ACTION_REDRAW, menu); | 733 | if (menu_callback(ACTION_REDRAW, menu, &lists) == ACTION_REDRAW) |
734 | gui_synclist_draw(&lists); | 734 | { |
735 | gui_synclist_speak_item(&lists); | 735 | gui_synclist_draw(&lists); |
736 | gui_synclist_speak_item(&lists); | ||
737 | } | ||
736 | } | 738 | } |
737 | } | 739 | } |
738 | 740 | ||
diff --git a/apps/menu.h b/apps/menu.h index 7ace51329f..e56a4a149b 100644 --- a/apps/menu.h +++ b/apps/menu.h | |||
@@ -27,6 +27,7 @@ | |||
27 | #include "icons.h" | 27 | #include "icons.h" |
28 | #include "root_menu.h" /* needed for MENU_* return codes */ | 28 | #include "root_menu.h" /* needed for MENU_* return codes */ |
29 | #include "settings_list.h" | 29 | #include "settings_list.h" |
30 | #include "gui/list.h" | ||
30 | 31 | ||
31 | 32 | ||
32 | enum menu_item_type { | 33 | enum menu_item_type { |
@@ -79,18 +80,21 @@ struct menu_item_ex { | |||
79 | }; | 80 | }; |
80 | union { | 81 | union { |
81 | /* For settings */ | 82 | /* For settings */ |
82 | int (*menu_callback)(int action, const struct menu_item_ex *this_item); | 83 | int (*menu_callback)(int action, const struct menu_item_ex *this_item, |
84 | struct gui_synclist *this_list); | ||
83 | /* For everything else, except if the text is dynamic */ | 85 | /* For everything else, except if the text is dynamic */ |
84 | const struct menu_callback_with_desc { | 86 | const struct menu_callback_with_desc { |
85 | int (*menu_callback)(int action, | 87 | int (*menu_callback)(int action, |
86 | const struct menu_item_ex *this_item); | 88 | const struct menu_item_ex *this_item, |
89 | struct gui_synclist *this_list); | ||
87 | unsigned char *desc; /* string or ID */ | 90 | unsigned char *desc; /* string or ID */ |
88 | int icon_id; /* from icons_6x8 in icons.h */ | 91 | int icon_id; /* from icons_6x8 in icons.h */ |
89 | } *callback_and_desc; | 92 | } *callback_and_desc; |
90 | /* For when the item text is dynamic */ | 93 | /* For when the item text is dynamic */ |
91 | const struct menu_get_name_and_icon { | 94 | const struct menu_get_name_and_icon { |
92 | int (*menu_callback)(int action, | 95 | int (*menu_callback)(int action, |
93 | const struct menu_item_ex *this_item); | 96 | const struct menu_item_ex *this_item, |
97 | struct gui_synclist *this_list); | ||
94 | char *(*list_get_name)(int selected_item, void * data, | 98 | char *(*list_get_name)(int selected_item, void * data, |
95 | char *buffer, size_t buffer_len); | 99 | char *buffer, size_t buffer_len); |
96 | int (*list_speak_item)(int selected_item, void * data); | 100 | int (*list_speak_item)(int selected_item, void * data); |
@@ -101,7 +105,8 @@ struct menu_item_ex { | |||
101 | }; | 105 | }; |
102 | 106 | ||
103 | typedef int (*menu_callback_type)(int action, | 107 | typedef int (*menu_callback_type)(int action, |
104 | const struct menu_item_ex *this_item); | 108 | const struct menu_item_ex *this_item, |
109 | struct gui_synclist *this_list); | ||
105 | void do_setting_from_menu(const struct menu_item_ex *temp, | 110 | void do_setting_from_menu(const struct menu_item_ex *temp, |
106 | struct viewport parent[NB_SCREENS]); | 111 | struct viewport parent[NB_SCREENS]); |
107 | void do_setting_screen(const struct settings_list *setting, const char * title, | 112 | void do_setting_screen(const struct settings_list *setting, const char * title, |
diff --git a/apps/menus/display_menu.c b/apps/menus/display_menu.c index 5d53cbfe16..83bd8066d5 100644 --- a/apps/menus/display_menu.c +++ b/apps/menus/display_menu.c | |||
@@ -50,10 +50,12 @@ | |||
50 | #include "rbunicode.h" | 50 | #include "rbunicode.h" |
51 | 51 | ||
52 | #ifdef HAVE_BACKLIGHT | 52 | #ifdef HAVE_BACKLIGHT |
53 | static int selectivebacklight_callback(int action,const struct menu_item_ex *this_item) | 53 | static int selectivebacklight_callback(int action, |
54 | const struct menu_item_ex *this_item, | ||
55 | struct gui_synclist *this_list) | ||
54 | { | 56 | { |
55 | (void)this_item; | 57 | (void)this_item; |
56 | 58 | (void)this_list; | |
57 | switch (action) | 59 | switch (action) |
58 | { | 60 | { |
59 | case ACTION_EXIT_MENUITEM: | 61 | case ACTION_EXIT_MENUITEM: |
@@ -69,10 +71,11 @@ static int selectivebacklight_callback(int action,const struct menu_item_ex *thi | |||
69 | return action; | 71 | return action; |
70 | } | 72 | } |
71 | 73 | ||
72 | static int filterfirstkeypress_callback(int action,const struct menu_item_ex *this_item) | 74 | static int filterfirstkeypress_callback(int action, |
75 | const struct menu_item_ex *this_item, | ||
76 | struct gui_synclist *this_list) | ||
73 | { | 77 | { |
74 | /*(void)this_item;REMOVED*/ | 78 | /*(void)this_item;REMOVED*/ |
75 | |||
76 | switch (action) | 79 | switch (action) |
77 | { | 80 | { |
78 | case ACTION_EXIT_MENUITEM: | 81 | case ACTION_EXIT_MENUITEM: |
@@ -81,7 +84,7 @@ static int filterfirstkeypress_callback(int action,const struct menu_item_ex *th | |||
81 | set_remote_backlight_filter_keypress( | 84 | set_remote_backlight_filter_keypress( |
82 | global_settings.remote_bl_filter_first_keypress); | 85 | global_settings.remote_bl_filter_first_keypress); |
83 | #endif /* HAVE_REMOTE_LCD */ | 86 | #endif /* HAVE_REMOTE_LCD */ |
84 | selectivebacklight_callback(action,this_item);/*uses Filter First KP*/ | 87 | selectivebacklight_callback(action,this_item, this_list);/*uses Filter First KP*/ |
85 | break; | 88 | break; |
86 | } | 89 | } |
87 | 90 | ||
@@ -118,9 +121,12 @@ static int selectivebacklight_set_mask(void* param) | |||
118 | 121 | ||
119 | #endif /* HAVE_BACKLIGHT */ | 122 | #endif /* HAVE_BACKLIGHT */ |
120 | #ifdef HAVE_LCD_FLIP | 123 | #ifdef HAVE_LCD_FLIP |
121 | static int flipdisplay_callback(int action,const struct menu_item_ex *this_item) | 124 | static int flipdisplay_callback(int action, |
125 | const struct menu_item_ex *this_item | ||
126 | struct gui_synclist *this_list) | ||
122 | { | 127 | { |
123 | (void)this_item; | 128 | (void)this_item; |
129 | (void)this_list; | ||
124 | switch (action) | 130 | switch (action) |
125 | { | 131 | { |
126 | case ACTION_EXIT_MENUITEM: | 132 | case ACTION_EXIT_MENUITEM: |
@@ -265,9 +271,12 @@ MENUITEM_SETTING(remote_flip_display, | |||
265 | #endif | 271 | #endif |
266 | 272 | ||
267 | #ifdef HAVE_REMOTE_LCD_TICKING | 273 | #ifdef HAVE_REMOTE_LCD_TICKING |
268 | static int ticking_callback(int action,const struct menu_item_ex *this_item) | 274 | static int ticking_callback(int action, |
275 | const struct menu_item_ex *this_item | ||
276 | struct gui_synclist *this_list) | ||
269 | { | 277 | { |
270 | (void)this_item; | 278 | (void)this_item; |
279 | (void)this_list; | ||
271 | switch (action) | 280 | switch (action) |
272 | { | 281 | { |
273 | case ACTION_EXIT_MENUITEM: | 282 | case ACTION_EXIT_MENUITEM: |
@@ -334,9 +343,12 @@ MENUITEM_SETTING(list_accel_start_delay, | |||
334 | MENUITEM_SETTING(list_accel_wait, &global_settings.list_accel_wait, NULL); | 343 | MENUITEM_SETTING(list_accel_wait, &global_settings.list_accel_wait, NULL); |
335 | #endif /* HAVE_WHEEL_ACCELERATION */ | 344 | #endif /* HAVE_WHEEL_ACCELERATION */ |
336 | #ifdef HAVE_LCD_BITMAP | 345 | #ifdef HAVE_LCD_BITMAP |
337 | static int screenscroll_callback(int action,const struct menu_item_ex *this_item) | 346 | static int screenscroll_callback(int action, |
347 | const struct menu_item_ex *this_item, | ||
348 | struct gui_synclist *this_list) | ||
338 | { | 349 | { |
339 | (void)this_item; | 350 | (void)this_item; |
351 | (void)this_list; | ||
340 | switch (action) | 352 | switch (action) |
341 | { | 353 | { |
342 | case ACTION_EXIT_MENUITEM: | 354 | case ACTION_EXIT_MENUITEM: |
@@ -375,9 +387,12 @@ MAKE_MENU(scroll_settings_menu, ID2P(LANG_SCROLL_MENU), 0, Icon_NOICON, | |||
375 | /* PEAK METER MENU */ | 387 | /* PEAK METER MENU */ |
376 | 388 | ||
377 | #ifdef HAVE_LCD_BITMAP | 389 | #ifdef HAVE_LCD_BITMAP |
378 | static int peakmeter_callback(int action,const struct menu_item_ex *this_item) | 390 | static int peakmeter_callback(int action, |
391 | const struct menu_item_ex *this_item, | ||
392 | struct gui_synclist *this_list) | ||
379 | { | 393 | { |
380 | (void)this_item; | 394 | (void)this_item; |
395 | (void)this_list; | ||
381 | switch (action) | 396 | switch (action) |
382 | { | 397 | { |
383 | case ACTION_EXIT_MENUITEM: | 398 | case ACTION_EXIT_MENUITEM: |
@@ -561,9 +576,12 @@ MAKE_MENU(peak_meter_menu, ID2P(LANG_PM_MENU), NULL, Icon_NOICON, | |||
561 | 576 | ||
562 | 577 | ||
563 | #ifdef HAVE_TOUCHSCREEN | 578 | #ifdef HAVE_TOUCHSCREEN |
564 | static int touch_mode_callback(int action,const struct menu_item_ex *this_item) | 579 | static int touch_mode_callback(int action, |
580 | const struct menu_item_ex *this_item, | ||
581 | struct gui_synclist *this_list) | ||
565 | { | 582 | { |
566 | (void)this_item; | 583 | (void)this_item; |
584 | (void)this_list; | ||
567 | switch (action) | 585 | switch (action) |
568 | { | 586 | { |
569 | case ACTION_EXIT_MENUITEM: /* on exit */ | 587 | case ACTION_EXIT_MENUITEM: /* on exit */ |
@@ -573,10 +591,12 @@ static int touch_mode_callback(int action,const struct menu_item_ex *this_item) | |||
573 | return action; | 591 | return action; |
574 | } | 592 | } |
575 | 593 | ||
576 | static int line_padding_callback(int action,const struct menu_item_ex *this_item) | 594 | static int line_padding_callback(int action, |
595 | const struct menu_item_ex *this_item, | ||
596 | struct gui_synclist *this_list); | ||
577 | { | 597 | { |
578 | (void)this_item; | 598 | (void)this_item; |
579 | 599 | (void)this_list; | |
580 | if (action == ACTION_EXIT_MENUITEM) | 600 | if (action == ACTION_EXIT_MENUITEM) |
581 | viewportmanager_theme_changed(THEME_LISTS); | 601 | viewportmanager_theme_changed(THEME_LISTS); |
582 | return action; | 602 | return action; |
@@ -594,11 +614,14 @@ MAKE_MENU(touchscreen_menu, ID2P(LANG_TOUCHSCREEN_SETTINGS), NULL, Icon_NOICON, | |||
594 | &touchscreen_menu_calibrate, &touchscreen_menu_reset_calibration); | 614 | &touchscreen_menu_calibrate, &touchscreen_menu_reset_calibration); |
595 | #endif | 615 | #endif |
596 | 616 | ||
597 | static int codepage_callback(int action, const struct menu_item_ex *this_item) | 617 | static int codepage_callback(int action, |
618 | const struct menu_item_ex *this_item, | ||
619 | struct gui_synclist *this_list) | ||
598 | { | 620 | { |
621 | (void)this_item; | ||
622 | (void)this_list; | ||
599 | static int old_codepage; | 623 | static int old_codepage; |
600 | int new_codepage = global_settings.default_codepage; | 624 | int new_codepage = global_settings.default_codepage; |
601 | (void)this_item; | ||
602 | switch (action) | 625 | switch (action) |
603 | { | 626 | { |
604 | case ACTION_ENTER_MENUITEM: | 627 | case ACTION_ENTER_MENUITEM: |
diff --git a/apps/menus/eq_menu.c b/apps/menus/eq_menu.c index 7cbf7b5d90..b41e4b0981 100644 --- a/apps/menus/eq_menu.c +++ b/apps/menus/eq_menu.c | |||
@@ -81,16 +81,19 @@ static void eq_apply(void) | |||
81 | } | 81 | } |
82 | } | 82 | } |
83 | 83 | ||
84 | static int eq_setting_callback(int action, const struct menu_item_ex *this_item) | 84 | static int eq_setting_callback(int action, |
85 | const struct menu_item_ex *this_item, | ||
86 | struct gui_synclist *this_list) | ||
85 | { | 87 | { |
88 | (void)this_list; | ||
86 | switch (action) | 89 | switch (action) |
87 | { | 90 | { |
88 | case ACTION_ENTER_MENUITEM: | 91 | case ACTION_ENTER_MENUITEM: |
89 | action = lowlatency_callback(action, this_item); | 92 | action = lowlatency_callback(action, this_item, NULL); |
90 | break; | 93 | break; |
91 | case ACTION_EXIT_MENUITEM: | 94 | case ACTION_EXIT_MENUITEM: |
92 | eq_apply(); | 95 | eq_apply(); |
93 | action = lowlatency_callback(action, this_item); | 96 | action = lowlatency_callback(action, this_item, NULL); |
94 | break; | 97 | break; |
95 | } | 98 | } |
96 | 99 | ||
diff --git a/apps/menus/menu_common.c b/apps/menus/menu_common.c index e8a2a91f12..2ef48cc23b 100644 --- a/apps/menus/menu_common.c +++ b/apps/menus/menu_common.c | |||
@@ -31,9 +31,12 @@ | |||
31 | 31 | ||
32 | #if CONFIG_CODEC == SWCODEC | 32 | #if CONFIG_CODEC == SWCODEC |
33 | /* Use this callback if your menu adjusts DSP settings. */ | 33 | /* Use this callback if your menu adjusts DSP settings. */ |
34 | int lowlatency_callback(int action, const struct menu_item_ex *this_item) | 34 | int lowlatency_callback(int action, |
35 | const struct menu_item_ex *this_item, | ||
36 | struct gui_synclist *this_list) | ||
35 | { | 37 | { |
36 | (void)this_item; | 38 | (void)this_item; |
39 | (void)this_list; | ||
37 | switch (action) | 40 | switch (action) |
38 | { | 41 | { |
39 | case ACTION_ENTER_MENUITEM: /* on entering an item */ | 42 | case ACTION_ENTER_MENUITEM: /* on entering an item */ |
diff --git a/apps/menus/menu_common.h b/apps/menus/menu_common.h index bdf02a0092..e85ed8dc61 100644 --- a/apps/menus/menu_common.h +++ b/apps/menus/menu_common.h | |||
@@ -25,7 +25,9 @@ | |||
25 | #include "config.h" | 25 | #include "config.h" |
26 | 26 | ||
27 | #if CONFIG_CODEC == SWCODEC | 27 | #if CONFIG_CODEC == SWCODEC |
28 | int lowlatency_callback(int action, const struct menu_item_ex *this_item); | 28 | int lowlatency_callback(int action, |
29 | const struct menu_item_ex *this_item, | ||
30 | struct gui_synclist *this_list); | ||
29 | #endif | 31 | #endif |
30 | 32 | ||
31 | #endif /* _MENU_COMMON_H */ | 33 | #endif /* _MENU_COMMON_H */ |
diff --git a/apps/menus/playback_menu.c b/apps/menus/playback_menu.c index 23f1cb55bf..bf770c0f11 100644 --- a/apps/menus/playback_menu.c +++ b/apps/menus/playback_menu.c | |||
@@ -45,9 +45,12 @@ | |||
45 | 45 | ||
46 | 46 | ||
47 | #if (CONFIG_CODEC == SWCODEC) && defined(HAVE_CROSSFADE) | 47 | #if (CONFIG_CODEC == SWCODEC) && defined(HAVE_CROSSFADE) |
48 | static int setcrossfadeonexit_callback(int action,const struct menu_item_ex *this_item) | 48 | static int setcrossfadeonexit_callback(int action, |
49 | const struct menu_item_ex *this_item, | ||
50 | struct gui_synclist *this_list) | ||
49 | { | 51 | { |
50 | (void)this_item; | 52 | (void)this_item; |
53 | (void)this_list; | ||
51 | switch (action) | 54 | switch (action) |
52 | { | 55 | { |
53 | case ACTION_EXIT_MENUITEM: /* on exit */ | 56 | case ACTION_EXIT_MENUITEM: /* on exit */ |
@@ -61,7 +64,9 @@ static int setcrossfadeonexit_callback(int action,const struct menu_item_ex *thi | |||
61 | 64 | ||
62 | /***********************************/ | 65 | /***********************************/ |
63 | /* PLAYBACK MENU */ | 66 | /* PLAYBACK MENU */ |
64 | static int playback_callback(int action,const struct menu_item_ex *this_item); | 67 | static int playback_callback(int action, |
68 | const struct menu_item_ex *this_item, | ||
69 | struct gui_synclist *this_list); | ||
65 | 70 | ||
66 | MENUITEM_SETTING(shuffle_item, &global_settings.playlist_shuffle, playback_callback); | 71 | MENUITEM_SETTING(shuffle_item, &global_settings.playlist_shuffle, playback_callback); |
67 | MENUITEM_SETTING(repeat_mode, &global_settings.repeat_mode, playback_callback); | 72 | MENUITEM_SETTING(repeat_mode, &global_settings.repeat_mode, playback_callback); |
@@ -73,9 +78,12 @@ MAKE_MENU(ff_rewind_settings_menu, ID2P(LANG_WIND_MENU), 0, Icon_NOICON, | |||
73 | &ff_rewind_min_step, &ff_rewind_accel); | 78 | &ff_rewind_min_step, &ff_rewind_accel); |
74 | #ifdef HAVE_DISK_STORAGE | 79 | #ifdef HAVE_DISK_STORAGE |
75 | #if CONFIG_CODEC == SWCODEC | 80 | #if CONFIG_CODEC == SWCODEC |
76 | static int buffermargin_callback(int action,const struct menu_item_ex *this_item) | 81 | static int buffermargin_callback(int action, |
82 | const struct menu_item_ex *this_item, | ||
83 | struct gui_synclist *this_list) | ||
77 | { | 84 | { |
78 | (void)this_item; | 85 | (void)this_item; |
86 | (void)this_list; | ||
79 | switch (action) | 87 | switch (action) |
80 | { | 88 | { |
81 | case ACTION_EXIT_MENUITEM: /* on exit */ | 89 | case ACTION_EXIT_MENUITEM: /* on exit */ |
@@ -115,9 +123,12 @@ MAKE_MENU(crossfade_settings_menu,ID2P(LANG_CROSSFADE),0, Icon_NOICON, | |||
115 | 123 | ||
116 | /* replay gain submenu */ | 124 | /* replay gain submenu */ |
117 | 125 | ||
118 | static int replaygain_callback(int action,const struct menu_item_ex *this_item) | 126 | static int replaygain_callback(int action, |
127 | const struct menu_item_ex *this_item, | ||
128 | struct gui_synclist *this_list) | ||
119 | { | 129 | { |
120 | (void)this_item; | 130 | (void)this_item; |
131 | (void)this_list; | ||
121 | switch (action) | 132 | switch (action) |
122 | { | 133 | { |
123 | case ACTION_EXIT_MENUITEM: /* on exit */ | 134 | case ACTION_EXIT_MENUITEM: /* on exit */ |
@@ -147,9 +158,12 @@ MENUITEM_SETTING(spdif_enable, &global_settings.spdif_enable, NULL); | |||
147 | MENUITEM_SETTING(next_folder, &global_settings.next_folder, NULL); | 158 | MENUITEM_SETTING(next_folder, &global_settings.next_folder, NULL); |
148 | MENUITEM_SETTING(constrain_next_folder, | 159 | MENUITEM_SETTING(constrain_next_folder, |
149 | &global_settings.constrain_next_folder, NULL); | 160 | &global_settings.constrain_next_folder, NULL); |
150 | static int audioscrobbler_callback(int action,const struct menu_item_ex *this_item) | 161 | static int audioscrobbler_callback(int action, |
162 | const struct menu_item_ex *this_item, | ||
163 | struct gui_synclist *this_list) | ||
151 | { | 164 | { |
152 | (void)this_item; | 165 | (void)this_item; |
166 | (void)this_list; | ||
153 | switch (action) | 167 | switch (action) |
154 | { | 168 | { |
155 | case ACTION_EXIT_MENUITEM: /* on exit */ | 169 | case ACTION_EXIT_MENUITEM: /* on exit */ |
@@ -165,9 +179,12 @@ static int audioscrobbler_callback(int action,const struct menu_item_ex *this_it | |||
165 | MENUITEM_SETTING(audioscrobbler, &global_settings.audioscrobbler, audioscrobbler_callback); | 179 | MENUITEM_SETTING(audioscrobbler, &global_settings.audioscrobbler, audioscrobbler_callback); |
166 | 180 | ||
167 | 181 | ||
168 | static int cuesheet_callback(int action,const struct menu_item_ex *this_item) | 182 | static int cuesheet_callback(int action, |
183 | const struct menu_item_ex *this_item, | ||
184 | struct gui_synclist *this_list) | ||
169 | { | 185 | { |
170 | (void)this_item; | 186 | (void)this_item; |
187 | (void)this_list; | ||
171 | switch (action) | 188 | switch (action) |
172 | { | 189 | { |
173 | case ACTION_EXIT_MENUITEM: /* on exit */ | 190 | case ACTION_EXIT_MENUITEM: /* on exit */ |
@@ -236,8 +253,11 @@ MAKE_MENU(playback_settings,ID2P(LANG_PLAYBACK),0, | |||
236 | #endif | 253 | #endif |
237 | ); | 254 | ); |
238 | 255 | ||
239 | static int playback_callback(int action,const struct menu_item_ex *this_item) | 256 | static int playback_callback(int action, |
257 | const struct menu_item_ex *this_item, | ||
258 | struct gui_synclist *this_list) | ||
240 | { | 259 | { |
260 | (void)this_list; | ||
241 | static bool old_shuffle = false; | 261 | static bool old_shuffle = false; |
242 | static int old_repeat = 0; | 262 | static int old_repeat = 0; |
243 | switch (action) | 263 | switch (action) |
diff --git a/apps/menus/recording_menu.c b/apps/menus/recording_menu.c index 54dc415de7..21c6cff5fb 100644 --- a/apps/menus/recording_menu.c +++ b/apps/menus/recording_menu.c | |||
@@ -69,7 +69,9 @@ | |||
69 | #include "exported_menus.h" | 69 | #include "exported_menus.h" |
70 | 70 | ||
71 | static bool no_source_in_menu = false; | 71 | static bool no_source_in_menu = false; |
72 | static int recmenu_callback(int action,const struct menu_item_ex *this_item); | 72 | static int recmenu_callback(int action, |
73 | const struct menu_item_ex *this_item, | ||
74 | struct gui_synclist *this_list); | ||
73 | 75 | ||
74 | static int recsource_func(void) | 76 | static int recsource_func(void) |
75 | { | 77 | { |
@@ -313,8 +315,11 @@ MENUITEM_FUNCTION(enc_global_config_menu_item, 0, ID2P(LANG_ENCODER_SETTINGS), | |||
313 | #endif /* CONFIG_CODEC == SWCODEC */ | 315 | #endif /* CONFIG_CODEC == SWCODEC */ |
314 | 316 | ||
315 | 317 | ||
316 | static int recmenu_callback(int action,const struct menu_item_ex *this_item) | 318 | static int recmenu_callback(int action, |
319 | const struct menu_item_ex *this_item, | ||
320 | struct gui_synclist *this_list) | ||
317 | { | 321 | { |
322 | (void)this_list; | ||
318 | switch (action) | 323 | switch (action) |
319 | { | 324 | { |
320 | case ACTION_REQUEST_MENUITEM: | 325 | case ACTION_REQUEST_MENUITEM: |
diff --git a/apps/menus/settings_menu.c b/apps/menus/settings_menu.c index 67595498ad..2a08ab0a4e 100644 --- a/apps/menus/settings_menu.c +++ b/apps/menus/settings_menu.c | |||
@@ -59,9 +59,11 @@ | |||
59 | 59 | ||
60 | #ifndef HAS_BUTTON_HOLD | 60 | #ifndef HAS_BUTTON_HOLD |
61 | static int selectivesoftlock_callback(int action, | 61 | static int selectivesoftlock_callback(int action, |
62 | const struct menu_item_ex *this_item) | 62 | const struct menu_item_ex *this_item, |
63 | struct gui_synclist *this_list) | ||
63 | { | 64 | { |
64 | (void)this_item; | 65 | (void)this_item; |
66 | (void)this_list; | ||
65 | 67 | ||
66 | switch (action) | 68 | switch (action) |
67 | { | 69 | { |
@@ -176,7 +178,10 @@ MAKE_MENU(tagcache_menu, ID2P(LANG_TAGCACHE), 0, Icon_NOICON, | |||
176 | 178 | ||
177 | /***********************************/ | 179 | /***********************************/ |
178 | /* FILE VIEW MENU */ | 180 | /* FILE VIEW MENU */ |
179 | static int fileview_callback(int action,const struct menu_item_ex *this_item); | 181 | static int fileview_callback(int action, |
182 | const struct menu_item_ex *this_item, | ||
183 | struct gui_synclist *this_list); | ||
184 | |||
180 | MENUITEM_SETTING(sort_case, &global_settings.sort_case, NULL); | 185 | MENUITEM_SETTING(sort_case, &global_settings.sort_case, NULL); |
181 | MENUITEM_SETTING(sort_dir, &global_settings.sort_dir, fileview_callback); | 186 | MENUITEM_SETTING(sort_dir, &global_settings.sort_dir, fileview_callback); |
182 | MENUITEM_SETTING(sort_file, &global_settings.sort_file, fileview_callback); | 187 | MENUITEM_SETTING(sort_file, &global_settings.sort_file, fileview_callback); |
@@ -196,8 +201,11 @@ static int clear_start_directory(void) | |||
196 | } | 201 | } |
197 | MENUITEM_FUNCTION(clear_start_directory_item, 0, ID2P(LANG_RESET_START_DIR), | 202 | MENUITEM_FUNCTION(clear_start_directory_item, 0, ID2P(LANG_RESET_START_DIR), |
198 | clear_start_directory, NULL, NULL, Icon_file_view_menu); | 203 | clear_start_directory, NULL, NULL, Icon_file_view_menu); |
199 | static int fileview_callback(int action,const struct menu_item_ex *this_item) | 204 | static int fileview_callback(int action, |
205 | const struct menu_item_ex *this_item, | ||
206 | struct gui_synclist *this_list) | ||
200 | { | 207 | { |
208 | (void)this_list; | ||
201 | static int oldval; | 209 | static int oldval; |
202 | int *variable = this_item->variable; | 210 | int *variable = this_item->variable; |
203 | switch (action) | 211 | switch (action) |
@@ -236,9 +244,12 @@ MENUITEM_SETTING(battery_capacity, &global_settings.battery_capacity, NULL); | |||
236 | MENUITEM_SETTING(battery_type, &global_settings.battery_type, NULL); | 244 | MENUITEM_SETTING(battery_type, &global_settings.battery_type, NULL); |
237 | #endif | 245 | #endif |
238 | #ifdef HAVE_USB_CHARGING_ENABLE | 246 | #ifdef HAVE_USB_CHARGING_ENABLE |
239 | static int usbcharging_callback(int action,const struct menu_item_ex *this_item) | 247 | static int usbcharging_callback(int action, |
248 | const struct menu_item_ex *this_item, | ||
249 | struct gui_synclist *this_list) | ||
240 | { | 250 | { |
241 | (void)this_item; | 251 | (void)this_item; |
252 | (void)this_list; | ||
242 | switch (action) | 253 | switch (action) |
243 | { | 254 | { |
244 | case ACTION_EXIT_MENUITEM: /* on exit */ | 255 | case ACTION_EXIT_MENUITEM: /* on exit */ |
@@ -265,9 +276,12 @@ MAKE_MENU(battery_menu, ID2P(LANG_BATTERY_MENU), 0, Icon_NOICON, | |||
265 | MENUITEM_SETTING(disk_spindown, &global_settings.disk_spindown, NULL); | 276 | MENUITEM_SETTING(disk_spindown, &global_settings.disk_spindown, NULL); |
266 | #endif | 277 | #endif |
267 | #ifdef HAVE_DIRCACHE | 278 | #ifdef HAVE_DIRCACHE |
268 | static int dircache_callback(int action,const struct menu_item_ex *this_item) | 279 | static int dircache_callback(int action, |
280 | const struct menu_item_ex *this_item, | ||
281 | struct gui_synclist *this_list) | ||
269 | { | 282 | { |
270 | (void)this_item; | 283 | (void)this_item; |
284 | (void)this_list; | ||
271 | switch (action) | 285 | switch (action) |
272 | { | 286 | { |
273 | case ACTION_EXIT_MENUITEM: /* on exit */ | 287 | case ACTION_EXIT_MENUITEM: /* on exit */ |
@@ -328,9 +342,12 @@ MAKE_MENU(keyclick_menu, ID2P(LANG_KEYCLICK), 0, Icon_NOICON, | |||
328 | 342 | ||
329 | #if CONFIG_CODEC == MAS3507D | 343 | #if CONFIG_CODEC == MAS3507D |
330 | void dac_line_in(bool enable); | 344 | void dac_line_in(bool enable); |
331 | static int linein_callback(int action,const struct menu_item_ex *this_item) | 345 | static int linein_callback(int action, |
346 | const struct menu_item_ex *this_item, | ||
347 | struct gui_synclist *this_list) | ||
332 | { | 348 | { |
333 | (void)this_item; | 349 | (void)this_item; |
350 | (void)this_list; | ||
334 | switch (action) | 351 | switch (action) |
335 | { | 352 | { |
336 | case ACTION_EXIT_MENUITEM: /* on exit */ | 353 | case ACTION_EXIT_MENUITEM: /* on exit */ |
@@ -545,9 +562,11 @@ static int toggle_sleeptimer(void) | |||
545 | /* Handle restarting a current sleep timer to the newly set default | 562 | /* Handle restarting a current sleep timer to the newly set default |
546 | duration */ | 563 | duration */ |
547 | static int sleeptimer_duration_cb(int action, | 564 | static int sleeptimer_duration_cb(int action, |
548 | const struct menu_item_ex *this_item) | 565 | const struct menu_item_ex *this_item, |
566 | struct gui_synclist *this_list) | ||
549 | { | 567 | { |
550 | (void)this_item; | 568 | (void)this_item; |
569 | (void)this_list; | ||
551 | static int initial_duration; | 570 | static int initial_duration; |
552 | switch (action) | 571 | switch (action) |
553 | { | 572 | { |
@@ -590,9 +609,12 @@ MAKE_MENU(startup_shutdown_menu, ID2P(LANG_STARTUP_SHUTDOWN), | |||
590 | 609 | ||
591 | /***********************************/ | 610 | /***********************************/ |
592 | /* BOOKMARK MENU */ | 611 | /* BOOKMARK MENU */ |
593 | static int bmark_callback(int action,const struct menu_item_ex *this_item) | 612 | static int bmark_callback(int action, |
613 | const struct menu_item_ex *this_item, | ||
614 | struct gui_synclist *this_list) | ||
594 | { | 615 | { |
595 | (void)this_item; | 616 | (void)this_item; |
617 | (void)this_list; | ||
596 | switch (action) | 618 | switch (action) |
597 | { | 619 | { |
598 | case ACTION_EXIT_MENUITEM: /* on exit */ | 620 | case ACTION_EXIT_MENUITEM: /* on exit */ |
@@ -623,9 +645,12 @@ MAKE_MENU(bookmark_settings_menu, ID2P(LANG_BOOKMARK_SETTINGS), 0, | |||
623 | #ifdef HAVE_TAGCACHE | 645 | #ifdef HAVE_TAGCACHE |
624 | #if CONFIG_CODEC == SWCODEC | 646 | #if CONFIG_CODEC == SWCODEC |
625 | 647 | ||
626 | static int autoresume_callback(int action, const struct menu_item_ex *this_item) | 648 | static int autoresume_callback(int action, |
649 | const struct menu_item_ex *this_item, | ||
650 | struct gui_synclist *this_list) | ||
627 | { | 651 | { |
628 | (void)this_item; | 652 | (void)this_item; |
653 | (void)this_list; | ||
629 | 654 | ||
630 | if (action == ACTION_EXIT_MENUITEM /* on exit */ | 655 | if (action == ACTION_EXIT_MENUITEM /* on exit */ |
631 | && global_settings.autoresume_enable | 656 | && global_settings.autoresume_enable |
@@ -642,9 +667,11 @@ static int autoresume_callback(int action, const struct menu_item_ex *this_item) | |||
642 | } | 667 | } |
643 | 668 | ||
644 | static int autoresume_nexttrack_callback(int action, | 669 | static int autoresume_nexttrack_callback(int action, |
645 | const struct menu_item_ex *this_item) | 670 | const struct menu_item_ex *this_item, |
671 | struct gui_synclist *this_list) | ||
646 | { | 672 | { |
647 | (void)this_item; | 673 | (void)this_item; |
674 | (void)this_list; | ||
648 | static int oldval = 0; | 675 | static int oldval = 0; |
649 | switch (action) | 676 | switch (action) |
650 | { | 677 | { |
@@ -678,14 +705,20 @@ MAKE_MENU(autoresume_menu, ID2P(LANG_AUTORESUME), | |||
678 | 705 | ||
679 | /***********************************/ | 706 | /***********************************/ |
680 | /* VOICE MENU */ | 707 | /* VOICE MENU */ |
681 | static int talk_callback(int action,const struct menu_item_ex *this_item); | 708 | static int talk_callback(int action, |
709 | const struct menu_item_ex *this_item, | ||
710 | struct gui_synclist *this_list); | ||
711 | |||
682 | MENUITEM_SETTING(talk_menu_item, &global_settings.talk_menu, NULL); | 712 | MENUITEM_SETTING(talk_menu_item, &global_settings.talk_menu, NULL); |
683 | MENUITEM_SETTING(talk_dir_item, &global_settings.talk_dir, NULL); | 713 | MENUITEM_SETTING(talk_dir_item, &global_settings.talk_dir, NULL); |
684 | MENUITEM_SETTING(talk_dir_clip_item, &global_settings.talk_dir_clip, talk_callback); | 714 | MENUITEM_SETTING(talk_dir_clip_item, &global_settings.talk_dir_clip, talk_callback); |
685 | MENUITEM_SETTING(talk_file_item, &global_settings.talk_file, NULL); | 715 | MENUITEM_SETTING(talk_file_item, &global_settings.talk_file, NULL); |
686 | MENUITEM_SETTING(talk_file_clip_item, &global_settings.talk_file_clip, talk_callback); | 716 | MENUITEM_SETTING(talk_file_clip_item, &global_settings.talk_file_clip, talk_callback); |
687 | static int talk_callback(int action,const struct menu_item_ex *this_item) | 717 | static int talk_callback(int action, |
718 | const struct menu_item_ex *this_item, | ||
719 | struct gui_synclist *this_list) | ||
688 | { | 720 | { |
721 | (void)this_list; | ||
689 | static int oldval = 0; | 722 | static int oldval = 0; |
690 | switch (action) | 723 | switch (action) |
691 | { | 724 | { |
diff --git a/apps/menus/sound_menu.c b/apps/menus/sound_menu.c index fb9a7fa26e..f39d980a35 100644 --- a/apps/menus/sound_menu.c +++ b/apps/menus/sound_menu.c | |||
@@ -38,9 +38,12 @@ | |||
38 | #include "option_select.h" | 38 | #include "option_select.h" |
39 | #include "misc.h" | 39 | #include "misc.h" |
40 | 40 | ||
41 | static int volume_limit_callback(int action,const struct menu_item_ex *this_item) | 41 | static int volume_limit_callback(int action, |
42 | const struct menu_item_ex *this_item, | ||
43 | struct gui_synclist *this_list) | ||
42 | { | 44 | { |
43 | (void)this_item; | 45 | (void)this_item; |
46 | (void)this_list; | ||
44 | 47 | ||
45 | static struct int_setting volume_limit_int_setting; | 48 | static struct int_setting volume_limit_int_setting; |
46 | volume_limit_int_setting.option_callback = NULL; | 49 | volume_limit_int_setting.option_callback = NULL; |
@@ -147,8 +150,11 @@ MENUITEM_SETTING(func_mode, &global_settings.func_mode, NULL); | |||
147 | &crossfeed_hf_attenuation, &crossfeed_hf_cutoff); | 150 | &crossfeed_hf_attenuation, &crossfeed_hf_cutoff); |
148 | 151 | ||
149 | #ifdef HAVE_PITCHCONTROL | 152 | #ifdef HAVE_PITCHCONTROL |
150 | static int timestretch_callback(int action,const struct menu_item_ex *this_item) | 153 | static int timestretch_callback(int action, |
154 | const struct menu_item_ex *this_item, | ||
155 | struct gui_synclist *this_list) | ||
151 | { | 156 | { |
157 | (void)this_list; | ||
152 | switch (action) | 158 | switch (action) |
153 | { | 159 | { |
154 | case ACTION_EXIT_MENUITEM: /* on exit */ | 160 | case ACTION_EXIT_MENUITEM: /* on exit */ |
@@ -156,7 +162,7 @@ static int timestretch_callback(int action,const struct menu_item_ex *this_item) | |||
156 | splash(HZ*2, ID2P(LANG_PLEASE_REBOOT)); | 162 | splash(HZ*2, ID2P(LANG_PLEASE_REBOOT)); |
157 | break; | 163 | break; |
158 | } | 164 | } |
159 | lowlatency_callback(action, this_item); | 165 | lowlatency_callback(action, this_item, NULL); |
160 | return action; | 166 | return action; |
161 | } | 167 | } |
162 | MENUITEM_SETTING(timestretch_enabled, | 168 | MENUITEM_SETTING(timestretch_enabled, |
diff --git a/apps/menus/theme_menu.c b/apps/menus/theme_menu.c index f64ded1615..10d1291daa 100644 --- a/apps/menus/theme_menu.c +++ b/apps/menus/theme_menu.c | |||
@@ -182,20 +182,29 @@ static int statusbar_callback_ex(int action,const struct menu_item_ex *this_item | |||
182 | } | 182 | } |
183 | 183 | ||
184 | #ifdef HAVE_REMOTE_LCD | 184 | #ifdef HAVE_REMOTE_LCD |
185 | static int statusbar_callback_remote(int action,const struct menu_item_ex *this_item) | 185 | static int statusbar_callback_remote(int action, |
186 | const struct menu_item_ex *this_item, | ||
187 | struct gui_synclist *this_list) | ||
186 | { | 188 | { |
189 | (void)this_list; | ||
187 | return statusbar_callback_ex(action, this_item, SCREEN_REMOTE); | 190 | return statusbar_callback_ex(action, this_item, SCREEN_REMOTE); |
188 | } | 191 | } |
189 | #endif | 192 | #endif |
190 | static int statusbar_callback(int action,const struct menu_item_ex *this_item) | 193 | static int statusbar_callback(int action, |
194 | const struct menu_item_ex *this_item, | ||
195 | struct gui_synclist *this_list) | ||
191 | { | 196 | { |
197 | (void)this_list; | ||
192 | return statusbar_callback_ex(action, this_item, SCREEN_MAIN); | 198 | return statusbar_callback_ex(action, this_item, SCREEN_MAIN); |
193 | } | 199 | } |
194 | 200 | ||
195 | #ifdef HAVE_BUTTONBAR | 201 | #ifdef HAVE_BUTTONBAR |
196 | static int buttonbar_callback(int action, const struct menu_item_ex *this_item) | 202 | static int buttonbar_callback(int action, |
203 | const struct menu_item_ex *this_item, | ||
204 | struct gui_synclist *this_list) | ||
197 | { | 205 | { |
198 | (void)this_item; | 206 | (void)this_item; |
207 | (void)this_list; | ||
199 | switch (action) | 208 | switch (action) |
200 | { | 209 | { |
201 | case ACTION_EXIT_MENUITEM: | 210 | case ACTION_EXIT_MENUITEM: |
@@ -369,9 +378,12 @@ MENUITEM_FUNCTION(browse_rfms, MENU_FUNC_USEPARAM, | |||
369 | #endif | 378 | #endif |
370 | 379 | ||
371 | 380 | ||
372 | static int showicons_callback(int action, const struct menu_item_ex *this_item) | 381 | static int showicons_callback(int action, |
382 | const struct menu_item_ex *this_item, | ||
383 | struct gui_synclist *this_list) | ||
373 | { | 384 | { |
374 | (void)this_item; | 385 | (void)this_item; |
386 | (void)this_list; | ||
375 | static bool old_icons; | 387 | static bool old_icons; |
376 | switch (action) | 388 | switch (action) |
377 | { | 389 | { |
diff --git a/apps/menus/time_menu.c b/apps/menus/time_menu.c index 94e19b06aa..811996ca40 100644 --- a/apps/menus/time_menu.c +++ b/apps/menus/time_menu.c | |||
@@ -93,9 +93,12 @@ MENUITEM_FUNCTION(alarm_screen_call, 0, ID2P(LANG_ALARM_MOD_ALARM_MENU), | |||
93 | /* This need only be shown if we dont have recording, because if we do | 93 | /* This need only be shown if we dont have recording, because if we do |
94 | then always show the setting item, because there will always be at least | 94 | then always show the setting item, because there will always be at least |
95 | 2 items */ | 95 | 2 items */ |
96 | static int alarm_callback(int action,const struct menu_item_ex *this_item) | 96 | static int alarm_callback(int action, |
97 | const struct menu_item_ex *this_item, | ||
98 | struct gui_synclist *this_list) | ||
97 | { | 99 | { |
98 | (void)this_item; | 100 | (void)this_item; |
101 | (void)this_list; | ||
99 | switch (action) | 102 | switch (action) |
100 | { | 103 | { |
101 | case ACTION_REQUEST_MENUITEM: | 104 | case ACTION_REQUEST_MENUITEM: |
@@ -204,9 +207,11 @@ static void draw_timedate(struct viewport *vp, struct screen *display) | |||
204 | static struct viewport clock_vps[NB_SCREENS], menu[NB_SCREENS]; | 207 | static struct viewport clock_vps[NB_SCREENS], menu[NB_SCREENS]; |
205 | static bool menu_was_pressed; | 208 | static bool menu_was_pressed; |
206 | static int time_menu_callback(int action, | 209 | static int time_menu_callback(int action, |
207 | const struct menu_item_ex *this_item) | 210 | const struct menu_item_ex *this_item, |
211 | struct gui_synclist *this_list) | ||
208 | { | 212 | { |
209 | (void)this_item; | 213 | (void)this_item; |
214 | (void)this_list; | ||
210 | static int last_redraw = 0; | 215 | static int last_redraw = 0; |
211 | bool redraw = false; | 216 | bool redraw = false; |
212 | 217 | ||
diff --git a/apps/onplay.c b/apps/onplay.c index 095a337d6b..7f96246c08 100644 --- a/apps/onplay.c +++ b/apps/onplay.c | |||
@@ -143,7 +143,8 @@ static bool clipboard_clip(struct clipboard *clip, const char *path, | |||
143 | /* ----------------------------------------------------------------------- */ | 143 | /* ----------------------------------------------------------------------- */ |
144 | 144 | ||
145 | static int bookmark_menu_callback(int action, | 145 | static int bookmark_menu_callback(int action, |
146 | const struct menu_item_ex *this_item); | 146 | const struct menu_item_ex *this_item, |
147 | struct gui_synclist *this_list); | ||
147 | MENUITEM_FUNCTION(bookmark_create_menu_item, 0, | 148 | MENUITEM_FUNCTION(bookmark_create_menu_item, 0, |
148 | ID2P(LANG_BOOKMARK_MENU_CREATE), | 149 | ID2P(LANG_BOOKMARK_MENU_CREATE), |
149 | bookmark_create_menu, NULL, | 150 | bookmark_create_menu, NULL, |
@@ -156,8 +157,10 @@ MAKE_ONPLAYMENU(bookmark_menu, ID2P(LANG_BOOKMARK_MENU), | |||
156 | bookmark_menu_callback, Icon_Bookmark, | 157 | bookmark_menu_callback, Icon_Bookmark, |
157 | &bookmark_create_menu_item, &bookmark_load_menu_item); | 158 | &bookmark_create_menu_item, &bookmark_load_menu_item); |
158 | static int bookmark_menu_callback(int action, | 159 | static int bookmark_menu_callback(int action, |
159 | const struct menu_item_ex *this_item) | 160 | const struct menu_item_ex *this_item, |
161 | struct gui_synclist *this_list) | ||
160 | { | 162 | { |
163 | (void) this_list; | ||
161 | switch (action) | 164 | switch (action) |
162 | { | 165 | { |
163 | case ACTION_REQUEST_MENUITEM: | 166 | case ACTION_REQUEST_MENUITEM: |
@@ -574,9 +577,11 @@ static int playlist_queue_func(void *param) | |||
574 | } | 577 | } |
575 | 578 | ||
576 | static int treeplaylist_wplayback_callback(int action, | 579 | static int treeplaylist_wplayback_callback(int action, |
577 | const struct menu_item_ex* this_item) | 580 | const struct menu_item_ex* this_item, |
581 | struct gui_synclist *this_list) | ||
578 | { | 582 | { |
579 | (void)this_item; | 583 | (void)this_item; |
584 | (void)this_list; | ||
580 | switch (action) | 585 | switch (action) |
581 | { | 586 | { |
582 | case ACTION_REQUEST_MENUITEM: | 587 | case ACTION_REQUEST_MENUITEM: |
@@ -590,7 +595,8 @@ static int treeplaylist_wplayback_callback(int action, | |||
590 | } | 595 | } |
591 | 596 | ||
592 | static int treeplaylist_callback(int action, | 597 | static int treeplaylist_callback(int action, |
593 | const struct menu_item_ex *this_item); | 598 | const struct menu_item_ex *this_item, |
599 | struct gui_synclist *this_list); | ||
594 | 600 | ||
595 | /* insert items */ | 601 | /* insert items */ |
596 | MENUITEM_FUNCTION(i_pl_item, MENU_FUNC_USEPARAM, ID2P(LANG_INSERT), | 602 | MENUITEM_FUNCTION(i_pl_item, MENU_FUNC_USEPARAM, ID2P(LANG_INSERT), |
@@ -656,8 +662,10 @@ MAKE_ONPLAYMENU( tree_playlist_menu, ID2P(LANG_CURRENT_PLAYLIST), | |||
656 | &replace_pl_item | 662 | &replace_pl_item |
657 | ); | 663 | ); |
658 | static int treeplaylist_callback(int action, | 664 | static int treeplaylist_callback(int action, |
659 | const struct menu_item_ex *this_item) | 665 | const struct menu_item_ex *this_item, |
666 | struct gui_synclist *this_list) | ||
660 | { | 667 | { |
668 | (void)this_list; | ||
661 | switch (action) | 669 | switch (action) |
662 | { | 670 | { |
663 | case ACTION_REQUEST_MENUITEM: | 671 | case ACTION_REQUEST_MENUITEM: |
@@ -727,7 +735,10 @@ static bool cat_add_to_a_new_playlist(void) | |||
727 | return catalog_add_to_a_playlist(selected_file, selected_file_attr, | 735 | return catalog_add_to_a_playlist(selected_file, selected_file_attr, |
728 | true, NULL); | 736 | true, NULL); |
729 | } | 737 | } |
730 | static int clipboard_callback(int action,const struct menu_item_ex *this_item); | 738 | static int clipboard_callback(int action, |
739 | const struct menu_item_ex *this_item, | ||
740 | struct gui_synclist *this_list); | ||
741 | |||
731 | static bool set_catalogdir(void) | 742 | static bool set_catalogdir(void) |
732 | { | 743 | { |
733 | catalog_set_directory(selected_file); | 744 | catalog_set_directory(selected_file); |
@@ -738,7 +749,9 @@ MENUITEM_FUNCTION(set_catalogdir_item, 0, ID2P(LANG_SET_AS_PLAYLISTCAT_DIR), | |||
738 | set_catalogdir, NULL, clipboard_callback, Icon_Playlist); | 749 | set_catalogdir, NULL, clipboard_callback, Icon_Playlist); |
739 | 750 | ||
740 | static int cat_playlist_callback(int action, | 751 | static int cat_playlist_callback(int action, |
741 | const struct menu_item_ex *this_item); | 752 | const struct menu_item_ex *this_item, |
753 | struct gui_synclist *this_list); | ||
754 | |||
742 | MENUITEM_FUNCTION(cat_add_to_list, 0, ID2P(LANG_CATALOG_ADD_TO), | 755 | MENUITEM_FUNCTION(cat_add_to_list, 0, ID2P(LANG_CATALOG_ADD_TO), |
743 | cat_add_to_a_playlist, 0, NULL, Icon_Playlist); | 756 | cat_add_to_a_playlist, 0, NULL, Icon_Playlist); |
744 | MENUITEM_FUNCTION(cat_add_to_new, 0, ID2P(LANG_CATALOG_ADD_TO_NEW), | 757 | MENUITEM_FUNCTION(cat_add_to_new, 0, ID2P(LANG_CATALOG_ADD_TO_NEW), |
@@ -755,9 +768,11 @@ void onplay_show_playlist_cat_menu(char* track_name) | |||
755 | } | 768 | } |
756 | 769 | ||
757 | static int cat_playlist_callback(int action, | 770 | static int cat_playlist_callback(int action, |
758 | const struct menu_item_ex *this_item) | 771 | const struct menu_item_ex *this_item, |
772 | struct gui_synclist *this_list) | ||
759 | { | 773 | { |
760 | (void)this_item; | 774 | (void)this_item; |
775 | (void)this_list; | ||
761 | if (!selected_file || | 776 | if (!selected_file || |
762 | (((selected_file_attr & FILE_ATTR_MASK) != FILE_ATTR_AUDIO) && | 777 | (((selected_file_attr & FILE_ATTR_MASK) != FILE_ATTR_AUDIO) && |
763 | ((selected_file_attr & FILE_ATTR_MASK) != FILE_ATTR_M3U) && | 778 | ((selected_file_attr & FILE_ATTR_MASK) != FILE_ATTR_M3U) && |
@@ -1394,9 +1409,12 @@ static int set_rating_inline(void) | |||
1394 | splash(HZ*2, ID2P(LANG_ID3_NO_INFO)); | 1409 | splash(HZ*2, ID2P(LANG_ID3_NO_INFO)); |
1395 | return 0; | 1410 | return 0; |
1396 | } | 1411 | } |
1397 | static int ratingitem_callback(int action,const struct menu_item_ex *this_item) | 1412 | static int ratingitem_callback(int action, |
1413 | const struct menu_item_ex *this_item, | ||
1414 | struct gui_synclist *this_list) | ||
1398 | { | 1415 | { |
1399 | (void)this_item; | 1416 | (void)this_item; |
1417 | (void)this_list; | ||
1400 | switch (action) | 1418 | switch (action) |
1401 | { | 1419 | { |
1402 | case ACTION_REQUEST_MENUITEM: | 1420 | case ACTION_REQUEST_MENUITEM: |
@@ -1426,9 +1444,11 @@ static bool view_cue(void) | |||
1426 | return false; | 1444 | return false; |
1427 | } | 1445 | } |
1428 | static int view_cue_item_callback(int action, | 1446 | static int view_cue_item_callback(int action, |
1429 | const struct menu_item_ex *this_item) | 1447 | const struct menu_item_ex *this_item, |
1448 | struct gui_synclist *this_list) | ||
1430 | { | 1449 | { |
1431 | (void)this_item; | 1450 | (void)this_item; |
1451 | (void)this_list; | ||
1432 | struct mp3entry* id3 = audio_current_track(); | 1452 | struct mp3entry* id3 = audio_current_track(); |
1433 | switch (action) | 1453 | switch (action) |
1434 | { | 1454 | { |
@@ -1460,7 +1480,10 @@ MENUITEM_FUNCTION(pitch_screen_item, 0, ID2P(LANG_PITCH), | |||
1460 | #endif | 1480 | #endif |
1461 | 1481 | ||
1462 | /* CONTEXT_[TREE|ID3DB] items */ | 1482 | /* CONTEXT_[TREE|ID3DB] items */ |
1463 | static int clipboard_callback(int action,const struct menu_item_ex *this_item); | 1483 | static int clipboard_callback(int action, |
1484 | const struct menu_item_ex *this_item, | ||
1485 | struct gui_synclist *this_list); | ||
1486 | |||
1464 | MENUITEM_FUNCTION(rename_file_item, 0, ID2P(LANG_RENAME), | 1487 | MENUITEM_FUNCTION(rename_file_item, 0, ID2P(LANG_RENAME), |
1465 | rename_file, NULL, clipboard_callback, Icon_NOICON); | 1488 | rename_file, NULL, clipboard_callback, Icon_NOICON); |
1466 | MENUITEM_FUNCTION(clipboard_cut_item, 0, ID2P(LANG_CUT), | 1489 | MENUITEM_FUNCTION(clipboard_cut_item, 0, ID2P(LANG_CUT), |
@@ -1542,8 +1565,11 @@ static bool set_startdir(void) | |||
1542 | MENUITEM_FUNCTION(set_startdir_item, 0, ID2P(LANG_SET_AS_START_DIR), | 1565 | MENUITEM_FUNCTION(set_startdir_item, 0, ID2P(LANG_SET_AS_START_DIR), |
1543 | set_startdir, NULL, clipboard_callback, Icon_file_view_menu); | 1566 | set_startdir, NULL, clipboard_callback, Icon_file_view_menu); |
1544 | 1567 | ||
1545 | static int clipboard_callback(int action,const struct menu_item_ex *this_item) | 1568 | static int clipboard_callback(int action, |
1569 | const struct menu_item_ex *this_item, | ||
1570 | struct gui_synclist *this_list) | ||
1546 | { | 1571 | { |
1572 | (void)this_list; | ||
1547 | switch (action) | 1573 | switch (action) |
1548 | { | 1574 | { |
1549 | case ACTION_REQUEST_MENUITEM: | 1575 | case ACTION_REQUEST_MENUITEM: |
@@ -1625,7 +1651,10 @@ static int clipboard_callback(int action,const struct menu_item_ex *this_item) | |||
1625 | return action; | 1651 | return action; |
1626 | } | 1652 | } |
1627 | 1653 | ||
1628 | static int onplaymenu_callback(int action,const struct menu_item_ex *this_item); | 1654 | static int onplaymenu_callback(int action, |
1655 | const struct menu_item_ex *this_item, | ||
1656 | struct gui_synclist *this_list); | ||
1657 | |||
1629 | /* used when onplay() is called in the CONTEXT_WPS context */ | 1658 | /* used when onplay() is called in the CONTEXT_WPS context */ |
1630 | MAKE_ONPLAYMENU( wps_onplay_menu, ID2P(LANG_ONPLAY_MENU_TITLE), | 1659 | MAKE_ONPLAYMENU( wps_onplay_menu, ID2P(LANG_ONPLAY_MENU_TITLE), |
1631 | onplaymenu_callback, Icon_Audio, | 1660 | onplaymenu_callback, Icon_Audio, |
@@ -1659,8 +1688,11 @@ MAKE_ONPLAYMENU( tree_onplay_menu, ID2P(LANG_ONPLAY_MENU_TITLE), | |||
1659 | #endif | 1688 | #endif |
1660 | &set_startdir_item, &add_to_faves_item, &file_menu, | 1689 | &set_startdir_item, &add_to_faves_item, &file_menu, |
1661 | ); | 1690 | ); |
1662 | static int onplaymenu_callback(int action,const struct menu_item_ex *this_item) | 1691 | static int onplaymenu_callback(int action, |
1692 | const struct menu_item_ex *this_item, | ||
1693 | struct gui_synclist *this_list) | ||
1663 | { | 1694 | { |
1695 | (void)this_list; | ||
1664 | switch (action) | 1696 | switch (action) |
1665 | { | 1697 | { |
1666 | case ACTION_TREE_STOP: | 1698 | case ACTION_TREE_STOP: |
diff --git a/apps/plugins/2048.c b/apps/plugins/2048.c index 15d3f41191..5dd5a7e99f 100644 --- a/apps/plugins/2048.c +++ b/apps/plugins/2048.c | |||
@@ -989,8 +989,11 @@ static enum plugin_status do_game(bool newgame) | |||
989 | 989 | ||
990 | /* decide if this_item should be shown in the main menu */ | 990 | /* decide if this_item should be shown in the main menu */ |
991 | /* used to hide resume option when there is no save */ | 991 | /* used to hide resume option when there is no save */ |
992 | static int mainmenu_cb(int action, const struct menu_item_ex *this_item) | 992 | static int mainmenu_cb(int action, |
993 | const struct menu_item_ex *this_item, | ||
994 | struct gui_synclist *this_list) | ||
993 | { | 995 | { |
996 | (void)this_list; | ||
994 | int idx = ((intptr_t)this_item); | 997 | int idx = ((intptr_t)this_item); |
995 | if(action == ACTION_REQUEST_MENUITEM && !loaded && (idx == 0 || idx == 5)) | 998 | if(action == ACTION_REQUEST_MENUITEM && !loaded && (idx == 0 || idx == 5)) |
996 | return ACTION_EXIT_MENUITEM; | 999 | return ACTION_EXIT_MENUITEM; |
diff --git a/apps/plugins/blackjack.c b/apps/plugins/blackjack.c index 4511d3fad5..d685de9617 100644 --- a/apps/plugins/blackjack.c +++ b/apps/plugins/blackjack.c | |||
@@ -1418,8 +1418,11 @@ static bool blackjack_help(void) { | |||
1418 | return false; | 1418 | return false; |
1419 | } | 1419 | } |
1420 | 1420 | ||
1421 | static int blackjack_menu_cb(int action, const struct menu_item_ex *this_item) | 1421 | static int blackjack_menu_cb(int action, |
1422 | const struct menu_item_ex *this_item, | ||
1423 | struct gui_synclist *this_list) | ||
1422 | { | 1424 | { |
1425 | (void)this_list; | ||
1423 | int i = ((intptr_t)this_item); | 1426 | int i = ((intptr_t)this_item); |
1424 | if(action == ACTION_REQUEST_MENUITEM | 1427 | if(action == ACTION_REQUEST_MENUITEM |
1425 | && !resume && (i==0 || i==5)) | 1428 | && !resume && (i==0 || i==5)) |
diff --git a/apps/plugins/brickmania.c b/apps/plugins/brickmania.c index b0a1b6565b..182ba4f040 100644 --- a/apps/plugins/brickmania.c +++ b/apps/plugins/brickmania.c | |||
@@ -1530,8 +1530,11 @@ static int brickmania_help(void) | |||
1530 | return 0; | 1530 | return 0; |
1531 | } | 1531 | } |
1532 | 1532 | ||
1533 | static int brickmania_menu_cb(int action, const struct menu_item_ex *this_item) | 1533 | static int brickmania_menu_cb(int action, |
1534 | const struct menu_item_ex *this_item, | ||
1535 | struct gui_synclist *this_list) | ||
1534 | { | 1536 | { |
1537 | (void)this_list; | ||
1535 | int i = ((intptr_t)this_item); | 1538 | int i = ((intptr_t)this_item); |
1536 | if(action == ACTION_REQUEST_MENUITEM | 1539 | if(action == ACTION_REQUEST_MENUITEM |
1537 | && !resume && (i==0 || i==6)) | 1540 | && !resume && (i==0 || i==6)) |
diff --git a/apps/plugins/bubbles.c b/apps/plugins/bubbles.c index e96010ec02..2d163d8bc9 100644 --- a/apps/plugins/bubbles.c +++ b/apps/plugins/bubbles.c | |||
@@ -2414,8 +2414,11 @@ static int bubbles_handlebuttons(struct game_context* bb, bool animblock, | |||
2414 | return BB_NONE; | 2414 | return BB_NONE; |
2415 | } | 2415 | } |
2416 | 2416 | ||
2417 | static int bubbles_menu_cb(int action, const struct menu_item_ex *this_item) | 2417 | static int bubbles_menu_cb(int action, |
2418 | const struct menu_item_ex *this_item, | ||
2419 | struct gui_synclist *this_list) | ||
2418 | { | 2420 | { |
2421 | (void)this_list; | ||
2419 | int i = ((intptr_t)this_item); | 2422 | int i = ((intptr_t)this_item); |
2420 | if(action == ACTION_REQUEST_MENUITEM | 2423 | if(action == ACTION_REQUEST_MENUITEM |
2421 | && !resume && (i==0)) | 2424 | && !resume && (i==0)) |
diff --git a/apps/plugins/calendar.c b/apps/plugins/calendar.c index 4d89530ca9..ded0a70d26 100644 --- a/apps/plugins/calendar.c +++ b/apps/plugins/calendar.c | |||
@@ -876,8 +876,11 @@ static void add_memo(struct shown *shown, int type) | |||
876 | rb->splash(HZ/2, "Event not added"); | 876 | rb->splash(HZ/2, "Event not added"); |
877 | } | 877 | } |
878 | 878 | ||
879 | static int edit_menu_cb(int action, const struct menu_item_ex *this_item) | 879 | static int edit_menu_cb(int action, |
880 | const struct menu_item_ex *this_item, | ||
881 | struct gui_synclist *this_list) | ||
880 | { | 882 | { |
883 | (void)this_list; | ||
881 | int i = (intptr_t)this_item; | 884 | int i = (intptr_t)this_item; |
882 | if (action == ACTION_REQUEST_MENUITEM | 885 | if (action == ACTION_REQUEST_MENUITEM |
883 | && memos_in_shown_memory <= 0 && (i==0 || i==1)) | 886 | && memos_in_shown_memory <= 0 && (i==0 || i==1)) |
diff --git a/apps/plugins/chopper.c b/apps/plugins/chopper.c index 71e24deb8f..a206192974 100644 --- a/apps/plugins/chopper.c +++ b/apps/plugins/chopper.c | |||
@@ -767,8 +767,11 @@ static void chopDrawScene(void) | |||
767 | } | 767 | } |
768 | 768 | ||
769 | static bool _ingame; | 769 | static bool _ingame; |
770 | static int chopMenuCb(int action, const struct menu_item_ex *this_item) | 770 | static int chopMenuCb(int action, |
771 | const struct menu_item_ex *this_item, | ||
772 | struct gui_synclist *this_list) | ||
771 | { | 773 | { |
774 | (void)this_list; | ||
772 | if(action == ACTION_REQUEST_MENUITEM | 775 | if(action == ACTION_REQUEST_MENUITEM |
773 | && !_ingame && ((intptr_t)this_item)==0) | 776 | && !_ingame && ((intptr_t)this_item)==0) |
774 | return ACTION_EXIT_MENUITEM; | 777 | return ACTION_EXIT_MENUITEM; |
diff --git a/apps/plugins/clix.c b/apps/plugins/clix.c index e80fdeab8b..748090358c 100644 --- a/apps/plugins/clix.c +++ b/apps/plugins/clix.c | |||
@@ -744,8 +744,11 @@ static bool clix_help(void) | |||
744 | } | 744 | } |
745 | 745 | ||
746 | static bool _ingame; | 746 | static bool _ingame; |
747 | static int clix_menu_cb(int action, const struct menu_item_ex *this_item) | 747 | static int clix_menu_cb(int action, |
748 | const struct menu_item_ex *this_item, | ||
749 | struct gui_synclist *this_list) | ||
748 | { | 750 | { |
751 | (void)this_list; | ||
749 | if(action == ACTION_REQUEST_MENUITEM | 752 | if(action == ACTION_REQUEST_MENUITEM |
750 | && !_ingame && ((intptr_t)this_item)==0) | 753 | && !_ingame && ((intptr_t)this_item)==0) |
751 | return ACTION_EXIT_MENUITEM; | 754 | return ACTION_EXIT_MENUITEM; |
diff --git a/apps/plugins/codebuster.c b/apps/plugins/codebuster.c index ca36d5d01b..956991575d 100644 --- a/apps/plugins/codebuster.c +++ b/apps/plugins/codebuster.c | |||
@@ -363,8 +363,11 @@ static void settings_menu(void) { | |||
363 | } | 363 | } |
364 | 364 | ||
365 | static bool resume; | 365 | static bool resume; |
366 | static int menu_cb(int action, const struct menu_item_ex *this_item) | 366 | static int menu_cb(int action, |
367 | const struct menu_item_ex *this_item, | ||
368 | struct gui_synclist *this_list) | ||
367 | { | 369 | { |
370 | (void)this_list; | ||
368 | int i = ((intptr_t)this_item); | 371 | int i = ((intptr_t)this_item); |
369 | if ((action == ACTION_REQUEST_MENUITEM) && (!resume && (i==0))) | 372 | if ((action == ACTION_REQUEST_MENUITEM) && (!resume && (i==0))) |
370 | return ACTION_EXIT_MENUITEM; | 373 | return ACTION_EXIT_MENUITEM; |
diff --git a/apps/plugins/disktidy.c b/apps/plugins/disktidy.c index 6f131e37a6..013e7a37bd 100644 --- a/apps/plugins/disktidy.c +++ b/apps/plugins/disktidy.c | |||
@@ -645,8 +645,11 @@ static bool tidy_types_selected(void) | |||
645 | return false; | 645 | return false; |
646 | } | 646 | } |
647 | 647 | ||
648 | static int disktidy_menu_cb(int action, const struct menu_item_ex *this_item) | 648 | static int disktidy_menu_cb(int action, |
649 | const struct menu_item_ex *this_item, | ||
650 | struct gui_synclist *this_list) | ||
649 | { | 651 | { |
652 | (void)this_list; | ||
650 | int item = ((intptr_t)this_item); | 653 | int item = ((intptr_t)this_item); |
651 | 654 | ||
652 | if (action == ACTION_REQUEST_MENUITEM && | 655 | if (action == ACTION_REQUEST_MENUITEM && |
diff --git a/apps/plugins/jewels.c b/apps/plugins/jewels.c index 87a9d2fabf..cae3befb5e 100644 --- a/apps/plugins/jewels.c +++ b/apps/plugins/jewels.c | |||
@@ -1471,8 +1471,11 @@ static bool jewels_help(void) | |||
1471 | } | 1471 | } |
1472 | 1472 | ||
1473 | static bool _ingame; | 1473 | static bool _ingame; |
1474 | static int jewels_menu_cb(int action, const struct menu_item_ex *this_item) | 1474 | static int jewels_menu_cb(int action, |
1475 | const struct menu_item_ex *this_item, | ||
1476 | struct gui_synclist *this_list) | ||
1475 | { | 1477 | { |
1478 | (void)this_list; | ||
1476 | int i = ((intptr_t)this_item); | 1479 | int i = ((intptr_t)this_item); |
1477 | if(action == ACTION_REQUEST_MENUITEM | 1480 | if(action == ACTION_REQUEST_MENUITEM |
1478 | && !_ingame && (i==0 || i==6)) | 1481 | && !_ingame && (i==0 || i==6)) |
diff --git a/apps/plugins/keybox.c b/apps/plugins/keybox.c index d692c88419..914761e73b 100644 --- a/apps/plugins/keybox.c +++ b/apps/plugins/keybox.c | |||
@@ -104,9 +104,13 @@ static void do_decrypt(uint32_t* v, uint32_t* k) | |||
104 | v[0]=v0; v[1]=v1; | 104 | v[0]=v0; v[1]=v1; |
105 | } | 105 | } |
106 | 106 | ||
107 | static int context_item_cb(int action, const struct menu_item_ex *this_item) | 107 | static int context_item_cb(int action, |
108 | const struct menu_item_ex *this_item, | ||
109 | struct gui_synclist *this_list) | ||
108 | { | 110 | { |
109 | int i = (intptr_t)this_item; | 111 | int i = (intptr_t)this_item; |
112 | (void)this_list; | ||
113 | |||
110 | if (action == ACTION_REQUEST_MENUITEM | 114 | if (action == ACTION_REQUEST_MENUITEM |
111 | && pw_list.num_entries == 0 | 115 | && pw_list.num_entries == 0 |
112 | && (i != 0 && i != 5)) | 116 | && (i != 0 && i != 5)) |
diff --git a/apps/plugins/lua/rocklib.c b/apps/plugins/lua/rocklib.c index 6b24984130..6820c30dc3 100644 --- a/apps/plugins/lua/rocklib.c +++ b/apps/plugins/lua/rocklib.c | |||
@@ -220,9 +220,12 @@ static lua_State* store_luastate(lua_State *L, bool bStore) | |||
220 | return LStored; | 220 | return LStored; |
221 | } | 221 | } |
222 | 222 | ||
223 | static int menu_callback(int action, const struct menu_item_ex *this_item) | 223 | static int menu_callback(int action, |
224 | const struct menu_item_ex *this_item, | ||
225 | struct gui_synclist *this_list) | ||
224 | { | 226 | { |
225 | (void) this_item; | 227 | (void) this_item; |
228 | (void) this_list; | ||
226 | static int lua_ref = LUA_NOREF; | 229 | static int lua_ref = LUA_NOREF; |
227 | lua_State *L = store_luastate(NULL, false); | 230 | lua_State *L = store_luastate(NULL, false); |
228 | if(!L) | 231 | if(!L) |
@@ -259,7 +262,7 @@ RB_WRAP(do_menu) | |||
259 | { | 262 | { |
260 | /*lua callback function cb(action) return action end */ | 263 | /*lua callback function cb(action) return action end */ |
261 | ref_lua = luaL_ref(L, LUA_REGISTRYINDEX); | 264 | ref_lua = luaL_ref(L, LUA_REGISTRYINDEX); |
262 | menu_callback(ref_lua, NULL); | 265 | menu_callback(ref_lua, NULL, NULL); |
263 | store_luastate(L, true); | 266 | store_luastate(L, true); |
264 | menu_desc.menu_callback = &menu_callback; | 267 | menu_desc.menu_callback = &menu_callback; |
265 | } | 268 | } |
@@ -277,7 +280,7 @@ RB_WRAP(do_menu) | |||
277 | { | 280 | { |
278 | store_luastate(NULL, true); | 281 | store_luastate(NULL, true); |
279 | luaL_unref (L, LUA_REGISTRYINDEX, ref_lua); | 282 | luaL_unref (L, LUA_REGISTRYINDEX, ref_lua); |
280 | menu_callback(LUA_NOREF, NULL); | 283 | menu_callback(LUA_NOREF, NULL, NULL); |
281 | } | 284 | } |
282 | 285 | ||
283 | lua_pushinteger(L, result); | 286 | lua_pushinteger(L, result); |
diff --git a/apps/plugins/mazezam.c b/apps/plugins/mazezam.c index 759ca6477d..423b09288d 100644 --- a/apps/plugins/mazezam.c +++ b/apps/plugins/mazezam.c | |||
@@ -853,8 +853,11 @@ static void resume_save_data (struct resume_data *r, struct resume_data *old) | |||
853 | * Manages the main menu | 853 | * Manages the main menu |
854 | ******************************************************************************/ | 854 | ******************************************************************************/ |
855 | static bool have_continue; | 855 | static bool have_continue; |
856 | static int main_menu_cb(int action, const struct menu_item_ex *this_item) | 856 | static int main_menu_cb(int action, |
857 | const struct menu_item_ex *this_item, | ||
858 | struct gui_synclist *this_list) | ||
857 | { | 859 | { |
860 | (void)this_list; | ||
858 | if(action == ACTION_REQUEST_MENUITEM | 861 | if(action == ACTION_REQUEST_MENUITEM |
859 | && !have_continue && ((intptr_t)this_item)==0) | 862 | && !have_continue && ((intptr_t)this_item)==0) |
860 | return ACTION_EXIT_MENUITEM; | 863 | return ACTION_EXIT_MENUITEM; |
diff --git a/apps/plugins/mpegplayer/mpeg_misc.c b/apps/plugins/mpegplayer/mpeg_misc.c index 7b73c7c376..c85285f4f8 100644 --- a/apps/plugins/mpegplayer/mpeg_misc.c +++ b/apps/plugins/mpegplayer/mpeg_misc.c | |||
@@ -183,8 +183,11 @@ long mpeg_sysevent(void) | |||
183 | return mpeg_sysevent_id; | 183 | return mpeg_sysevent_id; |
184 | } | 184 | } |
185 | 185 | ||
186 | int mpeg_sysevent_callback(int btn, const struct menu_item_ex *menu) | 186 | int mpeg_sysevent_callback(int btn, |
187 | const struct menu_item_ex *menu, | ||
188 | struct gui_synclist *this_list) | ||
187 | { | 189 | { |
190 | (void) this_list; | ||
188 | switch (btn) | 191 | switch (btn) |
189 | { | 192 | { |
190 | case SYS_USB_CONNECTED: | 193 | case SYS_USB_CONNECTED: |
@@ -218,6 +221,6 @@ int mpeg_button_get(int timeout) | |||
218 | /* Produce keyclick */ | 221 | /* Produce keyclick */ |
219 | rb->keyclick_click(true, button); | 222 | rb->keyclick_click(true, button); |
220 | 223 | ||
221 | return mpeg_sysevent_callback(button, NULL); | 224 | return mpeg_sysevent_callback(button, NULL, NULL); |
222 | } | 225 | } |
223 | 226 | ||
diff --git a/apps/plugins/mpegplayer/mpeg_misc.h b/apps/plugins/mpegplayer/mpeg_misc.h index 6626bba594..e04db0e19d 100644 --- a/apps/plugins/mpegplayer/mpeg_misc.h +++ b/apps/plugins/mpegplayer/mpeg_misc.h | |||
@@ -241,7 +241,8 @@ void mpeg_sysevent_set(void); | |||
241 | long mpeg_sysevent(void); | 241 | long mpeg_sysevent(void); |
242 | 242 | ||
243 | /* Call with a system event code and used as menu callback */ | 243 | /* Call with a system event code and used as menu callback */ |
244 | int mpeg_sysevent_callback(int btn, const struct menu_item_ex *menu); | 244 | int mpeg_sysevent_callback(int btn, const struct menu_item_ex *menu, |
245 | struct gui_synclist *this_list); | ||
245 | 246 | ||
246 | /* Handle recorded event */ | 247 | /* Handle recorded event */ |
247 | void mpeg_sysevent_handle(void); | 248 | void mpeg_sysevent_handle(void); |
diff --git a/apps/plugins/pegbox.c b/apps/plugins/pegbox.c index b638f2feeb..e000e98d33 100644 --- a/apps/plugins/pegbox.c +++ b/apps/plugins/pegbox.c | |||
@@ -1316,8 +1316,12 @@ static bool pegbox_help(void) | |||
1316 | * pegbox_menu() is the game menu | 1316 | * pegbox_menu() is the game menu |
1317 | ************************************************************************/ | 1317 | ************************************************************************/ |
1318 | static bool _ingame; | 1318 | static bool _ingame; |
1319 | static int pegbox_menu_cb(int action, const struct menu_item_ex *this_item) | 1319 | static int pegbox_menu_cb(int action, |
1320 | const struct menu_item_ex *this_item, | ||
1321 | struct gui_synclist *this_list) | ||
1320 | { | 1322 | { |
1323 | (void)this_list; | ||
1324 | |||
1321 | int i = (intptr_t)this_item; | 1325 | int i = (intptr_t)this_item; |
1322 | if( action == ACTION_REQUEST_MENUITEM ) | 1326 | if( action == ACTION_REQUEST_MENUITEM ) |
1323 | { | 1327 | { |
diff --git a/apps/plugins/puzzles/rockbox.c b/apps/plugins/puzzles/rockbox.c index 45733c12a3..3bae2e1e64 100644 --- a/apps/plugins/puzzles/rockbox.c +++ b/apps/plugins/puzzles/rockbox.c | |||
@@ -2827,8 +2827,11 @@ static void debug_menu(void) | |||
2827 | } | 2827 | } |
2828 | #endif | 2828 | #endif |
2829 | 2829 | ||
2830 | static int pausemenu_cb(int action, const struct menu_item_ex *this_item) | 2830 | static int pausemenu_cb(int action, |
2831 | const struct menu_item_ex *this_item, | ||
2832 | struct gui_synclist *this_list) | ||
2831 | { | 2833 | { |
2834 | (void)this_list; | ||
2832 | int i = (intptr_t) this_item; | 2835 | int i = (intptr_t) this_item; |
2833 | if(action == ACTION_REQUEST_MENUITEM) | 2836 | if(action == ACTION_REQUEST_MENUITEM) |
2834 | { | 2837 | { |
diff --git a/apps/plugins/rockblox.c b/apps/plugins/rockblox.c index 93479c5c56..b6cf6e5470 100644 --- a/apps/plugins/rockblox.c +++ b/apps/plugins/rockblox.c | |||
@@ -1512,8 +1512,11 @@ static bool rockblox_help(void) | |||
1512 | return false; | 1512 | return false; |
1513 | } | 1513 | } |
1514 | 1514 | ||
1515 | static int rockblox_menu_cb(int action, const struct menu_item_ex *this_item) | 1515 | static int rockblox_menu_cb(int action, |
1516 | const struct menu_item_ex *this_item, | ||
1517 | struct gui_synclist *this_list) | ||
1516 | { | 1518 | { |
1519 | (void)this_list; | ||
1517 | int i = ((intptr_t)this_item); | 1520 | int i = ((intptr_t)this_item); |
1518 | if(action == ACTION_REQUEST_MENUITEM | 1521 | if(action == ACTION_REQUEST_MENUITEM |
1519 | && !resume && (i==0 || i==5)) | 1522 | && !resume && (i==0 || i==5)) |
diff --git a/apps/plugins/snake.c b/apps/plugins/snake.c index c885f4ccae..f60ddfe3de 100644 --- a/apps/plugins/snake.c +++ b/apps/plugins/snake.c | |||
@@ -496,8 +496,11 @@ static void snake_game_init(void) { | |||
496 | board[11][7]=1; | 496 | board[11][7]=1; |
497 | } | 497 | } |
498 | 498 | ||
499 | static int snake_menu_cb(int action, const struct menu_item_ex *this_item) | 499 | static int snake_menu_cb(int action, |
500 | const struct menu_item_ex *this_item, | ||
501 | struct gui_synclist *this_list) | ||
500 | { | 502 | { |
503 | (void)this_list; | ||
501 | if(action == ACTION_REQUEST_MENUITEM | 504 | if(action == ACTION_REQUEST_MENUITEM |
502 | && !ingame && ((intptr_t)this_item)==0) | 505 | && !ingame && ((intptr_t)this_item)==0) |
503 | return ACTION_EXIT_MENUITEM; | 506 | return ACTION_EXIT_MENUITEM; |
diff --git a/apps/plugins/solitaire.c b/apps/plugins/solitaire.c index c743634279..b830edf857 100644 --- a/apps/plugins/solitaire.c +++ b/apps/plugins/solitaire.c | |||
@@ -1060,8 +1060,11 @@ void solitaire_init(void); | |||
1060 | enum { MENU_RESUME, MENU_SAVE_AND_QUIT, MENU_QUIT, MENU_USB }; | 1060 | enum { MENU_RESUME, MENU_SAVE_AND_QUIT, MENU_QUIT, MENU_USB }; |
1061 | 1061 | ||
1062 | static bool _ingame; | 1062 | static bool _ingame; |
1063 | static int solitaire_menu_cb(int action, const struct menu_item_ex *this_item) | 1063 | static int solitaire_menu_cb(int action, |
1064 | const struct menu_item_ex *this_item, | ||
1065 | struct gui_synclist *this_list) | ||
1064 | { | 1066 | { |
1067 | (void)this_list; | ||
1065 | int i = (intptr_t)this_item; | 1068 | int i = (intptr_t)this_item; |
1066 | if( action == ACTION_REQUEST_MENUITEM ) | 1069 | if( action == ACTION_REQUEST_MENUITEM ) |
1067 | { | 1070 | { |
diff --git a/apps/plugins/spacerocks.c b/apps/plugins/spacerocks.c index 91bf7757de..ede67291b0 100644 --- a/apps/plugins/spacerocks.c +++ b/apps/plugins/spacerocks.c | |||
@@ -1929,8 +1929,11 @@ static bool spacerocks_help(void) | |||
1929 | 1929 | ||
1930 | #define PLUGIN_OTHER 10 | 1930 | #define PLUGIN_OTHER 10 |
1931 | static bool ingame; | 1931 | static bool ingame; |
1932 | static int spacerocks_menu_cb(int action, const struct menu_item_ex *this_item) | 1932 | static int spacerocks_menu_cb(int action, |
1933 | const struct menu_item_ex *this_item, | ||
1934 | struct gui_synclist *this_list) | ||
1933 | { | 1935 | { |
1936 | (void)this_list; | ||
1934 | if (action == ACTION_REQUEST_MENUITEM | 1937 | if (action == ACTION_REQUEST_MENUITEM |
1935 | && !ingame && ((intptr_t)this_item)==0) | 1938 | && !ingame && ((intptr_t)this_item)==0) |
1936 | return ACTION_EXIT_MENUITEM; | 1939 | return ACTION_EXIT_MENUITEM; |
diff --git a/apps/plugins/xobox.c b/apps/plugins/xobox.c index f86992f240..b923e23986 100644 --- a/apps/plugins/xobox.c +++ b/apps/plugins/xobox.c | |||
@@ -1154,8 +1154,11 @@ static bool save_game(void) | |||
1154 | } | 1154 | } |
1155 | 1155 | ||
1156 | /* the main menu */ | 1156 | /* the main menu */ |
1157 | static int xobox_menu_cb(int action, const struct menu_item_ex *this_item) | 1157 | static int xobox_menu_cb(int action, |
1158 | const struct menu_item_ex *this_item, | ||
1159 | struct gui_synclist *this_list) | ||
1158 | { | 1160 | { |
1161 | (void)this_list; | ||
1159 | intptr_t item = (intptr_t)this_item; | 1162 | intptr_t item = (intptr_t)this_item; |
1160 | if(action == ACTION_REQUEST_MENUITEM | 1163 | if(action == ACTION_REQUEST_MENUITEM |
1161 | && !_ingame && (item == 0 || item == 6)) | 1164 | && !_ingame && (item == 0 || item == 6)) |
diff --git a/apps/plugins/xworld/sys.c b/apps/plugins/xworld/sys.c index 22fc92f7e2..1416a40577 100644 --- a/apps/plugins/xworld/sys.c +++ b/apps/plugins/xworld/sys.c | |||
@@ -311,8 +311,11 @@ static void sys_reset_settings(struct System* sys) | |||
311 | 311 | ||
312 | static struct System* mainmenu_sysptr; | 312 | static struct System* mainmenu_sysptr; |
313 | 313 | ||
314 | static int mainmenu_cb(int action, const struct menu_item_ex *this_item) | 314 | static int mainmenu_cb(int action, |
315 | const struct menu_item_ex *this_item, | ||
316 | struct gui_synclist *this_list) | ||
315 | { | 317 | { |
318 | (void)this_list; | ||
316 | int idx = ((intptr_t)this_item); | 319 | int idx = ((intptr_t)this_item); |
317 | if(action == ACTION_REQUEST_MENUITEM && !mainmenu_sysptr->loaded && (idx == 0 || idx == 8 || idx == 10)) | 320 | if(action == ACTION_REQUEST_MENUITEM && !mainmenu_sysptr->loaded && (idx == 0 || idx == 8 || idx == 10)) |
318 | return ACTION_EXIT_MENUITEM; | 321 | return ACTION_EXIT_MENUITEM; |
diff --git a/apps/radio/presets.c b/apps/radio/presets.c index 368cb71e14..98a33d14ad 100644 --- a/apps/radio/presets.c +++ b/apps/radio/presets.c | |||
@@ -433,12 +433,14 @@ MENUITEM_FUNCTION(radio_delete_preset_item, MENU_FUNC_CHECK_RETVAL, | |||
433 | ID2P(LANG_FM_DELETE_PRESET), | 433 | ID2P(LANG_FM_DELETE_PRESET), |
434 | radio_delete_preset, NULL, NULL, Icon_NOICON); | 434 | radio_delete_preset, NULL, NULL, Icon_NOICON); |
435 | static int radio_preset_callback(int action, | 435 | static int radio_preset_callback(int action, |
436 | const struct menu_item_ex *this_item) | 436 | const struct menu_item_ex *this_item, |
437 | struct gui_synclist *this_list) | ||
437 | { | 438 | { |
438 | if (action == ACTION_STD_OK) | 439 | if (action == ACTION_STD_OK) |
439 | action = ACTION_EXIT_AFTER_THIS_MENUITEM; | 440 | action = ACTION_EXIT_AFTER_THIS_MENUITEM; |
440 | return action; | 441 | return action; |
441 | (void)this_item; | 442 | (void)this_item; |
443 | (void)this_list; | ||
442 | } | 444 | } |
443 | MAKE_MENU(handle_radio_preset_menu, ID2P(LANG_PRESET), | 445 | MAKE_MENU(handle_radio_preset_menu, ID2P(LANG_PRESET), |
444 | radio_preset_callback, Icon_NOICON, &radio_edit_preset_item, | 446 | radio_preset_callback, Icon_NOICON, &radio_edit_preset_item, |
diff --git a/apps/root_menu.c b/apps/root_menu.c index 584328bd4b..49379bbbfc 100644 --- a/apps/root_menu.c +++ b/apps/root_menu.c | |||
@@ -437,7 +437,9 @@ static const struct root_items items[] = { | |||
437 | }; | 437 | }; |
438 | static const int nb_items = sizeof(items)/sizeof(*items); | 438 | static const int nb_items = sizeof(items)/sizeof(*items); |
439 | 439 | ||
440 | static int item_callback(int action, const struct menu_item_ex *this_item) ; | 440 | static int item_callback(int action, |
441 | const struct menu_item_ex *this_item, | ||
442 | struct gui_synclist *this_list); | ||
441 | 443 | ||
442 | MENUITEM_RETURNVALUE(shortcut_menu, ID2P(LANG_SHORTCUTS), GO_TO_SHORTCUTMENU, | 444 | MENUITEM_RETURNVALUE(shortcut_menu, ID2P(LANG_SHORTCUTS), GO_TO_SHORTCUTMENU, |
443 | NULL, Icon_Bookmark); | 445 | NULL, Icon_Bookmark); |
@@ -621,8 +623,11 @@ bool root_menu_is_changed(void* setting, void* defaultval) | |||
621 | return *(bool*)setting; | 623 | return *(bool*)setting; |
622 | } | 624 | } |
623 | 625 | ||
624 | static int item_callback(int action, const struct menu_item_ex *this_item) | 626 | static int item_callback(int action, |
627 | const struct menu_item_ex *this_item, | ||
628 | struct gui_synclist *this_list) | ||
625 | { | 629 | { |
630 | (void)this_list; | ||
626 | switch (action) | 631 | switch (action) |
627 | { | 632 | { |
628 | case ACTION_TREE_STOP: | 633 | case ACTION_TREE_STOP: |