diff options
author | Nils Wallménius <nils@rockbox.org> | 2008-08-15 08:27:39 +0000 |
---|---|---|
committer | Nils Wallménius <nils@rockbox.org> | 2008-08-15 08:27:39 +0000 |
commit | 01729e7a1841d8aae7be37707dbc7146348c9a64 (patch) | |
tree | 5490fd9eccdcaef39bbbb91e8a44d1caad9b2ef7 /apps | |
parent | 9464fdde2d780206e1eddba8cafbfbd4bbff83e4 (diff) | |
download | rockbox-01729e7a1841d8aae7be37707dbc7146348c9a64.tar.gz rockbox-01729e7a1841d8aae7be37707dbc7146348c9a64.zip |
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
Diffstat (limited to 'apps')
65 files changed, 273 insertions, 302 deletions
diff --git a/apps/action.c b/apps/action.c index 7cde1b14ba..b1dd98df08 100644 --- a/apps/action.c +++ b/apps/action.c | |||
@@ -172,7 +172,7 @@ static int get_action_worker(int context, int timeout, | |||
172 | { | 172 | { |
173 | last_button = BUTTON_NONE; | 173 | last_button = BUTTON_NONE; |
174 | keys_locked = false; | 174 | keys_locked = false; |
175 | gui_syncsplash(HZ/2, str(LANG_KEYLOCK_OFF)); | 175 | splash(HZ/2, str(LANG_KEYLOCK_OFF)); |
176 | return ACTION_REDRAW; | 176 | return ACTION_REDRAW; |
177 | } | 177 | } |
178 | else | 178 | else |
@@ -181,7 +181,7 @@ static int get_action_worker(int context, int timeout, | |||
181 | #endif | 181 | #endif |
182 | { | 182 | { |
183 | if ((button & BUTTON_REL)) | 183 | if ((button & BUTTON_REL)) |
184 | gui_syncsplash(HZ/2, str(LANG_KEYLOCK_ON)); | 184 | splash(HZ/2, str(LANG_KEYLOCK_ON)); |
185 | return ACTION_REDRAW; | 185 | return ACTION_REDRAW; |
186 | } | 186 | } |
187 | } | 187 | } |
@@ -220,7 +220,7 @@ static int get_action_worker(int context, int timeout, | |||
220 | { | 220 | { |
221 | unlock_combo = button; | 221 | unlock_combo = button; |
222 | keys_locked = true; | 222 | keys_locked = true; |
223 | gui_syncsplash(HZ/2, str(LANG_KEYLOCK_ON)); | 223 | splash(HZ/2, str(LANG_KEYLOCK_ON)); |
224 | 224 | ||
225 | button_clear_queue(); | 225 | button_clear_queue(); |
226 | return ACTION_REDRAW; | 226 | return ACTION_REDRAW; |
diff --git a/apps/alarm_menu.c b/apps/alarm_menu.c index 3866a99bc1..bc058b7251 100644 --- a/apps/alarm_menu.c +++ b/apps/alarm_menu.c | |||
@@ -129,11 +129,11 @@ bool alarm_screen(void) | |||
129 | talk_value(togo % 60, UNIT_MIN, true); | 129 | talk_value(togo % 60, UNIT_MIN, true); |
130 | talk_force_enqueue_next(); | 130 | talk_force_enqueue_next(); |
131 | } | 131 | } |
132 | gui_syncsplash(HZ*2, str(LANG_ALARM_MOD_TIME_TO_GO), | 132 | splashf(HZ*2, str(LANG_ALARM_MOD_TIME_TO_GO), |
133 | togo / 60, togo % 60); | 133 | togo / 60, togo % 60); |
134 | done = true; | 134 | done = true; |
135 | } else { | 135 | } else { |
136 | gui_syncsplash(HZ, ID2P(LANG_ALARM_MOD_ERROR)); | 136 | splash(HZ, ID2P(LANG_ALARM_MOD_ERROR)); |
137 | update = true; | 137 | update = true; |
138 | } | 138 | } |
139 | break; | 139 | break; |
@@ -188,7 +188,7 @@ bool alarm_screen(void) | |||
188 | 188 | ||
189 | case ACTION_STD_CANCEL: | 189 | case ACTION_STD_CANCEL: |
190 | rtc_enable_alarm(false); | 190 | rtc_enable_alarm(false); |
191 | gui_syncsplash(HZ*2, ID2P(LANG_ALARM_MOD_DISABLE)); | 191 | splash(HZ*2, ID2P(LANG_ALARM_MOD_DISABLE)); |
192 | done = true; | 192 | done = true; |
193 | break; | 193 | break; |
194 | 194 | ||
diff --git a/apps/bookmark.c b/apps/bookmark.c index 0c3da641cb..524de5aff4 100644 --- a/apps/bookmark.c +++ b/apps/bookmark.c | |||
@@ -237,8 +237,8 @@ static bool write_bookmark(bool create_bookmark_file, const char *bookmark) | |||
237 | } | 237 | } |
238 | } | 238 | } |
239 | 239 | ||
240 | gui_syncsplash(HZ, success ? ID2P(LANG_BOOKMARK_CREATE_SUCCESS) | 240 | splash(HZ, success ? ID2P(LANG_BOOKMARK_CREATE_SUCCESS) |
241 | : ID2P(LANG_BOOKMARK_CREATE_FAILURE)); | 241 | : ID2P(LANG_BOOKMARK_CREATE_FAILURE)); |
242 | 242 | ||
243 | return true; | 243 | return true; |
244 | } | 244 | } |
@@ -400,7 +400,7 @@ bool bookmark_autoload(const char* file) | |||
400 | if (!play_bookmark(bookmark)) | 400 | if (!play_bookmark(bookmark)) |
401 | { | 401 | { |
402 | /* Selected bookmark not found. */ | 402 | /* Selected bookmark not found. */ |
403 | gui_syncsplash(HZ*2, ID2P(LANG_NOTHING_TO_RESUME)); | 403 | splash(HZ*2, ID2P(LANG_NOTHING_TO_RESUME)); |
404 | } | 404 | } |
405 | 405 | ||
406 | /* Act as if autoload was done even if it failed, since the | 406 | /* Act as if autoload was done even if it failed, since the |
@@ -445,7 +445,7 @@ bool bookmark_load(const char* file, bool autoload) | |||
445 | /* Selected bookmark not found. */ | 445 | /* Selected bookmark not found. */ |
446 | if (!autoload) | 446 | if (!autoload) |
447 | { | 447 | { |
448 | gui_syncsplash(HZ*2, ID2P(LANG_NOTHING_TO_RESUME)); | 448 | splash(HZ*2, ID2P(LANG_NOTHING_TO_RESUME)); |
449 | } | 449 | } |
450 | 450 | ||
451 | return false; | 451 | return false; |
@@ -694,7 +694,7 @@ static char* select_bookmark(const char* bookmark_file_name, bool show_dont_resu | |||
694 | if (bookmarks->total_count < 1) | 694 | if (bookmarks->total_count < 1) |
695 | { | 695 | { |
696 | /* No more bookmarks, delete file and exit */ | 696 | /* No more bookmarks, delete file and exit */ |
697 | gui_syncsplash(HZ, ID2P(LANG_BOOKMARK_LOAD_EMPTY)); | 697 | splash(HZ, ID2P(LANG_BOOKMARK_LOAD_EMPTY)); |
698 | remove(bookmark_file_name); | 698 | remove(bookmark_file_name); |
699 | return NULL; | 699 | return NULL; |
700 | } | 700 | } |
diff --git a/apps/codecs.c b/apps/codecs.c index 9df8ac58b7..417b546391 100644 --- a/apps/codecs.c +++ b/apps/codecs.c | |||
@@ -248,7 +248,7 @@ int codec_load_file(const char *plugin, struct codec_api *api) | |||
248 | fd = open(path, O_RDONLY); | 248 | fd = open(path, O_RDONLY); |
249 | if (fd < 0) { | 249 | if (fd < 0) { |
250 | logf("Codec load error:%d", fd); | 250 | logf("Codec load error:%d", fd); |
251 | gui_syncsplash(HZ*2, "Couldn't load codec: %s", path); | 251 | splashf(HZ*2, "Couldn't load codec: %s", path); |
252 | return fd; | 252 | return fd; |
253 | } | 253 | } |
254 | 254 | ||
diff --git a/apps/debug_menu.c b/apps/debug_menu.c index b2144e2169..72379f4104 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c | |||
@@ -2136,7 +2136,7 @@ static bool dbg_save_roms(void) | |||
2136 | restore_irq(old_irq_level); | 2136 | restore_irq(old_irq_level); |
2137 | 2137 | ||
2138 | if (err) | 2138 | if (err) |
2139 | gui_syncsplash(HZ*3, "Eeprom read failure (%d)",err); | 2139 | splashf(HZ*3, "Eeprom read failure (%d)", err); |
2140 | else | 2140 | else |
2141 | { | 2141 | { |
2142 | write(fd, buf, sizeof buf); | 2142 | write(fd, buf, sizeof buf); |
@@ -2233,7 +2233,7 @@ extern bool do_screendump_instead_of_usb; | |||
2233 | static bool dbg_screendump(void) | 2233 | static bool dbg_screendump(void) |
2234 | { | 2234 | { |
2235 | do_screendump_instead_of_usb = !do_screendump_instead_of_usb; | 2235 | do_screendump_instead_of_usb = !do_screendump_instead_of_usb; |
2236 | gui_syncsplash(HZ, "Screendump %s", | 2236 | splashf(HZ, "Screendump %s", |
2237 | do_screendump_instead_of_usb?"enabled":"disabled"); | 2237 | do_screendump_instead_of_usb?"enabled":"disabled"); |
2238 | return false; | 2238 | return false; |
2239 | } | 2239 | } |
@@ -2277,21 +2277,21 @@ static bool dbg_write_eeprom(void) | |||
2277 | 2277 | ||
2278 | err = eeprom_24cxx_write(0, buf, sizeof buf); | 2278 | err = eeprom_24cxx_write(0, buf, sizeof buf); |
2279 | if (err) | 2279 | if (err) |
2280 | gui_syncsplash(HZ*3, "Eeprom write failure (%d)",err); | 2280 | splashf(HZ*3, "Eeprom write failure (%d)", err); |
2281 | else | 2281 | else |
2282 | gui_syncsplash(HZ*3, "Eeprom written successfully"); | 2282 | splash(HZ*3, "Eeprom written successfully"); |
2283 | 2283 | ||
2284 | restore_irq(old_irq_level); | 2284 | restore_irq(old_irq_level); |
2285 | } | 2285 | } |
2286 | else | 2286 | else |
2287 | { | 2287 | { |
2288 | gui_syncsplash(HZ*3, "File read error (%d)",rc); | 2288 | splashf(HZ*3, "File read error (%d)",rc); |
2289 | } | 2289 | } |
2290 | close(fd); | 2290 | close(fd); |
2291 | } | 2291 | } |
2292 | else | 2292 | else |
2293 | { | 2293 | { |
2294 | gui_syncsplash(HZ*3, "Failed to open 'internal_eeprom.bin'"); | 2294 | splash(HZ*3, "Failed to open 'internal_eeprom.bin'"); |
2295 | } | 2295 | } |
2296 | 2296 | ||
2297 | return false; | 2297 | return false; |
@@ -2396,7 +2396,7 @@ static bool logf_usb_serial(void) | |||
2396 | { | 2396 | { |
2397 | bool serial_enabled = !usb_core_driver_enabled(USB_DRIVER_SERIAL); | 2397 | bool serial_enabled = !usb_core_driver_enabled(USB_DRIVER_SERIAL); |
2398 | usb_core_enable_driver(USB_DRIVER_SERIAL,serial_enabled); | 2398 | usb_core_enable_driver(USB_DRIVER_SERIAL,serial_enabled); |
2399 | gui_syncsplash(HZ, "USB logf %s", | 2399 | splashf(HZ, "USB logf %s", |
2400 | serial_enabled?"enabled":"disabled"); | 2400 | serial_enabled?"enabled":"disabled"); |
2401 | return false; | 2401 | return false; |
2402 | } | 2402 | } |
@@ -2405,7 +2405,7 @@ static bool logf_usb_serial(void) | |||
2405 | #if defined(HAVE_USBSTACK) && defined(USB_STORAGE) | 2405 | #if defined(HAVE_USBSTACK) && defined(USB_STORAGE) |
2406 | static bool usb_reconnect(void) | 2406 | static bool usb_reconnect(void) |
2407 | { | 2407 | { |
2408 | gui_syncsplash(HZ, "Reconnect mass storage"); | 2408 | splash(HZ, "Reconnect mass storage"); |
2409 | usb_storage_reconnect(); | 2409 | usb_storage_reconnect(); |
2410 | return false; | 2410 | return false; |
2411 | } | 2411 | } |
diff --git a/apps/enc_config.c b/apps/enc_config.c index 9c5cd7d784..2368c9e065 100644 --- a/apps/enc_config.c +++ b/apps/enc_config.c | |||
@@ -403,7 +403,7 @@ bool enc_config_menu(struct encoder_config *cfg) | |||
403 | } | 403 | } |
404 | else | 404 | else |
405 | { | 405 | { |
406 | gui_syncsplash(HZ, str(LANG_NO_SETTINGS)); | 406 | splash(HZ, str(LANG_NO_SETTINGS)); |
407 | return false; | 407 | return false; |
408 | } | 408 | } |
409 | } /* enc_config_menu */ | 409 | } /* enc_config_menu */ |
@@ -461,7 +461,7 @@ bool enc_global_config_menu(void) | |||
461 | } | 461 | } |
462 | else | 462 | else |
463 | { | 463 | { |
464 | gui_syncsplash(HZ, str(LANG_NO_SETTINGS)); | 464 | splash(HZ, str(LANG_NO_SETTINGS)); |
465 | return false; | 465 | return false; |
466 | } | 466 | } |
467 | } /* enc_global_config_menu */ | 467 | } /* enc_global_config_menu */ |
diff --git a/apps/filetree.c b/apps/filetree.c index dd3cb5452d..2b883db8ea 100644 --- a/apps/filetree.c +++ b/apps/filetree.c | |||
@@ -92,7 +92,7 @@ bool ft_play_playlist(char* pathname, char* dirname, char* filename) | |||
92 | { | 92 | { |
93 | if (global_settings.party_mode) | 93 | if (global_settings.party_mode) |
94 | { | 94 | { |
95 | gui_syncsplash(HZ, ID2P(LANG_PARTY_MODE)); | 95 | splash(HZ, ID2P(LANG_PARTY_MODE)); |
96 | return false; | 96 | return false; |
97 | } | 97 | } |
98 | 98 | ||
@@ -101,7 +101,7 @@ bool ft_play_playlist(char* pathname, char* dirname, char* filename) | |||
101 | return false; | 101 | return false; |
102 | } | 102 | } |
103 | 103 | ||
104 | gui_syncsplash(0, ID2P(LANG_WAIT)); | 104 | splash(0, ID2P(LANG_WAIT)); |
105 | 105 | ||
106 | /* about to create a new current playlist... | 106 | /* about to create a new current playlist... |
107 | allow user to cancel the operation */ | 107 | allow user to cancel the operation */ |
@@ -397,7 +397,7 @@ int ft_enter(struct tree_context* c) | |||
397 | if (bookmark_autoload(c->currdir)) | 397 | if (bookmark_autoload(c->currdir)) |
398 | break; | 398 | break; |
399 | 399 | ||
400 | gui_syncsplash(0, ID2P(LANG_WAIT)); | 400 | splash(0, ID2P(LANG_WAIT)); |
401 | 401 | ||
402 | /* about to create a new current playlist... | 402 | /* about to create a new current playlist... |
403 | allow user to cancel the operation */ | 403 | allow user to cancel the operation */ |
@@ -408,7 +408,7 @@ int ft_enter(struct tree_context* c) | |||
408 | { | 408 | { |
409 | playlist_insert_track(NULL, buf, | 409 | playlist_insert_track(NULL, buf, |
410 | PLAYLIST_INSERT_LAST, true, true); | 410 | PLAYLIST_INSERT_LAST, true, true); |
411 | gui_syncsplash(HZ, ID2P(LANG_QUEUE_LAST)); | 411 | splash(HZ, ID2P(LANG_QUEUE_LAST)); |
412 | } | 412 | } |
413 | else if (playlist_create(c->currdir, NULL) != -1) | 413 | else if (playlist_create(c->currdir, NULL) != -1) |
414 | { | 414 | { |
@@ -432,8 +432,7 @@ int ft_enter(struct tree_context* c) | |||
432 | #if CONFIG_TUNER | 432 | #if CONFIG_TUNER |
433 | /* fmr preset file */ | 433 | /* fmr preset file */ |
434 | case FILE_ATTR_FMR: | 434 | case FILE_ATTR_FMR: |
435 | 435 | splash(0, ID2P(LANG_WAIT)); | |
436 | gui_syncsplash(0, ID2P(LANG_WAIT)); | ||
437 | 436 | ||
438 | /* Preset inside the default folder. */ | 437 | /* Preset inside the default folder. */ |
439 | if(!strncasecmp(FMPRESET_PATH, buf, strlen(FMPRESET_PATH))) | 438 | if(!strncasecmp(FMPRESET_PATH, buf, strlen(FMPRESET_PATH))) |
@@ -460,7 +459,7 @@ int ft_enter(struct tree_context* c) | |||
460 | 459 | ||
461 | /* wps config file */ | 460 | /* wps config file */ |
462 | case FILE_ATTR_WPS: | 461 | case FILE_ATTR_WPS: |
463 | gui_syncsplash(0, ID2P(LANG_WAIT)); | 462 | splash(0, ID2P(LANG_WAIT)); |
464 | #if LCD_DEPTH > 1 | 463 | #if LCD_DEPTH > 1 |
465 | unload_wps_backdrop(); | 464 | unload_wps_backdrop(); |
466 | #endif | 465 | #endif |
@@ -472,7 +471,7 @@ int ft_enter(struct tree_context* c) | |||
472 | #if defined(HAVE_REMOTE_LCD) && (NB_SCREENS > 1) | 471 | #if defined(HAVE_REMOTE_LCD) && (NB_SCREENS > 1) |
473 | /* remote-wps config file */ | 472 | /* remote-wps config file */ |
474 | case FILE_ATTR_RWPS: | 473 | case FILE_ATTR_RWPS: |
475 | gui_syncsplash(0, ID2P(LANG_WAIT)); | 474 | splash(0, ID2P(LANG_WAIT)); |
476 | #if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1 | 475 | #if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1 |
477 | unload_remote_wps_backdrop(); | 476 | unload_remote_wps_backdrop(); |
478 | #endif | 477 | #endif |
@@ -483,39 +482,39 @@ int ft_enter(struct tree_context* c) | |||
483 | #endif | 482 | #endif |
484 | 483 | ||
485 | case FILE_ATTR_CFG: | 484 | case FILE_ATTR_CFG: |
486 | gui_syncsplash(0, ID2P(LANG_WAIT)); | 485 | splash(0, ID2P(LANG_WAIT)); |
487 | if (!settings_load_config(buf,true)) | 486 | if (!settings_load_config(buf,true)) |
488 | break; | 487 | break; |
489 | gui_syncsplash(HZ, ID2P(LANG_SETTINGS_LOADED)); | 488 | splash(HZ, ID2P(LANG_SETTINGS_LOADED)); |
490 | break; | 489 | break; |
491 | 490 | ||
492 | case FILE_ATTR_BMARK: | 491 | case FILE_ATTR_BMARK: |
493 | gui_syncsplash(0, ID2P(LANG_WAIT)); | 492 | splash(0, ID2P(LANG_WAIT)); |
494 | bookmark_load(buf, false); | 493 | bookmark_load(buf, false); |
495 | reload_dir = true; | 494 | reload_dir = true; |
496 | break; | 495 | break; |
497 | 496 | ||
498 | case FILE_ATTR_LNG: | 497 | case FILE_ATTR_LNG: |
499 | gui_syncsplash(0, ID2P(LANG_WAIT)); | 498 | splash(0, ID2P(LANG_WAIT)); |
500 | if(!lang_load(buf)) { | 499 | if(!lang_load(buf)) { |
501 | set_file(buf, (char *)global_settings.lang_file, | 500 | set_file(buf, (char *)global_settings.lang_file, |
502 | MAX_FILENAME); | 501 | MAX_FILENAME); |
503 | talk_init(); /* use voice of same language */ | 502 | talk_init(); /* use voice of same language */ |
504 | gui_syncsplash(HZ, ID2P(LANG_LANGUAGE_LOADED)); | 503 | splash(HZ, ID2P(LANG_LANGUAGE_LOADED)); |
505 | } | 504 | } |
506 | break; | 505 | break; |
507 | 506 | ||
508 | #ifdef HAVE_LCD_BITMAP | 507 | #ifdef HAVE_LCD_BITMAP |
509 | case FILE_ATTR_FONT: | 508 | case FILE_ATTR_FONT: |
510 | gui_syncsplash(0, ID2P(LANG_WAIT)); | 509 | splash(0, ID2P(LANG_WAIT)); |
511 | font_load(buf); | 510 | font_load(buf); |
512 | set_file(buf, (char *)global_settings.font_file, MAX_FILENAME); | 511 | set_file(buf, (char *)global_settings.font_file, MAX_FILENAME); |
513 | break; | 512 | break; |
514 | 513 | ||
515 | case FILE_ATTR_KBD: | 514 | case FILE_ATTR_KBD: |
516 | gui_syncsplash(0, ID2P(LANG_WAIT)); | 515 | splash(0, ID2P(LANG_WAIT)); |
517 | if (!load_kbd(buf)) | 516 | if (!load_kbd(buf)) |
518 | gui_syncsplash(HZ, ID2P(LANG_KEYBOARD_LOADED)); | 517 | splash(HZ, ID2P(LANG_KEYBOARD_LOADED)); |
519 | set_file(buf, (char *)global_settings.kbd_file, MAX_FILENAME); | 518 | set_file(buf, (char *)global_settings.kbd_file, MAX_FILENAME); |
520 | break; | 519 | break; |
521 | #endif | 520 | #endif |
@@ -523,7 +522,7 @@ int ft_enter(struct tree_context* c) | |||
523 | #ifndef SIMULATOR | 522 | #ifndef SIMULATOR |
524 | /* firmware file */ | 523 | /* firmware file */ |
525 | case FILE_ATTR_MOD: | 524 | case FILE_ATTR_MOD: |
526 | gui_syncsplash(0, ID2P(LANG_WAIT)); | 525 | splash(0, ID2P(LANG_WAIT)); |
527 | rolo_load(buf); | 526 | rolo_load(buf); |
528 | break; | 527 | break; |
529 | #endif | 528 | #endif |
@@ -531,7 +530,7 @@ int ft_enter(struct tree_context* c) | |||
531 | /* plugin file */ | 530 | /* plugin file */ |
532 | case FILE_ATTR_ROCK: | 531 | case FILE_ATTR_ROCK: |
533 | if (global_settings.party_mode) { | 532 | if (global_settings.party_mode) { |
534 | gui_syncsplash(HZ, ID2P(LANG_PARTY_MODE)); | 533 | splash(HZ, ID2P(LANG_PARTY_MODE)); |
535 | break; | 534 | break; |
536 | } | 535 | } |
537 | 536 | ||
@@ -555,7 +554,7 @@ int ft_enter(struct tree_context* c) | |||
555 | const char* plugin; | 554 | const char* plugin; |
556 | 555 | ||
557 | if (global_settings.party_mode) { | 556 | if (global_settings.party_mode) { |
558 | gui_syncsplash(HZ, ID2P(LANG_PARTY_MODE)); | 557 | splash(HZ, ID2P(LANG_PARTY_MODE)); |
559 | break; | 558 | break; |
560 | } | 559 | } |
561 | 560 | ||
diff --git a/apps/filetypes.c b/apps/filetypes.c index b05942f324..b50814f7f2 100644 --- a/apps/filetypes.c +++ b/apps/filetypes.c | |||
@@ -106,7 +106,7 @@ static const struct filetype inbuilt_filetypes[] = { | |||
106 | { "cue", FILE_ATTR_CUE, Icon_Bookmark, VOICE_EXT_CUESHEET }, | 106 | { "cue", FILE_ATTR_CUE, Icon_Bookmark, VOICE_EXT_CUESHEET }, |
107 | #ifdef BOOTFILE_EXT | 107 | #ifdef BOOTFILE_EXT |
108 | { BOOTFILE_EXT, FILE_ATTR_MOD, Icon_Firmware, VOICE_EXT_AJZ }, | 108 | { BOOTFILE_EXT, FILE_ATTR_MOD, Icon_Firmware, VOICE_EXT_AJZ }, |
109 | #endif /* #ifndef SIMULATOR */ | 109 | #endif |
110 | }; | 110 | }; |
111 | 111 | ||
112 | void tree_get_filetypes(const struct filetype** types, int* count) | 112 | void tree_get_filetypes(const struct filetype** types, int* count) |
@@ -300,7 +300,7 @@ static void read_config(char* config_file) | |||
300 | { | 300 | { |
301 | if (filetype_count >= MAX_FILETYPES) | 301 | if (filetype_count >= MAX_FILETYPES) |
302 | { | 302 | { |
303 | gui_syncsplash(HZ, ID2P(LANG_FILETYPES_FULL)); | 303 | splash(HZ, ID2P(LANG_FILETYPES_FULL)); |
304 | break; | 304 | break; |
305 | } | 305 | } |
306 | rm_whitespaces(line); | 306 | rm_whitespaces(line); |
@@ -485,7 +485,7 @@ int filetype_list_viewers(const char* current_file) | |||
485 | if (count == 0) | 485 | if (count == 0) |
486 | { | 486 | { |
487 | /* FIX: translation! */ | 487 | /* FIX: translation! */ |
488 | gui_syncsplash(HZ*2, (unsigned char *)"No viewers found"); | 488 | splash(HZ*2, "No viewers found"); |
489 | return PLUGIN_OK; | 489 | return PLUGIN_OK; |
490 | } | 490 | } |
491 | #endif | 491 | #endif |
diff --git a/apps/gui/color_picker.c b/apps/gui/color_picker.c index 8db9ba92f5..87af8ae3ed 100644 --- a/apps/gui/color_picker.c +++ b/apps/gui/color_picker.c | |||
@@ -461,7 +461,7 @@ bool set_color(struct screen *display, char *title, unsigned *color, | |||
461 | if (banned_color != (unsigned)-1 && | 461 | if (banned_color != (unsigned)-1 && |
462 | banned_color == rgb.color) | 462 | banned_color == rgb.color) |
463 | { | 463 | { |
464 | gui_syncsplash(HZ*2, ID2P(LANG_COLOR_UNACCEPTABLE)); | 464 | splash(HZ*2, ID2P(LANG_COLOR_UNACCEPTABLE)); |
465 | break; | 465 | break; |
466 | } | 466 | } |
467 | *color = rgb.color; | 467 | *color = rgb.color; |
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) | |||
152 | gui_wps_refresh(gwps, 0, WPS_REFRESH_NON_STATIC); | 152 | gui_wps_refresh(gwps, 0, WPS_REFRESH_NON_STATIC); |
153 | 153 | ||
154 | #ifdef HAVE_LCD_CHARCELLS | 154 | #ifdef HAVE_LCD_CHARCELLS |
155 | gui_splash(gwps->display, 0, "Vol: %3d dB", | 155 | splashf(0, "Vol: %3d dB", |
156 | sound_val2phys(SOUND_VOLUME, global_settings.volume)); | 156 | sound_val2phys(SOUND_VOLUME, global_settings.volume)); |
157 | return true; | 157 | return true; |
158 | #endif | 158 | #endif |
@@ -329,7 +329,7 @@ bool gui_wps_display(void) | |||
329 | #ifdef HAVE_LCD_BITMAP | 329 | #ifdef HAVE_LCD_BITMAP |
330 | gui_syncstatusbar_draw(&statusbars, true); | 330 | gui_syncstatusbar_draw(&statusbars, true); |
331 | #endif | 331 | #endif |
332 | gui_syncsplash(HZ, ID2P(LANG_END_PLAYLIST)); | 332 | splash(HZ, ID2P(LANG_END_PLAYLIST)); |
333 | return true; | 333 | return true; |
334 | } | 334 | } |
335 | else | 335 | else |
@@ -485,16 +485,11 @@ bool update(struct gui_wps *gwps) | |||
485 | 485 | ||
486 | void display_keylock_text(bool locked) | 486 | void display_keylock_text(bool locked) |
487 | { | 487 | { |
488 | char* s; | ||
489 | int i; | 488 | int i; |
490 | FOR_NB_SCREENS(i) | 489 | FOR_NB_SCREENS(i) |
491 | gui_wps[i].display->stop_scroll(); | 490 | gui_wps[i].display->stop_scroll(); |
492 | 491 | ||
493 | if(locked) | 492 | splash(HZ, locked ? ID2P(LANG_KEYLOCK_ON) : ID2P(LANG_KEYLOCK_OFF)); |
494 | s = str(LANG_KEYLOCK_ON); | ||
495 | else | ||
496 | s = str(LANG_KEYLOCK_OFF); | ||
497 | gui_syncsplash(HZ, s); | ||
498 | } | 493 | } |
499 | 494 | ||
500 | #ifdef HAVE_LCD_BITMAP | 495 | #ifdef HAVE_LCD_BITMAP |
diff --git a/apps/gui/option_select.c b/apps/gui/option_select.c index c68a8b0f39..bbad56bf47 100644 --- a/apps/gui/option_select.c +++ b/apps/gui/option_select.c | |||
@@ -530,7 +530,7 @@ bool option_screen(const struct settings_list *setting, | |||
530 | *variable = oldvalue; | 530 | *variable = oldvalue; |
531 | if (var_type == F_T_BOOL && !use_temp_var) | 531 | if (var_type == F_T_BOOL && !use_temp_var) |
532 | *(bool*)setting->setting = (oldvalue==1); | 532 | *(bool*)setting->setting = (oldvalue==1); |
533 | gui_syncsplash(HZ/2, ID2P(LANG_CANCEL)); | 533 | splash(HZ/2, ID2P(LANG_CANCEL)); |
534 | } | 534 | } |
535 | done = true; | 535 | done = true; |
536 | } | 536 | } |
diff --git a/apps/gui/pitchscreen.c b/apps/gui/pitchscreen.c index e0a7416ac6..2a568afc0a 100644 --- a/apps/gui/pitchscreen.c +++ b/apps/gui/pitchscreen.c | |||
@@ -109,7 +109,7 @@ static void pitch_screen_draw(struct screen *display, int pitch, int pitch_mode) | |||
109 | w+1, (display->lcdheight-h)/2, 7, 8); | 109 | w+1, (display->lcdheight-h)/2, 7, 8); |
110 | 110 | ||
111 | /* "Pitch" */ | 111 | /* "Pitch" */ |
112 | snprintf((char *)buf, sizeof(buf), str(LANG_PITCH)); | 112 | snprintf((char *)buf, sizeof(buf), "%s", str(LANG_PITCH)); |
113 | display->getstringsize(buf,&w,&h); | 113 | display->getstringsize(buf,&w,&h); |
114 | display->putsxy((display->lcdwidth-w)/2, (display->lcdheight/2)-h, buf); | 114 | display->putsxy((display->lcdwidth-w)/2, (display->lcdheight/2)-h, buf); |
115 | /* "XX.X%" */ | 115 | /* "XX.X%" */ |
diff --git a/apps/gui/splash.c b/apps/gui/splash.c index b4b451eed6..034e4a5912 100644 --- a/apps/gui/splash.c +++ b/apps/gui/splash.c | |||
@@ -45,7 +45,7 @@ | |||
45 | 45 | ||
46 | #endif | 46 | #endif |
47 | 47 | ||
48 | static void splash(struct screen * screen, const char *fmt, va_list ap) | 48 | static void splash_internal(struct screen * screen, const char *fmt, va_list ap) |
49 | { | 49 | { |
50 | char splash_buf[MAXBUFFER]; | 50 | char splash_buf[MAXBUFFER]; |
51 | short widths[MAXLINES]; | 51 | short widths[MAXLINES]; |
@@ -187,41 +187,35 @@ static void splash(struct screen * screen, const char *fmt, va_list ap) | |||
187 | screen->update(); | 187 | screen->update(); |
188 | } | 188 | } |
189 | 189 | ||
190 | void gui_splash(struct screen * screen, int ticks, | 190 | void splashf(int ticks, const char *fmt, ...) |
191 | const char *fmt, ...) | ||
192 | { | 191 | { |
193 | va_list ap; | 192 | va_list ap; |
194 | va_start( ap, fmt ); | 193 | int i; |
195 | splash(screen, fmt, ap); | 194 | |
196 | va_end( ap ); | 195 | /* If fmt is a lang ID then get the corresponding string (which |
196 | still might contain % place holders). */ | ||
197 | fmt = P2STR((unsigned char *)fmt); | ||
198 | FOR_NB_SCREENS(i) | ||
199 | { | ||
200 | va_start(ap, fmt); | ||
201 | screens[i].set_viewport(NULL); | ||
202 | splash_internal(&(screens[i]), fmt, ap); | ||
203 | va_end(ap); | ||
204 | } | ||
197 | 205 | ||
198 | if(ticks) | 206 | if(ticks) |
199 | sleep(ticks); | 207 | sleep(ticks); |
200 | } | 208 | } |
201 | 209 | ||
202 | void gui_syncsplash(int ticks, const char *fmt, ...) | 210 | void splash(int ticks, const char *str) |
203 | { | 211 | { |
204 | va_list ap; | ||
205 | int i; | ||
206 | #if !defined(SIMULATOR) || CONFIG_CODEC == SWCODEC | 212 | #if !defined(SIMULATOR) || CONFIG_CODEC == SWCODEC |
207 | long id; | 213 | long id; |
208 | /* fmt may be a so called virtual pointer. See settings.h. */ | 214 | /* fmt may be a so called virtual pointer. See settings.h. */ |
209 | if((id = P2ID((unsigned char *)fmt)) >= 0) | 215 | if((id = P2ID((const unsigned char*)str)) >= 0) |
210 | /* If fmt specifies a voicefont ID, and voice menus are | 216 | /* If fmt specifies a voicefont ID, and voice menus are |
211 | enabled, then speak it. */ | 217 | enabled, then speak it. */ |
212 | cond_talk_ids_fq(id); | 218 | cond_talk_ids_fq(id); |
213 | #endif | 219 | #endif |
214 | /* If fmt is a lang ID then get the corresponding string (which | 220 | splashf(ticks, "%s", P2STR((const unsigned char*)str)); |
215 | still might contain % place holders). */ | ||
216 | fmt = P2STR((unsigned char *)fmt); | ||
217 | va_start( ap, fmt ); | ||
218 | FOR_NB_SCREENS(i) | ||
219 | { | ||
220 | screens[i].set_viewport(NULL); | ||
221 | splash(&(screens[i]), fmt, ap); | ||
222 | } | ||
223 | va_end( ap ); | ||
224 | |||
225 | if(ticks) | ||
226 | sleep(ticks); | ||
227 | } | 221 | } |
diff --git a/apps/gui/splash.h b/apps/gui/splash.h index bb3c8727d1..1bbb9e9e49 100644 --- a/apps/gui/splash.h +++ b/apps/gui/splash.h | |||
@@ -25,20 +25,17 @@ | |||
25 | #include "screen_access.h" | 25 | #include "screen_access.h" |
26 | 26 | ||
27 | /* | 27 | /* |
28 | * Puts a splash message centered on the given screen for a given period | 28 | * Puts a splash message centered on all the screens for a given period |
29 | * - screen : the screen to put the splash on | ||
30 | * - ticks : how long the splash is displayed (in rb ticks) | 29 | * - ticks : how long the splash is displayed (in rb ticks) |
31 | * - fmt : what to say *printf style | 30 | * - fmt : what to say *printf style |
32 | */ | 31 | */ |
33 | extern void gui_splash(struct screen * screen, int ticks, | 32 | extern void splashf(int ticks, const char *fmt, ...) ATTRIBUTE_PRINTF(2, 3); |
34 | const char *fmt, ...) ATTRIBUTE_PRINTF(3, 4); | ||
35 | 33 | ||
36 | /* | 34 | /* |
37 | * Puts a splash message centered on all the screens for a given period | 35 | * Puts a splash message centered on all the screens for a given period |
38 | * - ticks : how long the splash is displayed (in rb ticks) | 36 | * - ticks : how long the splash is displayed (in rb ticks) |
39 | * - fmt : what to say *printf style | 37 | * - str : what to say, if this is a LANG_* string (from ID2P) |
38 | * it will be voiced | ||
40 | */ | 39 | */ |
41 | extern void gui_syncsplash(int ticks, const char *fmt, ...) | 40 | extern void splash(int ticks, const char *str); |
42 | ATTRIBUTE_PRINTF(2, 3); | ||
43 | |||
44 | #endif /* _GUI_ICON_H_ */ | 41 | #endif /* _GUI_ICON_H_ */ |
diff --git a/apps/main.c b/apps/main.c index ecc80710a1..1f2625df6c 100644 --- a/apps/main.c +++ b/apps/main.c | |||
@@ -162,7 +162,7 @@ static int init_dircache(bool preinit) | |||
162 | { | 162 | { |
163 | /* This will be in default language, settings are not | 163 | /* This will be in default language, settings are not |
164 | applied yet. Not really any easy way to fix that. */ | 164 | applied yet. Not really any easy way to fix that. */ |
165 | gui_syncsplash(0, str(LANG_SCANNING_DISK)); | 165 | splash(0, str(LANG_SCANNING_DISK)); |
166 | clear = true; | 166 | clear = true; |
167 | } | 167 | } |
168 | 168 | ||
@@ -180,7 +180,7 @@ static int init_dircache(bool preinit) | |||
180 | { | 180 | { |
181 | if (global_status.dircache_size <= 0) | 181 | if (global_status.dircache_size <= 0) |
182 | { | 182 | { |
183 | gui_syncsplash(0, str(LANG_SCANNING_DISK)); | 183 | splash(0, str(LANG_SCANNING_DISK)); |
184 | clear = true; | 184 | clear = true; |
185 | } | 185 | } |
186 | result = dircache_build(global_status.dircache_size); | 186 | result = dircache_build(global_status.dircache_size); |
@@ -191,7 +191,7 @@ static int init_dircache(bool preinit) | |||
191 | /* Initialization of dircache failed. Manual action is | 191 | /* Initialization of dircache failed. Manual action is |
192 | * necessary to enable dircache again. | 192 | * necessary to enable dircache again. |
193 | */ | 193 | */ |
194 | gui_syncsplash(0, "Dircache failed, disabled. Result: %d", result); | 194 | splashf(0, "Dircache failed, disabled. Result: %d", result); |
195 | global_settings.dircache = false; | 195 | global_settings.dircache = false; |
196 | } | 196 | } |
197 | 197 | ||
@@ -244,7 +244,7 @@ static void init_tagcache(void) | |||
244 | } | 244 | } |
245 | #endif | 245 | #endif |
246 | #ifdef HAVE_LCD_BITMAP | 246 | #ifdef HAVE_LCD_BITMAP |
247 | gui_syncsplash(0, "%s [%d/%d]", | 247 | splashf(0, "%s [%d/%d]", |
248 | str(LANG_TAGCACHE_INIT), ret, | 248 | str(LANG_TAGCACHE_INIT), ret, |
249 | tagcache_get_max_commit_step()); | 249 | tagcache_get_max_commit_step()); |
250 | #else | 250 | #else |
@@ -504,7 +504,7 @@ static void init(void) | |||
504 | if (button_hold()) | 504 | if (button_hold()) |
505 | #endif | 505 | #endif |
506 | { | 506 | { |
507 | gui_syncsplash(HZ*2, str(LANG_RESET_DONE_CLEAR)); | 507 | splash(HZ*2, str(LANG_RESET_DONE_CLEAR)); |
508 | settings_reset(); | 508 | settings_reset(); |
509 | } | 509 | } |
510 | else | 510 | else |
diff --git a/apps/menus/main_menu.c b/apps/menus/main_menu.c index 2f3b63fd6c..35fd100b5b 100644 --- a/apps/menus/main_menu.c +++ b/apps/menus/main_menu.c | |||
@@ -406,7 +406,7 @@ static int info_action_callback(int action, struct gui_synclist *lists) | |||
406 | #ifndef SIMULATOR | 406 | #ifndef SIMULATOR |
407 | struct info_data *info = (struct info_data *)lists->data; | 407 | struct info_data *info = (struct info_data *)lists->data; |
408 | info->new_data = true; | 408 | info->new_data = true; |
409 | gui_syncsplash(0, ID2P(LANG_SCANNING_DISK)); | 409 | splash(0, ID2P(LANG_SCANNING_DISK)); |
410 | fat_recalc_free(IF_MV(0)); | 410 | fat_recalc_free(IF_MV(0)); |
411 | #ifdef HAVE_MULTIVOLUME | 411 | #ifdef HAVE_MULTIVOLUME |
412 | if (fat_ismounted(1)) | 412 | if (fat_ismounted(1)) |
diff --git a/apps/menus/playback_menu.c b/apps/menus/playback_menu.c index 0d5a85483c..eb1597948b 100644 --- a/apps/menus/playback_menu.c +++ b/apps/menus/playback_menu.c | |||
@@ -1,4 +1,3 @@ | |||
1 | |||
2 | /*************************************************************************** | 1 | /*************************************************************************** |
3 | * __________ __ ___. | 2 | * __________ __ ___. |
4 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | 3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ |
@@ -143,7 +142,7 @@ static int audioscrobbler_callback(int action,const struct menu_item_ex *this_it | |||
143 | { | 142 | { |
144 | case ACTION_EXIT_MENUITEM: /* on exit */ | 143 | case ACTION_EXIT_MENUITEM: /* on exit */ |
145 | if (!scrobbler_is_enabled() && global_settings.audioscrobbler) | 144 | if (!scrobbler_is_enabled() && global_settings.audioscrobbler) |
146 | gui_syncsplash(HZ*2, "%s", ID2P(LANG_PLEASE_REBOOT)); | 145 | splash(HZ*2, ID2P(LANG_PLEASE_REBOOT)); |
147 | 146 | ||
148 | if(scrobbler_is_enabled() && !global_settings.audioscrobbler) | 147 | if(scrobbler_is_enabled() && !global_settings.audioscrobbler) |
149 | scrobbler_shutdown(); | 148 | scrobbler_shutdown(); |
@@ -161,7 +160,7 @@ static int cuesheet_callback(int action,const struct menu_item_ex *this_item) | |||
161 | { | 160 | { |
162 | case ACTION_EXIT_MENUITEM: /* on exit */ | 161 | case ACTION_EXIT_MENUITEM: /* on exit */ |
163 | if (!cuesheet_is_enabled() && global_settings.cuesheet) | 162 | if (!cuesheet_is_enabled() && global_settings.cuesheet) |
164 | gui_syncsplash(HZ*2, "%s", ID2P(LANG_PLEASE_REBOOT)); | 163 | splash(HZ*2, ID2P(LANG_PLEASE_REBOOT)); |
165 | break; | 164 | break; |
166 | } | 165 | } |
167 | return action; | 166 | return action; |
diff --git a/apps/menus/recording_menu.c b/apps/menus/recording_menu.c index b55cba8061..4705afa2ff 100644 --- a/apps/menus/recording_menu.c +++ b/apps/menus/recording_menu.c | |||
@@ -325,7 +325,7 @@ MENUITEM_SETTING(rec_prerecord_time, &global_settings.rec_prerecord_time, NULL); | |||
325 | static int clear_rec_directory(void) | 325 | static int clear_rec_directory(void) |
326 | { | 326 | { |
327 | strcpy(global_settings.rec_directory, REC_BASE_DIR); | 327 | strcpy(global_settings.rec_directory, REC_BASE_DIR); |
328 | gui_syncsplash(HZ, ID2P(LANG_RESET_DONE_CLEAR)); | 328 | splash(HZ, ID2P(LANG_RESET_DONE_CLEAR)); |
329 | return false; | 329 | return false; |
330 | } | 330 | } |
331 | MENUITEM_FUNCTION(clear_rec_directory_item, 0, ID2P(LANG_CLEAR_REC_DIR), | 331 | MENUITEM_FUNCTION(clear_rec_directory_item, 0, ID2P(LANG_CLEAR_REC_DIR), |
@@ -531,7 +531,7 @@ int rectrigger(void) | |||
531 | switch (action) | 531 | switch (action) |
532 | { | 532 | { |
533 | case ACTION_STD_CANCEL: | 533 | case ACTION_STD_CANCEL: |
534 | gui_syncsplash(HZ/2, ID2P(LANG_CANCEL)); | 534 | splash(HZ/2, ID2P(LANG_CANCEL)); |
535 | global_settings.rec_start_thres_db = old_start_thres_db; | 535 | global_settings.rec_start_thres_db = old_start_thres_db; |
536 | global_settings.rec_start_thres_linear = old_start_thres_linear; | 536 | global_settings.rec_start_thres_linear = old_start_thres_linear; |
537 | global_settings.rec_start_duration = old_start_duration; | 537 | global_settings.rec_start_duration = old_start_duration; |
diff --git a/apps/menus/settings_menu.c b/apps/menus/settings_menu.c index 93178e6af4..d5ddc168a0 100644 --- a/apps/menus/settings_menu.c +++ b/apps/menus/settings_menu.c | |||
@@ -57,13 +57,13 @@ | |||
57 | static void tagcache_rebuild_with_splash(void) | 57 | static void tagcache_rebuild_with_splash(void) |
58 | { | 58 | { |
59 | tagcache_rebuild(); | 59 | tagcache_rebuild(); |
60 | gui_syncsplash(HZ*2, ID2P(LANG_TAGCACHE_FORCE_UPDATE_SPLASH)); | 60 | splash(HZ*2, ID2P(LANG_TAGCACHE_FORCE_UPDATE_SPLASH)); |
61 | } | 61 | } |
62 | 62 | ||
63 | static void tagcache_update_with_splash(void) | 63 | static void tagcache_update_with_splash(void) |
64 | { | 64 | { |
65 | tagcache_update(); | 65 | tagcache_update(); |
66 | gui_syncsplash(HZ*2, ID2P(LANG_TAGCACHE_FORCE_UPDATE_SPLASH)); | 66 | splash(HZ*2, ID2P(LANG_TAGCACHE_FORCE_UPDATE_SPLASH)); |
67 | } | 67 | } |
68 | 68 | ||
69 | #ifdef HAVE_TC_RAMCACHE | 69 | #ifdef HAVE_TC_RAMCACHE |
@@ -187,7 +187,7 @@ static int dircache_callback(int action,const struct menu_item_ex *this_item) | |||
187 | { | 187 | { |
188 | case true: | 188 | case true: |
189 | if (!dircache_is_enabled()) | 189 | if (!dircache_is_enabled()) |
190 | gui_syncsplash(HZ*2, ID2P(LANG_PLEASE_REBOOT)); | 190 | splash(HZ*2, ID2P(LANG_PLEASE_REBOOT)); |
191 | break; | 191 | break; |
192 | case false: | 192 | case false: |
193 | if (dircache_is_enabled()) | 193 | if (dircache_is_enabled()) |
diff --git a/apps/misc.c b/apps/misc.c index f1f5c4aa12..401360d914 100644 --- a/apps/misc.c +++ b/apps/misc.c | |||
@@ -675,26 +675,24 @@ static bool clean_shutdown(void (*callback)(void *), void *parameter) | |||
675 | if (!tagcache_prepare_shutdown()) | 675 | if (!tagcache_prepare_shutdown()) |
676 | { | 676 | { |
677 | cancel_shutdown(); | 677 | cancel_shutdown(); |
678 | gui_syncsplash(HZ, ID2P(LANG_TAGCACHE_BUSY)); | 678 | splash(HZ, ID2P(LANG_TAGCACHE_BUSY)); |
679 | return false; | 679 | return false; |
680 | } | 680 | } |
681 | #endif | 681 | #endif |
682 | if (battery_level() > 10) | 682 | if (battery_level() > 10) |
683 | gui_syncsplash(0, str(LANG_SHUTTINGDOWN)); | 683 | splash(0, str(LANG_SHUTTINGDOWN)); |
684 | else | 684 | else |
685 | { | 685 | { |
686 | msg_id = LANG_WARNING_BATTERY_LOW; | 686 | msg_id = LANG_WARNING_BATTERY_LOW; |
687 | gui_syncsplash(0, "%s %s", | 687 | splashf(0, "%s %s", str(LANG_WARNING_BATTERY_LOW), |
688 | str(LANG_WARNING_BATTERY_LOW), | 688 | str(LANG_SHUTTINGDOWN)); |
689 | str(LANG_SHUTTINGDOWN)); | ||
690 | } | 689 | } |
691 | } | 690 | } |
692 | else | 691 | else |
693 | { | 692 | { |
694 | msg_id = LANG_WARNING_BATTERY_EMPTY; | 693 | msg_id = LANG_WARNING_BATTERY_EMPTY; |
695 | gui_syncsplash(0, "%s %s", | 694 | splashf(0, "%s %s", str(LANG_WARNING_BATTERY_EMPTY), |
696 | str(LANG_WARNING_BATTERY_EMPTY), | 695 | str(LANG_SHUTTINGDOWN)); |
697 | str(LANG_SHUTTINGDOWN)); | ||
698 | } | 696 | } |
699 | 697 | ||
700 | if (global_settings.fade_on_stop | 698 | if (global_settings.fade_on_stop |
diff --git a/apps/onplay.c b/apps/onplay.c index 2a70415b51..9ca0c6743e 100644 --- a/apps/onplay.c +++ b/apps/onplay.c | |||
@@ -166,7 +166,7 @@ static bool add_to_playlist(int position, bool queue) | |||
166 | }; | 166 | }; |
167 | const struct text_message message={lines, 2}; | 167 | const struct text_message message={lines, 2}; |
168 | 168 | ||
169 | gui_syncsplash(0, ID2P(LANG_WAIT)); | 169 | splash(0, ID2P(LANG_WAIT)); |
170 | 170 | ||
171 | if (new_playlist) | 171 | if (new_playlist) |
172 | playlist_create(NULL, NULL); | 172 | playlist_create(NULL, NULL); |
@@ -476,7 +476,7 @@ static int remove_dir(char* dirname, int len) | |||
476 | break; | 476 | break; |
477 | 477 | ||
478 | dirname[dirlen] ='\0'; | 478 | dirname[dirlen] ='\0'; |
479 | gui_syncsplash(0, dirname); | 479 | splash(0, dirname); |
480 | 480 | ||
481 | /* append name to current directory */ | 481 | /* append name to current directory */ |
482 | snprintf(dirname+dirlen, len-dirlen, "/%s", entry->d_name); | 482 | snprintf(dirname+dirlen, len-dirlen, "/%s", entry->d_name); |
@@ -499,7 +499,7 @@ static int remove_dir(char* dirname, int len) | |||
499 | } | 499 | } |
500 | if(ACTION_STD_CANCEL == get_action(CONTEXT_STD,TIMEOUT_NOBLOCK)) | 500 | if(ACTION_STD_CANCEL == get_action(CONTEXT_STD,TIMEOUT_NOBLOCK)) |
501 | { | 501 | { |
502 | gui_syncsplash(HZ, ID2P(LANG_CANCEL)); | 502 | splash(HZ, ID2P(LANG_CANCEL)); |
503 | result = -1; | 503 | result = -1; |
504 | break; | 504 | break; |
505 | } | 505 | } |
@@ -538,7 +538,7 @@ static bool delete_handler(bool is_dir) | |||
538 | if(gui_syncyesno_run(&message, &yes_message, NULL)!=YESNO_YES) | 538 | if(gui_syncyesno_run(&message, &yes_message, NULL)!=YESNO_YES) |
539 | return false; | 539 | return false; |
540 | 540 | ||
541 | gui_syncsplash(0, str(LANG_DELETING)); | 541 | splash(0, str(LANG_DELETING)); |
542 | 542 | ||
543 | int res; | 543 | int res; |
544 | if (is_dir) | 544 | if (is_dir) |
@@ -574,13 +574,13 @@ static bool set_backdrop(void) | |||
574 | { | 574 | { |
575 | /* load the image */ | 575 | /* load the image */ |
576 | if(load_main_backdrop(selected_file)) { | 576 | if(load_main_backdrop(selected_file)) { |
577 | gui_syncsplash(HZ, str(LANG_BACKDROP_LOADED)); | 577 | splash(HZ, str(LANG_BACKDROP_LOADED)); |
578 | set_file(selected_file, (char *)global_settings.backdrop_file, | 578 | set_file(selected_file, (char *)global_settings.backdrop_file, |
579 | MAX_FILENAME); | 579 | MAX_FILENAME); |
580 | show_main_backdrop(); | 580 | show_main_backdrop(); |
581 | return true; | 581 | return true; |
582 | } else { | 582 | } else { |
583 | gui_syncsplash(HZ, str(LANG_BACKDROP_FAILED)); | 583 | splash(HZ, str(LANG_BACKDROP_FAILED)); |
584 | return false; | 584 | return false; |
585 | } | 585 | } |
586 | } | 586 | } |
@@ -630,8 +630,8 @@ static bool create_dir(void) | |||
630 | rc = mkdir(dirname); | 630 | rc = mkdir(dirname); |
631 | if (rc < 0) { | 631 | if (rc < 0) { |
632 | cond_talk_ids_fq(LANG_CREATE_DIR, LANG_FAILED); | 632 | cond_talk_ids_fq(LANG_CREATE_DIR, LANG_FAILED); |
633 | gui_syncsplash(HZ, (unsigned char *)"%s %s", | 633 | splashf(HZ, (unsigned char *)"%s %s", str(LANG_CREATE_DIR), |
634 | str(LANG_CREATE_DIR), str(LANG_FAILED)); | 634 | str(LANG_FAILED)); |
635 | } else { | 635 | } else { |
636 | onplay_result = ONPLAY_RELOAD_DIR; | 636 | onplay_result = ONPLAY_RELOAD_DIR; |
637 | } | 637 | } |
@@ -886,11 +886,11 @@ static bool clipboard_paste(void) | |||
886 | } | 886 | } |
887 | 887 | ||
888 | if (clipboard_is_copy) { | 888 | if (clipboard_is_copy) { |
889 | gui_syncsplash(0, ID2P(LANG_COPYING)); | 889 | splash(0, ID2P(LANG_COPYING)); |
890 | } | 890 | } |
891 | else | 891 | else |
892 | { | 892 | { |
893 | gui_syncsplash(0, ID2P(LANG_MOVING)); | 893 | splash(0, ID2P(LANG_MOVING)); |
894 | } | 894 | } |
895 | 895 | ||
896 | /* Now figure out what we're doing */ | 896 | /* Now figure out what we're doing */ |
@@ -930,8 +930,8 @@ static bool clipboard_paste(void) | |||
930 | onplay_result = ONPLAY_RELOAD_DIR; | 930 | onplay_result = ONPLAY_RELOAD_DIR; |
931 | } else { | 931 | } else { |
932 | cond_talk_ids_fq(LANG_PASTE, LANG_FAILED); | 932 | cond_talk_ids_fq(LANG_PASTE, LANG_FAILED); |
933 | gui_syncsplash(HZ, (unsigned char *)"%s %s", | 933 | splashf(HZ, (unsigned char *)"%s %s", str(LANG_PASTE), |
934 | str(LANG_PASTE), str(LANG_FAILED)); | 934 | str(LANG_FAILED)); |
935 | } | 935 | } |
936 | 936 | ||
937 | return true; | 937 | return true; |
@@ -949,7 +949,7 @@ static int set_rating_inline(void) | |||
949 | tagcache_update_numeric(id3->tagcache_idx-1, tag_rating, id3->rating); | 949 | tagcache_update_numeric(id3->tagcache_idx-1, tag_rating, id3->rating); |
950 | } | 950 | } |
951 | else | 951 | else |
952 | gui_syncsplash(HZ*2, ID2P(LANG_ID3_NO_INFO)); | 952 | splash(HZ*2, ID2P(LANG_ID3_NO_INFO)); |
953 | return 0; | 953 | return 0; |
954 | } | 954 | } |
955 | static int ratingitem_callback(int action,const struct menu_item_ex *this_item) | 955 | static int ratingitem_callback(int action,const struct menu_item_ex *this_item) |
diff --git a/apps/playback.c b/apps/playback.c index daa9ab3f2e..ee1993a2da 100644 --- a/apps/playback.c +++ b/apps/playback.c | |||
@@ -822,7 +822,7 @@ void audio_set_crossfade(int enable) | |||
822 | { | 822 | { |
823 | /* Store the track resume position */ | 823 | /* Store the track resume position */ |
824 | offset = curtrack_id3.offset; | 824 | offset = curtrack_id3.offset; |
825 | gui_syncsplash(0, str(LANG_RESTARTING_PLAYBACK)); | 825 | splash(0, str(LANG_RESTARTING_PLAYBACK)); |
826 | } | 826 | } |
827 | 827 | ||
828 | /* Blast it - audio buffer will have to be setup again next time | 828 | /* Blast it - audio buffer will have to be setup again next time |
@@ -1334,7 +1334,7 @@ static void codec_thread(void) | |||
1334 | if (!ci.new_track) | 1334 | if (!ci.new_track) |
1335 | { | 1335 | { |
1336 | logf("Codec failure"); | 1336 | logf("Codec failure"); |
1337 | gui_syncsplash(HZ*2, "Codec failure"); | 1337 | splash(HZ*2, "Codec failure"); |
1338 | } | 1338 | } |
1339 | 1339 | ||
1340 | if (!codec_load_next_track()) | 1340 | if (!codec_load_next_track()) |
@@ -1395,7 +1395,7 @@ static void codec_thread(void) | |||
1395 | break; | 1395 | break; |
1396 | 1396 | ||
1397 | logf("Encoder failure"); | 1397 | logf("Encoder failure"); |
1398 | gui_syncsplash(HZ*2, "Encoder failure"); | 1398 | splash(HZ*2, "Encoder failure"); |
1399 | 1399 | ||
1400 | if (ci.enc_codec_loaded < 0) | 1400 | if (ci.enc_codec_loaded < 0) |
1401 | break; | 1401 | break; |
@@ -1717,7 +1717,6 @@ static bool audio_load_track(size_t offset, bool start_play) | |||
1717 | buffering_handle_finished_callback callback. */ | 1717 | buffering_handle_finished_callback callback. */ |
1718 | static void audio_finish_load_track(void) | 1718 | static void audio_finish_load_track(void) |
1719 | { | 1719 | { |
1720 | char msgbuf[80]; | ||
1721 | size_t file_offset = 0; | 1720 | size_t file_offset = 0; |
1722 | size_t offset = 0; | 1721 | size_t offset = 0; |
1723 | bool start_play = start_play_g; | 1722 | bool start_play = start_play_g; |
@@ -1791,9 +1790,8 @@ static void audio_finish_load_track(void) | |||
1791 | 1790 | ||
1792 | /* This is an error condition, either no codec was found, or reading | 1791 | /* This is an error condition, either no codec was found, or reading |
1793 | * the codec file failed part way through, either way, skip the track */ | 1792 | * the codec file failed part way through, either way, skip the track */ |
1794 | snprintf(msgbuf, sizeof(msgbuf)-1, "No codec for: %s", track_id3->path); | 1793 | /* FIXME: We should not use splashf from audio thread! */ |
1795 | /* We should not use gui_syncplash from audio thread! */ | 1794 | splashf(HZ*2, "No codec for: %s", track_id3->path); |
1796 | gui_syncsplash(HZ*2, msgbuf); | ||
1797 | /* Skip invalid entry from playlist. */ | 1795 | /* Skip invalid entry from playlist. */ |
1798 | playlist_skip_entry(NULL, last_peek_offset); | 1796 | playlist_skip_entry(NULL, last_peek_offset); |
1799 | return; | 1797 | return; |
diff --git a/apps/playlist.c b/apps/playlist.c index 4457de853a..9c494778a3 100644 --- a/apps/playlist.c +++ b/apps/playlist.c | |||
@@ -347,7 +347,7 @@ static void create_control(struct playlist_info* playlist) | |||
347 | if (check_rockboxdir()) | 347 | if (check_rockboxdir()) |
348 | { | 348 | { |
349 | cond_talk_ids_fq(LANG_PLAYLIST_CONTROL_ACCESS_ERROR); | 349 | cond_talk_ids_fq(LANG_PLAYLIST_CONTROL_ACCESS_ERROR); |
350 | gui_syncsplash(HZ*2, (unsigned char *)"%s (%d)", | 350 | splashf(HZ*2, (unsigned char *)"%s (%d)", |
351 | str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR), | 351 | str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR), |
352 | playlist->control_fd); | 352 | playlist->control_fd); |
353 | } | 353 | } |
@@ -536,7 +536,7 @@ static int add_indices_to_playlist(struct playlist_info* playlist, | |||
536 | if((i = lseek(playlist->fd, 0, SEEK_CUR)) > 0) | 536 | if((i = lseek(playlist->fd, 0, SEEK_CUR)) > 0) |
537 | playlist->utf8 = true; /* Override any earlier indication. */ | 537 | playlist->utf8 = true; /* Override any earlier indication. */ |
538 | 538 | ||
539 | gui_syncsplash(0, ID2P(LANG_WAIT)); | 539 | splash(0, ID2P(LANG_WAIT)); |
540 | 540 | ||
541 | if (!buffer) | 541 | if (!buffer) |
542 | { | 542 | { |
@@ -1426,9 +1426,9 @@ static int get_filename(struct playlist_info* playlist, int index, int seek, | |||
1426 | if (max < 0) | 1426 | if (max < 0) |
1427 | { | 1427 | { |
1428 | if (control_file) | 1428 | if (control_file) |
1429 | gui_syncsplash(HZ*2, ID2P(LANG_PLAYLIST_CONTROL_ACCESS_ERROR)); | 1429 | splash(HZ*2, ID2P(LANG_PLAYLIST_CONTROL_ACCESS_ERROR)); |
1430 | else | 1430 | else |
1431 | gui_syncsplash(HZ*2, ID2P(LANG_PLAYLIST_ACCESS_ERROR)); | 1431 | splash(HZ*2, ID2P(LANG_PLAYLIST_ACCESS_ERROR)); |
1432 | 1432 | ||
1433 | return max; | 1433 | return max; |
1434 | } | 1434 | } |
@@ -1523,7 +1523,7 @@ static int get_next_dir(char *dir, bool is_forward, bool recursion) | |||
1523 | 1523 | ||
1524 | if (ft_load(tc, (dir[0]=='\0')?"/":dir) < 0) | 1524 | if (ft_load(tc, (dir[0]=='\0')?"/":dir) < 0) |
1525 | { | 1525 | { |
1526 | gui_syncsplash(HZ*2, ID2P(LANG_PLAYLIST_DIRECTORY_ACCESS_ERROR)); | 1526 | splash(HZ*2, ID2P(LANG_PLAYLIST_DIRECTORY_ACCESS_ERROR)); |
1527 | exit = true; | 1527 | exit = true; |
1528 | result = -1; | 1528 | result = -1; |
1529 | break; | 1529 | break; |
@@ -1604,7 +1604,7 @@ static int check_subdir_for_music(char *dir, char *subdir, bool recurse) | |||
1604 | 1604 | ||
1605 | if (ft_load(tc, dir) < 0) | 1605 | if (ft_load(tc, dir) < 0) |
1606 | { | 1606 | { |
1607 | gui_syncsplash(HZ*2, ID2P(LANG_PLAYLIST_DIRECTORY_ACCESS_ERROR)); | 1607 | splash(HZ*2, ID2P(LANG_PLAYLIST_DIRECTORY_ACCESS_ERROR)); |
1608 | return -2; | 1608 | return -2; |
1609 | } | 1609 | } |
1610 | 1610 | ||
@@ -1657,8 +1657,7 @@ static int check_subdir_for_music(char *dir, char *subdir, bool recurse) | |||
1657 | 1657 | ||
1658 | /* we now need to reload our current directory */ | 1658 | /* we now need to reload our current directory */ |
1659 | if(ft_load(tc, dir) < 0) | 1659 | if(ft_load(tc, dir) < 0) |
1660 | gui_syncsplash(HZ*2, | 1660 | splash(HZ*2, ID2P(LANG_PLAYLIST_DIRECTORY_ACCESS_ERROR)); |
1661 | ID2P(LANG_PLAYLIST_DIRECTORY_ACCESS_ERROR)); | ||
1662 | } | 1661 | } |
1663 | return result; | 1662 | return result; |
1664 | } | 1663 | } |
@@ -1747,7 +1746,7 @@ static void display_playlist_count(int count, const unsigned char *fmt, | |||
1747 | } | 1746 | } |
1748 | fmt = P2STR(fmt); | 1747 | fmt = P2STR(fmt); |
1749 | 1748 | ||
1750 | gui_syncsplash(0, fmt, count, str(LANG_OFF_ABORT)); | 1749 | splashf(0, fmt, count, str(LANG_OFF_ABORT)); |
1751 | } | 1750 | } |
1752 | 1751 | ||
1753 | /* | 1752 | /* |
@@ -1755,7 +1754,7 @@ static void display_playlist_count(int count, const unsigned char *fmt, | |||
1755 | */ | 1754 | */ |
1756 | static void display_buffer_full(void) | 1755 | static void display_buffer_full(void) |
1757 | { | 1756 | { |
1758 | gui_syncsplash(HZ*2, ID2P(LANG_PLAYLIST_BUFFER_FULL)); | 1757 | splash(HZ*2, ID2P(LANG_PLAYLIST_BUFFER_FULL)); |
1759 | } | 1758 | } |
1760 | 1759 | ||
1761 | /* | 1760 | /* |
@@ -1834,7 +1833,7 @@ static int flush_cached_control(struct playlist_info* playlist) | |||
1834 | else | 1833 | else |
1835 | { | 1834 | { |
1836 | result = -1; | 1835 | result = -1; |
1837 | gui_syncsplash(HZ*2, ID2P(LANG_PLAYLIST_CONTROL_UPDATE_ERROR)); | 1836 | splash(HZ*2, ID2P(LANG_PLAYLIST_CONTROL_UPDATE_ERROR)); |
1838 | } | 1837 | } |
1839 | 1838 | ||
1840 | return result; | 1839 | return result; |
@@ -2021,11 +2020,11 @@ int playlist_resume(void) | |||
2021 | 2020 | ||
2022 | empty_playlist(playlist, true); | 2021 | empty_playlist(playlist, true); |
2023 | 2022 | ||
2024 | gui_syncsplash(0, ID2P(LANG_WAIT)); | 2023 | splash(0, ID2P(LANG_WAIT)); |
2025 | playlist->control_fd = open(playlist->control_filename, O_RDWR); | 2024 | playlist->control_fd = open(playlist->control_filename, O_RDWR); |
2026 | if (playlist->control_fd < 0) | 2025 | if (playlist->control_fd < 0) |
2027 | { | 2026 | { |
2028 | gui_syncsplash(HZ*2, ID2P(LANG_PLAYLIST_CONTROL_ACCESS_ERROR)); | 2027 | splash(HZ*2, ID2P(LANG_PLAYLIST_CONTROL_ACCESS_ERROR)); |
2029 | return -1; | 2028 | return -1; |
2030 | } | 2029 | } |
2031 | playlist->control_created = true; | 2030 | playlist->control_created = true; |
@@ -2033,7 +2032,7 @@ int playlist_resume(void) | |||
2033 | control_file_size = filesize(playlist->control_fd); | 2032 | control_file_size = filesize(playlist->control_fd); |
2034 | if (control_file_size <= 0) | 2033 | if (control_file_size <= 0) |
2035 | { | 2034 | { |
2036 | gui_syncsplash(HZ*2, ID2P(LANG_PLAYLIST_CONTROL_ACCESS_ERROR)); | 2035 | splash(HZ*2, ID2P(LANG_PLAYLIST_CONTROL_ACCESS_ERROR)); |
2037 | return -1; | 2036 | return -1; |
2038 | } | 2037 | } |
2039 | 2038 | ||
@@ -2042,7 +2041,7 @@ int playlist_resume(void) | |||
2042 | PLAYLIST_COMMAND_SIZE<buflen?PLAYLIST_COMMAND_SIZE:buflen); | 2041 | PLAYLIST_COMMAND_SIZE<buflen?PLAYLIST_COMMAND_SIZE:buflen); |
2043 | if(nread <= 0) | 2042 | if(nread <= 0) |
2044 | { | 2043 | { |
2045 | gui_syncsplash(HZ*2, ID2P(LANG_PLAYLIST_CONTROL_ACCESS_ERROR)); | 2044 | splash(HZ*2, ID2P(LANG_PLAYLIST_CONTROL_ACCESS_ERROR)); |
2046 | return -1; | 2045 | return -1; |
2047 | } | 2046 | } |
2048 | 2047 | ||
@@ -2069,9 +2068,9 @@ int playlist_resume(void) | |||
2069 | /* So a splash while we are loading. */ | 2068 | /* So a splash while we are loading. */ |
2070 | if (current_tick - last_tick > HZ/4) | 2069 | if (current_tick - last_tick > HZ/4) |
2071 | { | 2070 | { |
2072 | gui_syncsplash(0, str(LANG_LOADING_PERCENT), | 2071 | splashf(0, str(LANG_LOADING_PERCENT), |
2073 | (total_read+count)*100/control_file_size, | 2072 | (total_read+count)*100/control_file_size, |
2074 | str(LANG_OFF_ABORT)); | 2073 | str(LANG_OFF_ABORT)); |
2075 | if (action_userabort(TIMEOUT_NOBLOCK)) | 2074 | if (action_userabort(TIMEOUT_NOBLOCK)) |
2076 | { | 2075 | { |
2077 | useraborted = true; | 2076 | useraborted = true; |
@@ -2337,13 +2336,13 @@ int playlist_resume(void) | |||
2337 | 2336 | ||
2338 | if (result < 0) | 2337 | if (result < 0) |
2339 | { | 2338 | { |
2340 | gui_syncsplash(HZ*2, ID2P(LANG_PLAYLIST_CONTROL_INVALID)); | 2339 | splash(HZ*2, ID2P(LANG_PLAYLIST_CONTROL_INVALID)); |
2341 | return result; | 2340 | return result; |
2342 | } | 2341 | } |
2343 | 2342 | ||
2344 | if (useraborted) | 2343 | if (useraborted) |
2345 | { | 2344 | { |
2346 | gui_syncsplash(HZ*2, ID2P(LANG_CANCEL)); | 2345 | splash(HZ*2, ID2P(LANG_CANCEL)); |
2347 | return -1; | 2346 | return -1; |
2348 | } | 2347 | } |
2349 | if (!newline || (exit_loop && count<nread)) | 2348 | if (!newline || (exit_loop && count<nread)) |
@@ -2351,7 +2350,7 @@ int playlist_resume(void) | |||
2351 | if ((total_read + count) >= control_file_size) | 2350 | if ((total_read + count) >= control_file_size) |
2352 | { | 2351 | { |
2353 | /* no newline at end of control file */ | 2352 | /* no newline at end of control file */ |
2354 | gui_syncsplash(HZ*2, ID2P(LANG_PLAYLIST_CONTROL_INVALID)); | 2353 | splash(HZ*2, ID2P(LANG_PLAYLIST_CONTROL_INVALID)); |
2355 | return -1; | 2354 | return -1; |
2356 | } | 2355 | } |
2357 | 2356 | ||
@@ -2861,7 +2860,7 @@ int playlist_insert_track(struct playlist_info* playlist, const char *filename, | |||
2861 | 2860 | ||
2862 | if (check_control(playlist) < 0) | 2861 | if (check_control(playlist) < 0) |
2863 | { | 2862 | { |
2864 | gui_syncsplash(HZ*2, ID2P(LANG_PLAYLIST_CONTROL_ACCESS_ERROR)); | 2863 | splash(HZ*2, ID2P(LANG_PLAYLIST_CONTROL_ACCESS_ERROR)); |
2865 | return -1; | 2864 | return -1; |
2866 | } | 2865 | } |
2867 | 2866 | ||
@@ -2892,7 +2891,7 @@ int playlist_insert_directory(struct playlist_info* playlist, | |||
2892 | 2891 | ||
2893 | if (check_control(playlist) < 0) | 2892 | if (check_control(playlist) < 0) |
2894 | { | 2893 | { |
2895 | gui_syncsplash(HZ*2, ID2P(LANG_PLAYLIST_CONTROL_ACCESS_ERROR)); | 2894 | splash(HZ*2, ID2P(LANG_PLAYLIST_CONTROL_ACCESS_ERROR)); |
2896 | return -1; | 2895 | return -1; |
2897 | } | 2896 | } |
2898 | 2897 | ||
@@ -2959,14 +2958,14 @@ int playlist_insert_playlist(struct playlist_info* playlist, const char *filenam | |||
2959 | 2958 | ||
2960 | if (check_control(playlist) < 0) | 2959 | if (check_control(playlist) < 0) |
2961 | { | 2960 | { |
2962 | gui_syncsplash(HZ*2, ID2P(LANG_PLAYLIST_CONTROL_ACCESS_ERROR)); | 2961 | splash(HZ*2, ID2P(LANG_PLAYLIST_CONTROL_ACCESS_ERROR)); |
2963 | return -1; | 2962 | return -1; |
2964 | } | 2963 | } |
2965 | 2964 | ||
2966 | fd = open_utf8(filename, O_RDONLY); | 2965 | fd = open_utf8(filename, O_RDONLY); |
2967 | if (fd < 0) | 2966 | if (fd < 0) |
2968 | { | 2967 | { |
2969 | gui_syncsplash(HZ*2, ID2P(LANG_PLAYLIST_ACCESS_ERROR)); | 2968 | splash(HZ*2, ID2P(LANG_PLAYLIST_ACCESS_ERROR)); |
2970 | return -1; | 2969 | return -1; |
2971 | } | 2970 | } |
2972 | 2971 | ||
@@ -3087,7 +3086,7 @@ int playlist_delete(struct playlist_info* playlist, int index) | |||
3087 | 3086 | ||
3088 | if (check_control(playlist) < 0) | 3087 | if (check_control(playlist) < 0) |
3089 | { | 3088 | { |
3090 | gui_syncsplash(HZ*2, ID2P(LANG_PLAYLIST_CONTROL_ACCESS_ERROR)); | 3089 | splash(HZ*2, ID2P(LANG_PLAYLIST_CONTROL_ACCESS_ERROR)); |
3091 | return -1; | 3090 | return -1; |
3092 | } | 3091 | } |
3093 | 3092 | ||
@@ -3122,7 +3121,7 @@ int playlist_move(struct playlist_info* playlist, int index, int new_index) | |||
3122 | 3121 | ||
3123 | if (check_control(playlist) < 0) | 3122 | if (check_control(playlist) < 0) |
3124 | { | 3123 | { |
3125 | gui_syncsplash(HZ*2, ID2P(LANG_PLAYLIST_CONTROL_ACCESS_ERROR)); | 3124 | splash(HZ*2, ID2P(LANG_PLAYLIST_CONTROL_ACCESS_ERROR)); |
3126 | return -1; | 3125 | return -1; |
3127 | } | 3126 | } |
3128 | 3127 | ||
@@ -3385,7 +3384,7 @@ int playlist_save(struct playlist_info* playlist, char *filename) | |||
3385 | if (playlist->buffer_size < (int)(playlist->amount * sizeof(int))) | 3384 | if (playlist->buffer_size < (int)(playlist->amount * sizeof(int))) |
3386 | { | 3385 | { |
3387 | /* not enough buffer space to store updated indices */ | 3386 | /* not enough buffer space to store updated indices */ |
3388 | gui_syncsplash(HZ*2, ID2P(LANG_PLAYLIST_ACCESS_ERROR)); | 3387 | splash(HZ*2, ID2P(LANG_PLAYLIST_ACCESS_ERROR)); |
3389 | return -1; | 3388 | return -1; |
3390 | } | 3389 | } |
3391 | 3390 | ||
@@ -3409,7 +3408,7 @@ int playlist_save(struct playlist_info* playlist, char *filename) | |||
3409 | } | 3408 | } |
3410 | if (fd < 0) | 3409 | if (fd < 0) |
3411 | { | 3410 | { |
3412 | gui_syncsplash(HZ*2, ID2P(LANG_PLAYLIST_ACCESS_ERROR)); | 3411 | splash(HZ*2, ID2P(LANG_PLAYLIST_ACCESS_ERROR)); |
3413 | return -1; | 3412 | return -1; |
3414 | } | 3413 | } |
3415 | 3414 | ||
@@ -3450,7 +3449,7 @@ int playlist_save(struct playlist_info* playlist, char *filename) | |||
3450 | 3449 | ||
3451 | if (fdprintf(fd, "%s\n", tmp_buf) < 0) | 3450 | if (fdprintf(fd, "%s\n", tmp_buf) < 0) |
3452 | { | 3451 | { |
3453 | gui_syncsplash(HZ*2, ID2P(LANG_PLAYLIST_ACCESS_ERROR)); | 3452 | splash(HZ*2, ID2P(LANG_PLAYLIST_ACCESS_ERROR)); |
3454 | result = -1; | 3453 | result = -1; |
3455 | break; | 3454 | break; |
3456 | } | 3455 | } |
@@ -3538,7 +3537,7 @@ int playlist_directory_tracksearch(const char* dirname, bool recurse, | |||
3538 | 3537 | ||
3539 | if (ft_load(tc, dirname) < 0) | 3538 | if (ft_load(tc, dirname) < 0) |
3540 | { | 3539 | { |
3541 | gui_syncsplash(HZ*2, ID2P(LANG_PLAYLIST_DIRECTORY_ACCESS_ERROR)); | 3540 | splash(HZ*2, ID2P(LANG_PLAYLIST_DIRECTORY_ACCESS_ERROR)); |
3542 | *(tc->dirfilter) = old_dirfilter; | 3541 | *(tc->dirfilter) = old_dirfilter; |
3543 | return -1; | 3542 | return -1; |
3544 | } | 3543 | } |
diff --git a/apps/playlist_catalog.c b/apps/playlist_catalog.c index cadad9f464..ef2c1d13d5 100644 --- a/apps/playlist_catalog.c +++ b/apps/playlist_catalog.c | |||
@@ -96,8 +96,7 @@ static int initialize_catalog(void) | |||
96 | if (!playlist_dir_exists) | 96 | if (!playlist_dir_exists) |
97 | { | 97 | { |
98 | if (mkdir(playlist_dir) < 0) { | 98 | if (mkdir(playlist_dir) < 0) { |
99 | gui_syncsplash(HZ*2, ID2P(LANG_CATALOG_NO_DIRECTORY), | 99 | splashf(HZ*2, ID2P(LANG_CATALOG_NO_DIRECTORY), playlist_dir); |
100 | playlist_dir); | ||
101 | return -1; | 100 | return -1; |
102 | } | 101 | } |
103 | else { | 102 | else { |
@@ -130,8 +129,7 @@ static int create_playlist_list(char** playlists, int num_items, | |||
130 | 129 | ||
131 | if (ft_load(tc, playlist_dir) < 0) | 130 | if (ft_load(tc, playlist_dir) < 0) |
132 | { | 131 | { |
133 | gui_syncsplash(HZ*2, ID2P(LANG_CATALOG_NO_DIRECTORY), | 132 | splashf(HZ*2, ID2P(LANG_CATALOG_NO_DIRECTORY), playlist_dir); |
134 | playlist_dir); | ||
135 | goto exit; | 133 | goto exit; |
136 | } | 134 | } |
137 | 135 | ||
@@ -234,7 +232,7 @@ static int display_playlists(char* playlist, bool view) | |||
234 | 232 | ||
235 | if (num_playlists <= 0) | 233 | if (num_playlists <= 0) |
236 | { | 234 | { |
237 | gui_syncsplash(HZ*2, ID2P(LANG_CATALOG_NO_PLAYLISTS)); | 235 | splash(HZ*2, ID2P(LANG_CATALOG_NO_PLAYLISTS)); |
238 | return -1; | 236 | return -1; |
239 | } | 237 | } |
240 | 238 | ||
@@ -327,8 +325,7 @@ static void display_insert_count(int count) | |||
327 | talk_id(LANG_PLAYLIST_INSERT_COUNT, true); | 325 | talk_id(LANG_PLAYLIST_INSERT_COUNT, true); |
328 | } | 326 | } |
329 | 327 | ||
330 | gui_syncsplash(0, str(LANG_PLAYLIST_INSERT_COUNT), count, | 328 | splashf(0, str(LANG_PLAYLIST_INSERT_COUNT), count, str(LANG_OFF_ABORT)); |
331 | str(LANG_OFF_ABORT)); | ||
332 | } | 329 | } |
333 | 330 | ||
334 | /* Add specified track into playlist. Callback from directory insert */ | 331 | /* Add specified track into playlist. Callback from directory insert */ |
diff --git a/apps/playlist_viewer.c b/apps/playlist_viewer.c index 0d59354804..62e755a53a 100644 --- a/apps/playlist_viewer.c +++ b/apps/playlist_viewer.c | |||
@@ -293,7 +293,7 @@ static bool playlist_viewer_init(struct playlist_viewer * viewer, | |||
293 | if (!have_list) | 293 | if (!have_list) |
294 | { | 294 | { |
295 | /* Nothing to view, exit */ | 295 | /* Nothing to view, exit */ |
296 | gui_syncsplash(HZ, str(LANG_CATALOG_NO_PLAYLISTS)); | 296 | splash(HZ, str(LANG_CATALOG_NO_PLAYLISTS)); |
297 | return false; | 297 | return false; |
298 | } | 298 | } |
299 | 299 | ||
@@ -680,8 +680,8 @@ bool playlist_viewer_ex(const char* filename) | |||
680 | ret_val = playlist_move(viewer.playlist, viewer.move_track, | 680 | ret_val = playlist_move(viewer.playlist, viewer.move_track, |
681 | current_track->index); | 681 | current_track->index); |
682 | if (ret_val < 0) | 682 | if (ret_val < 0) |
683 | gui_syncsplash(HZ, (unsigned char *)"%s %s", | 683 | splashf(HZ, (unsigned char *)"%s %s", str(LANG_MOVE), |
684 | str(LANG_MOVE), str(LANG_FAILED)); | 684 | str(LANG_FAILED)); |
685 | update_playlist(true); | 685 | update_playlist(true); |
686 | viewer.move_track = -1; | 686 | viewer.move_track = -1; |
687 | } | 687 | } |
@@ -795,7 +795,7 @@ bool search_playlist(void) | |||
795 | playlist_count = playlist_amount_ex(viewer.playlist); | 795 | playlist_count = playlist_amount_ex(viewer.playlist); |
796 | for (i=0;(i<playlist_count)&&(found_indicies_count<MAX_PLAYLIST_ENTRIES);i++) | 796 | for (i=0;(i<playlist_count)&&(found_indicies_count<MAX_PLAYLIST_ENTRIES);i++) |
797 | { | 797 | { |
798 | gui_syncsplash(0, str(LANG_PLAYLIST_SEARCH_MSG),found_indicies_count, | 798 | splashf(0, str(LANG_PLAYLIST_SEARCH_MSG), found_indicies_count, |
799 | str(LANG_OFF_ABORT)); | 799 | str(LANG_OFF_ABORT)); |
800 | if (action_userabort(TIMEOUT_NOBLOCK)) | 800 | if (action_userabort(TIMEOUT_NOBLOCK)) |
801 | { | 801 | { |
diff --git a/apps/plugin.c b/apps/plugin.c index 6ebb6fad61..7f546011a9 100644 --- a/apps/plugin.c +++ b/apps/plugin.c | |||
@@ -157,7 +157,8 @@ static const struct plugin_api rockbox_api = { | |||
157 | backlight_set_timeout_plugged, | 157 | backlight_set_timeout_plugged, |
158 | #endif | 158 | #endif |
159 | is_backlight_on, | 159 | is_backlight_on, |
160 | gui_syncsplash, | 160 | splash, |
161 | splashf, | ||
161 | 162 | ||
162 | #ifdef HAVE_REMOTE_LCD | 163 | #ifdef HAVE_REMOTE_LCD |
163 | /* remote lcd */ | 164 | /* remote lcd */ |
@@ -639,32 +640,32 @@ int plugin_load(const char* plugin, const void* parameter) | |||
639 | plugin_loaded = false; | 640 | plugin_loaded = false; |
640 | } | 641 | } |
641 | 642 | ||
642 | gui_syncsplash(0, ID2P(LANG_WAIT)); | 643 | splash(0, ID2P(LANG_WAIT)); |
643 | strcpy(current_plugin, plugin); | 644 | strcpy(current_plugin, plugin); |
644 | 645 | ||
645 | #ifdef SIMULATOR | 646 | #ifdef SIMULATOR |
646 | hdr = sim_plugin_load((char *)plugin, &pd); | 647 | hdr = sim_plugin_load((char *)plugin, &pd); |
647 | if (pd == NULL) { | 648 | if (pd == NULL) { |
648 | gui_syncsplash(HZ*2, str(LANG_PLUGIN_CANT_OPEN), plugin); | 649 | splashf(HZ*2, str(LANG_PLUGIN_CANT_OPEN), plugin); |
649 | return -1; | 650 | return -1; |
650 | } | 651 | } |
651 | if (hdr == NULL | 652 | if (hdr == NULL |
652 | || hdr->magic != PLUGIN_MAGIC | 653 | || hdr->magic != PLUGIN_MAGIC |
653 | || hdr->target_id != TARGET_ID) { | 654 | || hdr->target_id != TARGET_ID) { |
654 | sim_plugin_close(pd); | 655 | sim_plugin_close(pd); |
655 | gui_syncsplash(HZ*2, str(LANG_PLUGIN_WRONG_MODEL)); | 656 | splash(HZ*2, str(LANG_PLUGIN_WRONG_MODEL)); |
656 | return -1; | 657 | return -1; |
657 | } | 658 | } |
658 | if (hdr->api_version > PLUGIN_API_VERSION | 659 | if (hdr->api_version > PLUGIN_API_VERSION |
659 | || hdr->api_version < PLUGIN_MIN_API_VERSION) { | 660 | || hdr->api_version < PLUGIN_MIN_API_VERSION) { |
660 | sim_plugin_close(pd); | 661 | sim_plugin_close(pd); |
661 | gui_syncsplash(HZ*2, str(LANG_PLUGIN_WRONG_VERSION)); | 662 | splash(HZ*2, str(LANG_PLUGIN_WRONG_VERSION)); |
662 | return -1; | 663 | return -1; |
663 | } | 664 | } |
664 | #else | 665 | #else |
665 | fd = open(plugin, O_RDONLY); | 666 | fd = open(plugin, O_RDONLY); |
666 | if (fd < 0) { | 667 | if (fd < 0) { |
667 | gui_syncsplash(HZ*2, str(LANG_PLUGIN_CANT_OPEN), plugin); | 668 | splashf(HZ*2, str(LANG_PLUGIN_CANT_OPEN), plugin); |
668 | return fd; | 669 | return fd; |
669 | } | 670 | } |
670 | #if NUM_CORES > 1 | 671 | #if NUM_CORES > 1 |
@@ -678,7 +679,7 @@ int plugin_load(const char* plugin, const void* parameter) | |||
678 | close(fd); | 679 | close(fd); |
679 | 680 | ||
680 | if (readsize < 0) { | 681 | if (readsize < 0) { |
681 | gui_syncsplash(HZ*2, str(LANG_READ_FAILED), plugin); | 682 | splashf(HZ*2, str(LANG_READ_FAILED), plugin); |
682 | return -1; | 683 | return -1; |
683 | } | 684 | } |
684 | hdr = (struct plugin_header *)pluginbuf; | 685 | hdr = (struct plugin_header *)pluginbuf; |
@@ -688,12 +689,12 @@ int plugin_load(const char* plugin, const void* parameter) | |||
688 | || hdr->target_id != TARGET_ID | 689 | || hdr->target_id != TARGET_ID |
689 | || hdr->load_addr != pluginbuf | 690 | || hdr->load_addr != pluginbuf |
690 | || hdr->end_addr > pluginbuf + PLUGIN_BUFFER_SIZE) { | 691 | || hdr->end_addr > pluginbuf + PLUGIN_BUFFER_SIZE) { |
691 | gui_syncsplash(HZ*2, str(LANG_PLUGIN_WRONG_MODEL)); | 692 | splash(HZ*2, str(LANG_PLUGIN_WRONG_MODEL)); |
692 | return -1; | 693 | return -1; |
693 | } | 694 | } |
694 | if (hdr->api_version > PLUGIN_API_VERSION | 695 | if (hdr->api_version > PLUGIN_API_VERSION |
695 | || hdr->api_version < PLUGIN_MIN_API_VERSION) { | 696 | || hdr->api_version < PLUGIN_MIN_API_VERSION) { |
696 | gui_syncsplash(HZ*2, str(LANG_PLUGIN_WRONG_VERSION)); | 697 | splash(HZ*2, str(LANG_PLUGIN_WRONG_VERSION)); |
697 | return -1; | 698 | return -1; |
698 | } | 699 | } |
699 | plugin_size = hdr->end_addr - pluginbuf; | 700 | plugin_size = hdr->end_addr - pluginbuf; |
@@ -768,7 +769,7 @@ int plugin_load(const char* plugin, const void* parameter) | |||
768 | return PLUGIN_USB_CONNECTED; | 769 | return PLUGIN_USB_CONNECTED; |
769 | 770 | ||
770 | default: | 771 | default: |
771 | gui_syncsplash(HZ*2, str(LANG_PLUGIN_ERROR)); | 772 | splash(HZ*2, str(LANG_PLUGIN_ERROR)); |
772 | break; | 773 | break; |
773 | } | 774 | } |
774 | return PLUGIN_OK; | 775 | return PLUGIN_OK; |
diff --git a/apps/plugin.h b/apps/plugin.h index 373795b145..fa5993d97f 100644 --- a/apps/plugin.h +++ b/apps/plugin.h | |||
@@ -130,12 +130,12 @@ void* plugin_get_buffer(size_t *buffer_size); | |||
130 | #define PLUGIN_MAGIC 0x526F634B /* RocK */ | 130 | #define PLUGIN_MAGIC 0x526F634B /* RocK */ |
131 | 131 | ||
132 | /* increase this every time the api struct changes */ | 132 | /* increase this every time the api struct changes */ |
133 | #define PLUGIN_API_VERSION 121 | 133 | #define PLUGIN_API_VERSION 122 |
134 | 134 | ||
135 | /* update this to latest version if a change to the api struct breaks | 135 | /* update this to latest version if a change to the api struct breaks |
136 | backwards compatibility (and please take the opportunity to sort in any | 136 | backwards compatibility (and please take the opportunity to sort in any |
137 | new function which are "waiting" at the end of the function table) */ | 137 | new function which are "waiting" at the end of the function table) */ |
138 | #define PLUGIN_MIN_API_VERSION 121 | 138 | #define PLUGIN_MIN_API_VERSION 122 |
139 | 139 | ||
140 | /* plugin return codes */ | 140 | /* plugin return codes */ |
141 | enum plugin_status { | 141 | enum plugin_status { |
@@ -256,7 +256,8 @@ struct plugin_api { | |||
256 | void (*backlight_set_timeout_plugged)(int index); | 256 | void (*backlight_set_timeout_plugged)(int index); |
257 | #endif | 257 | #endif |
258 | bool (*is_backlight_on)(bool ignore_always_off); | 258 | bool (*is_backlight_on)(bool ignore_always_off); |
259 | void (*splash)(int ticks, const char *fmt, ...) ATTRIBUTE_PRINTF(2, 3); | 259 | void (*splash)(int ticks, const char *str); |
260 | void (*splashf)(int ticks, const char *fmt, ...) ATTRIBUTE_PRINTF(2, 3); | ||
260 | 261 | ||
261 | #ifdef HAVE_REMOTE_LCD | 262 | #ifdef HAVE_REMOTE_LCD |
262 | /* remote lcd */ | 263 | /* remote lcd */ |
diff --git a/apps/plugins/bubbles.c b/apps/plugins/bubbles.c index 97aef29b57..be94036f4e 100644 --- a/apps/plugins/bubbles.c +++ b/apps/plugins/bubbles.c | |||
@@ -2319,7 +2319,7 @@ static int bubbles_handlebuttons(struct game_context* bb, bool animblock, | |||
2319 | 2319 | ||
2320 | case BUBBLES_START: /* pause the game */ | 2320 | case BUBBLES_START: /* pause the game */ |
2321 | start = *rb->current_tick; | 2321 | start = *rb->current_tick; |
2322 | rb->splash(1, "Paused"); | 2322 | rb->splash(0, "Paused"); |
2323 | while(pluginlib_getaction(rb,TIMEOUT_BLOCK,plugin_contexts,2) | 2323 | while(pluginlib_getaction(rb,TIMEOUT_BLOCK,plugin_contexts,2) |
2324 | != (BUBBLES_START)); | 2324 | != (BUBBLES_START)); |
2325 | bb->startedshot += *rb->current_tick-start; | 2325 | bb->startedshot += *rb->current_tick-start; |
diff --git a/apps/plugins/iriverify.c b/apps/plugins/iriverify.c index c88ddc7b09..7e77ae3e69 100644 --- a/apps/plugins/iriverify.c +++ b/apps/plugins/iriverify.c | |||
@@ -159,13 +159,13 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame | |||
159 | FOR_NB_SCREENS(i) | 159 | FOR_NB_SCREENS(i) |
160 | rb->screens[i]->clear_display(); | 160 | rb->screens[i]->clear_display(); |
161 | if(rc < 0) { | 161 | if(rc < 0) { |
162 | rb->splash(HZ, "Can't write file: %d", rc); | 162 | rb->splashf(HZ, "Can't write file: %d", rc); |
163 | } else { | 163 | } else { |
164 | rb->splash(HZ, "Done"); | 164 | rb->splash(HZ, "Done"); |
165 | } | 165 | } |
166 | } else { | 166 | } else { |
167 | if(rc < 0) { | 167 | if(rc < 0) { |
168 | rb->splash(HZ, "Can't read file: %d", rc); | 168 | rb->splashf(HZ, "Can't read file: %d", rc); |
169 | } else { | 169 | } else { |
170 | rb->splash(HZ, "The file is too big"); | 170 | rb->splash(HZ, "The file is too big"); |
171 | } | 171 | } |
diff --git a/apps/plugins/jewels.c b/apps/plugins/jewels.c index 48735a2b44..7f4cd4bd41 100644 --- a/apps/plugins/jewels.c +++ b/apps/plugins/jewels.c | |||
@@ -1261,7 +1261,7 @@ static void jewels_nextlevel(struct game_context* bj) { | |||
1261 | while(bj->score >= LEVEL_PTS) { | 1261 | while(bj->score >= LEVEL_PTS) { |
1262 | bj->score -= LEVEL_PTS; | 1262 | bj->score -= LEVEL_PTS; |
1263 | bj->level++; | 1263 | bj->level++; |
1264 | rb->splash(HZ*2, "Level %d", bj->level); | 1264 | rb->splashf(HZ*2, "Level %d", bj->level); |
1265 | jewels_drawboard(bj); | 1265 | jewels_drawboard(bj); |
1266 | } | 1266 | } |
1267 | 1267 | ||
@@ -1283,7 +1283,7 @@ static void jewels_nextlevel(struct game_context* bj) { | |||
1283 | rb->splash(HZ*2, "You win!"); | 1283 | rb->splash(HZ*2, "You win!"); |
1284 | bj->level = 1; | 1284 | bj->level = 1; |
1285 | } else { | 1285 | } else { |
1286 | rb->splash(HZ*2, "Level %d", bj->level); | 1286 | rb->splashf(HZ*2, "Level %d", bj->level); |
1287 | } | 1287 | } |
1288 | break; | 1288 | break; |
1289 | } | 1289 | } |
diff --git a/apps/plugins/jpeg.c b/apps/plugins/jpeg.c index a17c6d7729..ffc9d49a98 100644 --- a/apps/plugins/jpeg.c +++ b/apps/plugins/jpeg.c | |||
@@ -3026,7 +3026,7 @@ struct t_disp* get_image(struct jpeg* p_jpg, int ds) | |||
3026 | #endif | 3026 | #endif |
3027 | if (status) | 3027 | if (status) |
3028 | { | 3028 | { |
3029 | rb->splash(HZ, "decode error %d", status); | 3029 | rb->splashf(HZ, "decode error %d", status); |
3030 | file_pt[curfile] = '\0'; | 3030 | file_pt[curfile] = '\0'; |
3031 | return NULL; | 3031 | return NULL; |
3032 | } | 3032 | } |
@@ -3212,7 +3212,7 @@ int load_and_show(char* filename) | |||
3212 | 3212 | ||
3213 | if (status < 0 || (status & (DQT | SOF0)) != (DQT | SOF0)) | 3213 | if (status < 0 || (status & (DQT | SOF0)) != (DQT | SOF0)) |
3214 | { /* bad format or minimum components not contained */ | 3214 | { /* bad format or minimum components not contained */ |
3215 | rb->splash(HZ, "unsupported %d", status); | 3215 | rb->splashf(HZ, "unsupported %d", status); |
3216 | file_pt[curfile] = '\0'; | 3216 | file_pt[curfile] = '\0'; |
3217 | return change_filename(direction); | 3217 | return change_filename(direction); |
3218 | } | 3218 | } |
diff --git a/apps/plugins/keybox.c b/apps/plugins/keybox.c index 389299d580..fef3d4f23a 100644 --- a/apps/plugins/keybox.c +++ b/apps/plugins/keybox.c | |||
@@ -312,9 +312,9 @@ static void splash_pw(int selected_item) | |||
312 | entry = entry->next; | 312 | entry = entry->next; |
313 | } | 313 | } |
314 | if (entry->name != '\0') | 314 | if (entry->name != '\0') |
315 | rb->splash(0, "%s %s", entry->name, entry->password); | 315 | rb->splashf(0, "%s %s", entry->name, entry->password); |
316 | else | 316 | else |
317 | rb->splash(0, "%s", entry->password); | 317 | rb->splashf(0, "%s", entry->password); |
318 | rb->get_action(CONTEXT_STD, TIMEOUT_BLOCK); | 318 | rb->get_action(CONTEXT_STD, TIMEOUT_BLOCK); |
319 | } | 319 | } |
320 | 320 | ||
diff --git a/apps/plugins/lib/overlay.c b/apps/plugins/lib/overlay.c index a779722d88..706d6c14a7 100644 --- a/apps/plugins/lib/overlay.c +++ b/apps/plugins/lib/overlay.c | |||
@@ -57,7 +57,7 @@ enum plugin_status run_overlay(const struct plugin_api* rb, const void* paramete | |||
57 | fd = rb->open(filename, O_RDONLY); | 57 | fd = rb->open(filename, O_RDONLY); |
58 | if (fd < 0) | 58 | if (fd < 0) |
59 | { | 59 | { |
60 | rb->splash(2*HZ, "Can't open %s", filename); | 60 | rb->splashf(2*HZ, "Can't open %s", filename); |
61 | return PLUGIN_ERROR; | 61 | return PLUGIN_ERROR; |
62 | } | 62 | } |
63 | readsize = rb->read(fd, &header, sizeof(header)); | 63 | readsize = rb->read(fd, &header, sizeof(header)); |
@@ -67,17 +67,17 @@ enum plugin_status run_overlay(const struct plugin_api* rb, const void* paramete | |||
67 | 67 | ||
68 | if (readsize != sizeof(header)) | 68 | if (readsize != sizeof(header)) |
69 | { | 69 | { |
70 | rb->splash(2*HZ, "Reading %s overlay failed.", name); | 70 | rb->splashf(2*HZ, "Reading %s overlay failed.", name); |
71 | return PLUGIN_ERROR; | 71 | return PLUGIN_ERROR; |
72 | } | 72 | } |
73 | if (header.magic != PLUGIN_MAGIC || header.target_id != TARGET_ID) | 73 | if (header.magic != PLUGIN_MAGIC || header.target_id != TARGET_ID) |
74 | { | 74 | { |
75 | rb->splash(2*HZ, "%s overlay: Incompatible model.", name); | 75 | rb->splashf(2*HZ, "%s overlay: Incompatible model.", name); |
76 | return PLUGIN_ERROR; | 76 | return PLUGIN_ERROR; |
77 | } | 77 | } |
78 | if (header.api_version != PLUGIN_API_VERSION) | 78 | if (header.api_version != PLUGIN_API_VERSION) |
79 | { | 79 | { |
80 | rb->splash(2*HZ, "%s overlay: Incompatible version.", name); | 80 | rb->splashf(2*HZ, "%s overlay: Incompatible version.", name); |
81 | return PLUGIN_ERROR; | 81 | return PLUGIN_ERROR; |
82 | } | 82 | } |
83 | 83 | ||
@@ -85,14 +85,14 @@ enum plugin_status run_overlay(const struct plugin_api* rb, const void* paramete | |||
85 | if (header.load_addr < audiobuf || | 85 | if (header.load_addr < audiobuf || |
86 | header.end_addr > audiobuf + audiobuf_size) | 86 | header.end_addr > audiobuf + audiobuf_size) |
87 | { | 87 | { |
88 | rb->splash(2*HZ, "%s overlay doesn't fit into memory.", name); | 88 | rb->splashf(2*HZ, "%s overlay doesn't fit into memory.", name); |
89 | return PLUGIN_ERROR; | 89 | return PLUGIN_ERROR; |
90 | } | 90 | } |
91 | 91 | ||
92 | fd = rb->open(filename, O_RDONLY); | 92 | fd = rb->open(filename, O_RDONLY); |
93 | if (fd < 0) | 93 | if (fd < 0) |
94 | { | 94 | { |
95 | rb->splash(2*HZ, "Can't open %s", filename); | 95 | rb->splashf(2*HZ, "Can't open %s", filename); |
96 | return PLUGIN_ERROR; | 96 | return PLUGIN_ERROR; |
97 | } | 97 | } |
98 | readsize = rb->read(fd, header.load_addr, header.end_addr - header.load_addr); | 98 | readsize = rb->read(fd, header.load_addr, header.end_addr - header.load_addr); |
@@ -100,7 +100,7 @@ enum plugin_status run_overlay(const struct plugin_api* rb, const void* paramete | |||
100 | 100 | ||
101 | if (readsize < 0) | 101 | if (readsize < 0) |
102 | { | 102 | { |
103 | rb->splash(2*HZ, "Reading %s overlay failed.", name); | 103 | rb->splashf(2*HZ, "Reading %s overlay failed.", name); |
104 | return PLUGIN_ERROR; | 104 | return PLUGIN_ERROR; |
105 | } | 105 | } |
106 | /* Zero out bss area */ | 106 | /* Zero out bss area */ |
diff --git a/apps/plugins/mazezam.c b/apps/plugins/mazezam.c index 1868601cd9..c1726a5e95 100644 --- a/apps/plugins/mazezam.c +++ b/apps/plugins/mazezam.c | |||
@@ -715,7 +715,7 @@ static void play_level(short level, short lives, bool new_level) | |||
715 | */ | 715 | */ |
716 | rb->lcd_remote_clear_display(); | 716 | rb->lcd_remote_clear_display(); |
717 | #endif | 717 | #endif |
718 | rb->splash(MAZEZAM_DELAY_LIVES, MAZEZAM_TEXT_LIVES, | 718 | rb->splashf(MAZEZAM_DELAY_LIVES, MAZEZAM_TEXT_LIVES, |
719 | level+1, lives); | 719 | level+1, lives); |
720 | 720 | ||
721 | /* ensure keys pressed during the splash screen are ignored */ | 721 | /* ensure keys pressed during the splash screen are ignored */ |
diff --git a/apps/plugins/md5sum.c b/apps/plugins/md5sum.c index 084256badf..f95cd20f20 100644 --- a/apps/plugins/md5sum.c +++ b/apps/plugins/md5sum.c | |||
@@ -58,7 +58,7 @@ static void hash_file( int out, const char *path ) | |||
58 | { | 58 | { |
59 | char string[MD5_STRING_LENGTH+1]; | 59 | char string[MD5_STRING_LENGTH+1]; |
60 | done++; | 60 | done++; |
61 | rb->splash( 0, "%d / %d : %s", done, count, path ); | 61 | rb->splashf( 0, "%d / %d : %s", done, count, path ); |
62 | if( hash( string, path ) ) | 62 | if( hash( string, path ) ) |
63 | rb->write( out, "error", 5 ); | 63 | rb->write( out, "error", 5 ); |
64 | else | 64 | else |
@@ -140,7 +140,7 @@ static void hash_check( int out, const char *path ) | |||
140 | { | 140 | { |
141 | const char *filename = rb->strchr( line, ' ' ); | 141 | const char *filename = rb->strchr( line, ' ' ); |
142 | done++; | 142 | done++; |
143 | rb->splash( 0, "%d / %d : %s", done, count, filename ); | 143 | rb->splashf( 0, "%d / %d : %s", done, count, filename ); |
144 | if( !filename || len < MD5_STRING_LENGTH + 2 ) | 144 | if( !filename || len < MD5_STRING_LENGTH + 2 ) |
145 | { | 145 | { |
146 | const char error[] = "Malformed input line ... skipping"; | 146 | const char error[] = "Malformed input line ... skipping"; |
diff --git a/apps/plugins/minesweeper.c b/apps/plugins/minesweeper.c index 16cc0fcd87..266d12fc8d 100644 --- a/apps/plugins/minesweeper.c +++ b/apps/plugins/minesweeper.c | |||
@@ -749,12 +749,12 @@ enum minesweeper_status minesweeper( void ) | |||
749 | break; | 749 | break; |
750 | flags_used = count_flags(); | 750 | flags_used = count_flags(); |
751 | if (flags_used == 1) { | 751 | if (flags_used == 1) { |
752 | rb->splash( HZ*2, "You marked 1 field. There are %d mines.", | 752 | rb->splashf( HZ*2, "You marked 1 field. There are %d mines.", |
753 | mine_num ); | 753 | mine_num ); |
754 | } | 754 | } |
755 | else | 755 | else |
756 | { | 756 | { |
757 | rb->splash( HZ*2, "You marked %d fields. There are %d mines.", | 757 | rb->splashf( HZ*2, "You marked %d fields. There are %d mines.", |
758 | flags_used, mine_num ); | 758 | flags_used, mine_num ); |
759 | } | 759 | } |
760 | break; | 760 | break; |
diff --git a/apps/plugins/mpegplayer/disk_buf.c b/apps/plugins/mpegplayer/disk_buf.c index f37797bc9e..7ba4025f1e 100644 --- a/apps/plugins/mpegplayer/disk_buf.c +++ b/apps/plugins/mpegplayer/disk_buf.c | |||
@@ -151,7 +151,7 @@ static inline void disk_buf_buffer(void) | |||
151 | wm : AVERAGE(disk_buf.low_wm, wm, 16); | 151 | wm : AVERAGE(disk_buf.low_wm, wm, 16); |
152 | 152 | ||
153 | #if 0 | 153 | #if 0 |
154 | rb->splash(0, "*%10ld %10ld", disk_buf.low_wm, | 154 | rb->splashf(0, "*%10ld %10ld", disk_buf.low_wm, |
155 | disk_buf.win_right - sw.right); | 155 | disk_buf.win_right - sw.right); |
156 | #endif | 156 | #endif |
157 | 157 | ||
diff --git a/apps/plugins/mpegplayer/mpegplayer.c b/apps/plugins/mpegplayer/mpegplayer.c index c775a14f65..c58a2f6d0f 100644 --- a/apps/plugins/mpegplayer/mpegplayer.c +++ b/apps/plugins/mpegplayer/mpegplayer.c | |||
@@ -1674,7 +1674,7 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame | |||
1674 | errstring = "Error opening file: %d"; | 1674 | errstring = "Error opening file: %d"; |
1675 | } | 1675 | } |
1676 | 1676 | ||
1677 | rb->splash(HZ*2, errstring, err); | 1677 | rb->splashf(HZ*2, errstring, err); |
1678 | } | 1678 | } |
1679 | } | 1679 | } |
1680 | 1680 | ||
diff --git a/apps/plugins/pacbox/pacbox.c b/apps/plugins/pacbox/pacbox.c index 16860f9d25..c4ee037b5a 100644 --- a/apps/plugins/pacbox/pacbox.c +++ b/apps/plugins/pacbox/pacbox.c | |||
@@ -421,7 +421,7 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame | |||
421 | SETTINGS_VERSION); | 421 | SETTINGS_VERSION); |
422 | } | 422 | } |
423 | } else { | 423 | } else { |
424 | rb->splash(HZ*2, "No ROMs in %s/pacman/", ROCKBOX_DIR); | 424 | rb->splashf(HZ*2, "No ROMs in %s/pacman/", ROCKBOX_DIR); |
425 | } | 425 | } |
426 | 426 | ||
427 | #ifdef HAVE_ADJUSTABLE_CPU_FREQ | 427 | #ifdef HAVE_ADJUSTABLE_CPU_FREQ |
diff --git a/apps/plugins/ppmviewer.c b/apps/plugins/ppmviewer.c index 4c24a5d5f4..01513c4877 100644 --- a/apps/plugins/ppmviewer.c +++ b/apps/plugins/ppmviewer.c | |||
@@ -36,7 +36,7 @@ PLUGIN_HEADER | |||
36 | #define PPM_OVERALLMAXVAL 65535 | 36 | #define PPM_OVERALLMAXVAL 65535 |
37 | #define PPM_MAXSIZE (300*1024)/sizeof(fb_data) | 37 | #define PPM_MAXSIZE (300*1024)/sizeof(fb_data) |
38 | 38 | ||
39 | #define ppm_error(...) rb->splash(HZ*2, __VA_ARGS__ ) | 39 | #define ppm_error(...) rb->splashf(HZ*2, __VA_ARGS__ ) |
40 | 40 | ||
41 | static fb_data buffer[PPM_MAXSIZE]; | 41 | static fb_data buffer[PPM_MAXSIZE]; |
42 | static fb_data lcd_buf[LCD_WIDTH * LCD_HEIGHT]; | 42 | static fb_data lcd_buf[LCD_WIDTH * LCD_HEIGHT]; |
diff --git a/apps/plugins/properties.c b/apps/plugins/properties.c index 86955a7b57..22288d406f 100644 --- a/apps/plugins/properties.c +++ b/apps/plugins/properties.c | |||
@@ -292,7 +292,7 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame | |||
292 | if(!found) | 292 | if(!found) |
293 | { | 293 | { |
294 | /* weird: we couldn't find the entry. This Should Never Happen (TM) */ | 294 | /* weird: we couldn't find the entry. This Should Never Happen (TM) */ |
295 | rb->splash(0, "File/Dir not found: %s", file); | 295 | rb->splashf(0, "File/Dir not found: %s", file); |
296 | rb->action_userabort(TIMEOUT_BLOCK); | 296 | rb->action_userabort(TIMEOUT_BLOCK); |
297 | return PLUGIN_OK; | 297 | return PLUGIN_OK; |
298 | } | 298 | } |
diff --git a/apps/plugins/random_folder_advance_config.c b/apps/plugins/random_folder_advance_config.c index c03a794e73..3df38082ba 100644 --- a/apps/plugins/random_folder_advance_config.c +++ b/apps/plugins/random_folder_advance_config.c | |||
@@ -219,7 +219,7 @@ void generate(void) | |||
219 | rb->write(fd,&dirs_count,sizeof(int)); | 219 | rb->write(fd,&dirs_count,sizeof(int)); |
220 | if (fd < 0) | 220 | if (fd < 0) |
221 | { | 221 | { |
222 | rb->splash(HZ, "Couldnt open %s", RFA_FILE); | 222 | rb->splashf(HZ, "Couldnt open %s", RFA_FILE); |
223 | return; | 223 | return; |
224 | } | 224 | } |
225 | #ifndef HAVE_LCD_CHARCELLS | 225 | #ifndef HAVE_LCD_CHARCELLS |
@@ -295,7 +295,7 @@ int edit_list(void) | |||
295 | /* load the dat file if not already done */ | 295 | /* load the dat file if not already done */ |
296 | if ((list == NULL || list->count == 0) && (i = load_list()) != 0) | 296 | if ((list == NULL || list->count == 0) && (i = load_list()) != 0) |
297 | { | 297 | { |
298 | rb->splash(HZ*2, "Could not load %s, rv = %d", RFA_FILE, i); | 298 | rb->splashf(HZ*2, "Could not load %s, rv = %d", RFA_FILE, i); |
299 | return -1; | 299 | return -1; |
300 | } | 300 | } |
301 | 301 | ||
@@ -387,13 +387,13 @@ int export_list_to_file_text(void) | |||
387 | /* load the dat file if not already done */ | 387 | /* load the dat file if not already done */ |
388 | if ((list == NULL || list->count == 0) && (i = load_list()) != 0) | 388 | if ((list == NULL || list->count == 0) && (i = load_list()) != 0) |
389 | { | 389 | { |
390 | rb->splash(HZ*2, "Could not load %s, rv = %d", RFA_FILE, i); | 390 | rb->splashf(HZ*2, "Could not load %s, rv = %d", RFA_FILE, i); |
391 | return 0; | 391 | return 0; |
392 | } | 392 | } |
393 | 393 | ||
394 | if (list->count <= 0) | 394 | if (list->count <= 0) |
395 | { | 395 | { |
396 | rb->splash(HZ*2, "no dirs in list file: %s", RFA_FILE); | 396 | rb->splashf(HZ*2, "no dirs in list file: %s", RFA_FILE); |
397 | return 0; | 397 | return 0; |
398 | } | 398 | } |
399 | 399 | ||
@@ -401,7 +401,7 @@ int export_list_to_file_text(void) | |||
401 | int myfd = rb->creat(RFA_FILE_TEXT); | 401 | int myfd = rb->creat(RFA_FILE_TEXT); |
402 | if (myfd < 0) | 402 | if (myfd < 0) |
403 | { | 403 | { |
404 | rb->splash(HZ*4, "failed to open: fd = %d, file = %s", | 404 | rb->splashf(HZ*4, "failed to open: fd = %d, file = %s", |
405 | myfd, RFA_FILE_TEXT); | 405 | myfd, RFA_FILE_TEXT); |
406 | return -1; | 406 | return -1; |
407 | } | 407 | } |
@@ -434,7 +434,7 @@ int import_list_from_file_text(void) | |||
434 | int myfd = rb->open(RFA_FILE_TEXT, O_RDONLY); | 434 | int myfd = rb->open(RFA_FILE_TEXT, O_RDONLY); |
435 | if (myfd < 0) | 435 | if (myfd < 0) |
436 | { | 436 | { |
437 | rb->splash(HZ*2, "failed to open: %s", RFA_FILE_TEXT); | 437 | rb->splashf(HZ*2, "failed to open: %s", RFA_FILE_TEXT); |
438 | return -1; | 438 | return -1; |
439 | } | 439 | } |
440 | 440 | ||
diff --git a/apps/plugins/rockpaint.c b/apps/plugins/rockpaint.c index c4e6328923..6436d9baa5 100644 --- a/apps/plugins/rockpaint.c +++ b/apps/plugins/rockpaint.c | |||
@@ -2520,12 +2520,12 @@ static void goto_menu(void) | |||
2520 | { | 2520 | { |
2521 | if( load_bitmap( filename ) <= 0 ) | 2521 | if( load_bitmap( filename ) <= 0 ) |
2522 | { | 2522 | { |
2523 | rb->splash( 1*HZ, "Error while loading %s", | 2523 | rb->splashf( 1*HZ, "Error while loading %s", |
2524 | filename ); | 2524 | filename ); |
2525 | } | 2525 | } |
2526 | else | 2526 | else |
2527 | { | 2527 | { |
2528 | rb->splash( 1*HZ, "Image loaded (%s)", filename ); | 2528 | rb->splashf( 1*HZ, "Image loaded (%s)", filename ); |
2529 | restore_screen(); | 2529 | restore_screen(); |
2530 | inv_cursor(true); | 2530 | inv_cursor(true); |
2531 | return; | 2531 | return; |
@@ -2542,7 +2542,7 @@ static void goto_menu(void) | |||
2542 | rb->strcasecmp(&filename[rb->strlen(filename)-4], ".bmp")) | 2542 | rb->strcasecmp(&filename[rb->strlen(filename)-4], ".bmp")) |
2543 | rb->strcat(filename, ".bmp"); | 2543 | rb->strcat(filename, ".bmp"); |
2544 | save_bitmap( filename ); | 2544 | save_bitmap( filename ); |
2545 | rb->splash( 1*HZ, "File saved (%s)", filename ); | 2545 | rb->splashf( 1*HZ, "File saved (%s)", filename ); |
2546 | } | 2546 | } |
2547 | break; | 2547 | break; |
2548 | 2548 | ||
@@ -3011,7 +3011,7 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame | |||
3011 | } | 3011 | } |
3012 | else | 3012 | else |
3013 | { | 3013 | { |
3014 | rb->splash( 1*HZ, "Image loaded (%s)", (char *)parameter ); | 3014 | rb->splashf( 1*HZ, "Image loaded (%s)", (char *)parameter ); |
3015 | restore_screen(); | 3015 | restore_screen(); |
3016 | rb->strcpy( filename, parameter ); | 3016 | rb->strcpy( filename, parameter ); |
3017 | } | 3017 | } |
diff --git a/apps/plugins/shortcuts/shortcuts_append.c b/apps/plugins/shortcuts/shortcuts_append.c index 0e73d2caa1..0d74767a87 100644 --- a/apps/plugins/shortcuts/shortcuts_append.c +++ b/apps/plugins/shortcuts/shortcuts_append.c | |||
@@ -85,7 +85,7 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* void_p | |||
85 | if (!found) { | 85 | if (!found) { |
86 | /* Something's gone properly pear shaped - | 86 | /* Something's gone properly pear shaped - |
87 | * we couldn't even find the entry */ | 87 | * we couldn't even find the entry */ |
88 | rb->splash(HZ*2, "File/Dir not found: %s", parameter); | 88 | rb->splashf(HZ*2, "File/Dir not found: %s", parameter); |
89 | return PLUGIN_ERROR; | 89 | return PLUGIN_ERROR; |
90 | } | 90 | } |
91 | 91 | ||
diff --git a/apps/plugins/shortcuts/shortcuts_common.c b/apps/plugins/shortcuts/shortcuts_common.c index 231c72df09..0ea18c06a2 100644 --- a/apps/plugins/shortcuts/shortcuts_common.c +++ b/apps/plugins/shortcuts/shortcuts_common.c | |||
@@ -90,7 +90,7 @@ bool load_sc_file(sc_file_t *file, char *filename, bool must_exist, | |||
90 | if (fd < 0){ | 90 | if (fd < 0){ |
91 | /* For some reason we couldn't create the file, | 91 | /* For some reason we couldn't create the file, |
92 | * so return an error message and exit */ | 92 | * so return an error message and exit */ |
93 | rb->splash(HZ*2, "Couldn't create the shortcuts file %s", | 93 | rb->splashf(HZ*2, "Couldn't create the shortcuts file %s", |
94 | filename); | 94 | filename); |
95 | goto end_of_proc; | 95 | goto end_of_proc; |
96 | } | 96 | } |
@@ -98,7 +98,7 @@ bool load_sc_file(sc_file_t *file, char *filename, bool must_exist, | |||
98 | ret_val = true; | 98 | ret_val = true; |
99 | goto end_of_proc; | 99 | goto end_of_proc; |
100 | } else { | 100 | } else { |
101 | rb->splash(HZ, "Couldn't open %s", filename); | 101 | rb->splashf(HZ, "Couldn't open %s", filename); |
102 | goto end_of_proc; | 102 | goto end_of_proc; |
103 | } | 103 | } |
104 | } | 104 | } |
@@ -108,7 +108,7 @@ bool load_sc_file(sc_file_t *file, char *filename, bool must_exist, | |||
108 | continue; | 108 | continue; |
109 | } | 109 | } |
110 | if (file->entry_cnt >= file->max_entries) { | 110 | if (file->entry_cnt >= file->max_entries) { |
111 | rb->splash(HZ*2, "Too many entries in the file, max allowed: %d", | 111 | rb->splashf(HZ*2, "Too many entries in the file, max allowed: %d", |
112 | file->max_entries); | 112 | file->max_entries); |
113 | goto end_of_proc; | 113 | goto end_of_proc; |
114 | } | 114 | } |
@@ -320,7 +320,7 @@ bool dump_sc_file(sc_file_t *file, char *filename) | |||
320 | * thing. */ | 320 | * thing. */ |
321 | fd = rb->open(filename, O_WRONLY|O_TRUNC); | 321 | fd = rb->open(filename, O_WRONLY|O_TRUNC); |
322 | if (fd < 0) { | 322 | if (fd < 0) { |
323 | rb->splash(HZ*2, "Could not open shortcuts file %s for writing", | 323 | rb->splashf(HZ*2, "Could not open shortcuts file %s for writing", |
324 | filename); | 324 | filename); |
325 | return false; | 325 | return false; |
326 | } | 326 | } |
diff --git a/apps/plugins/shortcuts/shortcuts_view.c b/apps/plugins/shortcuts/shortcuts_view.c index e6b89b7641..09b25480e8 100644 --- a/apps/plugins/shortcuts/shortcuts_view.c +++ b/apps/plugins/shortcuts/shortcuts_view.c | |||
@@ -149,7 +149,7 @@ bool list_sc(bool is_editable) | |||
149 | case SCLA_SELECT: | 149 | case SCLA_SELECT: |
150 | return goto_entry(sc_file.entries[selected_item].path); | 150 | return goto_entry(sc_file.entries[selected_item].path); |
151 | case SCLA_DELETE: | 151 | case SCLA_DELETE: |
152 | rb->splash(HZ, "Deleting %s", sc_file.entries[selected_item].disp); | 152 | rb->splashf(HZ, "Deleting %s", sc_file.entries[selected_item].disp); |
153 | remove_entry(&sc_file, selected_item); | 153 | remove_entry(&sc_file, selected_item); |
154 | dump_sc_file(&sc_file, link_filename); | 154 | dump_sc_file(&sc_file, link_filename); |
155 | return (sc_file.entry_cnt == 0); | 155 | return (sc_file.entry_cnt == 0); |
@@ -175,7 +175,7 @@ bool goto_entry(char *file_or_dir) | |||
175 | } | 175 | } |
176 | 176 | ||
177 | if (!exists) { | 177 | if (!exists) { |
178 | rb->splash(HZ*2, "%s %s no longer exists on disk", what, file_or_dir); | 178 | rb->splashf(HZ*2, "%s %s no longer exists on disk", what, file_or_dir); |
179 | return false; | 179 | return false; |
180 | } | 180 | } |
181 | /* Set the browsers dirfilter to the global setting | 181 | /* Set the browsers dirfilter to the global setting |
diff --git a/apps/plugins/sokoban.c b/apps/plugins/sokoban.c index 77813a5104..4e8263aadf 100644 --- a/apps/plugins/sokoban.c +++ b/apps/plugins/sokoban.c | |||
@@ -618,7 +618,7 @@ static bool read_levels(bool initialize) | |||
618 | buffered_boards.start = 0; | 618 | buffered_boards.start = 0; |
619 | 619 | ||
620 | if ((fd = rb->open(buffered_boards.filename, O_RDONLY)) < 0) { | 620 | if ((fd = rb->open(buffered_boards.filename, O_RDONLY)) < 0) { |
621 | rb->splash(HZ*2, "Unable to open %s", buffered_boards.filename); | 621 | rb->splashf(HZ*2, "Unable to open %s", buffered_boards.filename); |
622 | return false; | 622 | return false; |
623 | } | 623 | } |
624 | 624 | ||
@@ -930,7 +930,7 @@ static bool save(char *filename, bool solution) | |||
930 | 930 | ||
931 | if (filename[0] == '\0' || | 931 | if (filename[0] == '\0' || |
932 | (fd = rb->open(filename, O_WRONLY|O_CREAT|O_TRUNC)) < 0) { | 932 | (fd = rb->open(filename, O_WRONLY|O_CREAT|O_TRUNC)) < 0) { |
933 | rb->splash(HZ*2, "Unable to open %s", filename); | 933 | rb->splashf(HZ*2, "Unable to open %s", filename); |
934 | return false; | 934 | return false; |
935 | } | 935 | } |
936 | 936 | ||
@@ -965,7 +965,7 @@ static bool load(char *filename, bool silent) | |||
965 | 965 | ||
966 | if (filename[0] == '\0' || (fd = rb->open(filename, O_RDONLY)) < 0) { | 966 | if (filename[0] == '\0' || (fd = rb->open(filename, O_RDONLY)) < 0) { |
967 | if (!silent) | 967 | if (!silent) |
968 | rb->splash(HZ*2, "Unable to open %s", filename); | 968 | rb->splashf(HZ*2, "Unable to open %s", filename); |
969 | return false; | 969 | return false; |
970 | } | 970 | } |
971 | 971 | ||
diff --git a/apps/plugins/sort.c b/apps/plugins/sort.c index a313bb1bd6..5292400b0f 100644 --- a/apps/plugins/sort.c +++ b/apps/plugins/sort.c | |||
@@ -207,7 +207,7 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame | |||
207 | rc = write_file(); | 207 | rc = write_file(); |
208 | if(rc < 0) { | 208 | if(rc < 0) { |
209 | rb->lcd_clear_display(); | 209 | rb->lcd_clear_display(); |
210 | rb->splash(HZ, "Can't write file: %d", rc); | 210 | rb->splashf(HZ, "Can't write file: %d", rc); |
211 | } else { | 211 | } else { |
212 | rb->lcd_clear_display(); | 212 | rb->lcd_clear_display(); |
213 | rb->splash(HZ, "Done"); | 213 | rb->splash(HZ, "Done"); |
@@ -215,7 +215,7 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame | |||
215 | } else { | 215 | } else { |
216 | if(rc < 0) { | 216 | if(rc < 0) { |
217 | rb->lcd_clear_display(); | 217 | rb->lcd_clear_display(); |
218 | rb->splash(HZ, "Can't read file: %d", rc); | 218 | rb->splashf(HZ, "Can't read file: %d", rc); |
219 | } else { | 219 | } else { |
220 | rb->lcd_clear_display(); | 220 | rb->lcd_clear_display(); |
221 | rb->splash(HZ, "The file is too big"); | 221 | rb->splash(HZ, "The file is too big"); |
diff --git a/apps/plugins/splitedit.c b/apps/plugins/splitedit.c index 4f319b4bef..8de6a746ab 100644 --- a/apps/plugins/splitedit.c +++ b/apps/plugins/splitedit.c | |||
@@ -690,7 +690,7 @@ static int save( | |||
690 | 690 | ||
691 | if (close_stat != 0) | 691 | if (close_stat != 0) |
692 | { | 692 | { |
693 | rb->splash(0, "failed closing file1: error %d", close_stat); | 693 | rb->splashf(0, "failed closing file1: error %d", close_stat); |
694 | rb->button_get(true); | 694 | rb->button_get(true); |
695 | rb->button_get(true); | 695 | rb->button_get(true); |
696 | } else { | 696 | } else { |
@@ -702,7 +702,7 @@ static int save( | |||
702 | } | 702 | } |
703 | else | 703 | else |
704 | { | 704 | { |
705 | rb->splash(0, "Can't write File1: error %d", file1); | 705 | rb->splashf(0, "Can't write File1: error %d", file1); |
706 | rb->button_get(true); | 706 | rb->button_get(true); |
707 | rb->button_get(true); | 707 | rb->button_get(true); |
708 | retval = -1; | 708 | retval = -1; |
@@ -713,7 +713,7 @@ static int save( | |||
713 | { | 713 | { |
714 | if (rb->lseek(src_file, end, SEEK_SET) < (off_t)end) | 714 | if (rb->lseek(src_file, end, SEEK_SET) < (off_t)end) |
715 | { | 715 | { |
716 | rb->splash(0, "Src file to short: error %d", src_file); | 716 | rb->splashf(0, "Src file to short: error %d", src_file); |
717 | rb->button_get(true); | 717 | rb->button_get(true); |
718 | rb->button_get(true); | 718 | rb->button_get(true); |
719 | } | 719 | } |
@@ -731,7 +731,7 @@ static int save( | |||
731 | 731 | ||
732 | if (close_stat != 0) | 732 | if (close_stat != 0) |
733 | { | 733 | { |
734 | rb->splash(0, "failed: closing file2: error %d", | 734 | rb->splashf(0, "failed: closing file2: error %d", |
735 | close_stat); | 735 | close_stat); |
736 | rb->button_get(true); | 736 | rb->button_get(true); |
737 | rb->button_get(true); | 737 | rb->button_get(true); |
@@ -744,7 +744,7 @@ static int save( | |||
744 | } | 744 | } |
745 | else | 745 | else |
746 | { | 746 | { |
747 | rb->splash(0, "Can't write File2: error %d", file2); | 747 | rb->splashf(0, "Can't write File2: error %d", file2); |
748 | rb->button_get(true); | 748 | rb->button_get(true); |
749 | rb->button_get(true); | 749 | rb->button_get(true); |
750 | retval = -2; | 750 | retval = -2; |
@@ -754,7 +754,7 @@ static int save( | |||
754 | close_stat = rb->close(src_file); | 754 | close_stat = rb->close(src_file); |
755 | if (close_stat != 0) | 755 | if (close_stat != 0) |
756 | { | 756 | { |
757 | rb->splash(0, "failed: closing src: error %d", close_stat); | 757 | rb->splashf(0, "failed: closing src: error %d", close_stat); |
758 | rb->button_get(true); | 758 | rb->button_get(true); |
759 | rb->button_get(true); | 759 | rb->button_get(true); |
760 | } | 760 | } |
diff --git a/apps/plugins/text_editor.c b/apps/plugins/text_editor.c index e00328d148..6910c6c7e2 100644 --- a/apps/plugins/text_editor.c +++ b/apps/plugins/text_editor.c | |||
@@ -350,7 +350,7 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame | |||
350 | fd = rb->open(filename,O_RDONLY); | 350 | fd = rb->open(filename,O_RDONLY); |
351 | if (fd<0) | 351 | if (fd<0) |
352 | { | 352 | { |
353 | rb->splash(HZ*2,"Couldnt open file: %s",(char*)parameter); | 353 | rb->splashf(HZ*2,"Couldnt open file: %s",(char*)parameter); |
354 | return PLUGIN_ERROR; | 354 | return PLUGIN_ERROR; |
355 | } | 355 | } |
356 | #ifdef HAVE_LCD_COLOR | 356 | #ifdef HAVE_LCD_COLOR |
@@ -363,7 +363,7 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame | |||
363 | { | 363 | { |
364 | if (!do_action(ACTION_INSERT,temp_line,line_count)) | 364 | if (!do_action(ACTION_INSERT,temp_line,line_count)) |
365 | { | 365 | { |
366 | rb->splash(HZ*2,"Error reading file: %s",(char*)parameter); | 366 | rb->splashf(HZ*2,"Error reading file: %s",(char*)parameter); |
367 | rb->close(fd); | 367 | rb->close(fd); |
368 | return PLUGIN_ERROR; | 368 | return PLUGIN_ERROR; |
369 | } | 369 | } |
diff --git a/apps/plugins/vbrfix.c b/apps/plugins/vbrfix.c index fa05463d13..8313994e29 100644 --- a/apps/plugins/vbrfix.c +++ b/apps/plugins/vbrfix.c | |||
@@ -119,7 +119,7 @@ static int insert_data_in_file(const char *fname, int fpos, char *buf, int num_b | |||
119 | 119 | ||
120 | static void fileerror(int rc) | 120 | static void fileerror(int rc) |
121 | { | 121 | { |
122 | rb->splash(HZ*2, "File error: %d", rc); | 122 | rb->splashf(HZ*2, "File error: %d", rc); |
123 | } | 123 | } |
124 | 124 | ||
125 | static const unsigned char empty_id3_header[] = | 125 | static const unsigned char empty_id3_header[] = |
diff --git a/apps/plugins/wavplay.c b/apps/plugins/wavplay.c index 0a1136a6c2..333d16135c 100644 --- a/apps/plugins/wavplay.c +++ b/apps/plugins/wavplay.c | |||
@@ -3500,7 +3500,7 @@ int play_file(char* filename) | |||
3500 | format = letoh16(*(uint16_t *)(aud_buf + 20)); | 3500 | format = letoh16(*(uint16_t *)(aud_buf + 20)); |
3501 | if (format != 1) | 3501 | if (format != 1) |
3502 | { | 3502 | { |
3503 | rb->splash(2*HZ, "Unsupported format: %d", format); | 3503 | rb->splashf(2*HZ, "Unsupported format: %d", format); |
3504 | rb->close(fd); | 3504 | rb->close(fd); |
3505 | return PLAY_ERROR; | 3505 | return PLAY_ERROR; |
3506 | } | 3506 | } |
@@ -3508,7 +3508,7 @@ int play_file(char* filename) | |||
3508 | channels = letoh16(*(uint16_t *)(aud_buf + 22)); | 3508 | channels = letoh16(*(uint16_t *)(aud_buf + 22)); |
3509 | if (channels > 2) | 3509 | if (channels > 2) |
3510 | { | 3510 | { |
3511 | rb->splash(2*HZ, "Too many channels: %d", channels); | 3511 | rb->splashf(2*HZ, "Too many channels: %d", channels); |
3512 | rb->close(fd); | 3512 | rb->close(fd); |
3513 | return PLAY_ERROR; | 3513 | return PLAY_ERROR; |
3514 | } | 3514 | } |
@@ -3516,7 +3516,7 @@ int play_file(char* filename) | |||
3516 | samplebits = letoh16(*(uint16_t *)(aud_buf + 34)); | 3516 | samplebits = letoh16(*(uint16_t *)(aud_buf + 34)); |
3517 | if (samplebits != 16) | 3517 | if (samplebits != 16) |
3518 | { | 3518 | { |
3519 | rb->splash(2*HZ, "Unsupported sample depth: %dbit", samplebits); | 3519 | rb->splashf(2*HZ, "Unsupported sample depth: %dbit", samplebits); |
3520 | rb->close(fd); | 3520 | rb->close(fd); |
3521 | return PLAY_ERROR; | 3521 | return PLAY_ERROR; |
3522 | } | 3522 | } |
@@ -3534,7 +3534,7 @@ int play_file(char* filename) | |||
3534 | case 44100: rate = 9; break; | 3534 | case 44100: rate = 9; break; |
3535 | case 48000: rate = 10; break; | 3535 | case 48000: rate = 10; break; |
3536 | default: | 3536 | default: |
3537 | rb->splash(2*HZ, "Unsupported samplerate: %dHz", samplerate); | 3537 | rb->splashf(2*HZ, "Unsupported samplerate: %dHz", samplerate); |
3538 | rb->close(fd); | 3538 | rb->close(fd); |
3539 | return PLAY_ERROR; | 3539 | return PLAY_ERROR; |
3540 | } | 3540 | } |
diff --git a/apps/plugins/wavrecord.c b/apps/plugins/wavrecord.c index 5c7a987171..d57a61a6a2 100644 --- a/apps/plugins/wavrecord.c +++ b/apps/plugins/wavrecord.c | |||
@@ -3772,7 +3772,7 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame | |||
3772 | rc = rb->mkdir(recbasedir); | 3772 | rc = rb->mkdir(recbasedir); |
3773 | if (rc < 0) | 3773 | if (rc < 0) |
3774 | { | 3774 | { |
3775 | rb->splash(HZ*2, "Can't create directory %s. Error %d.", | 3775 | rb->splashf(HZ*2, "Can't create directory %s. Error %d.", |
3776 | recbasedir, rc); | 3776 | recbasedir, rc); |
3777 | return PLUGIN_ERROR; | 3777 | return PLUGIN_ERROR; |
3778 | } | 3778 | } |
diff --git a/apps/plugins/wavview.c b/apps/plugins/wavview.c index 0d7b6f6476..7a26a3911f 100644 --- a/apps/plugins/wavview.c +++ b/apps/plugins/wavview.c | |||
@@ -203,7 +203,7 @@ static int readwavpeaks(const char *filename) | |||
203 | } | 203 | } |
204 | if(((bytes_read/4)*4) != bytes_read) | 204 | if(((bytes_read/4)*4) != bytes_read) |
205 | { | 205 | { |
206 | rb->splash(HZ*2, "bytes_read/*4 err: %ld",(long int)bytes_read); | 206 | rb->splashf(HZ*2, "bytes_read/*4 err: %ld",(long int)bytes_read); |
207 | rb->close (file); | 207 | rb->close (file); |
208 | return -1; | 208 | return -1; |
209 | } | 209 | } |
@@ -438,12 +438,12 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void *parame | |||
438 | /* zoom out */ | 438 | /* zoom out */ |
439 | if(zoomlevel > 1) | 439 | if(zoomlevel > 1) |
440 | zoomlevel /= 2; | 440 | zoomlevel /= 2; |
441 | rb->splash(HZ/2, "ZOOM: %dx",(int)zoomlevel); | 441 | rb->splashf(HZ/2, "ZOOM: %dx",(int)zoomlevel); |
442 | break; | 442 | break; |
443 | case ACTION_KBD_DOWN: | 443 | case ACTION_KBD_DOWN: |
444 | if(zoomlevel < (mempeakcount / LCD_WIDTH / 2)) | 444 | if(zoomlevel < (mempeakcount / LCD_WIDTH / 2)) |
445 | zoomlevel *= 2; | 445 | zoomlevel *= 2; |
446 | rb->splash(HZ/2, "ZOOM: %dx",(int)zoomlevel); | 446 | rb->splashf(HZ/2, "ZOOM: %dx",(int)zoomlevel); |
447 | break; | 447 | break; |
448 | case ACTION_KBD_LEFT: | 448 | case ACTION_KBD_LEFT: |
449 | center -= 10 * (mempeakcount / LCD_WIDTH) / zoomlevel; | 449 | center -= 10 * (mempeakcount / LCD_WIDTH) / zoomlevel; |
diff --git a/apps/plugins/xobox.c b/apps/plugins/xobox.c index dc730292de..0faf8a27be 100644 --- a/apps/plugins/xobox.c +++ b/apps/plugins/xobox.c | |||
@@ -845,7 +845,7 @@ static inline void move_board (void) | |||
845 | player.j = newj; | 845 | player.j = newj; |
846 | } | 846 | } |
847 | if (percentage_cache >= difficulty) { /* finished level */ | 847 | if (percentage_cache >= difficulty) { /* finished level */ |
848 | rb->splash (HZ * 2, "Level %d finished", player.level+1); | 848 | rb->splashf (HZ * 2, "Level %d finished", player.level+1); |
849 | player.score += percentage_cache; | 849 | player.score += percentage_cache; |
850 | if (player.level < MAX_LEVEL) | 850 | if (player.level < MAX_LEVEL) |
851 | player.level++; | 851 | player.level++; |
diff --git a/apps/plugins/zxbox/snapshot.c b/apps/plugins/zxbox/snapshot.c index 0010550392..d078ec78b1 100644 --- a/apps/plugins/zxbox/snapshot.c +++ b/apps/plugins/zxbox/snapshot.c | |||
@@ -651,7 +651,7 @@ void load_snapshot_file_type(char *name, int type) | |||
651 | snsh = rb->open(filenamebuf, O_RDONLY); | 651 | snsh = rb->open(filenamebuf, O_RDONLY); |
652 | if(snsh < 0) { | 652 | if(snsh < 0) { |
653 | #ifndef USE_GRAY | 653 | #ifndef USE_GRAY |
654 | rb->splash(HZ, "Could not open snapshot file `%s'",filenamebuf); | 654 | rb->splashf(HZ, "Could not open snapshot file `%s'",filenamebuf); |
655 | #endif | 655 | #endif |
656 | return; | 656 | return; |
657 | } | 657 | } |
diff --git a/apps/plugins/zxbox/spmain.c b/apps/plugins/zxbox/spmain.c index 136dcf0f24..6c586566f9 100644 --- a/apps/plugins/zxbox/spmain.c +++ b/apps/plugins/zxbox/spmain.c | |||
@@ -532,7 +532,7 @@ static void init_load(const void *parameter) | |||
532 | check_params(parameter); | 532 | check_params(parameter); |
533 | if(spcf_init_snapshot != NULL) { | 533 | if(spcf_init_snapshot != NULL) { |
534 | #ifndef USE_GREY | 534 | #ifndef USE_GREY |
535 | rb->splash(HZ, "Loading snapshot '%s'", spcf_init_snapshot); | 535 | rb->splashf(HZ, "Loading snapshot '%s'", spcf_init_snapshot); |
536 | #endif | 536 | #endif |
537 | 537 | ||
538 | load_snapshot_file_type(spcf_init_snapshot, spcf_init_snapshot_type); | 538 | load_snapshot_file_type(spcf_init_snapshot, spcf_init_snapshot_type); |
diff --git a/apps/recorder/radio.c b/apps/recorder/radio.c index 8d85af9937..27a98c6dc4 100644 --- a/apps/recorder/radio.c +++ b/apps/recorder/radio.c | |||
@@ -742,7 +742,7 @@ int radio_screen(void) | |||
742 | case ACTION_FM_PRESET: | 742 | case ACTION_FM_PRESET: |
743 | if(num_presets < 1) | 743 | if(num_presets < 1) |
744 | { | 744 | { |
745 | gui_syncsplash(HZ, ID2P(LANG_FM_NO_PRESETS)); | 745 | splash(HZ, ID2P(LANG_FM_NO_PRESETS)); |
746 | update_screen = true; | 746 | update_screen = true; |
747 | FOR_NB_SCREENS(i) | 747 | FOR_NB_SCREENS(i) |
748 | { | 748 | { |
@@ -776,7 +776,7 @@ int radio_screen(void) | |||
776 | case ACTION_FM_FREEZE: | 776 | case ACTION_FM_FREEZE: |
777 | if(!screen_freeze) | 777 | if(!screen_freeze) |
778 | { | 778 | { |
779 | gui_syncsplash(HZ, str(LANG_FM_FREEZE)); | 779 | splash(HZ, str(LANG_FM_FREEZE)); |
780 | screen_freeze = true; | 780 | screen_freeze = true; |
781 | } | 781 | } |
782 | else | 782 | else |
@@ -917,8 +917,8 @@ int radio_screen(void) | |||
917 | FOR_NB_SCREENS(i) | 917 | FOR_NB_SCREENS(i) |
918 | screens[i].puts_scroll(0, top_of_screen + 1, buf); | 918 | screens[i].puts_scroll(0, top_of_screen + 1, buf); |
919 | 919 | ||
920 | snprintf(buf, 128, stereo?str(LANG_CHANNEL_STEREO): | 920 | snprintf(buf, 128, "%s", stereo?str(LANG_CHANNEL_STEREO): |
921 | str(LANG_CHANNEL_MONO)); | 921 | str(LANG_CHANNEL_MONO)); |
922 | FOR_NB_SCREENS(i) | 922 | FOR_NB_SCREENS(i) |
923 | screens[i].puts_scroll(0, top_of_screen + 2, buf); | 923 | screens[i].puts_scroll(0, top_of_screen + 2, buf); |
924 | 924 | ||
@@ -1001,7 +1001,7 @@ int radio_screen(void) | |||
1001 | #if CONFIG_CODEC != SWCODEC | 1001 | #if CONFIG_CODEC != SWCODEC |
1002 | if(audio_status() & AUDIO_STATUS_ERROR) | 1002 | if(audio_status() & AUDIO_STATUS_ERROR) |
1003 | { | 1003 | { |
1004 | gui_syncsplash(0, str(LANG_DISK_FULL)); | 1004 | splash(0, str(LANG_DISK_FULL)); |
1005 | gui_syncstatusbar_draw(&statusbars,true); | 1005 | gui_syncstatusbar_draw(&statusbars,true); |
1006 | FOR_NB_SCREENS(i) | 1006 | FOR_NB_SCREENS(i) |
1007 | { | 1007 | { |
@@ -1083,7 +1083,7 @@ static void radio_save_presets(void) | |||
1083 | } | 1083 | } |
1084 | else | 1084 | else |
1085 | { | 1085 | { |
1086 | gui_syncsplash(HZ, ID2P(LANG_FM_PRESET_SAVE_FAILED)); | 1086 | splash(HZ, ID2P(LANG_FM_PRESET_SAVE_FAILED)); |
1087 | } | 1087 | } |
1088 | } | 1088 | } |
1089 | 1089 | ||
@@ -1169,7 +1169,7 @@ static int radio_add_preset(void) | |||
1169 | } | 1169 | } |
1170 | else | 1170 | else |
1171 | { | 1171 | { |
1172 | gui_syncsplash(HZ, ID2P(LANG_FM_NO_FREE_PRESETS)); | 1172 | splash(HZ, ID2P(LANG_FM_NO_FREE_PRESETS)); |
1173 | } | 1173 | } |
1174 | return true; | 1174 | return true; |
1175 | } | 1175 | } |
@@ -1257,7 +1257,7 @@ static int save_preset_list(void) | |||
1257 | if((!p1) || (len > MAX_FILENAME) || (len == 0)) | 1257 | if((!p1) || (len > MAX_FILENAME) || (len == 0)) |
1258 | { | 1258 | { |
1259 | /* no slash, too long or too short */ | 1259 | /* no slash, too long or too short */ |
1260 | gui_syncsplash(HZ, ID2P(LANG_INVALID_FILENAME)); | 1260 | splash(HZ, ID2P(LANG_INVALID_FILENAME)); |
1261 | } | 1261 | } |
1262 | else | 1262 | else |
1263 | { | 1263 | { |
@@ -1277,7 +1277,7 @@ static int save_preset_list(void) | |||
1277 | } | 1277 | } |
1278 | } | 1278 | } |
1279 | else | 1279 | else |
1280 | gui_syncsplash(HZ, ID2P(LANG_FM_NO_PRESETS)); | 1280 | splash(HZ, ID2P(LANG_FM_NO_PRESETS)); |
1281 | 1281 | ||
1282 | return true; | 1282 | return true; |
1283 | } | 1283 | } |
@@ -1456,8 +1456,6 @@ static int scan_presets(void *viewports) | |||
1456 | const struct fm_region_data * const fmr = | 1456 | const struct fm_region_data * const fmr = |
1457 | &fm_region_data[global_settings.fm_region]; | 1457 | &fm_region_data[global_settings.fm_region]; |
1458 | 1458 | ||
1459 | char buf[MAX_FMPRESET_LEN + 1]; | ||
1460 | |||
1461 | curr_freq = fmr->freq_min; | 1459 | curr_freq = fmr->freq_min; |
1462 | num_presets = 0; | 1460 | num_presets = 0; |
1463 | memset(presets, 0, sizeof(presets)); | 1461 | memset(presets, 0, sizeof(presets)); |
@@ -1473,8 +1471,7 @@ static int scan_presets(void *viewports) | |||
1473 | frac = freq % 100; | 1471 | frac = freq % 100; |
1474 | freq /= 100; | 1472 | freq /= 100; |
1475 | 1473 | ||
1476 | snprintf(buf, MAX_FMPRESET_LEN, str(LANG_FM_SCANNING), freq, frac); | 1474 | splashf(0, str(LANG_FM_SCANNING), freq, frac); |
1477 | gui_syncsplash(0, buf); | ||
1478 | 1475 | ||
1479 | if(tuner_set(RADIO_SCAN_FREQUENCY, curr_freq)) | 1476 | if(tuner_set(RADIO_SCAN_FREQUENCY, curr_freq)) |
1480 | { | 1477 | { |
diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c index 81f6581ffc..5b51cc161d 100644 --- a/apps/recorder/recording.c +++ b/apps/recorder/recording.c | |||
@@ -606,9 +606,9 @@ int rec_create_directory(void) | |||
606 | { | 606 | { |
607 | while (action_userabort(HZ) == false) | 607 | while (action_userabort(HZ) == false) |
608 | { | 608 | { |
609 | gui_syncsplash(0, "%s %s", | 609 | splashf(0, "%s %s", |
610 | str(LANG_REC_DIR_NOT_WRITABLE), | 610 | str(LANG_REC_DIR_NOT_WRITABLE), |
611 | str(LANG_OFF_ABORT)); | 611 | str(LANG_OFF_ABORT)); |
612 | } | 612 | } |
613 | } | 613 | } |
614 | else | 614 | else |
@@ -1442,7 +1442,6 @@ bool recording_screen(bool no_source) | |||
1442 | screens[1].puts(0, 0, str(LANG_REMOTE_LCD_OFF)); | 1442 | screens[1].puts(0, 0, str(LANG_REMOTE_LCD_OFF)); |
1443 | screens[1].puts(0, 1, str(LANG_REMOTE_LCD_ON)); | 1443 | screens[1].puts(0, 1, str(LANG_REMOTE_LCD_ON)); |
1444 | screens[1].update_viewport(); | 1444 | screens[1].update_viewport(); |
1445 | gui_splash(&screens[0], 0, str(LANG_REMOTE_LCD_OFF)); | ||
1446 | } | 1445 | } |
1447 | else | 1446 | else |
1448 | { | 1447 | { |
@@ -1789,7 +1788,7 @@ bool recording_screen(bool no_source) | |||
1789 | audio_stat = audio_status(); | 1788 | audio_stat = audio_status(); |
1790 | if (audio_stat & AUDIO_STATUS_ERROR) | 1789 | if (audio_stat & AUDIO_STATUS_ERROR) |
1791 | { | 1790 | { |
1792 | gui_syncsplash(0, str(LANG_DISK_FULL)); | 1791 | splash(0, str(LANG_DISK_FULL)); |
1793 | gui_syncstatusbar_draw(&statusbars, true); | 1792 | gui_syncstatusbar_draw(&statusbars, true); |
1794 | 1793 | ||
1795 | FOR_NB_SCREENS(i) | 1794 | FOR_NB_SCREENS(i) |
diff --git a/apps/root_menu.c b/apps/root_menu.c index bee17f183e..7322cbd9f6 100644 --- a/apps/root_menu.c +++ b/apps/root_menu.c | |||
@@ -127,14 +127,14 @@ static int browser(void* param) | |||
127 | /* Maybe just needs to reboot due to delayed commit */ | 127 | /* Maybe just needs to reboot due to delayed commit */ |
128 | if (stat->commit_delayed) | 128 | if (stat->commit_delayed) |
129 | { | 129 | { |
130 | gui_syncsplash(HZ*2, ID2P(LANG_PLEASE_REBOOT)); | 130 | splash(HZ*2, ID2P(LANG_PLEASE_REBOOT)); |
131 | break; | 131 | break; |
132 | } | 132 | } |
133 | 133 | ||
134 | /* Check if ready status is known */ | 134 | /* Check if ready status is known */ |
135 | if (!stat->readyvalid) | 135 | if (!stat->readyvalid) |
136 | { | 136 | { |
137 | gui_syncsplash(0, str(LANG_TAGCACHE_BUSY)); | 137 | splash(0, str(LANG_TAGCACHE_BUSY)); |
138 | continue; | 138 | continue; |
139 | } | 139 | } |
140 | 140 | ||
@@ -178,14 +178,14 @@ static int browser(void* param) | |||
178 | } | 178 | } |
179 | if (stat->commit_step > 0) | 179 | if (stat->commit_step > 0) |
180 | { | 180 | { |
181 | gui_syncsplash(0, "%s [%d/%d]", | 181 | splashf(0, "%s [%d/%d]", |
182 | str(LANG_TAGCACHE_INIT), stat->commit_step, | 182 | str(LANG_TAGCACHE_INIT), stat->commit_step, |
183 | tagcache_get_max_commit_step()); | 183 | tagcache_get_max_commit_step()); |
184 | } | 184 | } |
185 | else | 185 | else |
186 | { | 186 | { |
187 | gui_syncsplash(0, str(LANG_BUILDING_DATABASE), | 187 | splashf(0, str(LANG_BUILDING_DATABASE), |
188 | stat->processed_entries); | 188 | stat->processed_entries); |
189 | } | 189 | } |
190 | } | 190 | } |
191 | } | 191 | } |
@@ -254,7 +254,7 @@ static int wpsscrn(void* param) | |||
254 | } | 254 | } |
255 | else | 255 | else |
256 | { | 256 | { |
257 | gui_syncsplash(HZ*2, ID2P(LANG_NOTHING_TO_RESUME)); | 257 | splash(HZ*2, ID2P(LANG_NOTHING_TO_RESUME)); |
258 | } | 258 | } |
259 | #if LCD_DEPTH > 1 | 259 | #if LCD_DEPTH > 1 |
260 | show_main_backdrop(); | 260 | show_main_backdrop(); |
diff --git a/apps/screens.c b/apps/screens.c index af81e5a907..33c54abddc 100644 --- a/apps/screens.c +++ b/apps/screens.c | |||
@@ -168,9 +168,7 @@ int mmc_remove_request(void) | |||
168 | int i; | 168 | int i; |
169 | FOR_NB_SCREENS(i) | 169 | FOR_NB_SCREENS(i) |
170 | screens[i].clear_display(); | 170 | screens[i].clear_display(); |
171 | gui_syncsplash(1, str(LANG_REMOVE_MMC)); | 171 | splash(0, ID2P(LANG_REMOVE_MMC)); |
172 | if (global_settings.talk_menu) | ||
173 | talk_id(LANG_REMOVE_MMC, false); | ||
174 | 172 | ||
175 | while (1) | 173 | while (1) |
176 | { | 174 | { |
@@ -389,7 +387,7 @@ int charging_screen(void) | |||
389 | #if CONFIG_CHARGING | 387 | #if CONFIG_CHARGING |
390 | void charging_splash(void) | 388 | void charging_splash(void) |
391 | { | 389 | { |
392 | gui_syncsplash(2*HZ, (unsigned char *)str(LANG_BATTERY_CHARGE)); | 390 | splash(2*HZ, str(LANG_BATTERY_CHARGE)); |
393 | button_clear_queue(); | 391 | button_clear_queue(); |
394 | } | 392 | } |
395 | #endif | 393 | #endif |
@@ -669,7 +667,7 @@ bool shutdown_screen(void) | |||
669 | 667 | ||
670 | lcd_stop_scroll(); | 668 | lcd_stop_scroll(); |
671 | 669 | ||
672 | gui_syncsplash(0, str(LANG_CONFIRM_SHUTDOWN)); | 670 | splash(0, str(LANG_CONFIRM_SHUTDOWN)); |
673 | 671 | ||
674 | while(!done && TIME_BEFORE(current_tick,time_entered+HZ*2)) | 672 | while(!done && TIME_BEFORE(current_tick,time_entered+HZ*2)) |
675 | { | 673 | { |
diff --git a/apps/settings.c b/apps/settings.c index a9257aaf53..b681471ef1 100644 --- a/apps/settings.c +++ b/apps/settings.c | |||
@@ -634,15 +634,15 @@ bool settings_save_config(int options) | |||
634 | break; | 634 | break; |
635 | } | 635 | } |
636 | else { | 636 | else { |
637 | gui_syncsplash(HZ, ID2P(LANG_CANCEL)); | 637 | splash(HZ, ID2P(LANG_CANCEL)); |
638 | return false; | 638 | return false; |
639 | } | 639 | } |
640 | } | 640 | } |
641 | 641 | ||
642 | if (settings_write_config(filename, options)) | 642 | if (settings_write_config(filename, options)) |
643 | gui_syncsplash(HZ, ID2P(LANG_SETTINGS_SAVED)); | 643 | splash(HZ, ID2P(LANG_SETTINGS_SAVED)); |
644 | else | 644 | else |
645 | gui_syncsplash(HZ, ID2P(LANG_FAILED)); | 645 | splash(HZ, ID2P(LANG_FAILED)); |
646 | return true; | 646 | return true; |
647 | } | 647 | } |
648 | 648 | ||
diff --git a/apps/settings.h b/apps/settings.h index a1e5cb119c..e90b1a83bf 100644 --- a/apps/settings.h +++ b/apps/settings.h | |||
@@ -187,10 +187,10 @@ extern unsigned char vp_dummy[VIRT_SIZE]; | |||
187 | #define ID2P(id) (VIRT_PTR + id) | 187 | #define ID2P(id) (VIRT_PTR + id) |
188 | 188 | ||
189 | /* resolve a pointer which could be a virtualized ID or a literal */ | 189 | /* resolve a pointer which could be a virtualized ID or a literal */ |
190 | #define P2STR(p) (char *)((p>=VIRT_PTR && p<=VIRT_PTR+VIRT_SIZE) ? str(p-VIRT_PTR) : p) | 190 | #define P2STR(p) (char *)((p>=VIRT_PTR && p<VIRT_PTR+VIRT_SIZE) ? str(p-VIRT_PTR) : p) |
191 | 191 | ||
192 | /* get the string ID from a virtual pointer, -1 if not virtual */ | 192 | /* get the string ID from a virtual pointer, -1 if not virtual */ |
193 | #define P2ID(p) ((p>=VIRT_PTR && p<=VIRT_PTR+VIRT_SIZE) ? p-VIRT_PTR : -1) | 193 | #define P2ID(p) ((p>=VIRT_PTR && p<VIRT_PTR+VIRT_SIZE) ? p-VIRT_PTR : -1) |
194 | 194 | ||
195 | /* !defined(HAVE_LCD_COLOR) implies HAVE_LCD_CONTRAST with default 40. | 195 | /* !defined(HAVE_LCD_COLOR) implies HAVE_LCD_CONTRAST with default 40. |
196 | Explicitly define HAVE_LCD_CONTRAST in config file for newer ports for | 196 | Explicitly define HAVE_LCD_CONTRAST in config file for newer ports for |
diff --git a/apps/tagtree.c b/apps/tagtree.c index eb9df07113..ce562b78e9 100644 --- a/apps/tagtree.c +++ b/apps/tagtree.c | |||
@@ -711,10 +711,10 @@ static void tagtree_track_finish_event(struct mp3entry *id3) | |||
711 | 711 | ||
712 | bool tagtree_export(void) | 712 | bool tagtree_export(void) |
713 | { | 713 | { |
714 | gui_syncsplash(0, str(LANG_CREATING)); | 714 | splash(0, str(LANG_CREATING)); |
715 | if (!tagcache_create_changelog(&tcs)) | 715 | if (!tagcache_create_changelog(&tcs)) |
716 | { | 716 | { |
717 | gui_syncsplash(HZ*2, ID2P(LANG_FAILED)); | 717 | splash(HZ*2, ID2P(LANG_FAILED)); |
718 | } | 718 | } |
719 | 719 | ||
720 | return false; | 720 | return false; |
@@ -722,10 +722,10 @@ bool tagtree_export(void) | |||
722 | 722 | ||
723 | bool tagtree_import(void) | 723 | bool tagtree_import(void) |
724 | { | 724 | { |
725 | gui_syncsplash(0, ID2P(LANG_WAIT)); | 725 | splash(0, ID2P(LANG_WAIT)); |
726 | if (!tagcache_import_changelog()) | 726 | if (!tagcache_import_changelog()) |
727 | { | 727 | { |
728 | gui_syncsplash(HZ*2, ID2P(LANG_FAILED)); | 728 | splash(HZ*2, ID2P(LANG_FAILED)); |
729 | } | 729 | } |
730 | 730 | ||
731 | return false; | 731 | return false; |
@@ -942,8 +942,7 @@ static bool show_search_progress(bool init, int count) | |||
942 | /* Update progress every 1/10 of a second */ | 942 | /* Update progress every 1/10 of a second */ |
943 | if (current_tick - last_tick > HZ/10) | 943 | if (current_tick - last_tick > HZ/10) |
944 | { | 944 | { |
945 | gui_syncsplash(0, str(LANG_PLAYLIST_SEARCH_MSG), count, | 945 | splashf(0, str(LANG_PLAYLIST_SEARCH_MSG), count, str(LANG_OFF_ABORT)); |
946 | str(LANG_OFF_ABORT)); | ||
947 | if (action_userabort(TIMEOUT_NOBLOCK)) | 946 | if (action_userabort(TIMEOUT_NOBLOCK)) |
948 | return false; | 947 | return false; |
949 | last_tick = current_tick; | 948 | last_tick = current_tick; |
@@ -1266,7 +1265,7 @@ static int retrieve_entries(struct tree_context *c, struct tagcache_search *tcs, | |||
1266 | 1265 | ||
1267 | if (!sort && (sort_inverse || sort_limit)) | 1266 | if (!sort && (sort_inverse || sort_limit)) |
1268 | { | 1267 | { |
1269 | gui_syncsplash(HZ*4, ID2P(LANG_SHOWDIR_BUFFER_FULL), total_count); | 1268 | splashf(HZ*4, ID2P(LANG_SHOWDIR_BUFFER_FULL), total_count); |
1270 | logf("Too small dir buffer"); | 1269 | logf("Too small dir buffer"); |
1271 | return 0; | 1270 | return 0; |
1272 | } | 1271 | } |
@@ -1369,7 +1368,7 @@ int tagtree_load(struct tree_context* c) | |||
1369 | { | 1368 | { |
1370 | c->dirlevel = 0; | 1369 | c->dirlevel = 0; |
1371 | count = load_root(c); | 1370 | count = load_root(c); |
1372 | gui_syncsplash(HZ, str(LANG_TAGCACHE_BUSY)); | 1371 | splash(HZ, str(LANG_TAGCACHE_BUSY)); |
1373 | } | 1372 | } |
1374 | 1373 | ||
1375 | /* The _total_ numer of entries available. */ | 1374 | /* The _total_ numer of entries available. */ |
@@ -1566,7 +1565,7 @@ static bool insert_all_playlist(struct tree_context *c, int position, bool queue | |||
1566 | cpu_boost(true); | 1565 | cpu_boost(true); |
1567 | if (!tagcache_search(&tcs, tag_filename)) | 1566 | if (!tagcache_search(&tcs, tag_filename)) |
1568 | { | 1567 | { |
1569 | gui_syncsplash(HZ, ID2P(LANG_TAGCACHE_BUSY)); | 1568 | splash(HZ, ID2P(LANG_TAGCACHE_BUSY)); |
1570 | cpu_boost(false); | 1569 | cpu_boost(false); |
1571 | return false; | 1570 | return false; |
1572 | } | 1571 | } |
@@ -1674,12 +1673,12 @@ bool tagtree_insert_selection_playlist(int position, bool queue) | |||
1674 | } | 1673 | } |
1675 | 1674 | ||
1676 | if (tc->filesindir <= 0) | 1675 | if (tc->filesindir <= 0) |
1677 | gui_syncsplash(HZ, ID2P(LANG_END_PLAYLIST)); | 1676 | splash(HZ, ID2P(LANG_END_PLAYLIST)); |
1678 | else | 1677 | else |
1679 | { | 1678 | { |
1680 | logf("insert_all_playlist"); | 1679 | logf("insert_all_playlist"); |
1681 | if (!insert_all_playlist(tc, position, queue)) | 1680 | if (!insert_all_playlist(tc, position, queue)) |
1682 | gui_syncsplash(HZ*2, ID2P(LANG_FAILED)); | 1681 | splash(HZ*2, ID2P(LANG_FAILED)); |
1683 | } | 1682 | } |
1684 | 1683 | ||
1685 | /* Finally return the dirlevel to its original value. */ | 1684 | /* Finally return the dirlevel to its original value. */ |
diff --git a/apps/tree.c b/apps/tree.c index 19a0a22bc3..98cb88ffb1 100644 --- a/apps/tree.c +++ b/apps/tree.c | |||
@@ -276,10 +276,10 @@ bool check_rockboxdir(void) | |||
276 | int i; | 276 | int i; |
277 | FOR_NB_SCREENS(i) | 277 | FOR_NB_SCREENS(i) |
278 | screens[i].clear_display(); | 278 | screens[i].clear_display(); |
279 | gui_syncsplash(HZ*2, "No .rockbox directory"); | 279 | splash(HZ*2, "No .rockbox directory"); |
280 | FOR_NB_SCREENS(i) | 280 | FOR_NB_SCREENS(i) |
281 | screens[i].clear_display(); | 281 | screens[i].clear_display(); |
282 | gui_syncsplash(HZ*2, "Installation incomplete"); | 282 | splash(HZ*2, "Installation incomplete"); |
283 | return false; | 283 | return false; |
284 | } | 284 | } |
285 | return true; | 285 | return true; |
@@ -394,7 +394,7 @@ static int update_dir(void) | |||
394 | #endif | 394 | #endif |
395 | (tc.dirfull || tc.filesindir == global_settings.max_files_in_dir) ) | 395 | (tc.dirfull || tc.filesindir == global_settings.max_files_in_dir) ) |
396 | { | 396 | { |
397 | gui_syncsplash(HZ, ID2P(LANG_SHOWDIR_BUFFER_FULL)); | 397 | splash(HZ, ID2P(LANG_SHOWDIR_BUFFER_FULL)); |
398 | } | 398 | } |
399 | } | 399 | } |
400 | #ifdef HAVE_TAGCACHE | 400 | #ifdef HAVE_TAGCACHE |
@@ -635,7 +635,7 @@ static int dirbrowse() | |||
635 | 635 | ||
636 | if (*tc.dirfilter > NUM_FILTER_MODES && numentries==0) | 636 | if (*tc.dirfilter > NUM_FILTER_MODES && numentries==0) |
637 | { | 637 | { |
638 | gui_syncsplash(HZ*2, ID2P(LANG_NO_FILES)); | 638 | splash(HZ*2, ID2P(LANG_NO_FILES)); |
639 | return GO_TO_PREVIOUS; /* No files found for rockbox_browser() */ | 639 | return GO_TO_PREVIOUS; /* No files found for rockbox_browser() */ |
640 | } | 640 | } |
641 | 641 | ||
@@ -889,7 +889,7 @@ bool create_playlist(void) | |||
889 | 889 | ||
890 | snprintf(filename, sizeof filename, "%s.m3u8", | 890 | snprintf(filename, sizeof filename, "%s.m3u8", |
891 | tc.currdir[1] ? tc.currdir : "/root"); | 891 | tc.currdir[1] ? tc.currdir : "/root"); |
892 | gui_syncsplash(0, "%s %s", str(LANG_CREATING), filename); | 892 | splashf(0, "%s %s", str(LANG_CREATING), filename); |
893 | 893 | ||
894 | trigger_cpu_boost(); | 894 | trigger_cpu_boost(); |
895 | catalog_add_to_a_playlist(tc.currdir, ATTR_DIRECTORY, true, filename); | 895 | catalog_add_to_a_playlist(tc.currdir, ATTR_DIRECTORY, true, filename); |
@@ -1134,7 +1134,7 @@ void tree_restore(void) | |||
1134 | if (global_settings.dircache) | 1134 | if (global_settings.dircache) |
1135 | { | 1135 | { |
1136 | /* Print "Scanning disk..." to the display. */ | 1136 | /* Print "Scanning disk..." to the display. */ |
1137 | gui_syncsplash(0, str(LANG_SCANNING_DISK)); | 1137 | splash(0, str(LANG_SCANNING_DISK)); |
1138 | 1138 | ||
1139 | dircache_build(global_status.dircache_size); | 1139 | dircache_build(global_status.dircache_size); |
1140 | } | 1140 | } |