forked from len0rd/rockbox
FS#7158 - Bookmark selection as a list.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13495 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
1186c18c3a
commit
e676b814e8
14 changed files with 451 additions and 384 deletions
|
@ -178,9 +178,7 @@ enum {
|
||||||
ACTION_SETTINGS_RESET,
|
ACTION_SETTINGS_RESET,
|
||||||
|
|
||||||
/* bookmark screen */
|
/* bookmark screen */
|
||||||
ACTION_BMS_SELECT,
|
|
||||||
ACTION_BMS_DELETE,
|
ACTION_BMS_DELETE,
|
||||||
ACTION_BMS_EXIT,
|
|
||||||
|
|
||||||
/* alarm menu screen */
|
/* alarm menu screen */
|
||||||
|
|
||||||
|
|
557
apps/bookmark.c
557
apps/bookmark.c
|
@ -16,7 +16,6 @@
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -50,6 +49,8 @@
|
||||||
#include "abrepeat.h"
|
#include "abrepeat.h"
|
||||||
#include "splash.h"
|
#include "splash.h"
|
||||||
#include "yesno.h"
|
#include "yesno.h"
|
||||||
|
#include "list.h"
|
||||||
|
#include "plugin.h"
|
||||||
|
|
||||||
#if (LCD_DEPTH > 1) || (defined(HAVE_LCD_REMOTE) && (LCD_REMOTE_DEPTH > 1))
|
#if (LCD_DEPTH > 1) || (defined(HAVE_LCD_REMOTE) && (LCD_REMOTE_DEPTH > 1))
|
||||||
#include "backdrop.h"
|
#include "backdrop.h"
|
||||||
|
@ -59,19 +60,28 @@
|
||||||
#define MAX_BOOKMARK_SIZE 350
|
#define MAX_BOOKMARK_SIZE 350
|
||||||
#define RECENT_BOOKMARK_FILE ROCKBOX_DIR "/most-recent.bmark"
|
#define RECENT_BOOKMARK_FILE ROCKBOX_DIR "/most-recent.bmark"
|
||||||
|
|
||||||
|
/* Used to buffer bookmarks while displaying the bookmark list. */
|
||||||
|
struct bookmark_list
|
||||||
|
{
|
||||||
|
const char* filename;
|
||||||
|
size_t buffer_size;
|
||||||
|
int start;
|
||||||
|
int count;
|
||||||
|
int total_count;
|
||||||
|
bool show_dont_resume;
|
||||||
|
bool reload;
|
||||||
|
char* items[];
|
||||||
|
};
|
||||||
|
|
||||||
static bool add_bookmark(const char* bookmark_file_name, const char* bookmark,
|
static bool add_bookmark(const char* bookmark_file_name, const char* bookmark,
|
||||||
bool most_recent);
|
bool most_recent);
|
||||||
static bool check_bookmark(const char* bookmark);
|
static bool check_bookmark(const char* bookmark);
|
||||||
static char* create_bookmark(void);
|
static char* create_bookmark(void);
|
||||||
static bool delete_bookmark(const char* bookmark_file_name, int bookmark_id);
|
static bool delete_bookmark(const char* bookmark_file_name, int bookmark_id);
|
||||||
static void display_bookmark(const char* bookmark,
|
|
||||||
int bookmark_id,
|
|
||||||
int bookmark_count);
|
|
||||||
static void say_bookmark(const char* bookmark,
|
static void say_bookmark(const char* bookmark,
|
||||||
int bookmark_id);
|
int bookmark_id);
|
||||||
static bool play_bookmark(const char* bookmark);
|
static bool play_bookmark(const char* bookmark);
|
||||||
static bool generate_bookmark_file_name(const char *in);
|
static bool generate_bookmark_file_name(const char *in);
|
||||||
static char* get_bookmark(const char* bookmark_file, int bookmark_count);
|
|
||||||
static const char* skip_token(const char* s);
|
static const char* skip_token(const char* s);
|
||||||
static const char* int_token(const char* s, int* dest);
|
static const char* int_token(const char* s, int* dest);
|
||||||
static const char* long_token(const char* s, long* dest);
|
static const char* long_token(const char* s, long* dest);
|
||||||
|
@ -87,15 +97,20 @@ static bool parse_bookmark(const char *bookmark,
|
||||||
int * repeat_mode,
|
int * repeat_mode,
|
||||||
bool *shuffle,
|
bool *shuffle,
|
||||||
char* file_name);
|
char* file_name);
|
||||||
static char* select_bookmark(const char* bookmark_file_name);
|
static int buffer_bookmarks(struct bookmark_list* bookmarks, int first_line);
|
||||||
|
static char* get_bookmark_info(int list_index, void* data, char *buffer);
|
||||||
|
static char* select_bookmark(const char* bookmark_file_name, bool show_dont_resume);
|
||||||
static bool system_check(void);
|
static bool system_check(void);
|
||||||
static bool write_bookmark(bool create_bookmark_file);
|
static bool write_bookmark(bool create_bookmark_file);
|
||||||
static int get_bookmark_count(const char* bookmark_file_name);
|
static int get_bookmark_count(const char* bookmark_file_name);
|
||||||
|
|
||||||
static char global_temp_buffer[MAX_PATH+1];
|
static char global_temp_buffer[MAX_PATH+1];
|
||||||
|
/* File name created by generate_bookmark_file_name */
|
||||||
static char global_bookmark_file_name[MAX_PATH];
|
static char global_bookmark_file_name[MAX_PATH];
|
||||||
static char global_read_buffer[MAX_BOOKMARK_SIZE];
|
static char global_read_buffer[MAX_BOOKMARK_SIZE];
|
||||||
|
/* Bookmark created by create_bookmark*/
|
||||||
static char global_bookmark[MAX_BOOKMARK_SIZE];
|
static char global_bookmark[MAX_BOOKMARK_SIZE];
|
||||||
|
/* Filename from parsed bookmark (can be made local where needed) */
|
||||||
static char global_filename[MAX_PATH];
|
static char global_filename[MAX_PATH];
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------- */
|
/* ----------------------------------------------------------------------- */
|
||||||
|
@ -121,7 +136,7 @@ bool bookmark_load_menu(void)
|
||||||
sizeof(global_temp_buffer));
|
sizeof(global_temp_buffer));
|
||||||
if (generate_bookmark_file_name(name))
|
if (generate_bookmark_file_name(name))
|
||||||
{
|
{
|
||||||
char* bookmark = select_bookmark(global_bookmark_file_name);
|
char* bookmark = select_bookmark(global_bookmark_file_name, false);
|
||||||
|
|
||||||
if (bookmark != NULL)
|
if (bookmark != NULL)
|
||||||
{
|
{
|
||||||
|
@ -139,7 +154,7 @@ bool bookmark_load_menu(void)
|
||||||
/* ----------------------------------------------------------------------- */
|
/* ----------------------------------------------------------------------- */
|
||||||
bool bookmark_mrb_load()
|
bool bookmark_mrb_load()
|
||||||
{
|
{
|
||||||
char* bookmark = select_bookmark(RECENT_BOOKMARK_FILE);
|
char* bookmark = select_bookmark(RECENT_BOOKMARK_FILE, false);
|
||||||
|
|
||||||
if (bookmark != NULL)
|
if (bookmark != NULL)
|
||||||
{
|
{
|
||||||
|
@ -364,9 +379,7 @@ static bool check_bookmark(const char* bookmark)
|
||||||
/* ------------------------------------------------------------------------*/
|
/* ------------------------------------------------------------------------*/
|
||||||
bool bookmark_autoload(const char* file)
|
bool bookmark_autoload(const char* file)
|
||||||
{
|
{
|
||||||
int key;
|
|
||||||
int fd;
|
int fd;
|
||||||
int i;
|
|
||||||
|
|
||||||
if(global_settings.autoloadbookmark == BOOKMARK_NO)
|
if(global_settings.autoloadbookmark == BOOKMARK_NO)
|
||||||
return false;
|
return false;
|
||||||
|
@ -386,43 +399,11 @@ bool bookmark_autoload(const char* file)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Prompting user to confirm bookmark load */
|
char* bookmark = select_bookmark(global_bookmark_file_name, true);
|
||||||
FOR_NB_SCREENS(i)
|
|
||||||
screens[i].clear_display();
|
|
||||||
|
|
||||||
gui_syncstatusbar_draw(&statusbars, true);
|
if (bookmark)
|
||||||
|
|
||||||
FOR_NB_SCREENS(i)
|
|
||||||
{
|
{
|
||||||
#ifdef HAVE_LCD_BITMAP
|
return bookmark_load(global_bookmark_file_name, true);
|
||||||
screens[i].setmargins(0, global_settings.statusbar
|
|
||||||
? STATUSBAR_HEIGHT : 0);
|
|
||||||
screens[i].puts_scroll(0,0, str(LANG_BOOKMARK_AUTOLOAD_QUERY));
|
|
||||||
screens[i].puts(0,1, str(LANG_CONFIRM_WITH_PLAY_RECORDER));
|
|
||||||
screens[i].puts(0,2, str(LANG_BOOKMARK_SELECT_LIST_BOOKMARKS));
|
|
||||||
screens[i].puts(0,3, str(LANG_CANCEL_WITH_ANY_RECORDER));
|
|
||||||
#else
|
|
||||||
screens[i].puts_scroll(0,0, str(LANG_BOOKMARK_AUTOLOAD_QUERY));
|
|
||||||
screens[i].puts(0,1,str(LANG_RESUME_CONFIRM_PLAYER));
|
|
||||||
#endif
|
|
||||||
screens[i].update();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Wait for a key to be pushed */
|
|
||||||
key = get_action(CONTEXT_BOOKMARKSCREEN,TIMEOUT_BLOCK);
|
|
||||||
switch(key)
|
|
||||||
{
|
|
||||||
#ifdef HAVE_LCD_BITMAP
|
|
||||||
case ACTION_STD_NEXT:
|
|
||||||
action_signalscreenchange();
|
|
||||||
return bookmark_load(global_bookmark_file_name, false);
|
|
||||||
#endif
|
|
||||||
case ACTION_BMS_SELECT:
|
|
||||||
action_signalscreenchange();
|
|
||||||
return bookmark_load(global_bookmark_file_name, true);
|
|
||||||
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
action_signalscreenchange();
|
action_signalscreenchange();
|
||||||
|
@ -452,7 +433,7 @@ bool bookmark_load(const char* file, bool autoload)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* This is not an auto-load, so list the bookmarks */
|
/* This is not an auto-load, so list the bookmarks */
|
||||||
bookmark = select_bookmark(file);
|
bookmark = select_bookmark(file, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bookmark != NULL)
|
if (bookmark != NULL)
|
||||||
|
@ -480,120 +461,290 @@ static int get_bookmark_count(const char* bookmark_file_name)
|
||||||
|
|
||||||
close(file);
|
close(file);
|
||||||
return read_count;
|
return read_count;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int buffer_bookmarks(struct bookmark_list* bookmarks, int first_line)
|
||||||
|
{
|
||||||
|
char* dest = ((char*) bookmarks) + bookmarks->buffer_size - 1;
|
||||||
|
int read_count = 0;
|
||||||
|
int file = open(bookmarks->filename, O_RDONLY);
|
||||||
|
|
||||||
|
if (file < 0)
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((first_line != 0) && ((size_t) filesize(file) < bookmarks->buffer_size
|
||||||
|
- sizeof(*bookmarks) - (sizeof(char*) * bookmarks->total_count)))
|
||||||
|
{
|
||||||
|
/* Entire file fits in buffer */
|
||||||
|
first_line = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bookmarks->start = first_line;
|
||||||
|
bookmarks->count = 0;
|
||||||
|
bookmarks->reload = false;
|
||||||
|
|
||||||
|
while(read_line(file, global_read_buffer, sizeof(global_read_buffer)) > 0)
|
||||||
|
{
|
||||||
|
read_count++;
|
||||||
|
|
||||||
|
if (read_count >= first_line)
|
||||||
|
{
|
||||||
|
dest -= strlen(global_read_buffer) + 1;
|
||||||
|
|
||||||
|
if (dest < ((char*) bookmarks) + sizeof(*bookmarks)
|
||||||
|
+ (sizeof(char*) * (bookmarks->count + 1)))
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
strcpy(dest, global_read_buffer);
|
||||||
|
bookmarks->items[bookmarks->count] = dest;
|
||||||
|
bookmarks->count++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
close(file);
|
||||||
|
return bookmarks->start + bookmarks->count;
|
||||||
|
}
|
||||||
|
|
||||||
|
static char* get_bookmark_info(int list_index, void* data, char *buffer)
|
||||||
|
{
|
||||||
|
struct bookmark_list* bookmarks = (struct bookmark_list*) data;
|
||||||
|
int index = list_index / 2;
|
||||||
|
int resume_index = 0;
|
||||||
|
long resume_time = 0;
|
||||||
|
bool shuffle = false;
|
||||||
|
|
||||||
|
if (bookmarks->show_dont_resume)
|
||||||
|
{
|
||||||
|
if (index == 0)
|
||||||
|
{
|
||||||
|
return list_index % 2 == 0
|
||||||
|
? (char*) str(LANG_BOOKMARK_DONT_RESUME) : " ";
|
||||||
|
}
|
||||||
|
|
||||||
|
index--;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bookmarks->reload || (index >= bookmarks->start + bookmarks->count)
|
||||||
|
|| (index < bookmarks->start))
|
||||||
|
{
|
||||||
|
int read_index = index;
|
||||||
|
|
||||||
|
/* Using count as a guide on how far to move could possibly fail
|
||||||
|
* sometimes. Use byte count if that is a problem?
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (read_index != 0)
|
||||||
|
{
|
||||||
|
/* Move count * 3 / 4 items in the direction the user is moving,
|
||||||
|
* but don't go too close to the end.
|
||||||
|
*/
|
||||||
|
int offset = bookmarks->count;
|
||||||
|
int max = bookmarks->total_count - (bookmarks->count / 2);
|
||||||
|
|
||||||
|
if (read_index < bookmarks->start)
|
||||||
|
{
|
||||||
|
offset *= 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
read_index = index - offset / 4;
|
||||||
|
|
||||||
|
if (read_index > max)
|
||||||
|
{
|
||||||
|
read_index = max;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (read_index < 0)
|
||||||
|
{
|
||||||
|
read_index = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (buffer_bookmarks(bookmarks, read_index) <= index)
|
||||||
|
{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!parse_bookmark(bookmarks->items[index - bookmarks->start],
|
||||||
|
&resume_index, NULL, NULL, NULL, NULL, 0, &resume_time, NULL,
|
||||||
|
&shuffle, global_filename))
|
||||||
|
{
|
||||||
|
return list_index % 2 == 0 ? (char*) str(LANG_BOOKMARK_INVALID) : " ";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (list_index % 2 == 0)
|
||||||
|
{
|
||||||
|
char* dot = strrchr(global_filename, '.');
|
||||||
|
|
||||||
|
if (dot)
|
||||||
|
{
|
||||||
|
*dot = '\0';
|
||||||
|
}
|
||||||
|
|
||||||
|
return global_filename;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
char time_buf[32];
|
||||||
|
|
||||||
|
format_time(time_buf, sizeof(time_buf), resume_time);
|
||||||
|
snprintf(buffer, MAX_PATH, "%s, %d%s", time_buf, resume_index + 1,
|
||||||
|
shuffle ? (char*) str(LANG_BOOKMARK_SHUFFLE) : "");
|
||||||
|
return buffer;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------- */
|
/* ----------------------------------------------------------------------- */
|
||||||
/* This displays a the bookmarks in a file and allows the user to */
|
/* This displays a the bookmarks in a file and allows the user to */
|
||||||
/* select one to play. */
|
/* select one to play. */
|
||||||
/* ------------------------------------------------------------------------*/
|
/* ------------------------------------------------------------------------*/
|
||||||
static char* select_bookmark(const char* bookmark_file_name)
|
static char* select_bookmark(const char* bookmark_file_name, bool show_dont_resume)
|
||||||
{
|
{
|
||||||
int bookmark_id = 0;
|
struct bookmark_list* bookmarks;
|
||||||
int bookmark_id_prev = -1;
|
struct gui_synclist list;
|
||||||
int key;
|
int last_item = -2;
|
||||||
char* bookmark = NULL;
|
int item = 0;
|
||||||
int bookmark_count = 0;
|
int action;
|
||||||
|
size_t size;
|
||||||
|
bool exit = false;
|
||||||
|
bool refresh = true;
|
||||||
|
|
||||||
#ifdef HAVE_LCD_BITMAP
|
bookmarks = plugin_get_buffer(&size);
|
||||||
int i;
|
bookmarks->buffer_size = size;
|
||||||
|
bookmarks->show_dont_resume = show_dont_resume;
|
||||||
FOR_NB_SCREENS(i)
|
bookmarks->filename = bookmark_file_name;
|
||||||
screens[i].setmargins(0, global_settings.statusbar
|
bookmarks->start = 0;
|
||||||
? STATUSBAR_HEIGHT : 0);
|
gui_synclist_init(&list, &get_bookmark_info, (void*) bookmarks, false, 2);
|
||||||
#endif
|
gui_synclist_set_title(&list, str(LANG_BOOKMARK_SELECT_BOOKMARK),
|
||||||
|
Icon_Bookmark);
|
||||||
bookmark_count = get_bookmark_count(bookmark_file_name);
|
gui_syncstatusbar_draw(&statusbars, true);
|
||||||
if (bookmark_count < 1) /* error opening file, or empty file */
|
|
||||||
{
|
|
||||||
gui_syncsplash(HZ, str(LANG_BOOKMARK_LOAD_EMPTY));
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
action_signalscreenchange();
|
action_signalscreenchange();
|
||||||
while(true)
|
|
||||||
{
|
|
||||||
if(bookmark_id < 0)
|
|
||||||
bookmark_id = bookmark_count -1;
|
|
||||||
if(bookmark_id >= bookmark_count)
|
|
||||||
bookmark_id = 0;
|
|
||||||
|
|
||||||
if (bookmark_id != bookmark_id_prev)
|
while (!exit)
|
||||||
{
|
{
|
||||||
bookmark = get_bookmark(bookmark_file_name, bookmark_id);
|
gui_syncstatusbar_draw(&statusbars, false);
|
||||||
bookmark_id_prev = bookmark_id;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!bookmark)
|
if (refresh)
|
||||||
{
|
{
|
||||||
/* if there were no bookmarks in the file, delete the file and exit. */
|
int count = get_bookmark_count(bookmark_file_name);
|
||||||
if(bookmark_id <= 0)
|
bookmarks->total_count = count;
|
||||||
|
|
||||||
|
if (bookmarks->total_count < 1)
|
||||||
{
|
{
|
||||||
|
/* No more bookmarks, delete file and exit */
|
||||||
gui_syncsplash(HZ, str(LANG_BOOKMARK_LOAD_EMPTY));
|
gui_syncsplash(HZ, str(LANG_BOOKMARK_LOAD_EMPTY));
|
||||||
remove(bookmark_file_name);
|
remove(bookmark_file_name);
|
||||||
action_signalscreenchange();
|
action_signalscreenchange();
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (bookmarks->show_dont_resume)
|
||||||
|
{
|
||||||
|
count++;
|
||||||
|
item++;
|
||||||
|
}
|
||||||
|
|
||||||
|
gui_synclist_set_nb_items(&list, count * 2);
|
||||||
|
|
||||||
|
if (item >= count)
|
||||||
|
{
|
||||||
|
/* Selected item has been deleted */
|
||||||
|
item = count - 1;
|
||||||
|
gui_synclist_select_item(&list, item * 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
buffer_bookmarks(bookmarks, bookmarks->start);
|
||||||
|
gui_synclist_draw(&list);
|
||||||
|
refresh = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
action = get_action(CONTEXT_BOOKMARKSCREEN, HZ / 2);
|
||||||
|
gui_synclist_do_button(&list, action, LIST_WRAP_UNLESS_HELD);
|
||||||
|
item = gui_synclist_get_sel_pos(&list) / 2;
|
||||||
|
|
||||||
|
if (bookmarks->show_dont_resume)
|
||||||
|
{
|
||||||
|
item--;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (item != last_item && global_settings.talk_menu)
|
||||||
|
{
|
||||||
|
last_item = item;
|
||||||
|
|
||||||
|
if (item == -1)
|
||||||
|
{
|
||||||
|
talk_id(LANG_BOOKMARK_DONT_RESUME, true);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bookmark_id_prev = bookmark_id;
|
say_bookmark(bookmarks->items[item - bookmarks->start], item);
|
||||||
bookmark_id--;
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
if (action == ACTION_STD_CONTEXT)
|
||||||
{
|
{
|
||||||
display_bookmark(bookmark, bookmark_id, bookmark_count);
|
MENUITEM_STRINGLIST(menu_items, ID2P(LANG_BOOKMARK_CONTEXT_MENU),
|
||||||
if (global_settings.talk_menu) /* for voice UI */
|
NULL, ID2P(LANG_BOOKMARK_CONTEXT_RESUME),
|
||||||
say_bookmark(bookmark, bookmark_id);
|
ID2P(LANG_BOOKMARK_CONTEXT_DELETE));
|
||||||
|
static const int menu_actions[] =
|
||||||
|
{
|
||||||
|
ACTION_STD_OK, ACTION_BMS_DELETE
|
||||||
|
};
|
||||||
|
int selection = do_menu(&menu_items, NULL);
|
||||||
|
|
||||||
|
refresh = true;
|
||||||
|
|
||||||
|
if (selection >= 0 && selection <=
|
||||||
|
(int) (sizeof(menu_actions) / sizeof(menu_actions[0])))
|
||||||
|
{
|
||||||
|
action = menu_actions[selection];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* waiting for the user to click a button */
|
switch (action)
|
||||||
key = get_action(CONTEXT_BOOKMARKSCREEN,TIMEOUT_BLOCK);
|
|
||||||
switch(key)
|
|
||||||
{
|
{
|
||||||
case ACTION_BMS_SELECT:
|
case ACTION_STD_OK:
|
||||||
/* User wants to use this bookmark */
|
if (item >= 0)
|
||||||
|
{
|
||||||
action_signalscreenchange();
|
action_signalscreenchange();
|
||||||
return bookmark;
|
return bookmarks->items[item - bookmarks->start];
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Else fall through */
|
||||||
|
|
||||||
case ACTION_BMS_DELETE:
|
case ACTION_TREE_WPS:
|
||||||
/* User wants to delete this bookmark */
|
case ACTION_STD_CANCEL:
|
||||||
delete_bookmark(bookmark_file_name, bookmark_id);
|
exit = true;
|
||||||
bookmark_id_prev=-2;
|
break;
|
||||||
bookmark_count--;
|
|
||||||
if(bookmark_id >= bookmark_count)
|
|
||||||
bookmark_id = bookmark_count -1;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case ACTION_STD_PREV:
|
case ACTION_BMS_DELETE:
|
||||||
case ACTION_STD_PREVREPEAT:
|
if (item >= 0)
|
||||||
bookmark_id--;
|
{
|
||||||
break;
|
delete_bookmark(bookmark_file_name, item);
|
||||||
|
bookmarks->reload = true;
|
||||||
|
refresh = true;
|
||||||
|
last_item = -2;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case ACTION_STD_NEXT:
|
default:
|
||||||
case ACTION_STD_NEXTREPEAT:
|
if (default_event_handler(action) == SYS_USB_CONNECTED)
|
||||||
bookmark_id++;
|
{
|
||||||
break;
|
exit = true;
|
||||||
|
}
|
||||||
|
|
||||||
case ACTION_BMS_EXIT:
|
break;
|
||||||
action_signalscreenchange();
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
default:
|
|
||||||
if(default_event_handler(key) == SYS_USB_CONNECTED)
|
|
||||||
{
|
|
||||||
action_signalscreenchange();
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
action_signalscreenchange();
|
action_signalscreenchange();
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------- */
|
/* ----------------------------------------------------------------------- */
|
||||||
/* This function takes a location in a bookmark file and deletes that */
|
/* This function takes a location in a bookmark file and deletes that */
|
||||||
/* bookmark. */
|
/* bookmark. */
|
||||||
|
@ -638,117 +789,6 @@ static bool delete_bookmark(const char* bookmark_file_name, int bookmark_id)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------- */
|
|
||||||
/* This function parses a bookmark and displays it for the user. */
|
|
||||||
/* ------------------------------------------------------------------------*/
|
|
||||||
static void display_bookmark(const char* bookmark,
|
|
||||||
int bookmark_id,
|
|
||||||
int bookmark_count)
|
|
||||||
{
|
|
||||||
int resume_index = 0;
|
|
||||||
long ms = 0;
|
|
||||||
int repeat_mode = 0;
|
|
||||||
bool playlist_shuffle = false;
|
|
||||||
char *dot;
|
|
||||||
char time_buf[32];
|
|
||||||
int i;
|
|
||||||
|
|
||||||
/* getting the index and the time into the file */
|
|
||||||
parse_bookmark(bookmark,
|
|
||||||
&resume_index, NULL, NULL, NULL, NULL, 0,
|
|
||||||
&ms, &repeat_mode, &playlist_shuffle,
|
|
||||||
global_filename);
|
|
||||||
|
|
||||||
FOR_NB_SCREENS(i)
|
|
||||||
screens[i].clear_display();
|
|
||||||
|
|
||||||
#ifdef HAVE_LCD_BITMAP
|
|
||||||
/* bookmark shuffle and repeat states*/
|
|
||||||
switch (repeat_mode)
|
|
||||||
{
|
|
||||||
#ifdef AB_REPEAT_ENABLE
|
|
||||||
case REPEAT_AB:
|
|
||||||
statusbar_icon_play_mode(Icon_RepeatAB);
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
case REPEAT_ONE:
|
|
||||||
statusbar_icon_play_mode(Icon_RepeatOne);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case REPEAT_ALL:
|
|
||||||
statusbar_icon_play_mode(Icon_Repeat);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if(playlist_shuffle)
|
|
||||||
statusbar_icon_shuffle();
|
|
||||||
|
|
||||||
/* File Name */
|
|
||||||
dot = strrchr(global_filename, '.');
|
|
||||||
|
|
||||||
if (dot)
|
|
||||||
*dot='\0';
|
|
||||||
|
|
||||||
FOR_NB_SCREENS(i)
|
|
||||||
screens[i].puts_scroll(0, 0, (unsigned char *)global_filename);
|
|
||||||
|
|
||||||
if (dot)
|
|
||||||
*dot='.';
|
|
||||||
|
|
||||||
/* bookmark number */
|
|
||||||
snprintf(global_temp_buffer, sizeof(global_temp_buffer), "%s: %d/%d",
|
|
||||||
str(LANG_BOOKMARK_SELECT_BOOKMARK_TEXT),
|
|
||||||
bookmark_id + 1, bookmark_count);
|
|
||||||
FOR_NB_SCREENS(i)
|
|
||||||
screens[i].puts_scroll(0, 1, (unsigned char *)global_temp_buffer);
|
|
||||||
|
|
||||||
/* bookmark resume index */
|
|
||||||
snprintf(global_temp_buffer, sizeof(global_temp_buffer), "%s: %d",
|
|
||||||
str(LANG_BOOKMARK_SELECT_INDEX_TEXT), resume_index+1);
|
|
||||||
FOR_NB_SCREENS(i)
|
|
||||||
screens[i].puts_scroll(0, 2, (unsigned char *)global_temp_buffer);
|
|
||||||
|
|
||||||
/* elapsed time*/
|
|
||||||
format_time(time_buf, sizeof(time_buf), ms);
|
|
||||||
snprintf(global_temp_buffer, sizeof(global_temp_buffer), "%s: %s",
|
|
||||||
str(LANG_BOOKMARK_SELECT_TIME_TEXT), time_buf);
|
|
||||||
FOR_NB_SCREENS(i)
|
|
||||||
screens[i].puts_scroll(0, 3, (unsigned char *)global_temp_buffer);
|
|
||||||
|
|
||||||
/* commands */
|
|
||||||
FOR_NB_SCREENS(i)
|
|
||||||
{
|
|
||||||
screens[i].puts_scroll(0, 4, str(LANG_BOOKMARK_SELECT_PLAY));
|
|
||||||
screens[i].puts_scroll(0, 5, str(LANG_BOOKMARK_SELECT_EXIT));
|
|
||||||
screens[i].puts_scroll(0, 6, str(LANG_BOOKMARK_SELECT_DELETE));
|
|
||||||
screens[i].update();
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
dot = strrchr(global_filename, '.');
|
|
||||||
|
|
||||||
if (dot)
|
|
||||||
*dot='\0';
|
|
||||||
|
|
||||||
format_time(time_buf, sizeof(time_buf), ms);
|
|
||||||
snprintf(global_temp_buffer, sizeof(global_temp_buffer),
|
|
||||||
"%d/%d, %s, %s", (bookmark_id + 1), bookmark_count,
|
|
||||||
time_buf, global_filename);
|
|
||||||
|
|
||||||
if (dot)
|
|
||||||
*dot='.';
|
|
||||||
|
|
||||||
gui_syncstatusbar_draw(&statusbars, false);
|
|
||||||
|
|
||||||
FOR_NB_SCREENS(i)
|
|
||||||
{
|
|
||||||
screens[i].puts_scroll(0,0,global_temp_buffer);
|
|
||||||
screens[i].puts(0,1,str(LANG_RESUME_CONFIRM_PLAYER));
|
|
||||||
screens[i].update();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------- */
|
/* ----------------------------------------------------------------------- */
|
||||||
/* This function parses a bookmark, says the voice UI part of it. */
|
/* This function parses a bookmark, says the voice UI part of it. */
|
||||||
/* ------------------------------------------------------------------------*/
|
/* ------------------------------------------------------------------------*/
|
||||||
|
@ -760,12 +800,13 @@ static void say_bookmark(const char* bookmark,
|
||||||
char dir[MAX_PATH];
|
char dir[MAX_PATH];
|
||||||
bool enqueue = false; /* only the first voice is not queued */
|
bool enqueue = false; /* only the first voice is not queued */
|
||||||
|
|
||||||
parse_bookmark(bookmark,
|
if (!parse_bookmark(bookmark, &resume_index, NULL, NULL, NULL,
|
||||||
&resume_index,
|
dir, sizeof(dir), &ms, NULL, NULL, NULL))
|
||||||
NULL, NULL, NULL,
|
{
|
||||||
dir, sizeof(dir),
|
talk_id(LANG_BOOKMARK_INVALID, true);
|
||||||
&ms, NULL, NULL,
|
return;
|
||||||
NULL);
|
}
|
||||||
|
|
||||||
/* disabled, because transition between talkbox and voice UI clip is not nice */
|
/* disabled, because transition between talkbox and voice UI clip is not nice */
|
||||||
#if 0
|
#if 0
|
||||||
if (global_settings.talk_dir >= 3)
|
if (global_settings.talk_dir >= 3)
|
||||||
|
@ -818,44 +859,6 @@ static bool play_bookmark(const char* bookmark)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------- */
|
|
||||||
/* This function retrieves a given bookmark from a file. */
|
|
||||||
/* If the bookmark requested is beyond the number of bookmarks available */
|
|
||||||
/* in the file, it will return the last one. */
|
|
||||||
/* It also returns the index number of the bookmark in the file */
|
|
||||||
/* ------------------------------------------------------------------------*/
|
|
||||||
static char* get_bookmark(const char* bookmark_file, int bookmark_count)
|
|
||||||
{
|
|
||||||
int read_count = -1;
|
|
||||||
int result = 0;
|
|
||||||
int file = open(bookmark_file, O_RDONLY);
|
|
||||||
|
|
||||||
if (file < 0)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
/* Get the requested bookmark */
|
|
||||||
while (read_count < bookmark_count)
|
|
||||||
{
|
|
||||||
/*Reading in a single bookmark */
|
|
||||||
result = read_line(file,
|
|
||||||
global_read_buffer,
|
|
||||||
sizeof(global_read_buffer));
|
|
||||||
|
|
||||||
/* Reading past the last bookmark in the file
|
|
||||||
causes the loop to stop */
|
|
||||||
if (result <= 0)
|
|
||||||
break;
|
|
||||||
|
|
||||||
read_count++;
|
|
||||||
}
|
|
||||||
|
|
||||||
close(file);
|
|
||||||
if ((read_count >= 0) && (read_count == bookmark_count))
|
|
||||||
return global_read_buffer;
|
|
||||||
else
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
static const char* skip_token(const char* s)
|
static const char* skip_token(const char* s)
|
||||||
{
|
{
|
||||||
while (*s && *s != ';')
|
while (*s && *s != ';')
|
||||||
|
|
|
@ -198,10 +198,8 @@ static const struct button_mapping button_context_keyboard[] = {
|
||||||
static const struct button_mapping button_context_bmark[] = {
|
static const struct button_mapping button_context_bmark[] = {
|
||||||
{ ACTION_BMS_DELETE, BUTTON_SELECT|BUTTON_ON, BUTTON_SELECT },
|
{ ACTION_BMS_DELETE, BUTTON_SELECT|BUTTON_ON, BUTTON_SELECT },
|
||||||
{ ACTION_BMS_DELETE, BUTTON_SELECT|BUTTON_ON, BUTTON_ON },
|
{ ACTION_BMS_DELETE, BUTTON_SELECT|BUTTON_ON, BUTTON_ON },
|
||||||
{ ACTION_BMS_EXIT, BUTTON_OFF, BUTTON_NONE },
|
|
||||||
{ ACTION_BMS_SELECT, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT },
|
|
||||||
|
|
||||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD),
|
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
|
||||||
|
|
||||||
}; /* button_context_settings_bmark */
|
}; /* button_context_settings_bmark */
|
||||||
|
|
||||||
|
|
|
@ -219,10 +219,8 @@ static const struct button_mapping button_context_keyboard[] = {
|
||||||
|
|
||||||
static const struct button_mapping button_context_bmark[] = {
|
static const struct button_mapping button_context_bmark[] = {
|
||||||
{ ACTION_BMS_DELETE, BUTTON_UP, BUTTON_NONE },
|
{ ACTION_BMS_DELETE, BUTTON_UP, BUTTON_NONE },
|
||||||
{ ACTION_BMS_SELECT, BUTTON_SELECT, BUTTON_NONE },
|
|
||||||
{ ACTION_BMS_EXIT, BUTTON_POWER, BUTTON_NONE },
|
|
||||||
|
|
||||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD),
|
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
|
||||||
}; /* button_context_bmark */
|
}; /* button_context_bmark */
|
||||||
|
|
||||||
/* get_context_mapping returns a pointer to one of the above defined arrays depending on the context */
|
/* get_context_mapping returns a pointer to one of the above defined arrays depending on the context */
|
||||||
|
|
|
@ -192,27 +192,25 @@ static const struct button_mapping button_context_yesno[] = {
|
||||||
static const struct button_mapping button_context_colorchooser[] = {
|
static const struct button_mapping button_context_colorchooser[] = {
|
||||||
{ ACTION_STD_OK, BUTTON_A|BUTTON_REL, BUTTON_NONE },
|
{ ACTION_STD_OK, BUTTON_A|BUTTON_REL, BUTTON_NONE },
|
||||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS),
|
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS),
|
||||||
}; /* button_context_settings_bmark */
|
}; /* button_context_colorchooser */
|
||||||
|
|
||||||
static const struct button_mapping button_context_eq[] = {
|
static const struct button_mapping button_context_eq[] = {
|
||||||
{ ACTION_STD_OK, BUTTON_SELECT|BUTTON_REL, BUTTON_NONE },
|
{ ACTION_STD_OK, BUTTON_SELECT|BUTTON_REL, BUTTON_NONE },
|
||||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS),
|
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS),
|
||||||
}; /* button_context_settings_bmark */
|
}; /* button_context_eq */
|
||||||
|
|
||||||
/** Bookmark Screen **/
|
/** Bookmark Screen **/
|
||||||
static const struct button_mapping button_context_bmark[] = {
|
static const struct button_mapping button_context_bmark[] = {
|
||||||
{ ACTION_BMS_DELETE, BUTTON_A, BUTTON_NONE },
|
{ ACTION_BMS_DELETE, BUTTON_A, BUTTON_NONE },
|
||||||
{ ACTION_BMS_SELECT, BUTTON_SELECT, BUTTON_NONE },
|
|
||||||
{ ACTION_BMS_EXIT, BUTTON_POWER, BUTTON_NONE },
|
|
||||||
|
|
||||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS),
|
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
|
||||||
}; /* button_context_settings_bmark */
|
}; /* button_context_bmark */
|
||||||
|
|
||||||
static const struct button_mapping button_context_time[] = {
|
static const struct button_mapping button_context_time[] = {
|
||||||
{ ACTION_STD_CANCEL, BUTTON_POWER, BUTTON_NONE },
|
{ ACTION_STD_CANCEL, BUTTON_POWER, BUTTON_NONE },
|
||||||
{ ACTION_STD_OK, BUTTON_A, BUTTON_NONE },
|
{ ACTION_STD_OK, BUTTON_A, BUTTON_NONE },
|
||||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS),
|
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS),
|
||||||
}; /* button_context_settings_bmark */
|
}; /* button_context_time */
|
||||||
|
|
||||||
static const struct button_mapping button_context_quickscreen[] = {
|
static const struct button_mapping button_context_quickscreen[] = {
|
||||||
{ ACTION_QS_DOWNINV, BUTTON_UP, BUTTON_NONE },
|
{ ACTION_QS_DOWNINV, BUTTON_UP, BUTTON_NONE },
|
||||||
|
|
|
@ -296,9 +296,7 @@ static const struct button_mapping button_context_keyboard[] = {
|
||||||
|
|
||||||
static const struct button_mapping button_context_bmark[] = {
|
static const struct button_mapping button_context_bmark[] = {
|
||||||
{ ACTION_BMS_DELETE, BUTTON_REW, BUTTON_NONE },
|
{ ACTION_BMS_DELETE, BUTTON_REW, BUTTON_NONE },
|
||||||
{ ACTION_BMS_SELECT, BUTTON_RIGHT, BUTTON_NONE },
|
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
|
||||||
{ ACTION_BMS_EXIT, BUTTON_LEFT, BUTTON_NONE },
|
|
||||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD),
|
|
||||||
}; /* button_context_bmark */
|
}; /* button_context_bmark */
|
||||||
|
|
||||||
const struct button_mapping button_context_recscreen[] = {
|
const struct button_mapping button_context_recscreen[] = {
|
||||||
|
|
|
@ -174,7 +174,7 @@ static const struct button_mapping button_context_yesno[] = {
|
||||||
static const struct button_mapping button_context_colorchooser[] = {
|
static const struct button_mapping button_context_colorchooser[] = {
|
||||||
{ ACTION_STD_OK, BUTTON_ON|BUTTON_REL, BUTTON_NONE },
|
{ ACTION_STD_OK, BUTTON_ON|BUTTON_REL, BUTTON_NONE },
|
||||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS),
|
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS),
|
||||||
}; /* button_context_settings_bmark */
|
}; /* button_context_settings_colorchooser */
|
||||||
|
|
||||||
static const struct button_mapping button_context_eq[] = {
|
static const struct button_mapping button_context_eq[] = {
|
||||||
{ ACTION_STD_OK, BUTTON_SELECT|BUTTON_REL, BUTTON_NONE },
|
{ ACTION_STD_OK, BUTTON_SELECT|BUTTON_REL, BUTTON_NONE },
|
||||||
|
@ -186,13 +186,11 @@ static const struct button_mapping button_context_eq[] = {
|
||||||
{ ACTION_SETTINGS_DECBIGSTEP, BUTTON_LEFT|BUTTON_REL, BUTTON_ON|BUTTON_LEFT },
|
{ ACTION_SETTINGS_DECBIGSTEP, BUTTON_LEFT|BUTTON_REL, BUTTON_ON|BUTTON_LEFT },
|
||||||
{ ACTION_SETTINGS_DECBIGSTEP, BUTTON_ON|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_SETTINGS_DECBIGSTEP, BUTTON_ON|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS),
|
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS),
|
||||||
}; /* button_context_settings_bmark */
|
}; /* button_context_settings_context_eq */
|
||||||
|
|
||||||
static const struct button_mapping button_context_bmark[] = {
|
static const struct button_mapping button_context_bmark[] = {
|
||||||
{ ACTION_BMS_DELETE, BUTTON_REC, BUTTON_NONE },
|
{ ACTION_BMS_DELETE, BUTTON_REC, BUTTON_NONE },
|
||||||
{ ACTION_BMS_SELECT, BUTTON_SELECT, BUTTON_NONE },
|
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
|
||||||
{ ACTION_BMS_EXIT, BUTTON_OFF, BUTTON_NONE },
|
|
||||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS),
|
|
||||||
}; /* button_context_settings_bmark */
|
}; /* button_context_settings_bmark */
|
||||||
|
|
||||||
static const struct button_mapping button_context_time[] = {
|
static const struct button_mapping button_context_time[] = {
|
||||||
|
@ -493,11 +491,9 @@ static const struct button_mapping button_context_yesno_h100remote[] = {
|
||||||
static const struct button_mapping *button_context_yesno_h300lcdremote =
|
static const struct button_mapping *button_context_yesno_h300lcdremote =
|
||||||
button_context_yesno_h100remote;
|
button_context_yesno_h100remote;
|
||||||
|
|
||||||
static const struct button_mapping button_context_bmark_h100remote[] = {
|
static const struct button_mapping button_context_bmark_h100remote[] = {
|
||||||
{ ACTION_BMS_DELETE, BUTTON_RC_REC, BUTTON_NONE },
|
{ ACTION_BMS_DELETE, BUTTON_RC_REC, BUTTON_NONE },
|
||||||
{ ACTION_BMS_SELECT, BUTTON_RC_MENU, BUTTON_NONE },
|
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST)
|
||||||
{ ACTION_BMS_EXIT, BUTTON_RC_STOP, BUTTON_NONE },
|
|
||||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
|
|
||||||
}; /* button_context_settings_bmark */
|
}; /* button_context_settings_bmark */
|
||||||
|
|
||||||
static const struct button_mapping *button_context_bmark_h300lcdremote =
|
static const struct button_mapping *button_context_bmark_h300lcdremote =
|
||||||
|
|
|
@ -102,8 +102,7 @@ static const struct button_mapping button_context_yesno[] = {
|
||||||
|
|
||||||
static const struct button_mapping button_context_bmark[] = {
|
static const struct button_mapping button_context_bmark[] = {
|
||||||
{ ACTION_BMS_DELETE, BUTTON_MODE, BUTTON_NONE },
|
{ ACTION_BMS_DELETE, BUTTON_MODE, BUTTON_NONE },
|
||||||
{ ACTION_STD_OK, BUTTON_SELECT, BUTTON_NONE },
|
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
|
||||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS),
|
|
||||||
}; /* button_context_settings_bmark */
|
}; /* button_context_settings_bmark */
|
||||||
|
|
||||||
static const struct button_mapping button_context_quickscreen[] = {
|
static const struct button_mapping button_context_quickscreen[] = {
|
||||||
|
|
|
@ -117,9 +117,7 @@ static const struct button_mapping button_context_yesno[] = {
|
||||||
|
|
||||||
static const struct button_mapping button_context_bmark[] = {
|
static const struct button_mapping button_context_bmark[] = {
|
||||||
{ ACTION_BMS_DELETE, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU },
|
{ ACTION_BMS_DELETE, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU },
|
||||||
{ ACTION_BMS_SELECT, BUTTON_SELECT, BUTTON_NONE },
|
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
|
||||||
{ ACTION_BMS_EXIT, BUTTON_PLAY, BUTTON_NONE },
|
|
||||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS),
|
|
||||||
}; /* button_context_settings_bmark */
|
}; /* button_context_settings_bmark */
|
||||||
|
|
||||||
static const struct button_mapping button_context_quickscreen[] = {
|
static const struct button_mapping button_context_quickscreen[] = {
|
||||||
|
|
|
@ -113,10 +113,8 @@ static const struct button_mapping button_context_yesno[] = {
|
||||||
static const struct button_mapping button_context_bmark[] = {
|
static const struct button_mapping button_context_bmark[] = {
|
||||||
{ ACTION_NONE, BUTTON_LEFT, BUTTON_NONE },
|
{ ACTION_NONE, BUTTON_LEFT, BUTTON_NONE },
|
||||||
{ ACTION_BMS_DELETE, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_LEFT },
|
{ ACTION_BMS_DELETE, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_LEFT },
|
||||||
{ ACTION_BMS_EXIT, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT },
|
|
||||||
{ ACTION_BMS_SELECT, BUTTON_RIGHT, BUTTON_NONE },
|
|
||||||
|
|
||||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD),
|
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
|
||||||
}; /* button_context_settings_bmark */
|
}; /* button_context_settings_bmark */
|
||||||
|
|
||||||
static const struct button_mapping button_context_pitchscreen[] = {
|
static const struct button_mapping button_context_pitchscreen[] = {
|
||||||
|
|
|
@ -88,10 +88,8 @@ static const struct button_mapping button_context_yesno[] = {
|
||||||
static const struct button_mapping button_context_bmark[] = {
|
static const struct button_mapping button_context_bmark[] = {
|
||||||
{ ACTION_BMS_DELETE, BUTTON_PLAY|BUTTON_ON, BUTTON_PLAY },
|
{ ACTION_BMS_DELETE, BUTTON_PLAY|BUTTON_ON, BUTTON_PLAY },
|
||||||
{ ACTION_BMS_DELETE, BUTTON_PLAY|BUTTON_ON, BUTTON_ON },
|
{ ACTION_BMS_DELETE, BUTTON_PLAY|BUTTON_ON, BUTTON_ON },
|
||||||
{ ACTION_BMS_EXIT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE },
|
|
||||||
{ ACTION_BMS_SELECT, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY },
|
|
||||||
|
|
||||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD),
|
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
|
||||||
}; /* button_context_settings_bmark */
|
}; /* button_context_settings_bmark */
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
|
@ -199,10 +199,8 @@ static const struct button_mapping button_context_keyboard[] = {
|
||||||
static const struct button_mapping button_context_bmark[] = {
|
static const struct button_mapping button_context_bmark[] = {
|
||||||
{ ACTION_BMS_DELETE, BUTTON_PLAY|BUTTON_ON, BUTTON_PLAY },
|
{ ACTION_BMS_DELETE, BUTTON_PLAY|BUTTON_ON, BUTTON_PLAY },
|
||||||
{ ACTION_BMS_DELETE, BUTTON_PLAY|BUTTON_ON, BUTTON_ON },
|
{ ACTION_BMS_DELETE, BUTTON_PLAY|BUTTON_ON, BUTTON_ON },
|
||||||
{ ACTION_BMS_EXIT, BUTTON_OFF, BUTTON_NONE },
|
|
||||||
{ ACTION_BMS_SELECT, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY },
|
|
||||||
|
|
||||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD),
|
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
|
||||||
|
|
||||||
}; /* button_context_settings_bmark */
|
}; /* button_context_settings_bmark */
|
||||||
|
|
||||||
|
|
|
@ -76,10 +76,8 @@ static const struct button_mapping remote_button_context_standard[] = {
|
||||||
/** Bookmark Screen **/
|
/** Bookmark Screen **/
|
||||||
static const struct button_mapping button_context_bmark[] = {
|
static const struct button_mapping button_context_bmark[] = {
|
||||||
{ ACTION_BMS_DELETE, BUTTON_REC|BUTTON_REPEAT, BUTTON_REC },
|
{ ACTION_BMS_DELETE, BUTTON_REC|BUTTON_REPEAT, BUTTON_REC },
|
||||||
{ ACTION_BMS_SELECT, BUTTON_SELECT, BUTTON_NONE },
|
|
||||||
{ ACTION_BMS_EXIT, BUTTON_REC|BUTTON_REL, BUTTON_REC },
|
|
||||||
|
|
||||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS),
|
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
|
||||||
}; /* button_context_settings_bmark */
|
}; /* button_context_settings_bmark */
|
||||||
|
|
||||||
/** FM Radio Screen **/
|
/** FM Radio Screen **/
|
||||||
|
|
|
@ -4712,13 +4712,13 @@
|
||||||
</phrase>
|
</phrase>
|
||||||
<phrase>
|
<phrase>
|
||||||
id: LANG_BOOKMARK_SELECT_LIST_BOOKMARKS
|
id: LANG_BOOKMARK_SELECT_LIST_BOOKMARKS
|
||||||
desc: From the auto-load screen, allows user to list all bookmarks
|
desc: DEPRECATED
|
||||||
user:
|
user:
|
||||||
<source>
|
<source>
|
||||||
*: "Down = List"
|
*: ""
|
||||||
</source>
|
</source>
|
||||||
<dest>
|
<dest>
|
||||||
*: "Down = List"
|
*: deprecated
|
||||||
</dest>
|
</dest>
|
||||||
<voice>
|
<voice>
|
||||||
*: ""
|
*: ""
|
||||||
|
@ -4726,25 +4726,13 @@
|
||||||
</phrase>
|
</phrase>
|
||||||
<phrase>
|
<phrase>
|
||||||
id: LANG_BOOKMARK_SELECT_EXIT
|
id: LANG_BOOKMARK_SELECT_EXIT
|
||||||
desc: From the bookmark list screen, allows user to exit
|
desc: DEPRECATED
|
||||||
user:
|
user:
|
||||||
<source>
|
<source>
|
||||||
*: "OFF = Exit"
|
*: ""
|
||||||
h100,h120,h300: "STOP = Exit"
|
|
||||||
ipod*: "PLAY/PAUSE = Exit"
|
|
||||||
x5: "RECORD = Exit"
|
|
||||||
h10,h10_5gb: "PREV = Exit"
|
|
||||||
gigabeatf: "A = Exit"
|
|
||||||
e200: "POWER = Exit"
|
|
||||||
</source>
|
</source>
|
||||||
<dest>
|
<dest>
|
||||||
*: "OFF = Exit"
|
*: deprecated
|
||||||
h100,h120,h300: "STOP = Exit"
|
|
||||||
ipod*: "PLAY/PAUSE = Exit"
|
|
||||||
x5: "RECORD = Exit"
|
|
||||||
h10,h10_5gb: "PREV = Exit"
|
|
||||||
gigabeatf: "A = Exit"
|
|
||||||
e200: "POWER = Exit"
|
|
||||||
</dest>
|
</dest>
|
||||||
<voice>
|
<voice>
|
||||||
*: ""
|
*: ""
|
||||||
|
@ -4752,13 +4740,13 @@
|
||||||
</phrase>
|
</phrase>
|
||||||
<phrase>
|
<phrase>
|
||||||
id: LANG_BOOKMARK_SELECT_BOOKMARK_TEXT
|
id: LANG_BOOKMARK_SELECT_BOOKMARK_TEXT
|
||||||
desc: Used on the bookmark select window to label bookmark number
|
desc: DEPRECATED
|
||||||
user:
|
user:
|
||||||
<source>
|
<source>
|
||||||
*: "Bookmark"
|
*: ""
|
||||||
</source>
|
</source>
|
||||||
<dest>
|
<dest>
|
||||||
*: "Bookmark"
|
*: deprecated
|
||||||
</dest>
|
</dest>
|
||||||
<voice>
|
<voice>
|
||||||
*: ""
|
*: ""
|
||||||
|
@ -4766,53 +4754,41 @@
|
||||||
</phrase>
|
</phrase>
|
||||||
<phrase>
|
<phrase>
|
||||||
id: LANG_BOOKMARK_SELECT_INDEX_TEXT
|
id: LANG_BOOKMARK_SELECT_INDEX_TEXT
|
||||||
desc: Used on the bookmark select window to label index number
|
desc: DEPRECATED
|
||||||
user:
|
user:
|
||||||
<source>
|
<source>
|
||||||
*: "Index"
|
*: ""
|
||||||
</source>
|
</source>
|
||||||
<dest>
|
<dest>
|
||||||
*: "Index"
|
*: deprecated
|
||||||
</dest>
|
</dest>
|
||||||
<voice>
|
<voice>
|
||||||
*: "Index"
|
*: ""
|
||||||
</voice>
|
</voice>
|
||||||
</phrase>
|
</phrase>
|
||||||
<phrase>
|
<phrase>
|
||||||
id: LANG_BOOKMARK_SELECT_TIME_TEXT
|
id: LANG_BOOKMARK_SELECT_TIME_TEXT
|
||||||
desc: Used on the bookmark select window to label elapsed time
|
desc: DEPRECATED
|
||||||
user:
|
user:
|
||||||
<source>
|
<source>
|
||||||
*: "Time"
|
*: ""
|
||||||
</source>
|
</source>
|
||||||
<dest>
|
<dest>
|
||||||
*: "Time"
|
*: deprecated
|
||||||
</dest>
|
</dest>
|
||||||
<voice>
|
<voice>
|
||||||
*: "Time"
|
*: ""
|
||||||
</voice>
|
</voice>
|
||||||
</phrase>
|
</phrase>
|
||||||
<phrase>
|
<phrase>
|
||||||
id: LANG_BOOKMARK_SELECT_PLAY
|
id: LANG_BOOKMARK_SELECT_PLAY
|
||||||
desc: Used on the bookmark select window to indicated the play option
|
desc: DEPRECATED
|
||||||
user:
|
user:
|
||||||
<source>
|
<source>
|
||||||
*: "PLAY = Select"
|
*: ""
|
||||||
h100,h120,h300: "NAVI = Select"
|
|
||||||
ipod*: "SELECT = Select"
|
|
||||||
x5: "SELECT = Select"
|
|
||||||
h10,h10_5gb: "SELECT = Select"
|
|
||||||
gigabeatf: "SELECT = Select"
|
|
||||||
e200: "SELECT = Select"
|
|
||||||
</source>
|
</source>
|
||||||
<dest>
|
<dest>
|
||||||
*: "PLAY = Select"
|
*: deprecated
|
||||||
h100,h120,h300: "NAVI = Select"
|
|
||||||
ipod*: "SELECT = Select"
|
|
||||||
x5: "SELECT = Select"
|
|
||||||
h10,h10_5gb: "SELECT = Select"
|
|
||||||
gigabeatf: "SELECT = Select"
|
|
||||||
e200: "SELECT = Select"
|
|
||||||
</dest>
|
</dest>
|
||||||
<voice>
|
<voice>
|
||||||
*: ""
|
*: ""
|
||||||
|
@ -4820,25 +4796,13 @@
|
||||||
</phrase>
|
</phrase>
|
||||||
<phrase>
|
<phrase>
|
||||||
id: LANG_BOOKMARK_SELECT_DELETE
|
id: LANG_BOOKMARK_SELECT_DELETE
|
||||||
desc: Used on the bookmark select window to indicated the bookmark delete option
|
desc: DEPRECATED
|
||||||
user:
|
user:
|
||||||
<source>
|
<source>
|
||||||
*: "ON+Play = Delete"
|
*: ""
|
||||||
h100,h120,h300: "RECORD = Delete"
|
|
||||||
ipod*: "Long MENU = Delete"
|
|
||||||
x5: "Long RECORD = Delete"
|
|
||||||
h10,h10_5gb: "REWIND = Delete"
|
|
||||||
gigabeatf: "POWER = Delete"
|
|
||||||
e200: "PLAY = Delete"
|
|
||||||
</source>
|
</source>
|
||||||
<dest>
|
<dest>
|
||||||
*: "ON+Play = Delete"
|
*: deprecated
|
||||||
h100,h120,h300: "RECORD = Delete"
|
|
||||||
ipod*: "Long MENU = Delete"
|
|
||||||
x5: "Long RECORD = Delete"
|
|
||||||
h10,h10_5gb: "REWIND = Delete"
|
|
||||||
gigabeatf: "POWER = Delete"
|
|
||||||
e200: "PLAY = Delete"
|
|
||||||
</dest>
|
</dest>
|
||||||
<voice>
|
<voice>
|
||||||
*: ""
|
*: ""
|
||||||
|
@ -4846,13 +4810,13 @@
|
||||||
</phrase>
|
</phrase>
|
||||||
<phrase>
|
<phrase>
|
||||||
id: LANG_BOOKMARK_AUTOLOAD_QUERY
|
id: LANG_BOOKMARK_AUTOLOAD_QUERY
|
||||||
desc: prompt for user to decide to create a bookmark
|
desc: DEPRECATED
|
||||||
user:
|
user:
|
||||||
<source>
|
<source>
|
||||||
*: "Load Last Bookmark?"
|
*: ""
|
||||||
</source>
|
</source>
|
||||||
<dest>
|
<dest>
|
||||||
*: "Load Last Bookmark?"
|
*: deprecated
|
||||||
</dest>
|
</dest>
|
||||||
<voice>
|
<voice>
|
||||||
*: ""
|
*: ""
|
||||||
|
@ -10862,4 +10826,129 @@
|
||||||
*: "Moving"
|
*: "Moving"
|
||||||
</voice>
|
</voice>
|
||||||
</phrase>
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
id: LANG_BOOKMARK_SELECT_BOOKMARK
|
||||||
|
desc: bookmark selection list title
|
||||||
|
user:
|
||||||
|
<source>
|
||||||
|
*: "Select Bookmark"
|
||||||
|
</source>
|
||||||
|
<dest>
|
||||||
|
*: "Select Bookmark"
|
||||||
|
</dest>
|
||||||
|
<voice>
|
||||||
|
*: "Select Bookmark"
|
||||||
|
</voice>
|
||||||
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
id: LANG_BOOKMARK_DONT_RESUME
|
||||||
|
desc: top item in the list when asking user about bookmark auto load
|
||||||
|
user:
|
||||||
|
<source>
|
||||||
|
*: "<Don't Resume>"
|
||||||
|
</source>
|
||||||
|
<dest>
|
||||||
|
*: "<Don't Resume>"
|
||||||
|
</dest>
|
||||||
|
<voice>
|
||||||
|
*: "Do Not Resume"
|
||||||
|
</voice>
|
||||||
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
id: LANG_BOOKMARK_SHUFFLE
|
||||||
|
desc: bookmark selection list, bookmark enables shuffle
|
||||||
|
user:
|
||||||
|
<source>
|
||||||
|
*: ", Shuffle"
|
||||||
|
</source>
|
||||||
|
<dest>
|
||||||
|
*: ", Shuffle"
|
||||||
|
</dest>
|
||||||
|
<voice>
|
||||||
|
*: ""
|
||||||
|
</voice>
|
||||||
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
id: LANG_BOOKMARK_INVALID
|
||||||
|
desc: bookmark selection list, bookmark couldn't be parsed
|
||||||
|
user:
|
||||||
|
<source>
|
||||||
|
*: "<Invalid Bookmark>"
|
||||||
|
</source>
|
||||||
|
<dest>
|
||||||
|
*: "<Invalid Bookmark>"
|
||||||
|
</dest>
|
||||||
|
<voice>
|
||||||
|
*: "Invalid Bookmark"
|
||||||
|
</voice>
|
||||||
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
id: LANG_BOOKMARK_CONTEXT_MENU
|
||||||
|
desc: bookmark selection list context menu
|
||||||
|
user:
|
||||||
|
<source>
|
||||||
|
*: "Bookmark Actions"
|
||||||
|
</source>
|
||||||
|
<dest>
|
||||||
|
*: "Bookmark Actions"
|
||||||
|
</dest>
|
||||||
|
<voice>
|
||||||
|
*: "Bookmark Actions"
|
||||||
|
</voice>
|
||||||
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
id: LANG_BOOKMARK_CONTEXT_RESUME
|
||||||
|
desc: bookmark context menu, resume this bookmark
|
||||||
|
user:
|
||||||
|
<source>
|
||||||
|
*: "Resume"
|
||||||
|
</source>
|
||||||
|
<dest>
|
||||||
|
*: "Resume"
|
||||||
|
</dest>
|
||||||
|
<voice>
|
||||||
|
*: "Resume"
|
||||||
|
</voice>
|
||||||
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
id: LANG_BOOKMARK_CONTEXT_DELETE
|
||||||
|
desc: bookmark context menu, delete this bookmark
|
||||||
|
user:
|
||||||
|
<source>
|
||||||
|
*: "Delete"
|
||||||
|
</source>
|
||||||
|
<dest>
|
||||||
|
*: "Delete"
|
||||||
|
</dest>
|
||||||
|
<voice>
|
||||||
|
*: "Delete"
|
||||||
|
</voice>
|
||||||
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
id: VOICE_BOOKMARK_SELECT_INDEX_TEXT
|
||||||
|
desc: voice only, used in the bookmark list to label index number
|
||||||
|
user:
|
||||||
|
<source>
|
||||||
|
*: ""
|
||||||
|
</source>
|
||||||
|
<dest>
|
||||||
|
*: ""
|
||||||
|
</dest>
|
||||||
|
<voice>
|
||||||
|
*: "Index"
|
||||||
|
</voice>
|
||||||
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
id: VOICE_BOOKMARK_SELECT_TIME_TEXT
|
||||||
|
desc: voice only, used in the bookmark select list to label elapsed time
|
||||||
|
user:
|
||||||
|
<source>
|
||||||
|
*: ""
|
||||||
|
</source>
|
||||||
|
<dest>
|
||||||
|
*: ""
|
||||||
|
</dest>
|
||||||
|
<voice>
|
||||||
|
*: "Time"
|
||||||
|
</voice>
|
||||||
|
</phrase>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue