1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2002 Björn Stenberg
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
19 #include <timefuncs.h>
29 #include "main_menu.h"
30 #include "debug_menu.h"
34 #include "settings_menu.h"
36 #include "powermgmt.h"
37 #include "sound_menu.h"
43 #include "playlist_menu.h"
52 #include "filetypes.h"
56 #include "recording.h"
61 static bool rec_menu_recording_screen(void)
63 return recording_screen(false);
66 static bool recording_settings(void)
69 #ifdef HAVE_FMRADIO_IN
70 int rec_source
= global_settings
.rec_source
;
73 ret
= recording_menu(false);
75 #ifdef HAVE_FMRADIO_IN
76 if (rec_source
!= global_settings
.rec_source
)
78 if (rec_source
== AUDIO_SRC_FMRADIO
)
80 /* If AUDIO_SRC_FMRADIO was selected from something else,
81 the recording screen will start the radio */
94 static const struct menu_item items
[] = {
95 { ID2P(LANG_RECORDING_MENU
), rec_menu_recording_screen
},
96 { ID2P(LANG_RECORDING_SETTINGS
), recording_settings
},
99 m
=menu_init( items
, sizeof(items
) / sizeof(*items
), NULL
,
101 result
= menu_run(m
);
110 #ifdef HAVE_LCD_CHARCELLS
111 static bool do_shutdown(void)
122 static bool inside_menu
= false;
126 struct menu_item items
[11];
128 if(inside_menu
) return false;
131 items
[i
].desc
= ID2P(LANG_SOUND_SETTINGS
);
132 items
[i
++].function
= sound_menu
;
134 items
[i
].desc
= ID2P(LANG_GENERAL_SETTINGS
);
135 items
[i
++].function
= settings_menu
;
137 items
[i
].desc
= ID2P(LANG_MANAGE_MENU
);
138 items
[i
++].function
= manage_settings_menu
;
140 items
[i
].desc
= ID2P(LANG_CUSTOM_THEME
);
141 items
[i
++].function
= custom_theme_browse
;
144 if(radio_hardware_present()) {
145 items
[i
].desc
= ID2P(LANG_FM_RADIO
);
146 items
[i
++].function
= radio_screen
;
150 #ifdef HAVE_RECORDING
151 items
[i
].desc
= ID2P(LANG_RECORDING
);
152 items
[i
++].function
= rec_menu
;
155 items
[i
].desc
= ID2P(LANG_PLAYLIST_MENU
);
156 items
[i
++].function
= playlist_menu
;
158 items
[i
].desc
= ID2P(LANG_PLUGINS
);
159 items
[i
++].function
= plugin_browse
;
161 items
[i
].desc
= ID2P(LANG_INFO
);
162 items
[i
++].function
= info_menu
;
164 #ifdef HAVE_LCD_CHARCELLS
165 items
[i
].desc
= ID2P(LANG_SHUTDOWN
);
166 items
[i
++].function
= do_shutdown
;
169 m
=menu_init( items
, i
, NULL
, NULL
, NULL
, NULL
);
170 #ifdef HAVE_LCD_CHARCELLS
171 status_set_param(true);
173 result
= menu_run(m
);
174 #ifdef HAVE_LCD_CHARCELLS
175 status_set_param(false);
184 /* -----------------------------------------------------------------
185 * vim: et sw=4 ts=8 sts=4 tw=78