diff options
| author | Jörg Hohensohn <hohensoh@rockbox.org> | 2004-07-23 23:01:20 +0000 |
|---|---|---|
| committer | Jörg Hohensohn <hohensoh@rockbox.org> | 2004-07-23 23:01:20 +0000 |
| commit | b1403ee024f81ced657261441571ee5e8bab71ce (patch) | |
| tree | 3a7e1651d37bd35e801a331416654760cb61a075 /apps/playlist_menu.c | |
| parent | 15d04fdb00e7f94aef49cf9a70e73c5a46e21536 (diff) | |
| download | rockbox-b1403ee024f81ced657261441571ee5e8bab71ce.zip rockbox-b1403ee024f81ced657261441571ee5e8bab71ce.tar.gz rockbox-b1403ee024f81ced657261441571ee5e8bab71ce.tar.bz2 rockbox-b1403ee024f81ced657261441571ee5e8bab71ce.tar.xz | |
New way of defining menus and options allows to declare them static const, which saves the code to runtime-assemble them. Rockbox just got 6 KB smaller.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4931 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/playlist_menu.c')
| -rw-r--r-- | apps/playlist_menu.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/playlist_menu.c b/apps/playlist_menu.c index d1c69bf..3497b1d 100644 --- a/apps/playlist_menu.c +++ b/apps/playlist_menu.c @@ -50,7 +50,7 @@ static bool save_playlist(void) static bool recurse_directory(void) { - struct opt_items names[] = { + static const struct opt_items names[] = { { STR(LANG_OFF) }, { STR(LANG_ON) }, { STR(LANG_RESUME_SETTING_ASK)}, @@ -66,11 +66,11 @@ bool playlist_menu(void) int m; bool result; - struct menu_item items[] = { - { STR(LANG_CREATE_PLAYLIST), create_playlist }, - { STR(LANG_VIEW_DYNAMIC_PLAYLIST), playlist_viewer }, - { STR(LANG_SAVE_DYNAMIC_PLAYLIST), save_playlist }, - { STR(LANG_RECURSE_DIRECTORY), recurse_directory }, + static const struct menu_item items[] = { + { ID2P(LANG_CREATE_PLAYLIST), create_playlist }, + { ID2P(LANG_VIEW_DYNAMIC_PLAYLIST), playlist_viewer }, + { ID2P(LANG_SAVE_DYNAMIC_PLAYLIST), save_playlist }, + { ID2P(LANG_RECURSE_DIRECTORY), recurse_directory }, }; m = menu_init( items, sizeof items / sizeof(struct menu_item), NULL, |