mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 12:45:26 -05:00
FS#9281 Rename of splash functions.
* Remove gui_splash() * Rename gui_syncsplash() to splashf() and remove its voice capabilities. * Rename the internal splash() to splash_internal() and introduce an externally visible splash() that handles simple splashing without printf functionality e.g. splash(HZ, ID2P(LANG_FOO)); or splash(HZ, "foo"); if a LANG_* id is passed it will be voiced. * Adjust all places that called gui_syncsplash() to use the correct variant from above. * Export both new functions to plugins and adjust places calling rb->splash() to use the correct variant so that we now have naming consistency between the core and plugins. * Fix one latent bug that would cause my sim to crash with the above changes and correct P2STR and P2ID macros, thanks to pondlife. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18282 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
9464fdde2d
commit
01729e7a18
65 changed files with 276 additions and 305 deletions
|
|
@ -742,7 +742,7 @@ int radio_screen(void)
|
|||
case ACTION_FM_PRESET:
|
||||
if(num_presets < 1)
|
||||
{
|
||||
gui_syncsplash(HZ, ID2P(LANG_FM_NO_PRESETS));
|
||||
splash(HZ, ID2P(LANG_FM_NO_PRESETS));
|
||||
update_screen = true;
|
||||
FOR_NB_SCREENS(i)
|
||||
{
|
||||
|
|
@ -776,7 +776,7 @@ int radio_screen(void)
|
|||
case ACTION_FM_FREEZE:
|
||||
if(!screen_freeze)
|
||||
{
|
||||
gui_syncsplash(HZ, str(LANG_FM_FREEZE));
|
||||
splash(HZ, str(LANG_FM_FREEZE));
|
||||
screen_freeze = true;
|
||||
}
|
||||
else
|
||||
|
|
@ -917,8 +917,8 @@ int radio_screen(void)
|
|||
FOR_NB_SCREENS(i)
|
||||
screens[i].puts_scroll(0, top_of_screen + 1, buf);
|
||||
|
||||
snprintf(buf, 128, stereo?str(LANG_CHANNEL_STEREO):
|
||||
str(LANG_CHANNEL_MONO));
|
||||
snprintf(buf, 128, "%s", stereo?str(LANG_CHANNEL_STEREO):
|
||||
str(LANG_CHANNEL_MONO));
|
||||
FOR_NB_SCREENS(i)
|
||||
screens[i].puts_scroll(0, top_of_screen + 2, buf);
|
||||
|
||||
|
|
@ -1001,7 +1001,7 @@ int radio_screen(void)
|
|||
#if CONFIG_CODEC != SWCODEC
|
||||
if(audio_status() & AUDIO_STATUS_ERROR)
|
||||
{
|
||||
gui_syncsplash(0, str(LANG_DISK_FULL));
|
||||
splash(0, str(LANG_DISK_FULL));
|
||||
gui_syncstatusbar_draw(&statusbars,true);
|
||||
FOR_NB_SCREENS(i)
|
||||
{
|
||||
|
|
@ -1083,7 +1083,7 @@ static void radio_save_presets(void)
|
|||
}
|
||||
else
|
||||
{
|
||||
gui_syncsplash(HZ, ID2P(LANG_FM_PRESET_SAVE_FAILED));
|
||||
splash(HZ, ID2P(LANG_FM_PRESET_SAVE_FAILED));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1169,7 +1169,7 @@ static int radio_add_preset(void)
|
|||
}
|
||||
else
|
||||
{
|
||||
gui_syncsplash(HZ, ID2P(LANG_FM_NO_FREE_PRESETS));
|
||||
splash(HZ, ID2P(LANG_FM_NO_FREE_PRESETS));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
@ -1257,7 +1257,7 @@ static int save_preset_list(void)
|
|||
if((!p1) || (len > MAX_FILENAME) || (len == 0))
|
||||
{
|
||||
/* no slash, too long or too short */
|
||||
gui_syncsplash(HZ, ID2P(LANG_INVALID_FILENAME));
|
||||
splash(HZ, ID2P(LANG_INVALID_FILENAME));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1277,7 +1277,7 @@ static int save_preset_list(void)
|
|||
}
|
||||
}
|
||||
else
|
||||
gui_syncsplash(HZ, ID2P(LANG_FM_NO_PRESETS));
|
||||
splash(HZ, ID2P(LANG_FM_NO_PRESETS));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -1456,8 +1456,6 @@ static int scan_presets(void *viewports)
|
|||
const struct fm_region_data * const fmr =
|
||||
&fm_region_data[global_settings.fm_region];
|
||||
|
||||
char buf[MAX_FMPRESET_LEN + 1];
|
||||
|
||||
curr_freq = fmr->freq_min;
|
||||
num_presets = 0;
|
||||
memset(presets, 0, sizeof(presets));
|
||||
|
|
@ -1473,8 +1471,7 @@ static int scan_presets(void *viewports)
|
|||
frac = freq % 100;
|
||||
freq /= 100;
|
||||
|
||||
snprintf(buf, MAX_FMPRESET_LEN, str(LANG_FM_SCANNING), freq, frac);
|
||||
gui_syncsplash(0, buf);
|
||||
splashf(0, str(LANG_FM_SCANNING), freq, frac);
|
||||
|
||||
if(tuner_set(RADIO_SCAN_FREQUENCY, curr_freq))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -606,9 +606,9 @@ int rec_create_directory(void)
|
|||
{
|
||||
while (action_userabort(HZ) == false)
|
||||
{
|
||||
gui_syncsplash(0, "%s %s",
|
||||
str(LANG_REC_DIR_NOT_WRITABLE),
|
||||
str(LANG_OFF_ABORT));
|
||||
splashf(0, "%s %s",
|
||||
str(LANG_REC_DIR_NOT_WRITABLE),
|
||||
str(LANG_OFF_ABORT));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -1442,7 +1442,6 @@ bool recording_screen(bool no_source)
|
|||
screens[1].puts(0, 0, str(LANG_REMOTE_LCD_OFF));
|
||||
screens[1].puts(0, 1, str(LANG_REMOTE_LCD_ON));
|
||||
screens[1].update_viewport();
|
||||
gui_splash(&screens[0], 0, str(LANG_REMOTE_LCD_OFF));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1789,7 +1788,7 @@ bool recording_screen(bool no_source)
|
|||
audio_stat = audio_status();
|
||||
if (audio_stat & AUDIO_STATUS_ERROR)
|
||||
{
|
||||
gui_syncsplash(0, str(LANG_DISK_FULL));
|
||||
splash(0, str(LANG_DISK_FULL));
|
||||
gui_syncstatusbar_draw(&statusbars, true);
|
||||
|
||||
FOR_NB_SCREENS(i)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue