From 9a3d117c782e556db5d1c731ef0f2137055a19b6 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Sat, 27 Aug 2005 11:03:41 +0000 Subject: Const policed the radio menu. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7408 a1c6a512-1295-4272-9138-f99709370657 --- apps/recorder/radio.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'apps') diff --git a/apps/recorder/radio.c b/apps/recorder/radio.c index fa083f20f9..4e6c52ea84 100644 --- a/apps/recorder/radio.c +++ b/apps/recorder/radio.c @@ -952,26 +952,25 @@ int radio_menu_cb(int key, int m) /* main menu of the radio screen */ bool radio_menu(void) { - struct menu_item items[5]; int m; bool result; - - m = menu_init(items, 0, radio_menu_cb, NULL, NULL, NULL); - + + static const struct menu_item items[] = { #if CONFIG_KEYPAD == ONDIO_PAD /* Ondio has no key for presets, put it in menu */ - /* fixme: make real string table entries */ - menu_insert(m, -1, ID2P(LANG_FM_BUTTONBAR_PRESETS), handle_radio_presets); - menu_insert(m, -1, ID2P(LANG_FM_BUTTONBAR_ADD), radio_add_preset); -#endif - create_monomode_menu(); - menu_insert(m, -1, monomode_menu_string, toggle_mono_mode); - menu_insert(m, -1, ID2P(LANG_SOUND_SETTINGS), sound_menu); -#ifndef SIMULATOR -#if CONFIG_HWCODEC != MASNONE - menu_insert(m, -1, ID2P(LANG_RECORDING_SETTINGS), fm_recording_settings); + { ID2P(LANG_FM_BUTTONBAR_PRESETS), handle_radio_presets }, + { ID2P(LANG_FM_BUTTONBAR_ADD) , radio_add_preset }, #endif + { monomode_menu_string , toggle_mono_mode }, + { ID2P(LANG_SOUND_SETTINGS) , sound_menu }, +#if !defined(SIMULATOR) && (CONFIG_HWCODEC != MASNONE) + { ID2P(LANG_RECORDING_SETTINGS) , fm_recording_settings}, #endif + }; + + create_monomode_menu(); + m = menu_init(items, sizeof(items) / sizeof(*items), + radio_menu_cb, NULL, NULL, NULL); result = menu_run(m); menu_exit(m); return result; -- cgit v1.2.3