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>
27 #include "main_menu.h"
28 #include "debug_menu.h"
32 #include "settings_menu.h"
34 #include "powermgmt.h"
35 #include "sound_menu.h"
41 #include "playlist_menu.h"
50 #include "filetypes.h"
54 #include "recording.h"
59 static bool rec_menu_recording_screen(void)
61 return recording_screen(false);
64 static bool recording_settings(void)
67 #ifdef HAVE_FMRADIO_IN
68 int rec_source
= global_settings
.rec_source
;
71 ret
= recording_menu(false);
73 #ifdef HAVE_FMRADIO_IN
74 if (rec_source
!= global_settings
.rec_source
)
76 if (rec_source
== AUDIO_SRC_FMRADIO
)
78 /* If AUDIO_SRC_FMRADIO was selected from something else,
79 the recording screen will start the radio */
92 static const struct menu_item items
[] = {
93 { ID2P(LANG_RECORDING_MENU
), rec_menu_recording_screen
},
94 { ID2P(LANG_RECORDING_SETTINGS
), recording_settings
},
97 m
=menu_init( items
, sizeof(items
) / sizeof(*items
), NULL
,
108 #ifdef HAVE_LCD_CHARCELLS
109 static bool do_shutdown(void)
120 static bool inside_menu
= false;
124 struct menu_item items
[11];
126 if(inside_menu
) return false;
129 items
[i
].desc
= ID2P(LANG_SOUND_SETTINGS
);
130 items
[i
++].function
= sound_menu
;
132 items
[i
].desc
= ID2P(LANG_GENERAL_SETTINGS
);
133 items
[i
++].function
= settings_menu
;
135 items
[i
].desc
= ID2P(LANG_MANAGE_MENU
);
136 items
[i
++].function
= manage_settings_menu
;
138 items
[i
].desc
= ID2P(LANG_CUSTOM_THEME
);
139 items
[i
++].function
= custom_theme_browse
;
142 if(radio_hardware_present()) {
143 items
[i
].desc
= ID2P(LANG_FM_RADIO
);
144 items
[i
++].function
= radio_screen
;
148 #ifdef HAVE_RECORDING
149 items
[i
].desc
= ID2P(LANG_RECORDING
);
150 items
[i
++].function
= rec_menu
;
153 items
[i
].desc
= ID2P(LANG_PLAYLIST_MENU
);
154 items
[i
++].function
= playlist_menu
;
156 items
[i
].desc
= ID2P(LANG_PLUGINS
);
157 items
[i
++].function
= plugin_browse
;
159 items
[i
].desc
= ID2P(LANG_INFO
);
160 items
[i
++].function
= info_menu
;
162 #ifdef HAVE_LCD_CHARCELLS
163 items
[i
].desc
= ID2P(LANG_SHUTDOWN
);
164 items
[i
++].function
= do_shutdown
;
167 m
=menu_init( items
, i
, NULL
, NULL
, NULL
, NULL
);
168 #ifdef HAVE_LCD_CHARCELLS
169 status_set_param(true);
171 result
= menu_run(m
);
172 #ifdef HAVE_LCD_CHARCELLS
173 status_set_param(false);
182 /* -----------------------------------------------------------------
183 * vim: et sw=4 ts=8 sts=4 tw=78