From 01729e7a1841d8aae7be37707dbc7146348c9a64 Mon Sep 17 00:00:00 2001 From: Nils Wallménius Date: Fri, 15 Aug 2008 08:27:39 +0000 Subject: 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 --- apps/gui/gwps-common.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'apps/gui/gwps-common.c') diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c index 8c349ea35c..26c5c5d637 100644 --- a/apps/gui/gwps-common.c +++ b/apps/gui/gwps-common.c @@ -152,7 +152,7 @@ bool update_onvol_change(struct gui_wps * gwps) gui_wps_refresh(gwps, 0, WPS_REFRESH_NON_STATIC); #ifdef HAVE_LCD_CHARCELLS - gui_splash(gwps->display, 0, "Vol: %3d dB", + splashf(0, "Vol: %3d dB", sound_val2phys(SOUND_VOLUME, global_settings.volume)); return true; #endif @@ -329,7 +329,7 @@ bool gui_wps_display(void) #ifdef HAVE_LCD_BITMAP gui_syncstatusbar_draw(&statusbars, true); #endif - gui_syncsplash(HZ, ID2P(LANG_END_PLAYLIST)); + splash(HZ, ID2P(LANG_END_PLAYLIST)); return true; } else @@ -485,16 +485,11 @@ bool update(struct gui_wps *gwps) void display_keylock_text(bool locked) { - char* s; int i; FOR_NB_SCREENS(i) gui_wps[i].display->stop_scroll(); - if(locked) - s = str(LANG_KEYLOCK_ON); - else - s = str(LANG_KEYLOCK_OFF); - gui_syncsplash(HZ, s); + splash(HZ, locked ? ID2P(LANG_KEYLOCK_ON) : ID2P(LANG_KEYLOCK_OFF)); } #ifdef HAVE_LCD_BITMAP -- cgit v1.2.3