mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-04-12 00:47:49 -04:00
plugins: playing time: adjust error message, keep theme enabled
Replace generic error message with voiced info about the number of tracks skipped Change-Id: I334fac447eeef2eb5c0d302675b98027b01b09d0
This commit is contained in:
parent
4e211b55f9
commit
fe690dfa20
3 changed files with 17 additions and 15 deletions
|
|
@ -12754,20 +12754,6 @@
|
|||
*: "Average bit rate"
|
||||
</voice>
|
||||
</phrase>
|
||||
<phrase>
|
||||
id: LANG_PLAYTIME_ERROR
|
||||
desc: playing time screen
|
||||
user: core
|
||||
<source>
|
||||
*: "Error while gathering info"
|
||||
</source>
|
||||
<dest>
|
||||
*: "Error while gathering info"
|
||||
</dest>
|
||||
<voice>
|
||||
*: "Error while gathering info"
|
||||
</voice>
|
||||
</phrase>
|
||||
<phrase>
|
||||
id: LANG_PLAYING_TIME
|
||||
desc: onplay menu
|
||||
|
|
|
|||
|
|
@ -886,6 +886,7 @@ int plugin_load(const char* plugin, const void* parameter)
|
|||
/* for some plugins, the SBS can be left enabled */
|
||||
const char *sepch = strrchr(plugin, PATH_SEPCH);
|
||||
bool theme_enabled = sepch && (!strcmp("properties.rock", sepch + 1) ||
|
||||
!strcmp("playing_time.rock", sepch + 1) ||
|
||||
!strcmp("main_menu_config.rock", sepch + 1) ||
|
||||
!strcmp("disktidy.rock", sepch + 1));
|
||||
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ enum ePT_SUM {
|
|||
|
||||
struct playing_time_info {
|
||||
char single_mode_tag[MAX_PATH]; /* Relevant tag when single mode enabled */
|
||||
char error_str[16]; /* Error message to display to user */
|
||||
unsigned long long size[ePT_COUNT]; /* File size of tracks */
|
||||
unsigned long long length[ePT_COUNT]; /* Length of tracks */
|
||||
unsigned long curr_track_length[ePT_COUNT]; /* Current track length */
|
||||
|
|
@ -529,7 +530,19 @@ static bool playing_time(void)
|
|||
if (!success)
|
||||
return false;
|
||||
if (pti.error_count > 0)
|
||||
rb->splash(HZ, ID2P(LANG_PLAYTIME_ERROR));
|
||||
{
|
||||
rb->snprintf(pti.error_str, sizeof pti.error_str,
|
||||
"%d %s", pti.error_count, rb->str(LANG_TRACKS));
|
||||
if (rb->global_settings->talk_menu)
|
||||
{
|
||||
rb->talk_id(LANG_ERROR_FORMATSTR, false);
|
||||
rb->talk_number(pti.error_count, true);
|
||||
rb->talk_id(LANG_TRACKS, true);
|
||||
rb->talk_force_enqueue_next();
|
||||
}
|
||||
/* (voiced above) */
|
||||
rb->splashf(HZ, rb->str(LANG_ERROR_FORMATSTR), pti.error_str);
|
||||
}
|
||||
|
||||
pt_store_converted_totals(&pti);
|
||||
return pt_display_stats(&pti);
|
||||
|
|
@ -547,6 +560,8 @@ enum plugin_status plugin_start(const void* parameter)
|
|||
return status;
|
||||
}
|
||||
|
||||
/* Only relevant if launched using hotkey from the
|
||||
WPS. Otherwise theme should be enabled already. */
|
||||
FOR_NB_SCREENS(i)
|
||||
rb->viewportmanager_theme_enable(i, true, NULL);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue