summaryrefslogtreecommitdiff
path: root/apps/menus/main_menu.c
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2007-08-05 19:19:39 +0000
committerNils Wallménius <nils@rockbox.org>2007-08-05 19:19:39 +0000
commitb3113674819cd8daf44750d129c5d8298e830df0 (patch)
treeebc7ec9e096e309ef79834802eed28ff9c22fd41 /apps/menus/main_menu.c
parente70f7f4ca857e9e88a6e076360b6c9c235d7739b (diff)
downloadrockbox-b3113674819cd8daf44750d129c5d8298e830df0.tar.gz
rockbox-b3113674819cd8daf44750d129c5d8298e830df0.zip
*** Lang v2 cleanup (FS#6574) ***
1) Introduces apps/features.txt that controls which strings are included for each target based on defines. 2) .lng and .voice files are now target specific and the format versions of both these file types have been bumped, which means that new voice files are needed. 3) Use the 'features' mechanism to exclude strings for targets that didn't use them. 4) Delete unused and deprecated and duplicated strings, sort strings in english.lang Some string IDs were changed so translations will be slightly worse than before. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14198 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/menus/main_menu.c')
-rw-r--r--apps/menus/main_menu.c26
1 files changed, 12 insertions, 14 deletions
diff --git a/apps/menus/main_menu.c b/apps/menus/main_menu.c
index 7891a5c8a8..9529d93027 100644
--- a/apps/menus/main_menu.c
+++ b/apps/menus/main_menu.c
@@ -67,12 +67,12 @@ int browse_folder(void *param)
67 67
68static int reset_settings(void) 68static int reset_settings(void)
69{ 69{
70 unsigned char *lines[]={str(LANG_RESET_ASK_RECORDER)}; 70 unsigned char *lines[]={str(LANG_RESET_ASK)};
71 unsigned char *yes_lines[]={ 71 unsigned char *yes_lines[]={
72 str(LANG_RESET_DONE_SETTING), 72 str(LANG_SETTINGS),
73 str(LANG_RESET_DONE_CLEAR) 73 str(LANG_RESET_DONE_CLEAR)
74 }; 74 };
75 unsigned char *no_lines[]={yes_lines[0], str(LANG_RESET_DONE_CANCEL)}; 75 unsigned char *no_lines[]={yes_lines[0], str(LANG_CANCEL)};
76 struct text_message message={(char **)lines, 1}; 76 struct text_message message={(char **)lines, 1};
77 struct text_message yes_message={(char **)yes_lines, 2}; 77 struct text_message yes_message={(char **)yes_lines, 2};
78 struct text_message no_message={(char **)no_lines, 2}; 78 struct text_message no_message={(char **)no_lines, 2};
@@ -186,9 +186,11 @@ static bool show_info(void)
186 talk_value(battery_level(), UNIT_PERCENT, true); 186 talk_value(battery_level(), UNIT_PERCENT, true);
187#if CONFIG_CHARGING >= CHARGING_MONITOR 187#if CONFIG_CHARGING >= CHARGING_MONITOR
188 if (charge_state == CHARGING) 188 if (charge_state == CHARGING)
189 talk_id(LANG_BATTERY_CHARGE, true); 189 talk_id(LANG_BATTERY_CHARGE, true);
190#if CONFIG_CHARGING == CHARGING_CONTROL
190 else if (charge_state == TOPOFF) 191 else if (charge_state == TOPOFF)
191 talk_id(LANG_BATTERY_TOPOFF_CHARGE, true); 192 talk_id(LANG_BATTERY_TOPOFF_CHARGE, true);
193#endif
192 else if (charge_state == TRICKLE) 194 else if (charge_state == TRICKLE)
193 talk_id(LANG_BATTERY_TRICKLE_CHARGE, true); 195 talk_id(LANG_BATTERY_TRICKLE_CHARGE, true);
194#endif 196#endif
@@ -252,13 +254,9 @@ static bool show_info(void)
252 int integer = buflen / 1000; 254 int integer = buflen / 1000;
253 int decimal = buflen % 1000; 255 int decimal = buflen % 1000;
254 256
255#ifdef HAVE_LCD_CHARCELLS 257 snprintf(s, sizeof(s), (char *)str(LANG_BUFFER_STAT),
256 snprintf(s, sizeof(s), (char *)str(LANG_BUFFER_STAT_PLAYER),
257 integer, decimal); 258 integer, decimal);
258#else 259
259 snprintf(s, sizeof(s), (char *)str(LANG_BUFFER_STAT_RECORDER),
260 integer, decimal);
261#endif
262 FOR_NB_SCREENS(i) 260 FOR_NB_SCREENS(i)
263 screens[i].puts_scroll(0, y, (unsigned char *)s); 261 screens[i].puts_scroll(0, y, (unsigned char *)s);
264 y++; 262 y++;
@@ -341,7 +339,7 @@ static bool show_info(void)
341 339
342#ifndef SIMULATOR 340#ifndef SIMULATOR
343 case ACTION_STD_OK: 341 case ACTION_STD_OK:
344 gui_syncsplash(0, str(LANG_DIRCACHE_BUILDING)); 342 gui_syncsplash(0, str(LANG_SCANNING_DISK));
345 fat_recalc_free(IF_MV(0)); 343 fat_recalc_free(IF_MV(0));
346#ifdef HAVE_MULTIVOLUME 344#ifdef HAVE_MULTIVOLUME
347 if (fat_ismounted(1)) 345 if (fat_ismounted(1))
@@ -359,7 +357,7 @@ static bool show_info(void)
359 } 357 }
360 return false; 358 return false;
361} 359}
362MENUITEM_FUNCTION(show_info_item, 0, ID2P(LANG_INFO_MENU), 360MENUITEM_FUNCTION(show_info_item, 0, ID2P(LANG_ROCKBOX_INFO),
363 (menu_function)show_info, NULL, NULL, Icon_NOICON); 361 (menu_function)show_info, NULL, NULL, Icon_NOICON);
364 362
365 363
@@ -406,7 +404,7 @@ MENUITEM_FUNCTION(simulate_usb_item, 0, ID2P(LANG_USB),
406 (menu_function)simulate_usb, NULL, NULL, Icon_NOICON); 404 (menu_function)simulate_usb, NULL, NULL, Icon_NOICON);
407#endif 405#endif
408 406
409MAKE_MENU(info_menu, ID2P(LANG_INFO), 0, Icon_Questionmark, 407MAKE_MENU(info_menu, ID2P(LANG_SYSTEM), 0, Icon_Questionmark,
410 &show_info_item, &show_credits_item, &show_runtime_item, 408 &show_info_item, &show_credits_item, &show_runtime_item,
411 &sleep_timer_call, &debug_menu_item 409 &sleep_timer_call, &debug_menu_item
412#ifdef SIMULATOR 410#ifdef SIMULATOR
@@ -440,7 +438,7 @@ int mainmenu_callback(int action,const struct menu_item_ex *this_item)
440#else 438#else
441#define mainmenu_callback NULL 439#define mainmenu_callback NULL
442#endif 440#endif
443MAKE_MENU(main_menu_, ID2P(LANG_SETTINGS_MENU), mainmenu_callback, 441MAKE_MENU(main_menu_, ID2P(LANG_SETTINGS), mainmenu_callback,
444 Icon_Submenu_Entered, 442 Icon_Submenu_Entered,
445 &sound_settings, 443 &sound_settings,
446 &settings_menu_item, &manage_settings, &browse_themes, 444 &settings_menu_item, &manage_settings, &browse_themes,