summaryrefslogtreecommitdiff
path: root/apps/menus/settings_menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/menus/settings_menu.c')
-rw-r--r--apps/menus/settings_menu.c57
1 files changed, 45 insertions, 12 deletions
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
61static int selectivesoftlock_callback(int action, 61static 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 */
179static int fileview_callback(int action,const struct menu_item_ex *this_item); 181static int fileview_callback(int action,
182 const struct menu_item_ex *this_item,
183 struct gui_synclist *this_list);
184
180MENUITEM_SETTING(sort_case, &global_settings.sort_case, NULL); 185MENUITEM_SETTING(sort_case, &global_settings.sort_case, NULL);
181MENUITEM_SETTING(sort_dir, &global_settings.sort_dir, fileview_callback); 186MENUITEM_SETTING(sort_dir, &global_settings.sort_dir, fileview_callback);
182MENUITEM_SETTING(sort_file, &global_settings.sort_file, fileview_callback); 187MENUITEM_SETTING(sort_file, &global_settings.sort_file, fileview_callback);
@@ -196,8 +201,11 @@ static int clear_start_directory(void)
196} 201}
197MENUITEM_FUNCTION(clear_start_directory_item, 0, ID2P(LANG_RESET_START_DIR), 202MENUITEM_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);
199static int fileview_callback(int action,const struct menu_item_ex *this_item) 204static 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);
236MENUITEM_SETTING(battery_type, &global_settings.battery_type, NULL); 244MENUITEM_SETTING(battery_type, &global_settings.battery_type, NULL);
237#endif 245#endif
238#ifdef HAVE_USB_CHARGING_ENABLE 246#ifdef HAVE_USB_CHARGING_ENABLE
239static int usbcharging_callback(int action,const struct menu_item_ex *this_item) 247static 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,
265MENUITEM_SETTING(disk_spindown, &global_settings.disk_spindown, NULL); 276MENUITEM_SETTING(disk_spindown, &global_settings.disk_spindown, NULL);
266#endif 277#endif
267#ifdef HAVE_DIRCACHE 278#ifdef HAVE_DIRCACHE
268static int dircache_callback(int action,const struct menu_item_ex *this_item) 279static 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
330void dac_line_in(bool enable); 344void dac_line_in(bool enable);
331static int linein_callback(int action,const struct menu_item_ex *this_item) 345static 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 */
547static int sleeptimer_duration_cb(int action, 564static 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 */
593static int bmark_callback(int action,const struct menu_item_ex *this_item) 612static 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
626static int autoresume_callback(int action, const struct menu_item_ex *this_item) 648static 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
644static int autoresume_nexttrack_callback(int action, 669static 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 */
681static int talk_callback(int action,const struct menu_item_ex *this_item); 708static int talk_callback(int action,
709 const struct menu_item_ex *this_item,
710 struct gui_synclist *this_list);
711
682MENUITEM_SETTING(talk_menu_item, &global_settings.talk_menu, NULL); 712MENUITEM_SETTING(talk_menu_item, &global_settings.talk_menu, NULL);
683MENUITEM_SETTING(talk_dir_item, &global_settings.talk_dir, NULL); 713MENUITEM_SETTING(talk_dir_item, &global_settings.talk_dir, NULL);
684MENUITEM_SETTING(talk_dir_clip_item, &global_settings.talk_dir_clip, talk_callback); 714MENUITEM_SETTING(talk_dir_clip_item, &global_settings.talk_dir_clip, talk_callback);
685MENUITEM_SETTING(talk_file_item, &global_settings.talk_file, NULL); 715MENUITEM_SETTING(talk_file_item, &global_settings.talk_file, NULL);
686MENUITEM_SETTING(talk_file_clip_item, &global_settings.talk_file_clip, talk_callback); 716MENUITEM_SETTING(talk_file_clip_item, &global_settings.talk_file_clip, talk_callback);
687static int talk_callback(int action,const struct menu_item_ex *this_item) 717static 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 {