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_viewer.c | |
parent | 15d04fdb00e7f94aef49cf9a70e73c5a46e21536 (diff) | |
download | rockbox-b1403ee024f81ced657261441571ee5e8bab71ce.tar.gz rockbox-b1403ee024f81ced657261441571ee5e8bab71ce.zip |
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_viewer.c')
-rw-r--r-- | apps/playlist_viewer.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/apps/playlist_viewer.c b/apps/playlist_viewer.c index c30daf48ba..4b9a3e3752 100644 --- a/apps/playlist_viewer.c +++ b/apps/playlist_viewer.c | |||
@@ -681,16 +681,13 @@ static int onplay_menu(int index) | |||
681 | int m, i=0, result, ret = 0; | 681 | int m, i=0, result, ret = 0; |
682 | bool current = (tracks[index].index == viewer.current_playing_track); | 682 | bool current = (tracks[index].index == viewer.current_playing_track); |
683 | 683 | ||
684 | items[i].desc = str(LANG_REMOVE); | 684 | items[i].desc = ID2P(LANG_REMOVE); |
685 | items[i].voice_id = LANG_REMOVE; | ||
686 | i++; | 685 | i++; |
687 | 686 | ||
688 | items[i].desc = str(LANG_MOVE); | 687 | items[i].desc = ID2P(LANG_MOVE); |
689 | items[i].voice_id = LANG_MOVE; | ||
690 | i++; | 688 | i++; |
691 | 689 | ||
692 | items[i].desc = str(LANG_FILE_OPTIONS); | 690 | items[i].desc = ID2P(LANG_FILE_OPTIONS); |
693 | items[i].voice_id = LANG_FILE_OPTIONS; | ||
694 | i++; | 691 | i++; |
695 | 692 | ||
696 | m = menu_init(items, i, NULL, NULL, NULL, NULL); | 693 | m = menu_init(items, i, NULL, NULL, NULL, NULL); |
@@ -757,11 +754,11 @@ static bool viewer_menu(void) | |||
757 | int m; | 754 | int m; |
758 | bool result; | 755 | bool result; |
759 | 756 | ||
760 | struct menu_item items[] = { | 757 | static const struct menu_item items[] = { |
761 | { STR(LANG_SHOW_ICONS), show_icons }, | 758 | { ID2P(LANG_SHOW_ICONS), show_icons }, |
762 | { STR(LANG_SHOW_INDICES), show_indices }, | 759 | { ID2P(LANG_SHOW_INDICES), show_indices }, |
763 | { STR(LANG_TRACK_DISPLAY), track_display }, | 760 | { ID2P(LANG_TRACK_DISPLAY), track_display }, |
764 | { STR(LANG_SAVE_DYNAMIC_PLAYLIST), save_playlist }, | 761 | { ID2P(LANG_SAVE_DYNAMIC_PLAYLIST), save_playlist }, |
765 | }; | 762 | }; |
766 | 763 | ||
767 | m=menu_init( items, sizeof(items) / sizeof(*items), NULL, | 764 | m=menu_init( items, sizeof(items) / sizeof(*items), NULL, |
@@ -791,7 +788,7 @@ static bool show_indices(void) | |||
791 | /* How to display a track */ | 788 | /* How to display a track */ |
792 | static bool track_display(void) | 789 | static bool track_display(void) |
793 | { | 790 | { |
794 | struct opt_items names[] = { | 791 | static const struct opt_items names[] = { |
795 | { STR(LANG_DISPLAY_TRACK_NAME_ONLY) }, | 792 | { STR(LANG_DISPLAY_TRACK_NAME_ONLY) }, |
796 | { STR(LANG_DISPLAY_FULL_PATH) } | 793 | { STR(LANG_DISPLAY_FULL_PATH) } |
797 | }; | 794 | }; |