summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Holmgren <magnushol@gmail.com>2007-05-26 10:44:38 +0000
committerMagnus Holmgren <magnushol@gmail.com>2007-05-26 10:44:38 +0000
commite676b814e88922f361e91181b3d299931b03ff67 (patch)
tree72e4fa0cdbf814c79f13590067036c00d410c439
parent1186c18c3aed23b8c0d2964084b33bf40ab4ae86 (diff)
downloadrockbox-e676b814e88922f361e91181b3d299931b03ff67.tar.gz
rockbox-e676b814e88922f361e91181b3d299931b03ff67.zip
FS#7158 - Bookmark selection as a list.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13495 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/action.h2
-rw-r--r--apps/bookmark.c553
-rw-r--r--apps/keymaps/keymap-av300.c4
-rw-r--r--apps/keymaps/keymap-e200.c4
-rw-r--r--apps/keymaps/keymap-gigabeat.c12
-rw-r--r--apps/keymaps/keymap-h10.c4
-rw-r--r--apps/keymaps/keymap-h1x0_h3x0.c14
-rw-r--r--apps/keymaps/keymap-ifp7xx.c3
-rw-r--r--apps/keymaps/keymap-ipod.c4
-rw-r--r--apps/keymaps/keymap-ondio.c4
-rw-r--r--apps/keymaps/keymap-player.c4
-rw-r--r--apps/keymaps/keymap-recorder.c4
-rw-r--r--apps/keymaps/keymap-x5.c4
-rw-r--r--apps/lang/english.lang215
14 files changed, 449 insertions, 382 deletions
diff --git a/apps/action.h b/apps/action.h
index 85ad48592b..bd66fcf6f9 100644
--- a/apps/action.h
+++ b/apps/action.h
@@ -178,9 +178,7 @@ enum {
178 ACTION_SETTINGS_RESET, 178 ACTION_SETTINGS_RESET,
179 179
180 /* bookmark screen */ 180 /* bookmark screen */
181 ACTION_BMS_SELECT,
182 ACTION_BMS_DELETE, 181 ACTION_BMS_DELETE,
183 ACTION_BMS_EXIT,
184 182
185 /* alarm menu screen */ 183 /* alarm menu screen */
186 184
diff --git a/apps/bookmark.c b/apps/bookmark.c
index a878dedb13..e466ae944d 100644
--- a/apps/bookmark.c
+++ b/apps/bookmark.c
@@ -16,7 +16,6 @@
16 * 16 *
17 ****************************************************************************/ 17 ****************************************************************************/
18 18
19
20#include <stdio.h> 19#include <stdio.h>
21#include <stdlib.h> 20#include <stdlib.h>
22#include <string.h> 21#include <string.h>
@@ -50,6 +49,8 @@
50#include "abrepeat.h" 49#include "abrepeat.h"
51#include "splash.h" 50#include "splash.h"
52#include "yesno.h" 51#include "yesno.h"
52#include "list.h"
53#include "plugin.h"
53 54
54#if (LCD_DEPTH > 1) || (defined(HAVE_LCD_REMOTE) && (LCD_REMOTE_DEPTH > 1)) 55#if (LCD_DEPTH > 1) || (defined(HAVE_LCD_REMOTE) && (LCD_REMOTE_DEPTH > 1))
55#include "backdrop.h" 56#include "backdrop.h"
@@ -59,19 +60,28 @@
59#define MAX_BOOKMARK_SIZE 350 60#define MAX_BOOKMARK_SIZE 350
60#define RECENT_BOOKMARK_FILE ROCKBOX_DIR "/most-recent.bmark" 61#define RECENT_BOOKMARK_FILE ROCKBOX_DIR "/most-recent.bmark"
61 62
63/* Used to buffer bookmarks while displaying the bookmark list. */
64struct bookmark_list
65{
66 const char* filename;
67 size_t buffer_size;
68 int start;
69 int count;
70 int total_count;
71 bool show_dont_resume;
72 bool reload;
73 char* items[];
74};
75
62static bool add_bookmark(const char* bookmark_file_name, const char* bookmark, 76static bool add_bookmark(const char* bookmark_file_name, const char* bookmark,
63 bool most_recent); 77 bool most_recent);
64static bool check_bookmark(const char* bookmark); 78static bool check_bookmark(const char* bookmark);
65static char* create_bookmark(void); 79static char* create_bookmark(void);
66static bool delete_bookmark(const char* bookmark_file_name, int bookmark_id); 80static bool delete_bookmark(const char* bookmark_file_name, int bookmark_id);
67static void display_bookmark(const char* bookmark,
68 int bookmark_id,
69 int bookmark_count);
70static void say_bookmark(const char* bookmark, 81static void say_bookmark(const char* bookmark,
71 int bookmark_id); 82 int bookmark_id);
72static bool play_bookmark(const char* bookmark); 83static bool play_bookmark(const char* bookmark);
73static bool generate_bookmark_file_name(const char *in); 84static bool generate_bookmark_file_name(const char *in);
74static char* get_bookmark(const char* bookmark_file, int bookmark_count);
75static const char* skip_token(const char* s); 85static const char* skip_token(const char* s);
76static const char* int_token(const char* s, int* dest); 86static const char* int_token(const char* s, int* dest);
77static const char* long_token(const char* s, long* dest); 87static const char* long_token(const char* s, long* dest);
@@ -87,15 +97,20 @@ static bool parse_bookmark(const char *bookmark,
87 int * repeat_mode, 97 int * repeat_mode,
88 bool *shuffle, 98 bool *shuffle,
89 char* file_name); 99 char* file_name);
90static char* select_bookmark(const char* bookmark_file_name); 100static int buffer_bookmarks(struct bookmark_list* bookmarks, int first_line);
101static char* get_bookmark_info(int list_index, void* data, char *buffer);
102static char* select_bookmark(const char* bookmark_file_name, bool show_dont_resume);
91static bool system_check(void); 103static bool system_check(void);
92static bool write_bookmark(bool create_bookmark_file); 104static bool write_bookmark(bool create_bookmark_file);
93static int get_bookmark_count(const char* bookmark_file_name); 105static int get_bookmark_count(const char* bookmark_file_name);
94 106
95static char global_temp_buffer[MAX_PATH+1]; 107static char global_temp_buffer[MAX_PATH+1];
108/* File name created by generate_bookmark_file_name */
96static char global_bookmark_file_name[MAX_PATH]; 109static char global_bookmark_file_name[MAX_PATH];
97static char global_read_buffer[MAX_BOOKMARK_SIZE]; 110static char global_read_buffer[MAX_BOOKMARK_SIZE];
111/* Bookmark created by create_bookmark*/
98static char global_bookmark[MAX_BOOKMARK_SIZE]; 112static char global_bookmark[MAX_BOOKMARK_SIZE];
113/* Filename from parsed bookmark (can be made local where needed) */
99static char global_filename[MAX_PATH]; 114static char global_filename[MAX_PATH];
100 115
101/* ----------------------------------------------------------------------- */ 116/* ----------------------------------------------------------------------- */
@@ -121,7 +136,7 @@ bool bookmark_load_menu(void)
121 sizeof(global_temp_buffer)); 136 sizeof(global_temp_buffer));
122 if (generate_bookmark_file_name(name)) 137 if (generate_bookmark_file_name(name))
123 { 138 {
124 char* bookmark = select_bookmark(global_bookmark_file_name); 139 char* bookmark = select_bookmark(global_bookmark_file_name, false);
125 140
126 if (bookmark != NULL) 141 if (bookmark != NULL)
127 { 142 {
@@ -139,7 +154,7 @@ bool bookmark_load_menu(void)
139/* ----------------------------------------------------------------------- */ 154/* ----------------------------------------------------------------------- */
140bool bookmark_mrb_load() 155bool bookmark_mrb_load()
141{ 156{
142 char* bookmark = select_bookmark(RECENT_BOOKMARK_FILE); 157 char* bookmark = select_bookmark(RECENT_BOOKMARK_FILE, false);
143 158
144 if (bookmark != NULL) 159 if (bookmark != NULL)
145 { 160 {
@@ -364,9 +379,7 @@ static bool check_bookmark(const char* bookmark)
364/* ------------------------------------------------------------------------*/ 379/* ------------------------------------------------------------------------*/
365bool bookmark_autoload(const char* file) 380bool bookmark_autoload(const char* file)
366{ 381{
367 int key;
368 int fd; 382 int fd;
369 int i;
370 383
371 if(global_settings.autoloadbookmark == BOOKMARK_NO) 384 if(global_settings.autoloadbookmark == BOOKMARK_NO)
372 return false; 385 return false;
@@ -386,43 +399,11 @@ bool bookmark_autoload(const char* file)
386 } 399 }
387 else 400 else
388 { 401 {
389 /* Prompting user to confirm bookmark load */ 402 char* bookmark = select_bookmark(global_bookmark_file_name, true);
390 FOR_NB_SCREENS(i)
391 screens[i].clear_display();
392 403
393 gui_syncstatusbar_draw(&statusbars, true); 404 if (bookmark)
394
395 FOR_NB_SCREENS(i)
396 {
397#ifdef HAVE_LCD_BITMAP
398 screens[i].setmargins(0, global_settings.statusbar
399 ? STATUSBAR_HEIGHT : 0);
400 screens[i].puts_scroll(0,0, str(LANG_BOOKMARK_AUTOLOAD_QUERY));
401 screens[i].puts(0,1, str(LANG_CONFIRM_WITH_PLAY_RECORDER));
402 screens[i].puts(0,2, str(LANG_BOOKMARK_SELECT_LIST_BOOKMARKS));
403 screens[i].puts(0,3, str(LANG_CANCEL_WITH_ANY_RECORDER));
404#else
405 screens[i].puts_scroll(0,0, str(LANG_BOOKMARK_AUTOLOAD_QUERY));
406 screens[i].puts(0,1,str(LANG_RESUME_CONFIRM_PLAYER));
407#endif
408 screens[i].update();
409 }
410
411 /* Wait for a key to be pushed */
412 key = get_action(CONTEXT_BOOKMARKSCREEN,TIMEOUT_BLOCK);
413 switch(key)
414 { 405 {
415#ifdef HAVE_LCD_BITMAP 406 return bookmark_load(global_bookmark_file_name, true);
416 case ACTION_STD_NEXT:
417 action_signalscreenchange();
418 return bookmark_load(global_bookmark_file_name, false);
419#endif
420 case ACTION_BMS_SELECT:
421 action_signalscreenchange();
422 return bookmark_load(global_bookmark_file_name, true);
423
424 default:
425 break;
426 } 407 }
427 408
428 action_signalscreenchange(); 409 action_signalscreenchange();
@@ -452,7 +433,7 @@ bool bookmark_load(const char* file, bool autoload)
452 else 433 else
453 { 434 {
454 /* This is not an auto-load, so list the bookmarks */ 435 /* This is not an auto-load, so list the bookmarks */
455 bookmark = select_bookmark(file); 436 bookmark = select_bookmark(file, false);
456 } 437 }
457 438
458 if (bookmark != NULL) 439 if (bookmark != NULL)
@@ -480,120 +461,290 @@ static int get_bookmark_count(const char* bookmark_file_name)
480 461
481 close(file); 462 close(file);
482 return read_count; 463 return read_count;
483 464}
465
466static int buffer_bookmarks(struct bookmark_list* bookmarks, int first_line)
467{
468 char* dest = ((char*) bookmarks) + bookmarks->buffer_size - 1;
469 int read_count = 0;
470 int file = open(bookmarks->filename, O_RDONLY);
471
472 if (file < 0)
473 {
474 return -1;
475 }
476
477 if ((first_line != 0) && ((size_t) filesize(file) < bookmarks->buffer_size
478 - sizeof(*bookmarks) - (sizeof(char*) * bookmarks->total_count)))
479 {
480 /* Entire file fits in buffer */
481 first_line = 0;
482 }
483
484 bookmarks->start = first_line;
485 bookmarks->count = 0;
486 bookmarks->reload = false;
484 487
488 while(read_line(file, global_read_buffer, sizeof(global_read_buffer)) > 0)
489 {
490 read_count++;
491
492 if (read_count >= first_line)
493 {
494 dest -= strlen(global_read_buffer) + 1;
495
496 if (dest < ((char*) bookmarks) + sizeof(*bookmarks)
497 + (sizeof(char*) * (bookmarks->count + 1)))
498 {
499 break;
500 }
501
502 strcpy(dest, global_read_buffer);
503 bookmarks->items[bookmarks->count] = dest;
504 bookmarks->count++;
505 }
506 }
507
508 close(file);
509 return bookmarks->start + bookmarks->count;
485} 510}
486 511
487/* ----------------------------------------------------------------------- */ 512static char* get_bookmark_info(int list_index, void* data, char *buffer)
488/* This displays a the bookmarks in a file and allows the user to */
489/* select one to play. */
490/* ------------------------------------------------------------------------*/
491static char* select_bookmark(const char* bookmark_file_name)
492{ 513{
493 int bookmark_id = 0; 514 struct bookmark_list* bookmarks = (struct bookmark_list*) data;
494 int bookmark_id_prev = -1; 515 int index = list_index / 2;
495 int key; 516 int resume_index = 0;
496 char* bookmark = NULL; 517 long resume_time = 0;
497 int bookmark_count = 0; 518 bool shuffle = false;
498 519
499#ifdef HAVE_LCD_BITMAP 520 if (bookmarks->show_dont_resume)
500 int i; 521 {
522 if (index == 0)
523 {
524 return list_index % 2 == 0
525 ? (char*) str(LANG_BOOKMARK_DONT_RESUME) : " ";
526 }
527
528 index--;
529 }
501 530
502 FOR_NB_SCREENS(i) 531 if (bookmarks->reload || (index >= bookmarks->start + bookmarks->count)
503 screens[i].setmargins(0, global_settings.statusbar 532 || (index < bookmarks->start))
504 ? STATUSBAR_HEIGHT : 0); 533 {
505#endif 534 int read_index = index;
535
536 /* Using count as a guide on how far to move could possibly fail
537 * sometimes. Use byte count if that is a problem?
538 */
539
540 if (read_index != 0)
541 {
542 /* Move count * 3 / 4 items in the direction the user is moving,
543 * but don't go too close to the end.
544 */
545 int offset = bookmarks->count;
546 int max = bookmarks->total_count - (bookmarks->count / 2);
547
548 if (read_index < bookmarks->start)
549 {
550 offset *= 3;
551 }
552
553 read_index = index - offset / 4;
506 554
507 bookmark_count = get_bookmark_count(bookmark_file_name); 555 if (read_index > max)
508 if (bookmark_count < 1) /* error opening file, or empty file */ 556 {
557 read_index = max;
558 }
559
560 if (read_index < 0)
561 {
562 read_index = 0;
563 }
564 }
565
566 if (buffer_bookmarks(bookmarks, read_index) <= index)
567 {
568 return "";
569 }
570 }
571
572 if (!parse_bookmark(bookmarks->items[index - bookmarks->start],
573 &resume_index, NULL, NULL, NULL, NULL, 0, &resume_time, NULL,
574 &shuffle, global_filename))
509 { 575 {
510 gui_syncsplash(HZ, str(LANG_BOOKMARK_LOAD_EMPTY)); 576 return list_index % 2 == 0 ? (char*) str(LANG_BOOKMARK_INVALID) : " ";
511 return NULL;
512 } 577 }
513 action_signalscreenchange(); 578
514 while(true) 579 if (list_index % 2 == 0)
515 { 580 {
516 if(bookmark_id < 0) 581 char* dot = strrchr(global_filename, '.');
517 bookmark_id = bookmark_count -1;
518 if(bookmark_id >= bookmark_count)
519 bookmark_id = 0;
520 582
521 if (bookmark_id != bookmark_id_prev) 583 if (dot)
522 { 584 {
523 bookmark = get_bookmark(bookmark_file_name, bookmark_id); 585 *dot = '\0';
524 bookmark_id_prev = bookmark_id;
525 } 586 }
587
588 return global_filename;
589 }
590 else
591 {
592 char time_buf[32];
593
594 format_time(time_buf, sizeof(time_buf), resume_time);
595 snprintf(buffer, MAX_PATH, "%s, %d%s", time_buf, resume_index + 1,
596 shuffle ? (char*) str(LANG_BOOKMARK_SHUFFLE) : "");
597 return buffer;
598 }
599}
600
601/* ----------------------------------------------------------------------- */
602/* This displays a the bookmarks in a file and allows the user to */
603/* select one to play. */
604/* ------------------------------------------------------------------------*/
605static char* select_bookmark(const char* bookmark_file_name, bool show_dont_resume)
606{
607 struct bookmark_list* bookmarks;
608 struct gui_synclist list;
609 int last_item = -2;
610 int item = 0;
611 int action;
612 size_t size;
613 bool exit = false;
614 bool refresh = true;
615
616 bookmarks = plugin_get_buffer(&size);
617 bookmarks->buffer_size = size;
618 bookmarks->show_dont_resume = show_dont_resume;
619 bookmarks->filename = bookmark_file_name;
620 bookmarks->start = 0;
621 gui_synclist_init(&list, &get_bookmark_info, (void*) bookmarks, false, 2);
622 gui_synclist_set_title(&list, str(LANG_BOOKMARK_SELECT_BOOKMARK),
623 Icon_Bookmark);
624 gui_syncstatusbar_draw(&statusbars, true);
625 action_signalscreenchange();
626
627 while (!exit)
628 {
629 gui_syncstatusbar_draw(&statusbars, false);
526 630
527 if (!bookmark) 631 if (refresh)
528 { 632 {
529 /* if there were no bookmarks in the file, delete the file and exit. */ 633 int count = get_bookmark_count(bookmark_file_name);
530 if(bookmark_id <= 0) 634 bookmarks->total_count = count;
635
636 if (bookmarks->total_count < 1)
531 { 637 {
638 /* No more bookmarks, delete file and exit */
532 gui_syncsplash(HZ, str(LANG_BOOKMARK_LOAD_EMPTY)); 639 gui_syncsplash(HZ, str(LANG_BOOKMARK_LOAD_EMPTY));
533 remove(bookmark_file_name); 640 remove(bookmark_file_name);
534 action_signalscreenchange(); 641 action_signalscreenchange();
535 return NULL; 642 return NULL;
536 } 643 }
644
645 if (bookmarks->show_dont_resume)
646 {
647 count++;
648 item++;
649 }
650
651 gui_synclist_set_nb_items(&list, count * 2);
652
653 if (item >= count)
654 {
655 /* Selected item has been deleted */
656 item = count - 1;
657 gui_synclist_select_item(&list, item * 2);
658 }
659
660 buffer_bookmarks(bookmarks, bookmarks->start);
661 gui_synclist_draw(&list);
662 refresh = false;
663 }
664
665 action = get_action(CONTEXT_BOOKMARKSCREEN, HZ / 2);
666 gui_synclist_do_button(&list, action, LIST_WRAP_UNLESS_HELD);
667 item = gui_synclist_get_sel_pos(&list) / 2;
668
669 if (bookmarks->show_dont_resume)
670 {
671 item--;
672 }
673
674 if (item != last_item && global_settings.talk_menu)
675 {
676 last_item = item;
677
678 if (item == -1)
679 {
680 talk_id(LANG_BOOKMARK_DONT_RESUME, true);
681 }
537 else 682 else
538 { 683 {
539 bookmark_id_prev = bookmark_id; 684 say_bookmark(bookmarks->items[item - bookmarks->start], item);
540 bookmark_id--;
541 continue;
542 } 685 }
543 } 686 }
544 else 687
688 if (action == ACTION_STD_CONTEXT)
545 { 689 {
546 display_bookmark(bookmark, bookmark_id, bookmark_count); 690 MENUITEM_STRINGLIST(menu_items, ID2P(LANG_BOOKMARK_CONTEXT_MENU),
547 if (global_settings.talk_menu) /* for voice UI */ 691 NULL, ID2P(LANG_BOOKMARK_CONTEXT_RESUME),
548 say_bookmark(bookmark, bookmark_id); 692 ID2P(LANG_BOOKMARK_CONTEXT_DELETE));
693 static const int menu_actions[] =
694 {
695 ACTION_STD_OK, ACTION_BMS_DELETE
696 };
697 int selection = do_menu(&menu_items, NULL);
698
699 refresh = true;
700
701 if (selection >= 0 && selection <=
702 (int) (sizeof(menu_actions) / sizeof(menu_actions[0])))
703 {
704 action = menu_actions[selection];
705 }
549 } 706 }
550 707
551 /* waiting for the user to click a button */ 708 switch (action)
552 key = get_action(CONTEXT_BOOKMARKSCREEN,TIMEOUT_BLOCK);
553 switch(key)
554 { 709 {
555 case ACTION_BMS_SELECT: 710 case ACTION_STD_OK:
556 /* User wants to use this bookmark */ 711 if (item >= 0)
712 {
557 action_signalscreenchange(); 713 action_signalscreenchange();
558 return bookmark; 714 return bookmarks->items[item - bookmarks->start];
559 715 }
560 case ACTION_BMS_DELETE: 716
561 /* User wants to delete this bookmark */ 717 /* Else fall through */
562 delete_bookmark(bookmark_file_name, bookmark_id);
563 bookmark_id_prev=-2;
564 bookmark_count--;
565 if(bookmark_id >= bookmark_count)
566 bookmark_id = bookmark_count -1;
567 break;
568 718
569 case ACTION_STD_PREV: 719 case ACTION_TREE_WPS:
570 case ACTION_STD_PREVREPEAT: 720 case ACTION_STD_CANCEL:
571 bookmark_id--; 721 exit = true;
572 break; 722 break;
573 723
574 case ACTION_STD_NEXT: 724 case ACTION_BMS_DELETE:
575 case ACTION_STD_NEXTREPEAT: 725 if (item >= 0)
576 bookmark_id++; 726 {
577 break; 727 delete_bookmark(bookmark_file_name, item);
728 bookmarks->reload = true;
729 refresh = true;
730 last_item = -2;
731 }
732 break;
578 733
579 case ACTION_BMS_EXIT: 734 default:
580 action_signalscreenchange(); 735 if (default_event_handler(action) == SYS_USB_CONNECTED)
581 return NULL; 736 {
737 exit = true;
738 }
582 739
583 default: 740 break;
584 if(default_event_handler(key) == SYS_USB_CONNECTED)
585 {
586 action_signalscreenchange();
587 return NULL;
588 }
589 break;
590 } 741 }
591 } 742 }
743
592 action_signalscreenchange(); 744 action_signalscreenchange();
593 return NULL; 745 return NULL;
594} 746}
595 747
596
597/* ----------------------------------------------------------------------- */ 748/* ----------------------------------------------------------------------- */
598/* This function takes a location in a bookmark file and deletes that */ 749/* This function takes a location in a bookmark file and deletes that */
599/* bookmark. */ 750/* bookmark. */
@@ -639,117 +790,6 @@ static bool delete_bookmark(const char* bookmark_file_name, int bookmark_id)
639} 790}
640 791
641/* ----------------------------------------------------------------------- */ 792/* ----------------------------------------------------------------------- */
642/* This function parses a bookmark and displays it for the user. */
643/* ------------------------------------------------------------------------*/
644static void display_bookmark(const char* bookmark,
645 int bookmark_id,
646 int bookmark_count)
647{
648 int resume_index = 0;
649 long ms = 0;
650 int repeat_mode = 0;
651 bool playlist_shuffle = false;
652 char *dot;
653 char time_buf[32];
654 int i;
655
656 /* getting the index and the time into the file */
657 parse_bookmark(bookmark,
658 &resume_index, NULL, NULL, NULL, NULL, 0,
659 &ms, &repeat_mode, &playlist_shuffle,
660 global_filename);
661
662 FOR_NB_SCREENS(i)
663 screens[i].clear_display();
664
665#ifdef HAVE_LCD_BITMAP
666 /* bookmark shuffle and repeat states*/
667 switch (repeat_mode)
668 {
669#ifdef AB_REPEAT_ENABLE
670 case REPEAT_AB:
671 statusbar_icon_play_mode(Icon_RepeatAB);
672 break;
673#endif
674
675 case REPEAT_ONE:
676 statusbar_icon_play_mode(Icon_RepeatOne);
677 break;
678
679 case REPEAT_ALL:
680 statusbar_icon_play_mode(Icon_Repeat);
681 break;
682 }
683 if(playlist_shuffle)
684 statusbar_icon_shuffle();
685
686 /* File Name */
687 dot = strrchr(global_filename, '.');
688
689 if (dot)
690 *dot='\0';
691
692 FOR_NB_SCREENS(i)
693 screens[i].puts_scroll(0, 0, (unsigned char *)global_filename);
694
695 if (dot)
696 *dot='.';
697
698 /* bookmark number */
699 snprintf(global_temp_buffer, sizeof(global_temp_buffer), "%s: %d/%d",
700 str(LANG_BOOKMARK_SELECT_BOOKMARK_TEXT),
701 bookmark_id + 1, bookmark_count);
702 FOR_NB_SCREENS(i)
703 screens[i].puts_scroll(0, 1, (unsigned char *)global_temp_buffer);
704
705 /* bookmark resume index */
706 snprintf(global_temp_buffer, sizeof(global_temp_buffer), "%s: %d",
707 str(LANG_BOOKMARK_SELECT_INDEX_TEXT), resume_index+1);
708 FOR_NB_SCREENS(i)
709 screens[i].puts_scroll(0, 2, (unsigned char *)global_temp_buffer);
710
711 /* elapsed time*/
712 format_time(time_buf, sizeof(time_buf), ms);
713 snprintf(global_temp_buffer, sizeof(global_temp_buffer), "%s: %s",
714 str(LANG_BOOKMARK_SELECT_TIME_TEXT), time_buf);
715 FOR_NB_SCREENS(i)
716 screens[i].puts_scroll(0, 3, (unsigned char *)global_temp_buffer);
717
718 /* commands */
719 FOR_NB_SCREENS(i)
720 {
721 screens[i].puts_scroll(0, 4, str(LANG_BOOKMARK_SELECT_PLAY));
722 screens[i].puts_scroll(0, 5, str(LANG_BOOKMARK_SELECT_EXIT));
723 screens[i].puts_scroll(0, 6, str(LANG_BOOKMARK_SELECT_DELETE));
724 screens[i].update();
725 }
726#else
727 dot = strrchr(global_filename, '.');
728
729 if (dot)
730 *dot='\0';
731
732 format_time(time_buf, sizeof(time_buf), ms);
733 snprintf(global_temp_buffer, sizeof(global_temp_buffer),
734 "%d/%d, %s, %s", (bookmark_id + 1), bookmark_count,
735 time_buf, global_filename);
736
737 if (dot)
738 *dot='.';
739
740 gui_syncstatusbar_draw(&statusbars, false);
741
742 FOR_NB_SCREENS(i)
743 {
744 screens[i].puts_scroll(0,0,global_temp_buffer);
745 screens[i].puts(0,1,str(LANG_RESUME_CONFIRM_PLAYER));
746 screens[i].update();
747 }
748#endif
749}
750
751
752/* ----------------------------------------------------------------------- */
753/* This function parses a bookmark, says the voice UI part of it. */ 793/* This function parses a bookmark, says the voice UI part of it. */
754/* ------------------------------------------------------------------------*/ 794/* ------------------------------------------------------------------------*/
755static void say_bookmark(const char* bookmark, 795static void say_bookmark(const char* bookmark,
@@ -760,12 +800,13 @@ static void say_bookmark(const char* bookmark,
760 char dir[MAX_PATH]; 800 char dir[MAX_PATH];
761 bool enqueue = false; /* only the first voice is not queued */ 801 bool enqueue = false; /* only the first voice is not queued */
762 802
763 parse_bookmark(bookmark, 803 if (!parse_bookmark(bookmark, &resume_index, NULL, NULL, NULL,
764 &resume_index, 804 dir, sizeof(dir), &ms, NULL, NULL, NULL))
765 NULL, NULL, NULL, 805 {
766 dir, sizeof(dir), 806 talk_id(LANG_BOOKMARK_INVALID, true);
767 &ms, NULL, NULL, 807 return;
768 NULL); 808 }
809
769/* disabled, because transition between talkbox and voice UI clip is not nice */ 810/* disabled, because transition between talkbox and voice UI clip is not nice */
770#if 0 811#if 0
771 if (global_settings.talk_dir >= 3) 812 if (global_settings.talk_dir >= 3)
@@ -818,44 +859,6 @@ static bool play_bookmark(const char* bookmark)
818 return false; 859 return false;
819} 860}
820 861
821/* ----------------------------------------------------------------------- */
822/* This function retrieves a given bookmark from a file. */
823/* If the bookmark requested is beyond the number of bookmarks available */
824/* in the file, it will return the last one. */
825/* It also returns the index number of the bookmark in the file */
826/* ------------------------------------------------------------------------*/
827static char* get_bookmark(const char* bookmark_file, int bookmark_count)
828{
829 int read_count = -1;
830 int result = 0;
831 int file = open(bookmark_file, O_RDONLY);
832
833 if (file < 0)
834 return NULL;
835
836 /* Get the requested bookmark */
837 while (read_count < bookmark_count)
838 {
839 /*Reading in a single bookmark */
840 result = read_line(file,
841 global_read_buffer,
842 sizeof(global_read_buffer));
843
844 /* Reading past the last bookmark in the file
845 causes the loop to stop */
846 if (result <= 0)
847 break;
848
849 read_count++;
850 }
851
852 close(file);
853 if ((read_count >= 0) && (read_count == bookmark_count))
854 return global_read_buffer;
855 else
856 return NULL;
857}
858
859static const char* skip_token(const char* s) 862static const char* skip_token(const char* s)
860{ 863{
861 while (*s && *s != ';') 864 while (*s && *s != ';')
diff --git a/apps/keymaps/keymap-av300.c b/apps/keymaps/keymap-av300.c
index e451d708cf..552fc2a4d8 100644
--- a/apps/keymaps/keymap-av300.c
+++ b/apps/keymaps/keymap-av300.c
@@ -198,10 +198,8 @@ static const struct button_mapping button_context_keyboard[] = {
198static const struct button_mapping button_context_bmark[] = { 198static const struct button_mapping button_context_bmark[] = {
199 { ACTION_BMS_DELETE, BUTTON_SELECT|BUTTON_ON, BUTTON_SELECT }, 199 { ACTION_BMS_DELETE, BUTTON_SELECT|BUTTON_ON, BUTTON_SELECT },
200 { ACTION_BMS_DELETE, BUTTON_SELECT|BUTTON_ON, BUTTON_ON }, 200 { ACTION_BMS_DELETE, BUTTON_SELECT|BUTTON_ON, BUTTON_ON },
201 { ACTION_BMS_EXIT, BUTTON_OFF, BUTTON_NONE },
202 { ACTION_BMS_SELECT, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT },
203 201
204 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD), 202 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
205 203
206}; /* button_context_settings_bmark */ 204}; /* button_context_settings_bmark */
207 205
diff --git a/apps/keymaps/keymap-e200.c b/apps/keymaps/keymap-e200.c
index c946b5feca..280837bbfd 100644
--- a/apps/keymaps/keymap-e200.c
+++ b/apps/keymaps/keymap-e200.c
@@ -219,10 +219,8 @@ static const struct button_mapping button_context_keyboard[] = {
219 219
220static const struct button_mapping button_context_bmark[] = { 220static const struct button_mapping button_context_bmark[] = {
221 { ACTION_BMS_DELETE, BUTTON_UP, BUTTON_NONE }, 221 { ACTION_BMS_DELETE, BUTTON_UP, BUTTON_NONE },
222 { ACTION_BMS_SELECT, BUTTON_SELECT, BUTTON_NONE },
223 { ACTION_BMS_EXIT, BUTTON_POWER, BUTTON_NONE },
224 222
225 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD), 223 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
226}; /* button_context_bmark */ 224}; /* button_context_bmark */
227 225
228/* get_context_mapping returns a pointer to one of the above defined arrays depending on the context */ 226/* get_context_mapping returns a pointer to one of the above defined arrays depending on the context */
diff --git a/apps/keymaps/keymap-gigabeat.c b/apps/keymaps/keymap-gigabeat.c
index c2e6a537b0..465d16a85e 100644
--- a/apps/keymaps/keymap-gigabeat.c
+++ b/apps/keymaps/keymap-gigabeat.c
@@ -192,27 +192,25 @@ static const struct button_mapping button_context_yesno[] = {
192static const struct button_mapping button_context_colorchooser[] = { 192static const struct button_mapping button_context_colorchooser[] = {
193 { ACTION_STD_OK, BUTTON_A|BUTTON_REL, BUTTON_NONE }, 193 { ACTION_STD_OK, BUTTON_A|BUTTON_REL, BUTTON_NONE },
194 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS), 194 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS),
195}; /* button_context_settings_bmark */ 195}; /* button_context_colorchooser */
196 196
197static const struct button_mapping button_context_eq[] = { 197static const struct button_mapping button_context_eq[] = {
198 { ACTION_STD_OK, BUTTON_SELECT|BUTTON_REL, BUTTON_NONE }, 198 { ACTION_STD_OK, BUTTON_SELECT|BUTTON_REL, BUTTON_NONE },
199 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS), 199 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS),
200}; /* button_context_settings_bmark */ 200}; /* button_context_eq */
201 201
202/** Bookmark Screen **/ 202/** Bookmark Screen **/
203static const struct button_mapping button_context_bmark[] = { 203static const struct button_mapping button_context_bmark[] = {
204 { ACTION_BMS_DELETE, BUTTON_A, BUTTON_NONE }, 204 { ACTION_BMS_DELETE, BUTTON_A, BUTTON_NONE },
205 { ACTION_BMS_SELECT, BUTTON_SELECT, BUTTON_NONE },
206 { ACTION_BMS_EXIT, BUTTON_POWER, BUTTON_NONE },
207 205
208 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS), 206 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
209}; /* button_context_settings_bmark */ 207}; /* button_context_bmark */
210 208
211static const struct button_mapping button_context_time[] = { 209static const struct button_mapping button_context_time[] = {
212 { ACTION_STD_CANCEL, BUTTON_POWER, BUTTON_NONE }, 210 { ACTION_STD_CANCEL, BUTTON_POWER, BUTTON_NONE },
213 { ACTION_STD_OK, BUTTON_A, BUTTON_NONE }, 211 { ACTION_STD_OK, BUTTON_A, BUTTON_NONE },
214 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS), 212 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS),
215}; /* button_context_settings_bmark */ 213}; /* button_context_time */
216 214
217static const struct button_mapping button_context_quickscreen[] = { 215static const struct button_mapping button_context_quickscreen[] = {
218 { ACTION_QS_DOWNINV, BUTTON_UP, BUTTON_NONE }, 216 { ACTION_QS_DOWNINV, BUTTON_UP, BUTTON_NONE },
diff --git a/apps/keymaps/keymap-h10.c b/apps/keymaps/keymap-h10.c
index 1a3c81b989..7eb6b8dceb 100644
--- a/apps/keymaps/keymap-h10.c
+++ b/apps/keymaps/keymap-h10.c
@@ -296,9 +296,7 @@ static const struct button_mapping button_context_keyboard[] = {
296 296
297static const struct button_mapping button_context_bmark[] = { 297static const struct button_mapping button_context_bmark[] = {
298 { ACTION_BMS_DELETE, BUTTON_REW, BUTTON_NONE }, 298 { ACTION_BMS_DELETE, BUTTON_REW, BUTTON_NONE },
299 { ACTION_BMS_SELECT, BUTTON_RIGHT, BUTTON_NONE }, 299 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
300 { ACTION_BMS_EXIT, BUTTON_LEFT, BUTTON_NONE },
301 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD),
302}; /* button_context_bmark */ 300}; /* button_context_bmark */
303 301
304const struct button_mapping button_context_recscreen[] = { 302const struct button_mapping button_context_recscreen[] = {
diff --git a/apps/keymaps/keymap-h1x0_h3x0.c b/apps/keymaps/keymap-h1x0_h3x0.c
index bbec420846..144b788323 100644
--- a/apps/keymaps/keymap-h1x0_h3x0.c
+++ b/apps/keymaps/keymap-h1x0_h3x0.c
@@ -174,7 +174,7 @@ static const struct button_mapping button_context_yesno[] = {
174static const struct button_mapping button_context_colorchooser[] = { 174static const struct button_mapping button_context_colorchooser[] = {
175 { ACTION_STD_OK, BUTTON_ON|BUTTON_REL, BUTTON_NONE }, 175 { ACTION_STD_OK, BUTTON_ON|BUTTON_REL, BUTTON_NONE },
176 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS), 176 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS),
177}; /* button_context_settings_bmark */ 177}; /* button_context_settings_colorchooser */
178 178
179static const struct button_mapping button_context_eq[] = { 179static const struct button_mapping button_context_eq[] = {
180 { ACTION_STD_OK, BUTTON_SELECT|BUTTON_REL, BUTTON_NONE }, 180 { ACTION_STD_OK, BUTTON_SELECT|BUTTON_REL, BUTTON_NONE },
@@ -186,13 +186,11 @@ static const struct button_mapping button_context_eq[] = {
186 { ACTION_SETTINGS_DECBIGSTEP, BUTTON_LEFT|BUTTON_REL, BUTTON_ON|BUTTON_LEFT }, 186 { ACTION_SETTINGS_DECBIGSTEP, BUTTON_LEFT|BUTTON_REL, BUTTON_ON|BUTTON_LEFT },
187 { ACTION_SETTINGS_DECBIGSTEP, BUTTON_ON|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, 187 { ACTION_SETTINGS_DECBIGSTEP, BUTTON_ON|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
188 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS), 188 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS),
189}; /* button_context_settings_bmark */ 189}; /* button_context_settings_context_eq */
190 190
191static const struct button_mapping button_context_bmark[] = { 191static const struct button_mapping button_context_bmark[] = {
192 { ACTION_BMS_DELETE, BUTTON_REC, BUTTON_NONE }, 192 { ACTION_BMS_DELETE, BUTTON_REC, BUTTON_NONE },
193 { ACTION_BMS_SELECT, BUTTON_SELECT, BUTTON_NONE }, 193 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
194 { ACTION_BMS_EXIT, BUTTON_OFF, BUTTON_NONE },
195 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS),
196}; /* button_context_settings_bmark */ 194}; /* button_context_settings_bmark */
197 195
198static const struct button_mapping button_context_time[] = { 196static const struct button_mapping button_context_time[] = {
@@ -493,11 +491,9 @@ static const struct button_mapping button_context_yesno_h100remote[] = {
493static const struct button_mapping *button_context_yesno_h300lcdremote = 491static const struct button_mapping *button_context_yesno_h300lcdremote =
494 button_context_yesno_h100remote; 492 button_context_yesno_h100remote;
495 493
496static const struct button_mapping button_context_bmark_h100remote[] = { 494static const struct button_mapping button_context_bmark_h100remote[] = {
497 { ACTION_BMS_DELETE, BUTTON_RC_REC, BUTTON_NONE }, 495 { ACTION_BMS_DELETE, BUTTON_RC_REC, BUTTON_NONE },
498 { ACTION_BMS_SELECT, BUTTON_RC_MENU, BUTTON_NONE }, 496 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST)
499 { ACTION_BMS_EXIT, BUTTON_RC_STOP, BUTTON_NONE },
500 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
501}; /* button_context_settings_bmark */ 497}; /* button_context_settings_bmark */
502 498
503static const struct button_mapping *button_context_bmark_h300lcdremote = 499static const struct button_mapping *button_context_bmark_h300lcdremote =
diff --git a/apps/keymaps/keymap-ifp7xx.c b/apps/keymaps/keymap-ifp7xx.c
index 93de23b372..64c8908d0d 100644
--- a/apps/keymaps/keymap-ifp7xx.c
+++ b/apps/keymaps/keymap-ifp7xx.c
@@ -102,8 +102,7 @@ static const struct button_mapping button_context_yesno[] = {
102 102
103static const struct button_mapping button_context_bmark[] = { 103static const struct button_mapping button_context_bmark[] = {
104 { ACTION_BMS_DELETE, BUTTON_MODE, BUTTON_NONE }, 104 { ACTION_BMS_DELETE, BUTTON_MODE, BUTTON_NONE },
105 { ACTION_STD_OK, BUTTON_SELECT, BUTTON_NONE }, 105 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
106 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS),
107}; /* button_context_settings_bmark */ 106}; /* button_context_settings_bmark */
108 107
109static const struct button_mapping button_context_quickscreen[] = { 108static const struct button_mapping button_context_quickscreen[] = {
diff --git a/apps/keymaps/keymap-ipod.c b/apps/keymaps/keymap-ipod.c
index 4e0fc1b862..b05db02aae 100644
--- a/apps/keymaps/keymap-ipod.c
+++ b/apps/keymaps/keymap-ipod.c
@@ -117,9 +117,7 @@ static const struct button_mapping button_context_yesno[] = {
117 117
118static const struct button_mapping button_context_bmark[] = { 118static const struct button_mapping button_context_bmark[] = {
119 { ACTION_BMS_DELETE, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU }, 119 { ACTION_BMS_DELETE, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU },
120 { ACTION_BMS_SELECT, BUTTON_SELECT, BUTTON_NONE }, 120 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
121 { ACTION_BMS_EXIT, BUTTON_PLAY, BUTTON_NONE },
122 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS),
123}; /* button_context_settings_bmark */ 121}; /* button_context_settings_bmark */
124 122
125static const struct button_mapping button_context_quickscreen[] = { 123static const struct button_mapping button_context_quickscreen[] = {
diff --git a/apps/keymaps/keymap-ondio.c b/apps/keymaps/keymap-ondio.c
index 506444e094..10a27ca9c1 100644
--- a/apps/keymaps/keymap-ondio.c
+++ b/apps/keymaps/keymap-ondio.c
@@ -113,10 +113,8 @@ static const struct button_mapping button_context_yesno[] = {
113static const struct button_mapping button_context_bmark[] = { 113static const struct button_mapping button_context_bmark[] = {
114 { ACTION_NONE, BUTTON_LEFT, BUTTON_NONE }, 114 { ACTION_NONE, BUTTON_LEFT, BUTTON_NONE },
115 { ACTION_BMS_DELETE, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_LEFT }, 115 { ACTION_BMS_DELETE, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_LEFT },
116 { ACTION_BMS_EXIT, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT },
117 { ACTION_BMS_SELECT, BUTTON_RIGHT, BUTTON_NONE },
118 116
119 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD), 117 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
120}; /* button_context_settings_bmark */ 118}; /* button_context_settings_bmark */
121 119
122static const struct button_mapping button_context_pitchscreen[] = { 120static const struct button_mapping button_context_pitchscreen[] = {
diff --git a/apps/keymaps/keymap-player.c b/apps/keymaps/keymap-player.c
index 1c0536d242..1062a23dd3 100644
--- a/apps/keymaps/keymap-player.c
+++ b/apps/keymaps/keymap-player.c
@@ -88,10 +88,8 @@ static const struct button_mapping button_context_yesno[] = {
88static const struct button_mapping button_context_bmark[] = { 88static const struct button_mapping button_context_bmark[] = {
89 { ACTION_BMS_DELETE, BUTTON_PLAY|BUTTON_ON, BUTTON_PLAY }, 89 { ACTION_BMS_DELETE, BUTTON_PLAY|BUTTON_ON, BUTTON_PLAY },
90 { ACTION_BMS_DELETE, BUTTON_PLAY|BUTTON_ON, BUTTON_ON }, 90 { ACTION_BMS_DELETE, BUTTON_PLAY|BUTTON_ON, BUTTON_ON },
91 { ACTION_BMS_EXIT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE },
92 { ACTION_BMS_SELECT, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY },
93 91
94 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD), 92 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
95}; /* button_context_settings_bmark */ 93}; /* button_context_settings_bmark */
96 94
97/***************************************************************************** 95/*****************************************************************************
diff --git a/apps/keymaps/keymap-recorder.c b/apps/keymaps/keymap-recorder.c
index 3dd8bbdd87..73fdbf0696 100644
--- a/apps/keymaps/keymap-recorder.c
+++ b/apps/keymaps/keymap-recorder.c
@@ -199,10 +199,8 @@ static const struct button_mapping button_context_keyboard[] = {
199static const struct button_mapping button_context_bmark[] = { 199static const struct button_mapping button_context_bmark[] = {
200 { ACTION_BMS_DELETE, BUTTON_PLAY|BUTTON_ON, BUTTON_PLAY }, 200 { ACTION_BMS_DELETE, BUTTON_PLAY|BUTTON_ON, BUTTON_PLAY },
201 { ACTION_BMS_DELETE, BUTTON_PLAY|BUTTON_ON, BUTTON_ON }, 201 { ACTION_BMS_DELETE, BUTTON_PLAY|BUTTON_ON, BUTTON_ON },
202 { ACTION_BMS_EXIT, BUTTON_OFF, BUTTON_NONE },
203 { ACTION_BMS_SELECT, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY },
204 202
205 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD), 203 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
206 204
207}; /* button_context_settings_bmark */ 205}; /* button_context_settings_bmark */
208 206
diff --git a/apps/keymaps/keymap-x5.c b/apps/keymaps/keymap-x5.c
index b637e1ddd1..e5857512f0 100644
--- a/apps/keymaps/keymap-x5.c
+++ b/apps/keymaps/keymap-x5.c
@@ -76,10 +76,8 @@ static const struct button_mapping remote_button_context_standard[] = {
76/** Bookmark Screen **/ 76/** Bookmark Screen **/
77static const struct button_mapping button_context_bmark[] = { 77static const struct button_mapping button_context_bmark[] = {
78 { ACTION_BMS_DELETE, BUTTON_REC|BUTTON_REPEAT, BUTTON_REC }, 78 { ACTION_BMS_DELETE, BUTTON_REC|BUTTON_REPEAT, BUTTON_REC },
79 { ACTION_BMS_SELECT, BUTTON_SELECT, BUTTON_NONE },
80 { ACTION_BMS_EXIT, BUTTON_REC|BUTTON_REL, BUTTON_REC },
81 79
82 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS), 80 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
83}; /* button_context_settings_bmark */ 81}; /* button_context_settings_bmark */
84 82
85/** FM Radio Screen **/ 83/** FM Radio Screen **/
diff --git a/apps/lang/english.lang b/apps/lang/english.lang
index 25acb517aa..ecfa2be042 100644
--- a/apps/lang/english.lang
+++ b/apps/lang/english.lang
@@ -4712,13 +4712,13 @@
4712</phrase> 4712</phrase>
4713<phrase> 4713<phrase>
4714 id: LANG_BOOKMARK_SELECT_LIST_BOOKMARKS 4714 id: LANG_BOOKMARK_SELECT_LIST_BOOKMARKS
4715 desc: From the auto-load screen, allows user to list all bookmarks 4715 desc: DEPRECATED
4716 user: 4716 user:
4717 <source> 4717 <source>
4718 *: "Down = List" 4718 *: ""
4719 </source> 4719 </source>
4720 <dest> 4720 <dest>
4721 *: "Down = List" 4721 *: deprecated
4722 </dest> 4722 </dest>
4723 <voice> 4723 <voice>
4724 *: "" 4724 *: ""
@@ -4726,25 +4726,13 @@
4726</phrase> 4726</phrase>
4727<phrase> 4727<phrase>
4728 id: LANG_BOOKMARK_SELECT_EXIT 4728 id: LANG_BOOKMARK_SELECT_EXIT
4729 desc: From the bookmark list screen, allows user to exit 4729 desc: DEPRECATED
4730 user: 4730 user:
4731 <source> 4731 <source>
4732 *: "OFF = Exit" 4732 *: ""
4733 h100,h120,h300: "STOP = Exit"
4734 ipod*: "PLAY/PAUSE = Exit"
4735 x5: "RECORD = Exit"
4736 h10,h10_5gb: "PREV = Exit"
4737 gigabeatf: "A = Exit"
4738 e200: "POWER = Exit"
4739 </source> 4733 </source>
4740 <dest> 4734 <dest>
4741 *: "OFF = Exit" 4735 *: deprecated
4742 h100,h120,h300: "STOP = Exit"
4743 ipod*: "PLAY/PAUSE = Exit"
4744 x5: "RECORD = Exit"
4745 h10,h10_5gb: "PREV = Exit"
4746 gigabeatf: "A = Exit"
4747 e200: "POWER = Exit"
4748 </dest> 4736 </dest>
4749 <voice> 4737 <voice>
4750 *: "" 4738 *: ""
@@ -4752,13 +4740,13 @@
4752</phrase> 4740</phrase>
4753<phrase> 4741<phrase>
4754 id: LANG_BOOKMARK_SELECT_BOOKMARK_TEXT 4742 id: LANG_BOOKMARK_SELECT_BOOKMARK_TEXT
4755 desc: Used on the bookmark select window to label bookmark number 4743 desc: DEPRECATED
4756 user: 4744 user:
4757 <source> 4745 <source>
4758 *: "Bookmark" 4746 *: ""
4759 </source> 4747 </source>
4760 <dest> 4748 <dest>
4761 *: "Bookmark" 4749 *: deprecated
4762 </dest> 4750 </dest>
4763 <voice> 4751 <voice>
4764 *: "" 4752 *: ""
@@ -4766,53 +4754,41 @@
4766</phrase> 4754</phrase>
4767<phrase> 4755<phrase>
4768 id: LANG_BOOKMARK_SELECT_INDEX_TEXT 4756 id: LANG_BOOKMARK_SELECT_INDEX_TEXT
4769 desc: Used on the bookmark select window to label index number 4757 desc: DEPRECATED
4770 user: 4758 user:
4771 <source> 4759 <source>
4772 *: "Index" 4760 *: ""
4773 </source> 4761 </source>
4774 <dest> 4762 <dest>
4775 *: "Index" 4763 *: deprecated
4776 </dest> 4764 </dest>
4777 <voice> 4765 <voice>
4778 *: "Index" 4766 *: ""
4779 </voice> 4767 </voice>
4780</phrase> 4768</phrase>
4781<phrase> 4769<phrase>
4782 id: LANG_BOOKMARK_SELECT_TIME_TEXT 4770 id: LANG_BOOKMARK_SELECT_TIME_TEXT
4783 desc: Used on the bookmark select window to label elapsed time 4771 desc: DEPRECATED
4784 user: 4772 user:
4785 <source> 4773 <source>
4786 *: "Time" 4774 *: ""
4787 </source> 4775 </source>
4788 <dest> 4776 <dest>
4789 *: "Time" 4777 *: deprecated
4790 </dest> 4778 </dest>
4791 <voice> 4779 <voice>
4792 *: "Time" 4780 *: ""
4793 </voice> 4781 </voice>
4794</phrase> 4782</phrase>
4795<phrase> 4783<phrase>
4796 id: LANG_BOOKMARK_SELECT_PLAY 4784 id: LANG_BOOKMARK_SELECT_PLAY
4797 desc: Used on the bookmark select window to indicated the play option 4785 desc: DEPRECATED
4798 user: 4786 user:
4799 <source> 4787 <source>
4800 *: "PLAY = Select" 4788 *: ""
4801 h100,h120,h300: "NAVI = Select"
4802 ipod*: "SELECT = Select"
4803 x5: "SELECT = Select"
4804 h10,h10_5gb: "SELECT = Select"
4805 gigabeatf: "SELECT = Select"
4806 e200: "SELECT = Select"
4807 </source> 4789 </source>
4808 <dest> 4790 <dest>
4809 *: "PLAY = Select" 4791 *: deprecated
4810 h100,h120,h300: "NAVI = Select"
4811 ipod*: "SELECT = Select"
4812 x5: "SELECT = Select"
4813 h10,h10_5gb: "SELECT = Select"
4814 gigabeatf: "SELECT = Select"
4815 e200: "SELECT = Select"
4816 </dest> 4792 </dest>
4817 <voice> 4793 <voice>
4818 *: "" 4794 *: ""
@@ -4820,25 +4796,13 @@
4820</phrase> 4796</phrase>
4821<phrase> 4797<phrase>
4822 id: LANG_BOOKMARK_SELECT_DELETE 4798 id: LANG_BOOKMARK_SELECT_DELETE
4823 desc: Used on the bookmark select window to indicated the bookmark delete option 4799 desc: DEPRECATED
4824 user: 4800 user:
4825 <source> 4801 <source>
4826 *: "ON+Play = Delete" 4802 *: ""
4827 h100,h120,h300: "RECORD = Delete"
4828 ipod*: "Long MENU = Delete"
4829 x5: "Long RECORD = Delete"
4830 h10,h10_5gb: "REWIND = Delete"
4831 gigabeatf: "POWER = Delete"
4832 e200: "PLAY = Delete"
4833 </source> 4803 </source>
4834 <dest> 4804 <dest>
4835 *: "ON+Play = Delete" 4805 *: deprecated
4836 h100,h120,h300: "RECORD = Delete"
4837 ipod*: "Long MENU = Delete"
4838 x5: "Long RECORD = Delete"
4839 h10,h10_5gb: "REWIND = Delete"
4840 gigabeatf: "POWER = Delete"
4841 e200: "PLAY = Delete"
4842 </dest> 4806 </dest>
4843 <voice> 4807 <voice>
4844 *: "" 4808 *: ""
@@ -4846,13 +4810,13 @@
4846</phrase> 4810</phrase>
4847<phrase> 4811<phrase>
4848 id: LANG_BOOKMARK_AUTOLOAD_QUERY 4812 id: LANG_BOOKMARK_AUTOLOAD_QUERY
4849 desc: prompt for user to decide to create a bookmark 4813 desc: DEPRECATED
4850 user: 4814 user:
4851 <source> 4815 <source>
4852 *: "Load Last Bookmark?" 4816 *: ""
4853 </source> 4817 </source>
4854 <dest> 4818 <dest>
4855 *: "Load Last Bookmark?" 4819 *: deprecated
4856 </dest> 4820 </dest>
4857 <voice> 4821 <voice>
4858 *: "" 4822 *: ""
@@ -10862,4 +10826,129 @@
10862 *: "Moving" 10826 *: "Moving"
10863 </voice> 10827 </voice>
10864</phrase> 10828</phrase>
10865 10829<phrase>
10830 id: LANG_BOOKMARK_SELECT_BOOKMARK
10831 desc: bookmark selection list title
10832 user:
10833 <source>
10834 *: "Select Bookmark"
10835 </source>
10836 <dest>
10837 *: "Select Bookmark"
10838 </dest>
10839 <voice>
10840 *: "Select Bookmark"
10841 </voice>
10842</phrase>
10843<phrase>
10844 id: LANG_BOOKMARK_DONT_RESUME
10845 desc: top item in the list when asking user about bookmark auto load
10846 user:
10847 <source>
10848 *: "<Don't Resume>"
10849 </source>
10850 <dest>
10851 *: "<Don't Resume>"
10852 </dest>
10853 <voice>
10854 *: "Do Not Resume"
10855 </voice>
10856</phrase>
10857<phrase>
10858 id: LANG_BOOKMARK_SHUFFLE
10859 desc: bookmark selection list, bookmark enables shuffle
10860 user:
10861 <source>
10862 *: ", Shuffle"
10863 </source>
10864 <dest>
10865 *: ", Shuffle"
10866 </dest>
10867 <voice>
10868 *: ""
10869 </voice>
10870</phrase>
10871<phrase>
10872 id: LANG_BOOKMARK_INVALID
10873 desc: bookmark selection list, bookmark couldn't be parsed
10874 user:
10875 <source>
10876 *: "<Invalid Bookmark>"
10877 </source>
10878 <dest>
10879 *: "<Invalid Bookmark>"
10880 </dest>
10881 <voice>
10882 *: "Invalid Bookmark"
10883 </voice>
10884</phrase>
10885<phrase>
10886 id: LANG_BOOKMARK_CONTEXT_MENU
10887 desc: bookmark selection list context menu
10888 user:
10889 <source>
10890 *: "Bookmark Actions"
10891 </source>
10892 <dest>
10893 *: "Bookmark Actions"
10894 </dest>
10895 <voice>
10896 *: "Bookmark Actions"
10897 </voice>
10898</phrase>
10899<phrase>
10900 id: LANG_BOOKMARK_CONTEXT_RESUME
10901 desc: bookmark context menu, resume this bookmark
10902 user:
10903 <source>
10904 *: "Resume"
10905 </source>
10906 <dest>
10907 *: "Resume"
10908 </dest>
10909 <voice>
10910 *: "Resume"
10911 </voice>
10912</phrase>
10913<phrase>
10914 id: LANG_BOOKMARK_CONTEXT_DELETE
10915 desc: bookmark context menu, delete this bookmark
10916 user:
10917 <source>
10918 *: "Delete"
10919 </source>
10920 <dest>
10921 *: "Delete"
10922 </dest>
10923 <voice>
10924 *: "Delete"
10925 </voice>
10926</phrase>
10927<phrase>
10928 id: VOICE_BOOKMARK_SELECT_INDEX_TEXT
10929 desc: voice only, used in the bookmark list to label index number
10930 user:
10931 <source>
10932 *: ""
10933 </source>
10934 <dest>
10935 *: ""
10936 </dest>
10937 <voice>
10938 *: "Index"
10939 </voice>
10940</phrase>
10941<phrase>
10942 id: VOICE_BOOKMARK_SELECT_TIME_TEXT
10943 desc: voice only, used in the bookmark select list to label elapsed time
10944 user:
10945 <source>
10946 *: ""
10947 </source>
10948 <dest>
10949 *: ""
10950 </dest>
10951 <voice>
10952 *: "Time"
10953 </voice>
10954</phrase>