diff options
Diffstat (limited to 'apps/onplay.c')
-rw-r--r-- | apps/onplay.c | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/apps/onplay.c b/apps/onplay.c index 9dab34c283..04bb6b9a3a 100644 --- a/apps/onplay.c +++ b/apps/onplay.c | |||
@@ -140,54 +140,54 @@ static bool view_playlist(void) | |||
140 | /* Sub-menu for playlist options */ | 140 | /* Sub-menu for playlist options */ |
141 | static bool playlist_options(void) | 141 | static bool playlist_options(void) |
142 | { | 142 | { |
143 | struct menu_items menu[7]; | 143 | struct menu_item items[7]; |
144 | struct playlist_args args[7]; /* increase these 2 if you add entries! */ | 144 | struct playlist_args args[7]; /* increase these 2 if you add entries! */ |
145 | int m, i=0, pstart=0, result; | 145 | int m, i=0, pstart=0, result; |
146 | bool ret = false; | 146 | bool ret = false; |
147 | 147 | ||
148 | if ((selected_file_attr & TREE_ATTR_MASK) == TREE_ATTR_M3U) | 148 | if ((selected_file_attr & TREE_ATTR_MASK) == TREE_ATTR_M3U) |
149 | { | 149 | { |
150 | menu[i].desc = str(LANG_VIEW); | 150 | items[i].desc = str(LANG_VIEW); |
151 | menu[i].voice_id = LANG_VIEW; | 151 | items[i].voice_id = LANG_VIEW; |
152 | menu[i].function = view_playlist; | 152 | items[i].function = view_playlist; |
153 | i++; | 153 | i++; |
154 | pstart++; | 154 | pstart++; |
155 | } | 155 | } |
156 | 156 | ||
157 | if (mpeg_status() & MPEG_STATUS_PLAY) | 157 | if (mpeg_status() & MPEG_STATUS_PLAY) |
158 | { | 158 | { |
159 | menu[i].desc = str(LANG_INSERT); | 159 | items[i].desc = str(LANG_INSERT); |
160 | menu[i].voice_id = LANG_INSERT; | 160 | items[i].voice_id = LANG_INSERT; |
161 | args[i].position = PLAYLIST_INSERT; | 161 | args[i].position = PLAYLIST_INSERT; |
162 | args[i].queue = false; | 162 | args[i].queue = false; |
163 | i++; | 163 | i++; |
164 | 164 | ||
165 | menu[i].desc = str(LANG_INSERT_FIRST); | 165 | items[i].desc = str(LANG_INSERT_FIRST); |
166 | menu[i].voice_id = LANG_INSERT_FIRST; | 166 | items[i].voice_id = LANG_INSERT_FIRST; |
167 | args[i].position = PLAYLIST_INSERT_FIRST; | 167 | args[i].position = PLAYLIST_INSERT_FIRST; |
168 | args[i].queue = false; | 168 | args[i].queue = false; |
169 | i++; | 169 | i++; |
170 | 170 | ||
171 | menu[i].desc = str(LANG_INSERT_LAST); | 171 | items[i].desc = str(LANG_INSERT_LAST); |
172 | menu[i].voice_id = LANG_INSERT_LAST; | 172 | items[i].voice_id = LANG_INSERT_LAST; |
173 | args[i].position = PLAYLIST_INSERT_LAST; | 173 | args[i].position = PLAYLIST_INSERT_LAST; |
174 | args[i].queue = false; | 174 | args[i].queue = false; |
175 | i++; | 175 | i++; |
176 | 176 | ||
177 | menu[i].desc = str(LANG_QUEUE); | 177 | items[i].desc = str(LANG_QUEUE); |
178 | menu[i].voice_id = LANG_QUEUE; | 178 | items[i].voice_id = LANG_QUEUE; |
179 | args[i].position = PLAYLIST_INSERT; | 179 | args[i].position = PLAYLIST_INSERT; |
180 | args[i].queue = true; | 180 | args[i].queue = true; |
181 | i++; | 181 | i++; |
182 | 182 | ||
183 | menu[i].desc = str(LANG_QUEUE_FIRST); | 183 | items[i].desc = str(LANG_QUEUE_FIRST); |
184 | menu[i].voice_id = LANG_QUEUE_FIRST; | 184 | items[i].voice_id = LANG_QUEUE_FIRST; |
185 | args[i].position = PLAYLIST_INSERT_FIRST; | 185 | args[i].position = PLAYLIST_INSERT_FIRST; |
186 | args[i].queue = true; | 186 | args[i].queue = true; |
187 | i++; | 187 | i++; |
188 | 188 | ||
189 | menu[i].desc = str(LANG_QUEUE_LAST); | 189 | items[i].desc = str(LANG_QUEUE_LAST); |
190 | menu[i].voice_id = LANG_QUEUE_LAST; | 190 | items[i].voice_id = LANG_QUEUE_LAST; |
191 | args[i].position = PLAYLIST_INSERT_LAST; | 191 | args[i].position = PLAYLIST_INSERT_LAST; |
192 | args[i].queue = true; | 192 | args[i].queue = true; |
193 | i++; | 193 | i++; |
@@ -195,17 +195,17 @@ static bool playlist_options(void) | |||
195 | else if (((selected_file_attr & TREE_ATTR_MASK) == TREE_ATTR_MPA) || | 195 | else if (((selected_file_attr & TREE_ATTR_MASK) == TREE_ATTR_MPA) || |
196 | (selected_file_attr & ATTR_DIRECTORY)) | 196 | (selected_file_attr & ATTR_DIRECTORY)) |
197 | { | 197 | { |
198 | menu[i].desc = str(LANG_INSERT); | 198 | items[i].desc = str(LANG_INSERT); |
199 | menu[i].voice_id = LANG_INSERT; | 199 | items[i].voice_id = LANG_INSERT; |
200 | args[i].position = PLAYLIST_INSERT; | 200 | args[i].position = PLAYLIST_INSERT; |
201 | args[i].queue = false; | 201 | args[i].queue = false; |
202 | i++; | 202 | i++; |
203 | } | 203 | } |
204 | 204 | ||
205 | m = menu_init( menu, i, NULL ); | 205 | m = menu_init( items, i, NULL, NULL, NULL, NULL ); |
206 | result = menu_show(m); | 206 | result = menu_show(m); |
207 | if (result >= 0 && result < pstart) | 207 | if (result >= 0 && result < pstart) |
208 | ret = menu[result].function(); | 208 | ret = items[result].function(); |
209 | else if (result >= pstart) | 209 | else if (result >= pstart) |
210 | ret = add_to_playlist(args[result].position, args[result].queue); | 210 | ret = add_to_playlist(args[result].position, args[result].queue); |
211 | menu_exit(m); | 211 | menu_exit(m); |
@@ -550,7 +550,7 @@ bool create_dir(void) | |||
550 | 550 | ||
551 | int onplay(char* file, int attr) | 551 | int onplay(char* file, int attr) |
552 | { | 552 | { |
553 | struct menu_items menu[5]; /* increase this if you add entries! */ | 553 | struct menu_item items[5]; /* increase this if you add entries! */ |
554 | int m, i=0, result; | 554 | int m, i=0, result; |
555 | 555 | ||
556 | onplay_result = ONPLAY_OK; | 556 | onplay_result = ONPLAY_OK; |
@@ -564,44 +564,44 @@ int onplay(char* file, int attr) | |||
564 | (attr & ATTR_DIRECTORY) || | 564 | (attr & ATTR_DIRECTORY) || |
565 | ((attr & TREE_ATTR_MASK) == TREE_ATTR_M3U)) | 565 | ((attr & TREE_ATTR_MASK) == TREE_ATTR_M3U)) |
566 | { | 566 | { |
567 | menu[i].desc = str(LANG_PLAYINDICES_PLAYLIST); | 567 | items[i].desc = str(LANG_PLAYINDICES_PLAYLIST); |
568 | menu[i].voice_id = LANG_PLAYINDICES_PLAYLIST; | 568 | items[i].voice_id = LANG_PLAYINDICES_PLAYLIST; |
569 | menu[i].function = playlist_options; | 569 | items[i].function = playlist_options; |
570 | i++; | 570 | i++; |
571 | } | 571 | } |
572 | 572 | ||
573 | menu[i].desc = str(LANG_RENAME); | 573 | items[i].desc = str(LANG_RENAME); |
574 | menu[i].voice_id = LANG_RENAME; | 574 | items[i].voice_id = LANG_RENAME; |
575 | menu[i].function = rename_file; | 575 | items[i].function = rename_file; |
576 | i++; | 576 | i++; |
577 | 577 | ||
578 | if (!(attr & ATTR_DIRECTORY)) | 578 | if (!(attr & ATTR_DIRECTORY)) |
579 | { | 579 | { |
580 | menu[i].desc = str(LANG_DELETE); | 580 | items[i].desc = str(LANG_DELETE); |
581 | menu[i].voice_id = LANG_DELETE; | 581 | items[i].voice_id = LANG_DELETE; |
582 | menu[i].function = delete_file; | 582 | items[i].function = delete_file; |
583 | i++; | 583 | i++; |
584 | } | 584 | } |
585 | 585 | ||
586 | if ((attr & TREE_ATTR_MASK) == TREE_ATTR_MPA) | 586 | if ((attr & TREE_ATTR_MASK) == TREE_ATTR_MPA) |
587 | { | 587 | { |
588 | menu[i].desc = str(LANG_VBRFIX); | 588 | items[i].desc = str(LANG_VBRFIX); |
589 | menu[i].voice_id = LANG_VBRFIX; | 589 | items[i].voice_id = LANG_VBRFIX; |
590 | menu[i].function = vbr_fix; | 590 | items[i].function = vbr_fix; |
591 | i++; | 591 | i++; |
592 | } | 592 | } |
593 | } | 593 | } |
594 | 594 | ||
595 | menu[i].desc = str(LANG_CREATE_DIR); | 595 | items[i].desc = str(LANG_CREATE_DIR); |
596 | menu[i].voice_id = LANG_CREATE_DIR; | 596 | items[i].voice_id = LANG_CREATE_DIR; |
597 | menu[i].function = create_dir; | 597 | items[i].function = create_dir; |
598 | i++; | 598 | i++; |
599 | 599 | ||
600 | /* DIY menu handling, since we want to exit after selection */ | 600 | /* DIY menu handling, since we want to exit after selection */ |
601 | m = menu_init( menu, i, NULL ); | 601 | m = menu_init( items, i, NULL, NULL, NULL, NULL ); |
602 | result = menu_show(m); | 602 | result = menu_show(m); |
603 | if (result >= 0) | 603 | if (result >= 0) |
604 | menu[result].function(); | 604 | items[result].function(); |
605 | menu_exit(m); | 605 | menu_exit(m); |
606 | 606 | ||
607 | return onplay_result; | 607 | return onplay_result; |