forked from len0rd/rockbox
#ifdef HAVE_TAGCACHE the set_rating code and remove some old, unused code
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12936 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
b00d66a507
commit
40595bd57a
3 changed files with 15 additions and 63 deletions
|
|
@ -869,7 +869,7 @@ static int onplay_callback(int key, int menu)
|
|||
return key;
|
||||
}
|
||||
|
||||
|
||||
#ifdef HAVE_TAGCACHE
|
||||
char rating_menu_string[32];
|
||||
|
||||
static void create_rating_menu(void)
|
||||
|
|
@ -895,7 +895,7 @@ static bool set_rating_inline(void)
|
|||
create_rating_menu();
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
int onplay(char* file, int attr, int from)
|
||||
{
|
||||
|
|
@ -936,6 +936,7 @@ int onplay(char* file, int attr, int from)
|
|||
|
||||
if (context == CONTEXT_WPS)
|
||||
{
|
||||
#ifdef HAVE_TAGCACHE
|
||||
if(file && global_settings.runtimedb)
|
||||
{
|
||||
create_rating_menu();
|
||||
|
|
@ -943,6 +944,7 @@ int onplay(char* file, int attr, int from)
|
|||
items[i].function = set_rating_inline;
|
||||
i++;
|
||||
}
|
||||
#endif
|
||||
items[i].desc = ID2P(LANG_BOOKMARK_MENU);
|
||||
items[i].function = bookmark_menu;
|
||||
i++;
|
||||
|
|
@ -955,12 +957,6 @@ int onplay(char* file, int attr, int from)
|
|||
items[i].desc = ID2P(LANG_MENU_SHOW_ID3_INFO);
|
||||
items[i].function = browse_id3;
|
||||
i++;
|
||||
/* if(rundb_initialized)
|
||||
{
|
||||
items[i].desc = ID2P(LANG_MENU_SET_RATING);
|
||||
items[i].function = set_rating;
|
||||
i++;
|
||||
}*/
|
||||
}
|
||||
|
||||
#ifdef HAVE_MULTIVOLUME
|
||||
|
|
@ -1072,11 +1068,17 @@ int onplay(char* file, int attr, int from)
|
|||
if (i)
|
||||
{
|
||||
m = menu_init( items, i, onplay_callback, NULL, NULL, NULL );
|
||||
do {
|
||||
result = menu_show(m);
|
||||
if (result >= 0)
|
||||
items[result].function();
|
||||
} while (items[result].function == set_rating_inline);
|
||||
#ifdef HAVE_TAGCACHE
|
||||
do
|
||||
{
|
||||
#endif
|
||||
result = menu_show(m);
|
||||
if (result >= 0)
|
||||
items[result].function();
|
||||
#ifdef HAVE_TAGCACHE
|
||||
}
|
||||
while (items[result].function == set_rating_inline);
|
||||
#endif
|
||||
menu_exit(m);
|
||||
|
||||
if (exit_to_main)
|
||||
|
|
|
|||
|
|
@ -1254,55 +1254,6 @@ bool browse_id3(void)
|
|||
}
|
||||
}
|
||||
|
||||
#if 0 /* Currently unused */
|
||||
bool set_rating(void)
|
||||
{
|
||||
struct mp3entry* id3 = audio_current_track();
|
||||
int button;
|
||||
bool exit = false;
|
||||
char rating_text[20];
|
||||
|
||||
if (!(audio_status() & AUDIO_STATUS_PLAY)||id3==NULL)
|
||||
return false;
|
||||
while (!exit)
|
||||
{
|
||||
lcd_clear_display();
|
||||
lcd_puts(0, 0, str(LANG_RATING));
|
||||
snprintf(rating_text, sizeof(rating_text), "%d", id3->rating);
|
||||
lcd_puts(0, 1, (unsigned char *)rating_text);
|
||||
lcd_update();
|
||||
button = get_action(CONTEXT_SETTINGS,TIMEOUT_BLOCK);
|
||||
|
||||
switch(button)
|
||||
{
|
||||
case ACTION_SETTINGS_DEC:
|
||||
if (id3->rating > 0)
|
||||
id3->rating--;
|
||||
else
|
||||
id3->rating = 10;
|
||||
break;
|
||||
|
||||
case ACTION_SETTINGS_INC:
|
||||
if (id3->rating < 10)
|
||||
id3->rating++;
|
||||
else
|
||||
id3->rating = 0;
|
||||
break;
|
||||
case ACTION_STD_CANCEL:
|
||||
exit = true;
|
||||
break;
|
||||
|
||||
default:
|
||||
if(default_event_handler(button) == SYS_USB_CONNECTED)
|
||||
return true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
action_signalscreenchange();
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool view_runtime(void)
|
||||
{
|
||||
char s[32];
|
||||
|
|
|
|||
|
|
@ -48,7 +48,6 @@ bool set_time_screen(const char* string, struct tm *tm);
|
|||
|
||||
bool shutdown_screen(void);
|
||||
bool browse_id3(void);
|
||||
/* bool set_rating(void); Currently unused */
|
||||
bool view_runtime(void);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue