*** 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
This commit is contained in:
parent
e70f7f4ca8
commit
b311367481
36 changed files with 7276 additions and 7217 deletions
|
@ -90,6 +90,8 @@ $(DEPFILE): $(BITMAPLIBS)
|
||||||
|
|
||||||
dep: $(DEPFILE)
|
dep: $(DEPFILE)
|
||||||
|
|
||||||
|
features: $(OBJDIR)/features
|
||||||
|
|
||||||
build-codecs:
|
build-codecs:
|
||||||
$(SILENT)$(MAKE) -C codecs/lib OBJDIR=$(OBJDIR)/codecs/lib
|
$(SILENT)$(MAKE) -C codecs/lib OBJDIR=$(OBJDIR)/codecs/lib
|
||||||
$(SILENT)$(MAKE) -C codecs OBJDIR=$(OBJDIR)/codecs
|
$(SILENT)$(MAKE) -C codecs OBJDIR=$(OBJDIR)/codecs
|
||||||
|
@ -195,9 +197,22 @@ $(BUILDDIR)/rombox.iriver: $(OBJDIR)/rombox.bin
|
||||||
|
|
||||||
include $(TOOLSDIR)/make.inc
|
include $(TOOLSDIR)/make.inc
|
||||||
|
|
||||||
$(OBJDIR)/lang.o: lang/$(LANGUAGE).lang
|
# apps/features.txt is a file that (is preprocessed and) lists named features
|
||||||
@mkdir -p $(dir $@)
|
# based on defines in the config-*.h files. The named features will be passed
|
||||||
$(call PRINTS,GENLANG)perl -s $(TOOLSDIR)/genlang -p=$(BUILDDIR)/lang -t=$(ARCHOS) $<
|
# to genlang and thus (translated) phrases can be used based on those names.
|
||||||
|
# button.h is included for the HAS_BUTTON_HOLD define.
|
||||||
|
#
|
||||||
|
|
||||||
|
$(OBJDIR)/features: features.txt
|
||||||
|
$(SILENT)cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) \
|
||||||
|
$(TARGET) $(DEFINES) $(EXTRA_DEFINES) -E -P -imacros "config.h" -imacros "button.h" - | \
|
||||||
|
grep -v "^\#" | grep -v "^$$" > $@; \
|
||||||
|
echo "" >/dev/null
|
||||||
|
|
||||||
|
$(OBJDIR)/lang.o: lang/$(LANGUAGE).lang $(OBJDIR)/features
|
||||||
|
$(SILENT)mkdir -p `dirname $@`
|
||||||
|
$(SILENT)for f in `cat $(OBJDIR)/features`; do feat="$$feat:$$f" ; done; \
|
||||||
|
perl -s $(TOOLSDIR)/genlang -p=$(BUILDDIR)/lang -t=$(ARCHOS):$$feat $<
|
||||||
$(call PRINTS,CC lang.c)$(CC) $(CFLAGS) -c $(BUILDDIR)/lang.c -o $@
|
$(call PRINTS,CC lang.c)$(CC) $(CFLAGS) -c $(BUILDDIR)/lang.c -o $@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|
|
@ -141,7 +141,7 @@ static int get_action_worker(int context, int timeout,
|
||||||
{
|
{
|
||||||
last_button = BUTTON_NONE;
|
last_button = BUTTON_NONE;
|
||||||
keys_locked = false;
|
keys_locked = false;
|
||||||
gui_syncsplash(HZ/2, str(LANG_KEYLOCK_OFF_PLAYER));
|
gui_syncsplash(HZ/2, str(LANG_KEYLOCK_OFF));
|
||||||
return ACTION_REDRAW;
|
return ACTION_REDRAW;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -150,7 +150,7 @@ static int get_action_worker(int context, int timeout,
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
if ((button&BUTTON_REL))
|
if ((button&BUTTON_REL))
|
||||||
gui_syncsplash(HZ/2, str(LANG_KEYLOCK_ON_PLAYER));
|
gui_syncsplash(HZ/2, str(LANG_KEYLOCK_ON));
|
||||||
return ACTION_REDRAW;
|
return ACTION_REDRAW;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -189,7 +189,7 @@ static int get_action_worker(int context, int timeout,
|
||||||
{
|
{
|
||||||
unlock_combo = button;
|
unlock_combo = button;
|
||||||
keys_locked = true;
|
keys_locked = true;
|
||||||
gui_syncsplash(HZ/2, str(LANG_KEYLOCK_ON_PLAYER));
|
gui_syncsplash(HZ/2, str(LANG_KEYLOCK_ON));
|
||||||
|
|
||||||
button_clear_queue();
|
button_clear_queue();
|
||||||
return ACTION_REDRAW;
|
return ACTION_REDRAW;
|
||||||
|
|
|
@ -190,7 +190,7 @@ bool bookmark_autobookmark(void)
|
||||||
struct text_message message={(char **)lines, 1};
|
struct text_message message={(char **)lines, 1};
|
||||||
#else
|
#else
|
||||||
unsigned char *lines[]={str(LANG_AUTO_BOOKMARK_QUERY),
|
unsigned char *lines[]={str(LANG_AUTO_BOOKMARK_QUERY),
|
||||||
str(LANG_RESUME_CONFIRM_PLAYER)};
|
str(LANG_CONFIRM_WITH_BUTTON)};
|
||||||
struct text_message message={(char **)lines, 2};
|
struct text_message message={(char **)lines, 2};
|
||||||
#endif
|
#endif
|
||||||
#if LCD_DEPTH > 1
|
#if LCD_DEPTH > 1
|
||||||
|
@ -819,7 +819,7 @@ static void say_bookmark(const char* bookmark,
|
||||||
talk_number(bookmark_id + 1, true);
|
talk_number(bookmark_id + 1, true);
|
||||||
talk_id(VOICE_BOOKMARK_SELECT_INDEX_TEXT, true);
|
talk_id(VOICE_BOOKMARK_SELECT_INDEX_TEXT, true);
|
||||||
talk_number(resume_index + 1, true);
|
talk_number(resume_index + 1, true);
|
||||||
talk_id(VOICE_BOOKMARK_SELECT_TIME_TEXT, true);
|
talk_id(LANG_TIME, true);
|
||||||
if (ms / 60000)
|
if (ms / 60000)
|
||||||
talk_value(ms / 60000, UNIT_MIN, true);
|
talk_value(ms / 60000, UNIT_MIN, true);
|
||||||
talk_value((ms % 60000) / 1000, UNIT_SEC, true);
|
talk_value((ms % 60000) / 1000, UNIT_SEC, true);
|
||||||
|
|
159
apps/features.txt
Normal file
159
apps/features.txt
Normal file
|
@ -0,0 +1,159 @@
|
||||||
|
/* This file controls which strings are included when rockbox is built and
|
||||||
|
when the .lng and .voice files are built. That means that a change in this
|
||||||
|
file will break compatiblity with older .lng and .voice files and that those
|
||||||
|
version numbers should be updated. It also means that changing defines in
|
||||||
|
the various config*.h files could also break back compatiblity */
|
||||||
|
|
||||||
|
#if defined(HAVE_AGC)
|
||||||
|
agc
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAVE_RTC_ALARM)
|
||||||
|
alarm
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAVE_BACKLIGHT_BRIGHTNESS)
|
||||||
|
backlight_brightness
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAVE_BACKLIGHT_PWM_FADING)
|
||||||
|
backlight_fade
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BATTERY_TYPES_COUNT > 1
|
||||||
|
battery_types
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAVE_DIRCACHE)
|
||||||
|
dircache
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAVE_FLASH_STORAGE)
|
||||||
|
flash_storage
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAVE_HEADPHONE_DETECTION)
|
||||||
|
headphone_detection
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAS_BUTTON_HOLD)
|
||||||
|
hold_button
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAVE_LCD_BITMAP)
|
||||||
|
lcd_bitmap
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAVE_LCD_CHARCELLS)
|
||||||
|
lcd_charcell
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if LCD_DEPTH > 1
|
||||||
|
lcd_non-mono
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAVE_LCD_COLOR)
|
||||||
|
lcd_color
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAVE_LCD_FLIP)
|
||||||
|
lcd_flip
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAVE_LCD_INVERT) || defined(HAVE_REMOTE_LCD)
|
||||||
|
lcd_invert
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAVE_LCD_SLEEP)
|
||||||
|
lcd_sleep
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
|
||||||
|
masf
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if (CONFIG_CODEC == MAS3507D)
|
||||||
|
masd
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAVE_PITCHSCREEN)
|
||||||
|
pitchscreen
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAVE_MULTIVOLUME)
|
||||||
|
multivolume
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAVE_QUICKSCREEN)
|
||||||
|
quickscreen
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(CONFIG_TUNER)
|
||||||
|
radio
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if (CONFIG_KEYPAD == RECORDER_PAD)
|
||||||
|
recorder_pad
|
||||||
|
#if defined(CONFIG_TUNER)
|
||||||
|
radio_screen_button_bar
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAVE_RECORDING)
|
||||||
|
recording
|
||||||
|
#if CONFIG_CODEC == SWCODEC
|
||||||
|
recording_swcodec
|
||||||
|
#else
|
||||||
|
recording_hwcodec
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAVE_REMOTE_LCD)
|
||||||
|
remote
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAVE_REMOTE_LCD_TICKING)
|
||||||
|
remote_ticking
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if CONFIG_RTC
|
||||||
|
rtc
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAVE_SCROLLWHEEL)
|
||||||
|
scrollwheel
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(SIMULATOR)
|
||||||
|
sim
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(ARCHOS_RECORDER) || defined(ARCHOS_PLAYER)
|
||||||
|
soft_shutdown
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAVE_SPDIF_POWER)
|
||||||
|
spdif_power
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if CONFIG_CODEC == SWCODEC
|
||||||
|
swcodec
|
||||||
|
#else
|
||||||
|
hwcodec
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAVE_TAGCACHE)
|
||||||
|
tagcache
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAVE_TC_RAMCACHE)
|
||||||
|
tc_ramcache
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if CONFIG_CHARGING || defined(SIMULATOR)
|
||||||
|
charging
|
||||||
|
#if defined(HAVE_USB_POWER) || defined(SIMULATOR)
|
||||||
|
usb_charging
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
|
@ -101,7 +101,7 @@ const struct filetype inbuilt_filetypes[] = {
|
||||||
{ "kbd", FILE_ATTR_KBD, Icon_Keyboard, VOICE_EXT_KBD },
|
{ "kbd", FILE_ATTR_KBD, Icon_Keyboard, VOICE_EXT_KBD },
|
||||||
#endif
|
#endif
|
||||||
{ "bmark",FILE_ATTR_BMARK, Icon_Bookmark, VOICE_EXT_BMARK },
|
{ "bmark",FILE_ATTR_BMARK, Icon_Bookmark, VOICE_EXT_BMARK },
|
||||||
{ "cue", FILE_ATTR_CUE, Icon_Bookmark, LANG_CUESHEET },
|
{ "cue", FILE_ATTR_CUE, Icon_Bookmark, VOICE_EXT_CUESHEET },
|
||||||
#ifdef BOOTFILE_EXT
|
#ifdef BOOTFILE_EXT
|
||||||
{ BOOTFILE_EXT, FILE_ATTR_MOD, Icon_Firmware, VOICE_EXT_AJZ },
|
{ BOOTFILE_EXT, FILE_ATTR_MOD, Icon_Firmware, VOICE_EXT_AJZ },
|
||||||
#endif /* #ifndef SIMULATOR */
|
#endif /* #ifndef SIMULATOR */
|
||||||
|
|
|
@ -294,7 +294,7 @@ bool gui_wps_display(void)
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
gui_syncstatusbar_draw(&statusbars, true);
|
gui_syncstatusbar_draw(&statusbars, true);
|
||||||
#endif
|
#endif
|
||||||
gui_syncsplash(HZ, str(LANG_END_PLAYLIST_RECORDER));
|
gui_syncsplash(HZ, str(LANG_END_PLAYLIST));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -440,17 +440,10 @@ void display_keylock_text(bool locked)
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
gui_wps[i].display->stop_scroll();
|
gui_wps[i].display->stop_scroll();
|
||||||
|
|
||||||
#ifdef HAVE_LCD_CHARCELLS
|
|
||||||
if(locked)
|
if(locked)
|
||||||
s = str(LANG_KEYLOCK_ON_PLAYER);
|
s = str(LANG_KEYLOCK_ON);
|
||||||
else
|
else
|
||||||
s = str(LANG_KEYLOCK_OFF_PLAYER);
|
s = str(LANG_KEYLOCK_OFF);
|
||||||
#else
|
|
||||||
if(locked)
|
|
||||||
s = str(LANG_KEYLOCK_ON_RECORDER);
|
|
||||||
else
|
|
||||||
s = str(LANG_KEYLOCK_OFF_RECORDER);
|
|
||||||
#endif
|
|
||||||
gui_syncsplash(HZ, s);
|
gui_syncsplash(HZ, s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -409,7 +409,7 @@ bool option_screen(struct settings_list *setting,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (show_cancel)
|
if (show_cancel)
|
||||||
gui_syncsplash(HZ/2, str(LANG_MENU_SETTING_CANCEL));
|
gui_syncsplash(HZ/2, str(LANG_CANCEL));
|
||||||
done = true;
|
done = true;
|
||||||
}
|
}
|
||||||
else if (action == ACTION_STD_OK)
|
else if (action == ACTION_STD_OK)
|
||||||
|
|
|
@ -74,8 +74,10 @@ static void gui_yesno_draw(struct gui_yesno * yn)
|
||||||
{
|
{
|
||||||
if(nb_lines+line_shift+3<=display->nb_lines)
|
if(nb_lines+line_shift+3<=display->nb_lines)
|
||||||
nb_lines++;
|
nb_lines++;
|
||||||
display->puts(0, nb_lines+line_shift, str(LANG_CONFIRM_WITH_PLAY_RECORDER));
|
display->puts(0, nb_lines+line_shift, str(LANG_CONFIRM_WITH_BUTTON));
|
||||||
display->puts(0, nb_lines+line_shift+1, str(LANG_CANCEL_WITH_ANY_RECORDER));
|
#ifdef HAVE_LCD_BITMAP
|
||||||
|
display->puts(0, nb_lines+line_shift+1, str(LANG_CANCEL_WITH_ANY));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
gui_textarea_update(display);
|
gui_textarea_update(display);
|
||||||
}
|
}
|
||||||
|
|
13888
apps/lang/english.lang
13888
apps/lang/english.lang
File diff suppressed because it is too large
Load diff
|
@ -45,14 +45,15 @@ int lang_load(const char *filename)
|
||||||
int fsize;
|
int fsize;
|
||||||
int fd = open(filename, O_RDONLY);
|
int fd = open(filename, O_RDONLY);
|
||||||
int retcode=0;
|
int retcode=0;
|
||||||
unsigned char lang_header[2];
|
unsigned char lang_header[3];
|
||||||
if(fd == -1)
|
if(fd == -1)
|
||||||
return 1;
|
return 1;
|
||||||
fsize = filesize(fd) - 2;
|
fsize = filesize(fd) - 2;
|
||||||
if(fsize <= MAX_LANGUAGE_SIZE) {
|
if(fsize <= MAX_LANGUAGE_SIZE) {
|
||||||
read(fd, lang_header, 2);
|
read(fd, lang_header, 3);
|
||||||
if((lang_header[0] == LANGUAGE_COOKIE) &&
|
if((lang_header[0] == LANGUAGE_COOKIE) &&
|
||||||
(lang_header[1] == LANGUAGE_VERSION)) {
|
(lang_header[1] == LANGUAGE_VERSION) &&
|
||||||
|
(lang_header[2] == TARGET_ID)) {
|
||||||
read(fd, language_buffer, MAX_LANGUAGE_SIZE);
|
read(fd, language_buffer, MAX_LANGUAGE_SIZE);
|
||||||
unsigned char *ptr = language_buffer;
|
unsigned char *ptr = language_buffer;
|
||||||
int id;
|
int id;
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
/* both these must match the two initial bytes in the binary lang file */
|
/* both these must match the two initial bytes in the binary lang file */
|
||||||
#define LANGUAGE_COOKIE 0x1a
|
#define LANGUAGE_COOKIE 0x1a
|
||||||
#define LANGUAGE_VERSION 0x03
|
#define LANGUAGE_VERSION 0x04
|
||||||
|
|
||||||
/* Initialize language array with the builtin strings */
|
/* Initialize language array with the builtin strings */
|
||||||
void lang_init(void);
|
void lang_init(void);
|
||||||
|
|
|
@ -151,7 +151,7 @@ static int init_dircache(bool preinit)
|
||||||
{
|
{
|
||||||
/* This will be in default language, settings are not
|
/* This will be in default language, settings are not
|
||||||
applied yet. Not really any easy way to fix that. */
|
applied yet. Not really any easy way to fix that. */
|
||||||
gui_syncsplash(0, str(LANG_DIRCACHE_BUILDING));
|
gui_syncsplash(0, str(LANG_SCANNING_DISK));
|
||||||
clear = true;
|
clear = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -169,7 +169,7 @@ static int init_dircache(bool preinit)
|
||||||
{
|
{
|
||||||
if (global_status.dircache_size <= 0)
|
if (global_status.dircache_size <= 0)
|
||||||
{
|
{
|
||||||
gui_syncsplash(0, str(LANG_DIRCACHE_BUILDING));
|
gui_syncsplash(0, str(LANG_SCANNING_DISK));
|
||||||
clear = true;
|
clear = true;
|
||||||
}
|
}
|
||||||
result = dircache_build(global_status.dircache_size);
|
result = dircache_build(global_status.dircache_size);
|
||||||
|
|
|
@ -281,8 +281,8 @@ static int draw_eq_slider(struct screen * screen, int x, int y,
|
||||||
#if NB_SCREENS > 1
|
#if NB_SCREENS > 1
|
||||||
if (screen->screen_type == SCREEN_REMOTE) {
|
if (screen->screen_type == SCREEN_REMOTE) {
|
||||||
if (mode == GAIN) {
|
if (mode == GAIN) {
|
||||||
screen->putsxy(current_x, y + 2, str(LANG_EQUALIZER_BAND_GAIN));
|
screen->putsxy(current_x, y + 2, str(LANG_GAIN));
|
||||||
screen->getstringsize(str(LANG_EQUALIZER_BAND_GAIN), &w, &h);
|
screen->getstringsize(str(LANG_GAIN), &w, &h);
|
||||||
} else if (mode == CUTOFF) {
|
} else if (mode == CUTOFF) {
|
||||||
screen->putsxy(current_x, y + 2, str(LANG_EQUALIZER_BAND_CUTOFF));
|
screen->putsxy(current_x, y + 2, str(LANG_EQUALIZER_BAND_CUTOFF));
|
||||||
screen->getstringsize(str(LANG_EQUALIZER_BAND_CUTOFF), &w, &h);
|
screen->getstringsize(str(LANG_EQUALIZER_BAND_CUTOFF), &w, &h);
|
||||||
|
@ -454,7 +454,7 @@ bool eq_menu_graphical(void)
|
||||||
voice_unit = UNIT_DB;
|
voice_unit = UNIT_DB;
|
||||||
|
|
||||||
snprintf(buf, sizeof(buf), str(LANG_SYSFONT_EQUALIZER_EDIT_MODE),
|
snprintf(buf, sizeof(buf), str(LANG_SYSFONT_EQUALIZER_EDIT_MODE),
|
||||||
str(LANG_SYSFONT_EQUALIZER_BAND_GAIN));
|
str(LANG_SYSFONT_GAIN));
|
||||||
|
|
||||||
screens[SCREEN_MAIN].putsxy(2, y, buf);
|
screens[SCREEN_MAIN].putsxy(2, y, buf);
|
||||||
} else if (mode == CUTOFF) {
|
} else if (mode == CUTOFF) {
|
||||||
|
@ -596,7 +596,7 @@ static bool eq_save_preset(void)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
gui_syncsplash(HZ, str(LANG_MENU_SETTING_CANCEL));
|
gui_syncsplash(HZ, str(LANG_CANCEL));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,12 +67,12 @@ int browse_folder(void *param)
|
||||||
|
|
||||||
static int reset_settings(void)
|
static int reset_settings(void)
|
||||||
{
|
{
|
||||||
unsigned char *lines[]={str(LANG_RESET_ASK_RECORDER)};
|
unsigned char *lines[]={str(LANG_RESET_ASK)};
|
||||||
unsigned char *yes_lines[]={
|
unsigned char *yes_lines[]={
|
||||||
str(LANG_RESET_DONE_SETTING),
|
str(LANG_SETTINGS),
|
||||||
str(LANG_RESET_DONE_CLEAR)
|
str(LANG_RESET_DONE_CLEAR)
|
||||||
};
|
};
|
||||||
unsigned char *no_lines[]={yes_lines[0], str(LANG_RESET_DONE_CANCEL)};
|
unsigned char *no_lines[]={yes_lines[0], str(LANG_CANCEL)};
|
||||||
struct text_message message={(char **)lines, 1};
|
struct text_message message={(char **)lines, 1};
|
||||||
struct text_message yes_message={(char **)yes_lines, 2};
|
struct text_message yes_message={(char **)yes_lines, 2};
|
||||||
struct text_message no_message={(char **)no_lines, 2};
|
struct text_message no_message={(char **)no_lines, 2};
|
||||||
|
@ -186,9 +186,11 @@ static bool show_info(void)
|
||||||
talk_value(battery_level(), UNIT_PERCENT, true);
|
talk_value(battery_level(), UNIT_PERCENT, true);
|
||||||
#if CONFIG_CHARGING >= CHARGING_MONITOR
|
#if CONFIG_CHARGING >= CHARGING_MONITOR
|
||||||
if (charge_state == CHARGING)
|
if (charge_state == CHARGING)
|
||||||
talk_id(LANG_BATTERY_CHARGE, true);
|
talk_id(LANG_BATTERY_CHARGE, true);
|
||||||
|
#if CONFIG_CHARGING == CHARGING_CONTROL
|
||||||
else if (charge_state == TOPOFF)
|
else if (charge_state == TOPOFF)
|
||||||
talk_id(LANG_BATTERY_TOPOFF_CHARGE, true);
|
talk_id(LANG_BATTERY_TOPOFF_CHARGE, true);
|
||||||
|
#endif
|
||||||
else if (charge_state == TRICKLE)
|
else if (charge_state == TRICKLE)
|
||||||
talk_id(LANG_BATTERY_TRICKLE_CHARGE, true);
|
talk_id(LANG_BATTERY_TRICKLE_CHARGE, true);
|
||||||
#endif
|
#endif
|
||||||
|
@ -252,13 +254,9 @@ static bool show_info(void)
|
||||||
int integer = buflen / 1000;
|
int integer = buflen / 1000;
|
||||||
int decimal = buflen % 1000;
|
int decimal = buflen % 1000;
|
||||||
|
|
||||||
#ifdef HAVE_LCD_CHARCELLS
|
snprintf(s, sizeof(s), (char *)str(LANG_BUFFER_STAT),
|
||||||
snprintf(s, sizeof(s), (char *)str(LANG_BUFFER_STAT_PLAYER),
|
|
||||||
integer, decimal);
|
integer, decimal);
|
||||||
#else
|
|
||||||
snprintf(s, sizeof(s), (char *)str(LANG_BUFFER_STAT_RECORDER),
|
|
||||||
integer, decimal);
|
|
||||||
#endif
|
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
screens[i].puts_scroll(0, y, (unsigned char *)s);
|
screens[i].puts_scroll(0, y, (unsigned char *)s);
|
||||||
y++;
|
y++;
|
||||||
|
@ -341,7 +339,7 @@ static bool show_info(void)
|
||||||
|
|
||||||
#ifndef SIMULATOR
|
#ifndef SIMULATOR
|
||||||
case ACTION_STD_OK:
|
case ACTION_STD_OK:
|
||||||
gui_syncsplash(0, str(LANG_DIRCACHE_BUILDING));
|
gui_syncsplash(0, str(LANG_SCANNING_DISK));
|
||||||
fat_recalc_free(IF_MV(0));
|
fat_recalc_free(IF_MV(0));
|
||||||
#ifdef HAVE_MULTIVOLUME
|
#ifdef HAVE_MULTIVOLUME
|
||||||
if (fat_ismounted(1))
|
if (fat_ismounted(1))
|
||||||
|
@ -359,7 +357,7 @@ static bool show_info(void)
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
MENUITEM_FUNCTION(show_info_item, 0, ID2P(LANG_INFO_MENU),
|
MENUITEM_FUNCTION(show_info_item, 0, ID2P(LANG_ROCKBOX_INFO),
|
||||||
(menu_function)show_info, NULL, NULL, Icon_NOICON);
|
(menu_function)show_info, NULL, NULL, Icon_NOICON);
|
||||||
|
|
||||||
|
|
||||||
|
@ -406,7 +404,7 @@ MENUITEM_FUNCTION(simulate_usb_item, 0, ID2P(LANG_USB),
|
||||||
(menu_function)simulate_usb, NULL, NULL, Icon_NOICON);
|
(menu_function)simulate_usb, NULL, NULL, Icon_NOICON);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
MAKE_MENU(info_menu, ID2P(LANG_INFO), 0, Icon_Questionmark,
|
MAKE_MENU(info_menu, ID2P(LANG_SYSTEM), 0, Icon_Questionmark,
|
||||||
&show_info_item, &show_credits_item, &show_runtime_item,
|
&show_info_item, &show_credits_item, &show_runtime_item,
|
||||||
&sleep_timer_call, &debug_menu_item
|
&sleep_timer_call, &debug_menu_item
|
||||||
#ifdef SIMULATOR
|
#ifdef SIMULATOR
|
||||||
|
@ -440,7 +438,7 @@ int mainmenu_callback(int action,const struct menu_item_ex *this_item)
|
||||||
#else
|
#else
|
||||||
#define mainmenu_callback NULL
|
#define mainmenu_callback NULL
|
||||||
#endif
|
#endif
|
||||||
MAKE_MENU(main_menu_, ID2P(LANG_SETTINGS_MENU), mainmenu_callback,
|
MAKE_MENU(main_menu_, ID2P(LANG_SETTINGS), mainmenu_callback,
|
||||||
Icon_Submenu_Entered,
|
Icon_Submenu_Entered,
|
||||||
&sound_settings,
|
&sound_settings,
|
||||||
&settings_menu_item, &manage_settings, &browse_themes,
|
&settings_menu_item, &manage_settings, &browse_themes,
|
||||||
|
|
|
@ -167,7 +167,7 @@ MENUITEM_SETTING(cuesheet, &global_settings.cuesheet, cuesheet_callback);
|
||||||
MENUITEM_SETTING(unplug_mode, &global_settings.unplug_mode, NULL);
|
MENUITEM_SETTING(unplug_mode, &global_settings.unplug_mode, NULL);
|
||||||
MENUITEM_SETTING(unplug_rw, &global_settings.unplug_rw, NULL);
|
MENUITEM_SETTING(unplug_rw, &global_settings.unplug_rw, NULL);
|
||||||
MENUITEM_SETTING(unplug_autoresume, &global_settings.unplug_autoresume, NULL);
|
MENUITEM_SETTING(unplug_autoresume, &global_settings.unplug_autoresume, NULL);
|
||||||
MAKE_MENU(unplug_menu, ID2P(LANG_UNPLUG), 0, Icon_NOICON,
|
MAKE_MENU(unplug_menu, ID2P(LANG_HEADPHONE_UNPLUG), 0, Icon_NOICON,
|
||||||
&unplug_mode, &unplug_rw, &unplug_autoresume);
|
&unplug_mode, &unplug_rw, &unplug_autoresume);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -75,10 +75,10 @@ MENUITEM_FUNCTION(catalog, 0, ID2P(LANG_CATALOG),
|
||||||
MENUITEM_SETTING(recursive_dir_insert, &global_settings.recursive_dir_insert, NULL);
|
MENUITEM_SETTING(recursive_dir_insert, &global_settings.recursive_dir_insert, NULL);
|
||||||
MENUITEM_SETTING(warn_on_erase, &global_settings.warnon_erase_dynplaylist, NULL);
|
MENUITEM_SETTING(warn_on_erase, &global_settings.warnon_erase_dynplaylist, NULL);
|
||||||
|
|
||||||
MAKE_MENU(playlist_settings, ID2P(LANG_PLAYLIST_MENU), NULL,
|
MAKE_MENU(playlist_settings, ID2P(LANG_PLAYLISTS), NULL,
|
||||||
Icon_Playlist,
|
Icon_Playlist,
|
||||||
&recursive_dir_insert, &warn_on_erase);
|
&recursive_dir_insert, &warn_on_erase);
|
||||||
MAKE_MENU(playlist_options, ID2P(LANG_PLAYLIST_MENU), NULL,
|
MAKE_MENU(playlist_options, ID2P(LANG_PLAYLISTS), NULL,
|
||||||
Icon_Playlist,
|
Icon_Playlist,
|
||||||
&create_playlist_item, &view_playlist, &save_playlist, &catalog);
|
&create_playlist_item, &view_playlist, &save_playlist, &catalog);
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ static int recsource_func(void)
|
||||||
HAVE_MIC_REC_([AUDIO_SRC_MIC]
|
HAVE_MIC_REC_([AUDIO_SRC_MIC]
|
||||||
= { STR(LANG_RECORDING_SRC_MIC) },)
|
= { STR(LANG_RECORDING_SRC_MIC) },)
|
||||||
HAVE_LINE_REC_([AUDIO_SRC_LINEIN]
|
HAVE_LINE_REC_([AUDIO_SRC_LINEIN]
|
||||||
= { STR(LANG_RECORDING_SRC_LINE) },)
|
= { STR(LANG_LINE_IN) },)
|
||||||
HAVE_SPDIF_REC_([AUDIO_SRC_SPDIF]
|
HAVE_SPDIF_REC_([AUDIO_SRC_SPDIF]
|
||||||
= { STR(LANG_RECORDING_SRC_DIGITAL) },)
|
= { STR(LANG_RECORDING_SRC_DIGITAL) },)
|
||||||
HAVE_FMRADIO_REC_([AUDIO_SRC_FMRADIO]
|
HAVE_FMRADIO_REC_([AUDIO_SRC_FMRADIO]
|
||||||
|
@ -217,7 +217,7 @@ static int recchannels_func(void)
|
||||||
[CHN_MODE_MONO] = { STR(LANG_CHANNEL_MONO) }
|
[CHN_MODE_MONO] = { STR(LANG_CHANNEL_MONO) }
|
||||||
};
|
};
|
||||||
#if CONFIG_CODEC == MAS3587F
|
#if CONFIG_CODEC == MAS3587F
|
||||||
return set_option(str(LANG_RECORDING_CHANNELS),
|
return set_option(str(LANG_CHANNELS),
|
||||||
&global_settings.rec_channels, INT,
|
&global_settings.rec_channels, INT,
|
||||||
names, CHN_NUM_MODES, NULL );
|
names, CHN_NUM_MODES, NULL );
|
||||||
#endif /* CONFIG_CODEC == MAS3587F */
|
#endif /* CONFIG_CODEC == MAS3587F */
|
||||||
|
@ -245,7 +245,7 @@ static int recchannels_func(void)
|
||||||
|
|
||||||
make_options_from_indexes(names, table, n_opts, opts);
|
make_options_from_indexes(names, table, n_opts, opts);
|
||||||
|
|
||||||
ret = set_option(str(LANG_RECORDING_CHANNELS), &rec_channels,
|
ret = set_option(str(LANG_CHANNELS), &rec_channels,
|
||||||
INT, opts, n_opts, NULL );
|
INT, opts, n_opts, NULL );
|
||||||
|
|
||||||
if (!ret)
|
if (!ret)
|
||||||
|
@ -254,7 +254,7 @@ static int recchannels_func(void)
|
||||||
return ret;
|
return ret;
|
||||||
#endif /* CONFIG_CODEC == SWCODEC */
|
#endif /* CONFIG_CODEC == SWCODEC */
|
||||||
}
|
}
|
||||||
MENUITEM_FUNCTION(recchannels, 0, ID2P(LANG_RECORDING_CHANNELS),
|
MENUITEM_FUNCTION(recchannels, 0, ID2P(LANG_CHANNELS),
|
||||||
recchannels_func, NULL, NULL, Icon_Menu_setting);
|
recchannels_func, NULL, NULL, Icon_Menu_setting);
|
||||||
|
|
||||||
#if CONFIG_CODEC == SWCODEC
|
#if CONFIG_CODEC == SWCODEC
|
||||||
|
@ -438,7 +438,7 @@ bool rectrigger(void)
|
||||||
static const unsigned char *trigger_modes[] = {
|
static const unsigned char *trigger_modes[] = {
|
||||||
ID2P(LANG_OFF),
|
ID2P(LANG_OFF),
|
||||||
ID2P(LANG_RECORD_TRIG_NOREARM),
|
ID2P(LANG_RECORD_TRIG_NOREARM),
|
||||||
ID2P(LANG_RECORD_TRIG_REARM)
|
ID2P(LANG_REPEAT)
|
||||||
};
|
};
|
||||||
|
|
||||||
#define PRERECORD_TIMES_COUNT 31
|
#define PRERECORD_TIMES_COUNT 31
|
||||||
|
@ -452,18 +452,18 @@ bool rectrigger(void)
|
||||||
#define TRIGGER_TYPE_COUNT 3
|
#define TRIGGER_TYPE_COUNT 3
|
||||||
static const unsigned char *trigger_types[] = {
|
static const unsigned char *trigger_types[] = {
|
||||||
ID2P(LANG_RECORD_TRIGGER_STOP),
|
ID2P(LANG_RECORD_TRIGGER_STOP),
|
||||||
ID2P(LANG_RECORD_TRIGGER_PAUSE),
|
ID2P(LANG_PAUSE),
|
||||||
ID2P(LANG_RECORD_TRIGGER_NEWFILESTP),
|
ID2P(LANG_RECORD_TRIGGER_NEWFILESTP),
|
||||||
};
|
};
|
||||||
|
|
||||||
static const unsigned char *option_name[] = {
|
static const unsigned char *option_name[] = {
|
||||||
[TRIGGER_MODE] = ID2P(LANG_RECORD_TRIGGER_MODE),
|
[TRIGGER_MODE] = ID2P(LANG_RECORD_TRIGGER),
|
||||||
[TRIGGER_TYPE] = ID2P(LANG_RECORD_TRIGGER_TYPE),
|
[TRIGGER_TYPE] = ID2P(LANG_RECORD_TRIGGER_TYPE),
|
||||||
[PRERECORD_TIME] = ID2P(LANG_RECORD_PRERECORD_TIME),
|
[PRERECORD_TIME] = ID2P(LANG_RECORD_PRERECORD_TIME),
|
||||||
[START_THRESHOLD] = ID2P(LANG_RECORD_START_THRESHOLD),
|
[START_THRESHOLD] = ID2P(LANG_RECORD_START_THRESHOLD),
|
||||||
[START_DURATION] = ID2P(LANG_RECORD_MIN_DURATION),
|
[START_DURATION] = ID2P(LANG_MIN_DURATION),
|
||||||
[STOP_THRESHOLD] = ID2P(LANG_RECORD_STOP_THRESHOLD),
|
[STOP_THRESHOLD] = ID2P(LANG_RECORD_STOP_THRESHOLD),
|
||||||
[STOP_POSTREC] = ID2P(LANG_RECORD_STOP_POSTREC),
|
[STOP_POSTREC] = ID2P(LANG_MIN_DURATION),
|
||||||
[STOP_GAP] = ID2P(LANG_RECORD_STOP_GAP)
|
[STOP_GAP] = ID2P(LANG_RECORD_STOP_GAP)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -637,7 +637,7 @@ bool rectrigger(void)
|
||||||
|
|
||||||
switch (button) {
|
switch (button) {
|
||||||
case ACTION_STD_CANCEL:
|
case ACTION_STD_CANCEL:
|
||||||
gui_syncsplash(50, str(LANG_MENU_SETTING_CANCEL));
|
gui_syncsplash(50, str(LANG_CANCEL));
|
||||||
global_settings.rec_start_thres = old_start_thres;
|
global_settings.rec_start_thres = old_start_thres;
|
||||||
global_settings.rec_start_duration = old_start_duration;
|
global_settings.rec_start_duration = old_start_duration;
|
||||||
global_settings.rec_prerecord_time = old_prerecord_time;
|
global_settings.rec_prerecord_time = old_prerecord_time;
|
||||||
|
|
|
@ -228,7 +228,7 @@ static int timedate_set(void)
|
||||||
tm.tm_year = YEAR-1900;
|
tm.tm_year = YEAR-1900;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = (int)set_time_screen(str(LANG_TIME), &tm);
|
result = (int)set_time_screen(str(LANG_SET_TIME), &tm);
|
||||||
|
|
||||||
if(tm.tm_year != -1) {
|
if(tm.tm_year != -1) {
|
||||||
set_time(&tm);
|
set_time(&tm);
|
||||||
|
@ -236,7 +236,7 @@ static int timedate_set(void)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
MENUITEM_FUNCTION(time_set, 0, ID2P(LANG_TIME),
|
MENUITEM_FUNCTION(time_set, 0, ID2P(LANG_SET_TIME),
|
||||||
timedate_set, NULL, NULL, Icon_NOICON);
|
timedate_set, NULL, NULL, Icon_NOICON);
|
||||||
MENUITEM_SETTING(timeformat, &global_settings.timeformat, NULL);
|
MENUITEM_SETTING(timeformat, &global_settings.timeformat, NULL);
|
||||||
MAKE_MENU(time_menu, ID2P(LANG_TIME_MENU), 0, Icon_NOICON, &time_set, &timeformat);
|
MAKE_MENU(time_menu, ID2P(LANG_TIME_MENU), 0, Icon_NOICON, &time_set, &timeformat);
|
||||||
|
|
|
@ -295,7 +295,7 @@ MENUITEM_FUNCTION(playlist_save_item, 0, ID2P(LANG_SAVE_DYNAMIC_PLAYLIST),
|
||||||
save_playlist, NULL, NULL, Icon_Playlist);
|
save_playlist, NULL, NULL, Icon_Playlist);
|
||||||
MENUITEM_FUNCTION(reshuffle_item, 0, ID2P(LANG_SHUFFLE_PLAYLIST),
|
MENUITEM_FUNCTION(reshuffle_item, 0, ID2P(LANG_SHUFFLE_PLAYLIST),
|
||||||
shuffle_playlist, NULL, NULL, Icon_Playlist);
|
shuffle_playlist, NULL, NULL, Icon_Playlist);
|
||||||
MAKE_ONPLAYMENU( wps_playlist_menu, ID2P(LANG_PLAYLIST_MENU),
|
MAKE_ONPLAYMENU( wps_playlist_menu, ID2P(LANG_PLAYLIST),
|
||||||
NULL, Icon_Playlist,
|
NULL, Icon_Playlist,
|
||||||
&playlist_viewer_item, &search_playlist_item,
|
&playlist_viewer_item, &search_playlist_item,
|
||||||
&playlist_save_item, &reshuffle_item
|
&playlist_save_item, &reshuffle_item
|
||||||
|
@ -373,7 +373,7 @@ MENUITEM_FUNCTION(view_playlist_item, 0, ID2P(LANG_VIEW),
|
||||||
view_playlist, NULL,
|
view_playlist, NULL,
|
||||||
treeplaylist_callback, Icon_Playlist);
|
treeplaylist_callback, Icon_Playlist);
|
||||||
|
|
||||||
MAKE_ONPLAYMENU( tree_playlist_menu, ID2P(LANG_PLAYLIST_MENU),
|
MAKE_ONPLAYMENU( tree_playlist_menu, ID2P(LANG_PLAYLIST),
|
||||||
treeplaylist_callback, Icon_Playlist,
|
treeplaylist_callback, Icon_Playlist,
|
||||||
|
|
||||||
/* view */
|
/* view */
|
||||||
|
@ -502,7 +502,7 @@ static int remove_dir(char* dirname, int len)
|
||||||
#endif
|
#endif
|
||||||
if(ACTION_STD_CANCEL == get_action(CONTEXT_STD,TIMEOUT_NOBLOCK))
|
if(ACTION_STD_CANCEL == get_action(CONTEXT_STD,TIMEOUT_NOBLOCK))
|
||||||
{
|
{
|
||||||
gui_syncsplash(HZ, str(LANG_MENU_SETTING_CANCEL));
|
gui_syncsplash(HZ, str(LANG_CANCEL));
|
||||||
result = -1;
|
result = -1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1032,6 +1032,7 @@ MENUITEM_FUNCTION(view_cue_item, 0, ID2P(LANG_BROWSE_CUESHEET),
|
||||||
/* CONTEXT_WPS items */
|
/* CONTEXT_WPS items */
|
||||||
MENUITEM_FUNCTION(browse_id3_item, 0, ID2P(LANG_MENU_SHOW_ID3_INFO),
|
MENUITEM_FUNCTION(browse_id3_item, 0, ID2P(LANG_MENU_SHOW_ID3_INFO),
|
||||||
browse_id3, NULL, NULL, Icon_NOICON);
|
browse_id3, NULL, NULL, Icon_NOICON);
|
||||||
|
/* NOTE: the LANG_MENU_SET_RATING string has been removed from english.lang */
|
||||||
#ifdef HAVE_PITCHSCREEN
|
#ifdef HAVE_PITCHSCREEN
|
||||||
MENUITEM_FUNCTION(pitch_screen_item, 0, ID2P(LANG_PITCH),
|
MENUITEM_FUNCTION(pitch_screen_item, 0, ID2P(LANG_PITCH),
|
||||||
pitch_screen, NULL, NULL, Icon_Audio);
|
pitch_screen, NULL, NULL, Icon_Audio);
|
||||||
|
|
|
@ -484,7 +484,7 @@ static int add_indices_to_playlist(struct playlist_info* playlist,
|
||||||
lcd_setmargins(0, 0);
|
lcd_setmargins(0, 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
gui_syncsplash(0, str(LANG_PLAYLIST_LOAD));
|
gui_syncsplash(0, str(LANG_WAIT));
|
||||||
|
|
||||||
if (!buffer)
|
if (!buffer)
|
||||||
{
|
{
|
||||||
|
@ -1668,13 +1668,7 @@ static void display_playlist_count(int count, const unsigned char *fmt)
|
||||||
lcd_setmargins(0, 0);
|
lcd_setmargins(0, 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
gui_syncsplash(0, fmt, count,
|
gui_syncsplash(0, fmt, count, str(LANG_OFF_ABORT));
|
||||||
#if CONFIG_KEYPAD == PLAYER_PAD
|
|
||||||
str(LANG_STOP_ABORT)
|
|
||||||
#else
|
|
||||||
str(LANG_OFF_ABORT)
|
|
||||||
#endif
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1997,12 +1991,7 @@ int playlist_resume(void)
|
||||||
{
|
{
|
||||||
gui_syncsplash(0, str(LANG_LOADING_PERCENT),
|
gui_syncsplash(0, str(LANG_LOADING_PERCENT),
|
||||||
(total_read+count)*100/control_file_size,
|
(total_read+count)*100/control_file_size,
|
||||||
#if CONFIG_KEYPAD == PLAYER_PAD
|
str(LANG_OFF_ABORT));
|
||||||
str(LANG_STOP_ABORT)
|
|
||||||
#else
|
|
||||||
str(LANG_OFF_ABORT)
|
|
||||||
#endif
|
|
||||||
);
|
|
||||||
if (action_userabort(TIMEOUT_NOBLOCK))
|
if (action_userabort(TIMEOUT_NOBLOCK))
|
||||||
{
|
{
|
||||||
/* FIXME:
|
/* FIXME:
|
||||||
|
|
|
@ -320,12 +320,7 @@ static int display_playlists(char* playlist, bool view)
|
||||||
static void display_insert_count(int count)
|
static void display_insert_count(int count)
|
||||||
{
|
{
|
||||||
gui_syncsplash(0, str(LANG_PLAYLIST_INSERT_COUNT), count,
|
gui_syncsplash(0, str(LANG_PLAYLIST_INSERT_COUNT), count,
|
||||||
#if CONFIG_KEYPAD == PLAYER_PAD
|
str(LANG_OFF_ABORT));
|
||||||
str(LANG_STOP_ABORT)
|
|
||||||
#else
|
|
||||||
str(LANG_OFF_ABORT)
|
|
||||||
#endif
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Add specified track into playlist. Callback from directory insert */
|
/* Add specified track into playlist. Callback from directory insert */
|
||||||
|
|
|
@ -430,7 +430,7 @@ static int onplay_menu(int index)
|
||||||
int result, ret = 0;
|
int result, ret = 0;
|
||||||
struct playlist_entry * current_track=
|
struct playlist_entry * current_track=
|
||||||
playlist_buffer_get_track(&viewer.buffer, index);
|
playlist_buffer_get_track(&viewer.buffer, index);
|
||||||
MENUITEM_STRINGLIST(menu_items, ID2P(LANG_PLAYLIST_MENU), NULL,
|
MENUITEM_STRINGLIST(menu_items, ID2P(LANG_PLAYLIST), NULL,
|
||||||
ID2P(LANG_REMOVE), ID2P(LANG_MOVE),
|
ID2P(LANG_REMOVE), ID2P(LANG_MOVE),
|
||||||
ID2P(LANG_CATALOG_ADD_TO), ID2P(LANG_CATALOG_ADD_TO_NEW));
|
ID2P(LANG_CATALOG_ADD_TO), ID2P(LANG_CATALOG_ADD_TO_NEW));
|
||||||
bool current = (current_track->index == viewer.current_playing_track);
|
bool current = (current_track->index == viewer.current_playing_track);
|
||||||
|
@ -569,7 +569,7 @@ bool playlist_viewer_ex(char* filename)
|
||||||
&playlist_callback_icons:NULL);
|
&playlist_callback_icons:NULL);
|
||||||
gui_synclist_set_nb_items(&playlist_lists, viewer.num_tracks);
|
gui_synclist_set_nb_items(&playlist_lists, viewer.num_tracks);
|
||||||
gui_synclist_select_item(&playlist_lists, viewer.selected_track);
|
gui_synclist_select_item(&playlist_lists, viewer.selected_track);
|
||||||
gui_synclist_set_title(&playlist_lists, str(LANG_PLAYLIST_MENU), Icon_Playlist);
|
gui_synclist_set_title(&playlist_lists, str(LANG_PLAYLIST), Icon_Playlist);
|
||||||
gui_synclist_draw(&playlist_lists);
|
gui_synclist_draw(&playlist_lists);
|
||||||
while (!exit)
|
while (!exit)
|
||||||
{
|
{
|
||||||
|
@ -577,7 +577,7 @@ bool playlist_viewer_ex(char* filename)
|
||||||
if (global_status.resume_index == -1)
|
if (global_status.resume_index == -1)
|
||||||
{
|
{
|
||||||
/* Play has stopped */
|
/* Play has stopped */
|
||||||
gui_syncsplash(HZ, str(LANG_END_PLAYLIST_RECORDER));
|
gui_syncsplash(HZ, str(LANG_END_PLAYLIST));
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -635,8 +635,8 @@ bool playlist_viewer_ex(char* filename)
|
||||||
ret_val = playlist_move(viewer.playlist, viewer.move_track,
|
ret_val = playlist_move(viewer.playlist, viewer.move_track,
|
||||||
current_track->index);
|
current_track->index);
|
||||||
if (ret_val < 0)
|
if (ret_val < 0)
|
||||||
gui_syncsplash(HZ, str(LANG_MOVE_FAILED));
|
gui_syncsplash(HZ, (unsigned char *)"%s %s",
|
||||||
|
str(LANG_MOVE), str(LANG_FAILED));
|
||||||
update_playlist(true);
|
update_playlist(true);
|
||||||
viewer.move_track = -1;
|
viewer.move_track = -1;
|
||||||
}
|
}
|
||||||
|
@ -749,12 +749,7 @@ bool search_playlist(void)
|
||||||
for (i=0;(i<playlist_count)&&(found_indicies_count<MAX_PLAYLIST_ENTRIES);i++)
|
for (i=0;(i<playlist_count)&&(found_indicies_count<MAX_PLAYLIST_ENTRIES);i++)
|
||||||
{
|
{
|
||||||
gui_syncsplash(0, str(LANG_PLAYLIST_SEARCH_MSG),found_indicies_count,
|
gui_syncsplash(0, str(LANG_PLAYLIST_SEARCH_MSG),found_indicies_count,
|
||||||
#if CONFIG_KEYPAD == PLAYER_PAD
|
str(LANG_OFF_ABORT));
|
||||||
str(LANG_STOP_ABORT)
|
|
||||||
#else
|
|
||||||
str(LANG_OFF_ABORT)
|
|
||||||
#endif
|
|
||||||
);
|
|
||||||
if (action_userabort(TIMEOUT_NOBLOCK))
|
if (action_userabort(TIMEOUT_NOBLOCK))
|
||||||
{
|
{
|
||||||
if (!found_indicies_count)
|
if (!found_indicies_count)
|
||||||
|
|
|
@ -496,7 +496,7 @@ int radio_screen(void)
|
||||||
|
|
||||||
#ifdef HAS_BUTTONBAR
|
#ifdef HAS_BUTTONBAR
|
||||||
gui_buttonbar_set(&buttonbar, str(LANG_BUTTONBAR_MENU),
|
gui_buttonbar_set(&buttonbar, str(LANG_BUTTONBAR_MENU),
|
||||||
str(LANG_FM_BUTTONBAR_PRESETS), str(LANG_FM_BUTTONBAR_RECORD));
|
str(LANG_PRESET), str(LANG_FM_BUTTONBAR_RECORD));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_NOISY_IDLE_MODE
|
#ifndef HAVE_NOISY_IDLE_MODE
|
||||||
|
@ -680,7 +680,7 @@ int radio_screen(void)
|
||||||
}
|
}
|
||||||
#ifdef HAS_BUTTONBAR
|
#ifdef HAS_BUTTONBAR
|
||||||
gui_buttonbar_set(&buttonbar, str(LANG_BUTTONBAR_MENU),
|
gui_buttonbar_set(&buttonbar, str(LANG_BUTTONBAR_MENU),
|
||||||
str(LANG_FM_BUTTONBAR_PRESETS),
|
str(LANG_PRESET),
|
||||||
str(LANG_FM_BUTTONBAR_RECORD));
|
str(LANG_FM_BUTTONBAR_RECORD));
|
||||||
#endif
|
#endif
|
||||||
update_screen = true;
|
update_screen = true;
|
||||||
|
@ -713,7 +713,7 @@ int radio_screen(void)
|
||||||
#ifdef HAS_BUTTONBAR
|
#ifdef HAS_BUTTONBAR
|
||||||
gui_buttonbar_set(&buttonbar,
|
gui_buttonbar_set(&buttonbar,
|
||||||
str(LANG_BUTTONBAR_MENU),
|
str(LANG_BUTTONBAR_MENU),
|
||||||
str(LANG_FM_BUTTONBAR_PRESETS),
|
str(LANG_PRESET),
|
||||||
str(LANG_FM_BUTTONBAR_RECORD));
|
str(LANG_FM_BUTTONBAR_RECORD));
|
||||||
#endif
|
#endif
|
||||||
update_screen = true;
|
update_screen = true;
|
||||||
|
@ -858,8 +858,8 @@ int radio_screen(void)
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
screens[i].puts_scroll(0, top_of_screen + 2, buf);
|
screens[i].puts_scroll(0, top_of_screen + 2, buf);
|
||||||
|
|
||||||
snprintf(buf, 128, "%s %s", str(LANG_FM_TUNE_MODE),
|
snprintf(buf, 128, "%s %s", str(LANG_MODE),
|
||||||
radio_mode ? str(LANG_RADIO_PRESET_MODE) :
|
radio_mode ? str(LANG_PRESET) :
|
||||||
str(LANG_RADIO_SCAN_MODE));
|
str(LANG_RADIO_SCAN_MODE));
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
screens[i].puts_scroll(0, top_of_screen + 3, buf);
|
screens[i].puts_scroll(0, top_of_screen + 3, buf);
|
||||||
|
@ -1223,7 +1223,7 @@ int radio_preset_callback(int action, const struct menu_item_ex *this_item)
|
||||||
return action;
|
return action;
|
||||||
(void)this_item;
|
(void)this_item;
|
||||||
}
|
}
|
||||||
MAKE_MENU(handle_radio_preset_menu, ID2P(LANG_FM_BUTTONBAR_PRESETS),
|
MAKE_MENU(handle_radio_preset_menu, ID2P(LANG_PRESET),
|
||||||
radio_preset_callback, Icon_NOICON, &radio_edit_preset_item,
|
radio_preset_callback, Icon_NOICON, &radio_edit_preset_item,
|
||||||
&radio_delete_preset_item);
|
&radio_delete_preset_item);
|
||||||
/* present a list of preset stations */
|
/* present a list of preset stations */
|
||||||
|
@ -1255,7 +1255,7 @@ static int handle_radio_presets(void)
|
||||||
gui_buttonbar_draw(&buttonbar);
|
gui_buttonbar_draw(&buttonbar);
|
||||||
#endif
|
#endif
|
||||||
gui_synclist_init(&lists, presets_get_name, NULL, false, 1);
|
gui_synclist_init(&lists, presets_get_name, NULL, false, 1);
|
||||||
gui_synclist_set_title(&lists, str(LANG_FM_BUTTONBAR_PRESETS), NOICON);
|
gui_synclist_set_title(&lists, str(LANG_PRESET), NOICON);
|
||||||
gui_synclist_set_icon_callback(&lists, NULL);
|
gui_synclist_set_icon_callback(&lists, NULL);
|
||||||
gui_synclist_set_nb_items(&lists, num_presets);
|
gui_synclist_set_nb_items(&lists, num_presets);
|
||||||
gui_synclist_select_item(&lists, curr_preset<0 ? 0 : curr_preset);
|
gui_synclist_select_item(&lists, curr_preset<0 ? 0 : curr_preset);
|
||||||
|
@ -1318,8 +1318,8 @@ char* get_mode_text(int selected_item, void * data, char *buffer)
|
||||||
{
|
{
|
||||||
(void)selected_item;
|
(void)selected_item;
|
||||||
(void)data;
|
(void)data;
|
||||||
snprintf(buffer, MAX_PATH, "%s %s", str(LANG_FM_TUNE_MODE),
|
snprintf(buffer, MAX_PATH, "%s %s", str(LANG_MODE),
|
||||||
radio_mode ? str(LANG_RADIO_PRESET_MODE) :
|
radio_mode ? str(LANG_PRESET) :
|
||||||
str(LANG_RADIO_SCAN_MODE));
|
str(LANG_RADIO_SCAN_MODE));
|
||||||
return buffer;
|
return buffer;
|
||||||
}
|
}
|
||||||
|
@ -1455,7 +1455,7 @@ static int fm_recording_settings(void)
|
||||||
#endif /* HAVE_RECORDING */
|
#endif /* HAVE_RECORDING */
|
||||||
|
|
||||||
#ifdef FM_RECORDING_SCREEN
|
#ifdef FM_RECORDING_SCREEN
|
||||||
MENUITEM_FUNCTION(recscreen_item, 0, ID2P(LANG_RECORDING_MENU),
|
MENUITEM_FUNCTION(recscreen_item, 0, ID2P(LANG_RECORDING),
|
||||||
fm_recording_screen, NULL, NULL, Icon_Recording);
|
fm_recording_screen, NULL, NULL, Icon_Recording);
|
||||||
#endif
|
#endif
|
||||||
#ifdef FM_RECORDING_SETTINGS
|
#ifdef FM_RECORDING_SETTINGS
|
||||||
|
@ -1463,7 +1463,7 @@ MENUITEM_FUNCTION(recsettings_item, 0, ID2P(LANG_RECORDING_SETTINGS),
|
||||||
fm_recording_settings, NULL, NULL, Icon_Recording);
|
fm_recording_settings, NULL, NULL, Icon_Recording);
|
||||||
#endif
|
#endif
|
||||||
#ifndef FM_PRESET
|
#ifndef FM_PRESET
|
||||||
MENUITEM_FUNCTION(radio_presets_item, 0, ID2P(LANG_FM_BUTTONBAR_PRESETS),
|
MENUITEM_FUNCTION(radio_presets_item, 0, ID2P(LANG_PRESET),
|
||||||
handle_radio_presets, NULL, NULL, Icon_NOICON);
|
handle_radio_presets, NULL, NULL, Icon_NOICON);
|
||||||
#endif
|
#endif
|
||||||
#ifndef FM_PRESET_ADD
|
#ifndef FM_PRESET_ADD
|
||||||
|
|
|
@ -1529,7 +1529,7 @@ bool recording_screen(bool no_source)
|
||||||
if(global_settings.rec_source == AUDIO_SRC_MIC)
|
if(global_settings.rec_source == AUDIO_SRC_MIC)
|
||||||
{
|
{
|
||||||
/* Draw MIC recording gain */
|
/* Draw MIC recording gain */
|
||||||
snprintf(buf, sizeof(buf), "%s:%s", str(LANG_SYSFONT_RECORDING_GAIN),
|
snprintf(buf, sizeof(buf), "%s:%s", str(LANG_SYSFONT_GAIN),
|
||||||
fmt_gain(SOUND_MIC_GAIN,
|
fmt_gain(SOUND_MIC_GAIN,
|
||||||
global_settings.rec_mic_gain,
|
global_settings.rec_mic_gain,
|
||||||
buf2, sizeof(buf2)));
|
buf2, sizeof(buf2)));
|
||||||
|
@ -1921,12 +1921,12 @@ static bool f2_rec_screen(void)
|
||||||
|
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
{
|
{
|
||||||
screens[i].getstringsize(str(LANG_SYSFONT_RECORDING_CHANNELS), &w, &h);
|
screens[i].getstringsize(str(LANG_SYSFONT_CHANNELS), &w, &h);
|
||||||
screens[i].putsxy(LCD_WIDTH - w, LCD_HEIGHT/2 - h*2,
|
screens[i].putsxy(LCD_WIDTH - w, LCD_HEIGHT/2 - h*2,
|
||||||
str(LANG_SYSFONT_RECORDING_CHANNELS));
|
str(LANG_SYSFONT_CHANNELS));
|
||||||
screens[i].getstringsize(str(LANG_SYSFONT_F2_MODE), &w, &h);
|
screens[i].getstringsize(str(LANG_SYSFONT_MODE), &w, &h);
|
||||||
screens[i].putsxy(LCD_WIDTH - w, LCD_HEIGHT/2 - h,
|
screens[i].putsxy(LCD_WIDTH - w, LCD_HEIGHT/2 - h,
|
||||||
str(LANG_SYSFONT_F2_MODE));
|
str(LANG_SYSFONT_MODE));
|
||||||
screens[i].getstringsize(ptr, &w, &h);
|
screens[i].getstringsize(ptr, &w, &h);
|
||||||
screens[i].putsxy(LCD_WIDTH - w, LCD_HEIGHT/2, ptr);
|
screens[i].putsxy(LCD_WIDTH - w, LCD_HEIGHT/2, ptr);
|
||||||
screens[i].mono_bitmap(bitmap_icons_7x8[Icon_FastForward],
|
screens[i].mono_bitmap(bitmap_icons_7x8[Icon_FastForward],
|
||||||
|
@ -1999,7 +1999,7 @@ static bool f3_rec_screen(void)
|
||||||
char *src_str[] =
|
char *src_str[] =
|
||||||
{
|
{
|
||||||
str(LANG_SYSFONT_RECORDING_SRC_MIC),
|
str(LANG_SYSFONT_RECORDING_SRC_MIC),
|
||||||
str(LANG_SYSFONT_RECORDING_SRC_LINE),
|
str(LANG_SYSFONT_LINE_IN),
|
||||||
str(LANG_SYSFONT_RECORDING_SRC_DIGITAL)
|
str(LANG_SYSFONT_RECORDING_SRC_DIGITAL)
|
||||||
};
|
};
|
||||||
struct audio_recording_options rec_options;
|
struct audio_recording_options rec_options;
|
||||||
|
|
|
@ -315,14 +315,14 @@ char *get_wps_item_name(int selected_item, void * data, char *buffer)
|
||||||
MENUITEM_RETURNVALUE_DYNTEXT(wps_item, GO_TO_WPS, NULL, get_wps_item_name,
|
MENUITEM_RETURNVALUE_DYNTEXT(wps_item, GO_TO_WPS, NULL, get_wps_item_name,
|
||||||
NULL, Icon_Playback_menu);
|
NULL, Icon_Playback_menu);
|
||||||
#ifdef HAVE_RECORDING
|
#ifdef HAVE_RECORDING
|
||||||
MENUITEM_RETURNVALUE(rec, ID2P(LANG_RECORDING_MENU), GO_TO_RECSCREEN,
|
MENUITEM_RETURNVALUE(rec, ID2P(LANG_RECORDING), GO_TO_RECSCREEN,
|
||||||
NULL, Icon_Recording);
|
NULL, Icon_Recording);
|
||||||
#endif
|
#endif
|
||||||
#if CONFIG_TUNER
|
#if CONFIG_TUNER
|
||||||
MENUITEM_RETURNVALUE(fm, ID2P(LANG_FM_RADIO), GO_TO_FM,
|
MENUITEM_RETURNVALUE(fm, ID2P(LANG_FM_RADIO), GO_TO_FM,
|
||||||
item_callback, Icon_Radio_screen);
|
item_callback, Icon_Radio_screen);
|
||||||
#endif
|
#endif
|
||||||
MENUITEM_RETURNVALUE(menu_, ID2P(LANG_SETTINGS_MENU), GO_TO_MAINMENU,
|
MENUITEM_RETURNVALUE(menu_, ID2P(LANG_SETTINGS), GO_TO_MAINMENU,
|
||||||
NULL, Icon_Submenu_Entered);
|
NULL, Icon_Submenu_Entered);
|
||||||
MENUITEM_RETURNVALUE(bookmarks, ID2P(LANG_BOOKMARK_MENU_RECENT_BOOKMARKS),
|
MENUITEM_RETURNVALUE(bookmarks, ID2P(LANG_BOOKMARK_MENU_RECENT_BOOKMARKS),
|
||||||
GO_TO_RECENTBMARKS, item_callback,
|
GO_TO_RECENTBMARKS, item_callback,
|
||||||
|
|
|
@ -398,7 +398,7 @@ static void pitch_screen_draw(struct screen *display, int pitch, int pitch_mode)
|
||||||
|
|
||||||
if (display->nb_lines < 4) /* very small screen, just show the pitch value */
|
if (display->nb_lines < 4) /* very small screen, just show the pitch value */
|
||||||
{
|
{
|
||||||
w = snprintf((char *)buf, sizeof(buf), "%s: %d.%d%%",str(LANG_SYSFONT_PITCH),
|
w = snprintf((char *)buf, sizeof(buf), "%s: %d.%d%%",str(LANG_PITCH),
|
||||||
pitch / 10, pitch % 10 );
|
pitch / 10, pitch % 10 );
|
||||||
display->putsxy((display->width-(w*display->char_width))/2,
|
display->putsxy((display->width-(w*display->char_width))/2,
|
||||||
display->nb_lines/2,buf);
|
display->nb_lines/2,buf);
|
||||||
|
@ -408,9 +408,9 @@ static void pitch_screen_draw(struct screen *display, int pitch, int pitch_mode)
|
||||||
|
|
||||||
/* UP: Pitch Up */
|
/* UP: Pitch Up */
|
||||||
if (pitch_mode == PITCH_MODE_ABSOLUTE) {
|
if (pitch_mode == PITCH_MODE_ABSOLUTE) {
|
||||||
ptr = str(LANG_SYSFONT_PITCH_UP);
|
ptr = str(LANG_PITCH_UP);
|
||||||
} else {
|
} else {
|
||||||
ptr = str(LANG_SYSFONT_PITCH_UP_SEMITONE);
|
ptr = str(LANG_PITCH_UP_SEMITONE);
|
||||||
}
|
}
|
||||||
display->getstringsize(ptr,&w,&h);
|
display->getstringsize(ptr,&w,&h);
|
||||||
display->putsxy((display->width-w)/2, 0, ptr);
|
display->putsxy((display->width-w)/2, 0, ptr);
|
||||||
|
@ -419,9 +419,9 @@ static void pitch_screen_draw(struct screen *display, int pitch, int pitch_mode)
|
||||||
|
|
||||||
/* DOWN: Pitch Down */
|
/* DOWN: Pitch Down */
|
||||||
if (pitch_mode == PITCH_MODE_ABSOLUTE) {
|
if (pitch_mode == PITCH_MODE_ABSOLUTE) {
|
||||||
ptr = str(LANG_SYSFONT_PITCH_DOWN);
|
ptr = str(LANG_PITCH_DOWN);
|
||||||
} else {
|
} else {
|
||||||
ptr = str(LANG_SYSFONT_PITCH_DOWN_SEMITONE);
|
ptr = str(LANG_PITCH_DOWN_SEMITONE);
|
||||||
}
|
}
|
||||||
display->getstringsize(ptr,&w,&h);
|
display->getstringsize(ptr,&w,&h);
|
||||||
display->putsxy((display->width-w)/2, display->height - h, ptr);
|
display->putsxy((display->width-w)/2, display->height - h, ptr);
|
||||||
|
@ -443,7 +443,7 @@ static void pitch_screen_draw(struct screen *display, int pitch, int pitch_mode)
|
||||||
w+1, (display->height-h)/2, 7, 8);
|
w+1, (display->height-h)/2, 7, 8);
|
||||||
|
|
||||||
/* "Pitch" */
|
/* "Pitch" */
|
||||||
snprintf((char *)buf, sizeof(buf), str(LANG_SYSFONT_PITCH));
|
snprintf((char *)buf, sizeof(buf), str(LANG_PITCH));
|
||||||
display->getstringsize(buf,&w,&h);
|
display->getstringsize(buf,&w,&h);
|
||||||
display->putsxy((display->width-w)/2, (display->height/2)-h, buf);
|
display->putsxy((display->width-w)/2, (display->height/2)-h, buf);
|
||||||
/* "XX.X%" */
|
/* "XX.X%" */
|
||||||
|
@ -654,14 +654,14 @@ bool quick_screen_quick(int button_enter)
|
||||||
[1]={ STR(LANG_SYSFONT_ON) }
|
[1]={ STR(LANG_SYSFONT_ON) }
|
||||||
};
|
};
|
||||||
static const struct opt_items bottom_items[] = {
|
static const struct opt_items bottom_items[] = {
|
||||||
[SHOW_ALL]={ STR(LANG_SYSFONT_FILTER_ALL) },
|
[SHOW_ALL]={ STR(LANG_SYSFONT_ALL) },
|
||||||
[SHOW_SUPPORTED]={ STR(LANG_SYSFONT_FILTER_SUPPORTED) },
|
[SHOW_SUPPORTED]={ STR(LANG_SYSFONT_FILTER_SUPPORTED) },
|
||||||
[SHOW_MUSIC]={ STR(LANG_SYSFONT_FILTER_MUSIC) },
|
[SHOW_MUSIC]={ STR(LANG_SYSFONT_FILTER_MUSIC) },
|
||||||
[SHOW_PLAYLIST]={ STR(LANG_SYSFONT_FILTER_PLAYLIST) },
|
[SHOW_PLAYLIST]={ STR(LANG_SYSFONT_FILTER_PLAYLIST) },
|
||||||
};
|
};
|
||||||
static const struct opt_items right_items[] = {
|
static const struct opt_items right_items[] = {
|
||||||
[REPEAT_OFF]={ STR(LANG_SYSFONT_OFF) },
|
[REPEAT_OFF]={ STR(LANG_SYSFONT_OFF) },
|
||||||
[REPEAT_ALL]={ STR(LANG_SYSFONT_REPEAT_ALL) },
|
[REPEAT_ALL]={ STR(LANG_SYSFONT_ALL) },
|
||||||
[REPEAT_ONE]={ STR(LANG_SYSFONT_REPEAT_ONE) },
|
[REPEAT_ONE]={ STR(LANG_SYSFONT_REPEAT_ONE) },
|
||||||
[REPEAT_SHUFFLE]={ STR(LANG_SYSFONT_SHUFFLE) },
|
[REPEAT_SHUFFLE]={ STR(LANG_SYSFONT_SHUFFLE) },
|
||||||
#ifdef AB_REPEAT_ENABLE
|
#ifdef AB_REPEAT_ENABLE
|
||||||
|
@ -1014,7 +1014,7 @@ bool set_time_screen(const char* title, struct tm *tm)
|
||||||
|
|
||||||
/* print help text */
|
/* print help text */
|
||||||
if (screens[s].nb_lines > 4)
|
if (screens[s].nb_lines > 4)
|
||||||
screens[s].puts(0, 4, str(LANG_TIME_SET));
|
screens[s].puts(0, 4, str(LANG_TIME_SET_BUTTON));
|
||||||
if (screens[s].nb_lines > 5)
|
if (screens[s].nb_lines > 5)
|
||||||
screens[s].puts(0, 5, str(LANG_TIME_REVERT));
|
screens[s].puts(0, 5, str(LANG_TIME_REVERT));
|
||||||
screens[s].update();
|
screens[s].update();
|
||||||
|
|
|
@ -536,11 +536,11 @@ int settings_save( void )
|
||||||
{
|
{
|
||||||
screens[i].clear_display();
|
screens[i].clear_display();
|
||||||
#ifdef HAVE_LCD_CHARCELLS
|
#ifdef HAVE_LCD_CHARCELLS
|
||||||
screens[i].puts(0, 0, str(LANG_SETTINGS_SAVE_PLAYER));
|
screens[i].puts(0, 0, str(LANG_SETTINGS_SAVE_FAILED));
|
||||||
screens[i].puts(0, 1, str(LANG_SETTINGS_BATTERY_PLAYER));
|
screens[i].puts(0, 1, str(LANG_SETTINGS_PARTITION));
|
||||||
#else
|
#else
|
||||||
screens[i].puts(4, 2, str(LANG_SETTINGS_SAVE_RECORDER));
|
screens[i].puts(4, 2, str(LANG_SETTINGS_SAVE_FAILED));
|
||||||
screens[i].puts(2, 4, str(LANG_SETTINGS_BATTERY_RECORDER));
|
screens[i].puts(2, 4, str(LANG_SETTINGS_PARTITION));
|
||||||
screens[i].update();
|
screens[i].update();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -575,7 +575,7 @@ bool settings_save_config(int options)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
gui_syncsplash(HZ, str(LANG_MENU_SETTING_CANCEL));
|
gui_syncsplash(HZ, str(LANG_CANCEL));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -387,8 +387,8 @@ const struct settings_list settings[] = {
|
||||||
OFFON_SETTING(0, superbass, LANG_SUPERBASS, false, "superbass", set_superbass),
|
OFFON_SETTING(0, superbass, LANG_SUPERBASS, false, "superbass", set_superbass),
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CHOICE_SETTING(0,channel_config,LANG_CHANNEL,0,"channels",
|
CHOICE_SETTING(0,channel_config,LANG_CHANNEL_CONFIGURATION,0,"channels",
|
||||||
"stereo,mono,custom,mono left,mono right,karaoke",
|
"stereo,mono,custom,mono left,mono right,karaoke",
|
||||||
sound_set_channels,
|
sound_set_channels,
|
||||||
6, ID2P(LANG_CHANNEL_STEREO), ID2P(LANG_CHANNEL_MONO),
|
6, ID2P(LANG_CHANNEL_STEREO), ID2P(LANG_CHANNEL_MONO),
|
||||||
ID2P(LANG_CHANNEL_CUSTOM), ID2P(LANG_CHANNEL_LEFT),
|
ID2P(LANG_CHANNEL_CUSTOM), ID2P(LANG_CHANNEL_LEFT),
|
||||||
|
@ -412,7 +412,7 @@ const struct settings_list settings[] = {
|
||||||
#else
|
#else
|
||||||
4,
|
4,
|
||||||
#endif
|
#endif
|
||||||
ID2P(LANG_OFF), ID2P(LANG_REPEAT_ALL), ID2P(LANG_REPEAT_ONE), ID2P(LANG_SHUFFLE)
|
ID2P(LANG_OFF), ID2P(LANG_ALL), ID2P(LANG_REPEAT_ONE), ID2P(LANG_SHUFFLE)
|
||||||
#ifdef AB_REPEAT_ENABLE
|
#ifdef AB_REPEAT_ENABLE
|
||||||
,ID2P(LANG_REPEAT_AB)
|
,ID2P(LANG_REPEAT_AB)
|
||||||
#endif
|
#endif
|
||||||
|
@ -440,9 +440,13 @@ const struct settings_list settings[] = {
|
||||||
#endif
|
#endif
|
||||||
#endif /* HAVE_BACKLIGHT */
|
#endif /* HAVE_BACKLIGHT */
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
|
#ifdef HAVE_LCD_INVERT
|
||||||
BOOL_SETTING(0, invert, LANG_INVERT, false ,"invert", off_on,
|
BOOL_SETTING(0, invert, LANG_INVERT, false ,"invert", off_on,
|
||||||
LANG_INVERT_LCD_INVERSE, LANG_INVERT_LCD_NORMAL, lcd_set_invert_display),
|
LANG_INVERT_LCD_INVERSE, LANG_NORMAL, lcd_set_invert_display),
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_LCD_FLIP
|
||||||
OFFON_SETTING(0,flip_display, LANG_FLIP_DISPLAY, false,"flip display", NULL),
|
OFFON_SETTING(0,flip_display, LANG_FLIP_DISPLAY, false,"flip display", NULL),
|
||||||
|
#endif
|
||||||
/* display */
|
/* display */
|
||||||
BOOL_SETTING(F_TEMPVAR, invert_cursor, LANG_INVERT_CURSOR, true ,"invert cursor", off_on,
|
BOOL_SETTING(F_TEMPVAR, invert_cursor, LANG_INVERT_CURSOR, true ,"invert cursor", off_on,
|
||||||
LANG_INVERT_CURSOR_BAR, LANG_INVERT_CURSOR_POINTER, NULL),
|
LANG_INVERT_CURSOR_BAR, LANG_INVERT_CURSOR_POINTER, NULL),
|
||||||
|
@ -458,9 +462,11 @@ const struct settings_list settings[] = {
|
||||||
CHOICE_SETTING(0, battery_display, LANG_BATTERY_DISPLAY, 0,
|
CHOICE_SETTING(0, battery_display, LANG_BATTERY_DISPLAY, 0,
|
||||||
"battery display", graphic_numeric, NULL, 2,
|
"battery display", graphic_numeric, NULL, 2,
|
||||||
ID2P(LANG_DISPLAY_GRAPHIC), ID2P(LANG_DISPLAY_NUMERIC)),
|
ID2P(LANG_DISPLAY_GRAPHIC), ID2P(LANG_DISPLAY_NUMERIC)),
|
||||||
|
#if CONFIG_RTC
|
||||||
CHOICE_SETTING(0, timeformat, LANG_TIMEFORMAT, 0,
|
CHOICE_SETTING(0, timeformat, LANG_TIMEFORMAT, 0,
|
||||||
"time format", "24hour,12hour", NULL, 2,
|
"time format", "24hour,12hour", NULL, 2,
|
||||||
ID2P(LANG_24_HOUR_CLOCK), ID2P(LANG_12_HOUR_CLOCK)),
|
ID2P(LANG_24_HOUR_CLOCK), ID2P(LANG_12_HOUR_CLOCK)),
|
||||||
|
#endif
|
||||||
#endif /* HAVE_LCD_BITMAP */
|
#endif /* HAVE_LCD_BITMAP */
|
||||||
OFFON_SETTING(0,show_icons, LANG_SHOW_ICONS ,true,"show icons", NULL),
|
OFFON_SETTING(0,show_icons, LANG_SHOW_ICONS ,true,"show icons", NULL),
|
||||||
/* system */
|
/* system */
|
||||||
|
@ -515,7 +521,7 @@ const struct settings_list settings[] = {
|
||||||
"remote contrast", UNIT_INT, MIN_REMOTE_CONTRAST_SETTING,
|
"remote contrast", UNIT_INT, MIN_REMOTE_CONTRAST_SETTING,
|
||||||
MAX_REMOTE_CONTRAST_SETTING, 1, NULL, NULL, lcd_remote_set_contrast),
|
MAX_REMOTE_CONTRAST_SETTING, 1, NULL, NULL, lcd_remote_set_contrast),
|
||||||
BOOL_SETTING(0, remote_invert, LANG_INVERT, false ,"remote invert", off_on,
|
BOOL_SETTING(0, remote_invert, LANG_INVERT, false ,"remote invert", off_on,
|
||||||
LANG_INVERT_LCD_INVERSE, LANG_INVERT_LCD_NORMAL, lcd_remote_set_invert_display),
|
LANG_INVERT_LCD_INVERSE, LANG_NORMAL, lcd_remote_set_invert_display),
|
||||||
OFFON_SETTING(0,remote_flip_display, LANG_FLIP_DISPLAY,
|
OFFON_SETTING(0,remote_flip_display, LANG_FLIP_DISPLAY,
|
||||||
false,"remote flip display", NULL),
|
false,"remote flip display", NULL),
|
||||||
INT_SETTING_W_CFGVALS(F_FLIPLIST, remote_backlight_timeout, LANG_BACKLIGHT, 6,
|
INT_SETTING_W_CFGVALS(F_FLIPLIST, remote_backlight_timeout, LANG_BACKLIGHT, 6,
|
||||||
|
@ -640,8 +646,8 @@ const struct settings_list settings[] = {
|
||||||
#endif /* HAVE_FLASH_STORAGE */
|
#endif /* HAVE_FLASH_STORAGE */
|
||||||
/* browser */
|
/* browser */
|
||||||
CHOICE_SETTING(0, dirfilter, LANG_FILTER, SHOW_SUPPORTED, "show files",
|
CHOICE_SETTING(0, dirfilter, LANG_FILTER, SHOW_SUPPORTED, "show files",
|
||||||
"all,supported,music,playlists", NULL, 4, ID2P(LANG_FILTER_ALL),
|
"all,supported,music,playlists", NULL, 4, ID2P(LANG_ALL),
|
||||||
ID2P(LANG_FILTER_SUPPORTED), ID2P(LANG_FILTER_MUSIC), ID2P(LANG_FILTER_PLAYLIST)),
|
ID2P(LANG_FILTER_SUPPORTED), ID2P(LANG_FILTER_MUSIC), ID2P(LANG_PLAYLISTS)),
|
||||||
OFFON_SETTING(0,sort_case,LANG_SORT_CASE,false,"sort case",NULL),
|
OFFON_SETTING(0,sort_case,LANG_SORT_CASE,false,"sort case",NULL),
|
||||||
OFFON_SETTING(0,browse_current,LANG_FOLLOW,false,"follow playlist",NULL),
|
OFFON_SETTING(0,browse_current,LANG_FOLLOW,false,"follow playlist",NULL),
|
||||||
OFFON_SETTING(0,playlist_viewer_icons,LANG_SHOW_ICONS,true,
|
OFFON_SETTING(0,playlist_viewer_icons,LANG_SHOW_ICONS,true,
|
||||||
|
@ -653,17 +659,17 @@ const struct settings_list settings[] = {
|
||||||
ID2P(LANG_DISPLAY_TRACK_NAME_ONLY), ID2P(LANG_DISPLAY_FULL_PATH)),
|
ID2P(LANG_DISPLAY_TRACK_NAME_ONLY), ID2P(LANG_DISPLAY_FULL_PATH)),
|
||||||
CHOICE_SETTING(0, recursive_dir_insert, LANG_RECURSE_DIRECTORY , RECURSE_OFF,
|
CHOICE_SETTING(0, recursive_dir_insert, LANG_RECURSE_DIRECTORY , RECURSE_OFF,
|
||||||
"recursive directory insert", off_on_ask, NULL , 3 ,
|
"recursive directory insert", off_on_ask, NULL , 3 ,
|
||||||
ID2P(LANG_OFF), ID2P(LANG_ON), ID2P(LANG_RESUME_SETTING_ASK)),
|
ID2P(LANG_OFF), ID2P(LANG_ON), ID2P(LANG_ASK)),
|
||||||
/* bookmarks */
|
/* bookmarks */
|
||||||
CHOICE_SETTING(0, autocreatebookmark, LANG_BOOKMARK_SETTINGS_AUTOCREATE,
|
CHOICE_SETTING(0, autocreatebookmark, LANG_BOOKMARK_SETTINGS_AUTOCREATE,
|
||||||
BOOKMARK_NO, "autocreate bookmarks",
|
BOOKMARK_NO, "autocreate bookmarks",
|
||||||
"off,on,ask,recent only - on,recent only - ask", NULL, 5,
|
"off,on,ask,recent only - on,recent only - ask", NULL, 5,
|
||||||
ID2P(LANG_SET_BOOL_NO), ID2P(LANG_SET_BOOL_YES),
|
ID2P(LANG_SET_BOOL_NO), ID2P(LANG_SET_BOOL_YES),
|
||||||
ID2P(LANG_RESUME_SETTING_ASK), ID2P(LANG_BOOKMARK_SETTINGS_RECENT_ONLY_YES),
|
ID2P(LANG_ASK), ID2P(LANG_BOOKMARK_SETTINGS_RECENT_ONLY_YES),
|
||||||
ID2P(LANG_BOOKMARK_SETTINGS_RECENT_ONLY_ASK)),
|
ID2P(LANG_BOOKMARK_SETTINGS_RECENT_ONLY_ASK)),
|
||||||
CHOICE_SETTING(0, autoloadbookmark, LANG_BOOKMARK_SETTINGS_AUTOLOAD,
|
CHOICE_SETTING(0, autoloadbookmark, LANG_BOOKMARK_SETTINGS_AUTOLOAD,
|
||||||
BOOKMARK_NO, "autoload bookmarks", off_on_ask, NULL, 3,
|
BOOKMARK_NO, "autoload bookmarks", off_on_ask, NULL, 3,
|
||||||
ID2P(LANG_SET_BOOL_NO), ID2P(LANG_SET_BOOL_YES), ID2P(LANG_RESUME_SETTING_ASK)),
|
ID2P(LANG_SET_BOOL_NO), ID2P(LANG_SET_BOOL_YES), ID2P(LANG_ASK)),
|
||||||
CHOICE_SETTING(0, usemrb, LANG_BOOKMARK_SETTINGS_MAINTAIN_RECENT_BOOKMARKS,
|
CHOICE_SETTING(0, usemrb, LANG_BOOKMARK_SETTINGS_MAINTAIN_RECENT_BOOKMARKS,
|
||||||
BOOKMARK_NO, "use most-recent-bookmarks", "off,on,unique only", NULL, 3,
|
BOOKMARK_NO, "use most-recent-bookmarks", "off,on,unique only", NULL, 3,
|
||||||
ID2P(LANG_SET_BOOL_NO), ID2P(LANG_SET_BOOL_YES),
|
ID2P(LANG_SET_BOOL_NO), ID2P(LANG_SET_BOOL_YES),
|
||||||
|
@ -764,14 +770,14 @@ const struct settings_list settings[] = {
|
||||||
TALK_ID(512, UNIT_MB), TALK_ID(650, UNIT_MB), TALK_ID(700, UNIT_MB),
|
TALK_ID(512, UNIT_MB), TALK_ID(650, UNIT_MB), TALK_ID(700, UNIT_MB),
|
||||||
TALK_ID(1024, UNIT_MB), TALK_ID(1536, UNIT_MB), TALK_ID(1792, UNIT_MB)),
|
TALK_ID(1024, UNIT_MB), TALK_ID(1536, UNIT_MB), TALK_ID(1792, UNIT_MB)),
|
||||||
{F_T_INT|F_RECSETTING, &global_settings.rec_channels,
|
{F_T_INT|F_RECSETTING, &global_settings.rec_channels,
|
||||||
LANG_RECORDING_CHANNELS, INT(0),
|
LANG_CHANNELS, INT(0),
|
||||||
"rec channels","stereo,mono",UNUSED},
|
"rec channels","stereo,mono",UNUSED},
|
||||||
CHOICE_SETTING(F_RECSETTING, rec_split_type, LANG_SPLIT_TYPE, 0 ,
|
CHOICE_SETTING(F_RECSETTING, rec_split_type, LANG_SPLIT_TYPE, 0 ,
|
||||||
"rec split type", "Split, Stop", NULL, 2,
|
"rec split type", "Split, Stop", NULL, 2,
|
||||||
ID2P(LANG_START_NEW_FILE), ID2P(LANG_STOP_RECORDING)),
|
ID2P(LANG_START_NEW_FILE), ID2P(LANG_STOP_RECORDING)),
|
||||||
CHOICE_SETTING(F_RECSETTING, rec_split_method, LANG_SPLIT_MEASURE, 0 ,
|
CHOICE_SETTING(F_RECSETTING, rec_split_method, LANG_SPLIT_MEASURE, 0 ,
|
||||||
"rec split method", "Time,Filesize", NULL, 2,
|
"rec split method", "Time,Filesize", NULL, 2,
|
||||||
ID2P(LANG_REC_TIME), ID2P(LANG_REC_SIZE)),
|
ID2P(LANG_TIME), ID2P(LANG_REC_SIZE)),
|
||||||
{F_T_INT|F_RECSETTING, &global_settings.rec_source,
|
{F_T_INT|F_RECSETTING, &global_settings.rec_source,
|
||||||
LANG_RECORDING_SOURCE, INT(0),
|
LANG_RECORDING_SOURCE, INT(0),
|
||||||
"rec source",
|
"rec source",
|
||||||
|
@ -790,13 +796,10 @@ const struct settings_list settings[] = {
|
||||||
CHOICE_SETTING(F_RECSETTING, cliplight, LANG_CLIP_LIGHT, 0 ,
|
CHOICE_SETTING(F_RECSETTING, cliplight, LANG_CLIP_LIGHT, 0 ,
|
||||||
"cliplight", "off,main,both,remote", NULL,
|
"cliplight", "off,main,both,remote", NULL,
|
||||||
#ifdef HAVE_REMOTE_LCD
|
#ifdef HAVE_REMOTE_LCD
|
||||||
4,
|
4, ID2P(LANG_OFF), ID2P(LANG_MAIN_UNIT), ID2P(LANG_REMOTE_MAIN),
|
||||||
|
ID2P(LANG_REMOTE_UNIT)
|
||||||
#else
|
#else
|
||||||
2,
|
2, ID2P(LANG_OFF), ID2P(LANG_ON)
|
||||||
#endif
|
|
||||||
ID2P(LANG_OFF), ID2P(LANG_MAIN_UNIT)
|
|
||||||
#ifdef HAVE_REMOTE_LCD
|
|
||||||
, ID2P(LANG_REMOTE_MAIN), ID2P(LANG_REMOTE_UNIT)
|
|
||||||
#endif
|
#endif
|
||||||
),
|
),
|
||||||
{F_T_INT|F_RECSETTING,&global_settings.cliplight,LANG_CLIP_LIGHT,INT(0),
|
{F_T_INT|F_RECSETTING,&global_settings.cliplight,LANG_CLIP_LIGHT,INT(0),
|
||||||
|
@ -804,7 +807,7 @@ const struct settings_list settings[] = {
|
||||||
#endif
|
#endif
|
||||||
#ifdef DEFAULT_REC_MIC_GAIN
|
#ifdef DEFAULT_REC_MIC_GAIN
|
||||||
{F_T_INT|F_RECSETTING,&global_settings.rec_mic_gain,
|
{F_T_INT|F_RECSETTING,&global_settings.rec_mic_gain,
|
||||||
LANG_RECORDING_GAIN,INT(DEFAULT_REC_MIC_GAIN),
|
LANG_GAIN,INT(DEFAULT_REC_MIC_GAIN),
|
||||||
"rec mic gain",NULL,UNUSED},
|
"rec mic gain",NULL,UNUSED},
|
||||||
#endif /* DEFAULT_REC_MIC_GAIN */
|
#endif /* DEFAULT_REC_MIC_GAIN */
|
||||||
#ifdef DEFAULT_REC_LEFT_GAIN
|
#ifdef DEFAULT_REC_LEFT_GAIN
|
||||||
|
@ -855,16 +858,16 @@ const struct settings_list settings[] = {
|
||||||
LANG_RECORD_STOP_THRESHOLD,INT(-45),
|
LANG_RECORD_STOP_THRESHOLD,INT(-45),
|
||||||
"trigger stop threshold",NULL,UNUSED},
|
"trigger stop threshold",NULL,UNUSED},
|
||||||
{F_T_INT|F_RECSETTING,&global_settings.rec_start_duration,
|
{F_T_INT|F_RECSETTING,&global_settings.rec_start_duration,
|
||||||
LANG_RECORD_MIN_DURATION,INT(0),
|
LANG_MIN_DURATION,INT(0),
|
||||||
"trigger start duration",trig_durations_conf,UNUSED},
|
"trigger start duration",trig_durations_conf,UNUSED},
|
||||||
{F_T_INT|F_RECSETTING,&global_settings.rec_stop_postrec,
|
{F_T_INT|F_RECSETTING,&global_settings.rec_stop_postrec,
|
||||||
LANG_RECORD_STOP_POSTREC,INT(2),
|
LANG_MIN_DURATION,INT(2),
|
||||||
"trigger stop postrec",trig_durations_conf,UNUSED},
|
"trigger stop postrec",trig_durations_conf,UNUSED},
|
||||||
{F_T_INT|F_RECSETTING,&global_settings.rec_stop_gap,
|
{F_T_INT|F_RECSETTING,&global_settings.rec_stop_gap,
|
||||||
LANG_RECORD_STOP_GAP,INT(1),
|
LANG_RECORD_STOP_GAP,INT(1),
|
||||||
"trigger min gap",trig_durations_conf,UNUSED},
|
"trigger min gap",trig_durations_conf,UNUSED},
|
||||||
{F_T_INT|F_RECSETTING,&global_settings.rec_trigger_mode,
|
{F_T_INT|F_RECSETTING,&global_settings.rec_trigger_mode,
|
||||||
LANG_RECORD_TRIGGER_MODE,INT(0),
|
LANG_RECORD_TRIGGER,INT(0),
|
||||||
"trigger mode","off,once,repeat",UNUSED},
|
"trigger mode","off,once,repeat",UNUSED},
|
||||||
#endif /* HAVE_RECORDING */
|
#endif /* HAVE_RECORDING */
|
||||||
|
|
||||||
|
@ -961,19 +964,19 @@ const struct settings_list settings[] = {
|
||||||
UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP,
|
UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP,
|
||||||
eq_q_format, NULL, NULL),
|
eq_q_format, NULL, NULL),
|
||||||
/* -240..240 (or -24db to +24db) */
|
/* -240..240 (or -24db to +24db) */
|
||||||
INT_SETTING(0, eq_band0_gain, LANG_EQUALIZER_BAND_GAIN, 0, "eq band 0 gain",
|
INT_SETTING(0, eq_band0_gain, LANG_GAIN, 0, "eq band 0 gain",
|
||||||
UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, EQ_GAIN_STEP,
|
UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, EQ_GAIN_STEP,
|
||||||
eq_gain_format, NULL, NULL),
|
eq_gain_format, NULL, NULL),
|
||||||
INT_SETTING(0, eq_band1_gain, LANG_EQUALIZER_BAND_GAIN, 0, "eq band 1 gain",
|
INT_SETTING(0, eq_band1_gain, LANG_GAIN, 0, "eq band 1 gain",
|
||||||
UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, EQ_GAIN_STEP,
|
UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, EQ_GAIN_STEP,
|
||||||
eq_gain_format, NULL, NULL),
|
eq_gain_format, NULL, NULL),
|
||||||
INT_SETTING(0, eq_band2_gain, LANG_EQUALIZER_BAND_GAIN, 0, "eq band 2 gain",
|
INT_SETTING(0, eq_band2_gain, LANG_GAIN, 0, "eq band 2 gain",
|
||||||
UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, EQ_GAIN_STEP,
|
UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, EQ_GAIN_STEP,
|
||||||
eq_gain_format, NULL, NULL),
|
eq_gain_format, NULL, NULL),
|
||||||
INT_SETTING(0, eq_band3_gain, LANG_EQUALIZER_BAND_GAIN, 0, "eq band 3 gain",
|
INT_SETTING(0, eq_band3_gain, LANG_GAIN, 0, "eq band 3 gain",
|
||||||
UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, EQ_GAIN_STEP,
|
UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, EQ_GAIN_STEP,
|
||||||
eq_gain_format, NULL, NULL),
|
eq_gain_format, NULL, NULL),
|
||||||
INT_SETTING(0, eq_band4_gain, LANG_EQUALIZER_BAND_GAIN, 0, "eq band 4 gain",
|
INT_SETTING(0, eq_band4_gain, LANG_GAIN, 0, "eq band 4 gain",
|
||||||
UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, EQ_GAIN_STEP,
|
UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, EQ_GAIN_STEP,
|
||||||
eq_gain_format, NULL, NULL),
|
eq_gain_format, NULL, NULL),
|
||||||
|
|
||||||
|
@ -993,9 +996,10 @@ const struct settings_list settings[] = {
|
||||||
OFFON_SETTING(0,tagcache_autoupdate,
|
OFFON_SETTING(0,tagcache_autoupdate,
|
||||||
LANG_TAGCACHE_AUTOUPDATE,false,"tagcache_autoupdate",NULL),
|
LANG_TAGCACHE_AUTOUPDATE,false,"tagcache_autoupdate",NULL),
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_LCD_BITMAP
|
|
||||||
CHOICE_SETTING(0, default_codepage, LANG_DEFAULT_CODEPAGE, 0,
|
CHOICE_SETTING(0, default_codepage, LANG_DEFAULT_CODEPAGE, 0,
|
||||||
"default codepage", /* The order must match with that in unicode.c */
|
"default codepage",
|
||||||
|
#ifdef HAVE_LCD_BITMAP
|
||||||
|
/* The order must match with that in unicode.c */
|
||||||
"iso8859-1,iso8859-7,iso8859-8,cp1251,iso8859-11,cp1256,"
|
"iso8859-1,iso8859-7,iso8859-8,cp1251,iso8859-11,cp1256,"
|
||||||
"iso8859-9,iso8859-2,sjis,gb2312,ksx1001,big5,utf-8",
|
"iso8859-9,iso8859-2,sjis,gb2312,ksx1001,big5,utf-8",
|
||||||
set_codepage, 13,
|
set_codepage, 13,
|
||||||
|
@ -1007,15 +1011,13 @@ const struct settings_list settings[] = {
|
||||||
ID2P(LANG_CODEPAGE_KOREAN), ID2P(LANG_CODEPAGE_TRADITIONAL),
|
ID2P(LANG_CODEPAGE_KOREAN), ID2P(LANG_CODEPAGE_TRADITIONAL),
|
||||||
ID2P(LANG_CODEPAGE_UTF8)),
|
ID2P(LANG_CODEPAGE_UTF8)),
|
||||||
#else /* !HAVE_LCD_BITMAP */
|
#else /* !HAVE_LCD_BITMAP */
|
||||||
CHOICE_SETTING(0, default_codepage, LANG_DEFAULT_CODEPAGE, 0,
|
/* The order must match with that in unicode.c */
|
||||||
"default codepage", /* The order must match with that in unicode.c */
|
|
||||||
"iso8859-1,iso8859-7,cp1251,iso8859-9,iso8859-2,utf-8",
|
"iso8859-1,iso8859-7,cp1251,iso8859-9,iso8859-2,utf-8",
|
||||||
set_codepage, 6,
|
set_codepage, 6,
|
||||||
ID2P(LANG_CODEPAGE_LATIN1), ID2P(LANG_CODEPAGE_GREEK),
|
ID2P(LANG_CODEPAGE_LATIN1), ID2P(LANG_CODEPAGE_GREEK),
|
||||||
ID2P(LANG_CODEPAGE_CYRILLIC), ID2P(LANG_CODEPAGE_TURKISH),
|
ID2P(LANG_CODEPAGE_CYRILLIC), ID2P(LANG_CODEPAGE_TURKISH),
|
||||||
ID2P(LANG_CODEPAGE_LATIN_EXTENDED), ID2P(LANG_CODEPAGE_UTF8)),
|
ID2P(LANG_CODEPAGE_LATIN_EXTENDED), ID2P(LANG_CODEPAGE_UTF8)),
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
OFFON_SETTING(0,warnon_erase_dynplaylist,
|
OFFON_SETTING(0,warnon_erase_dynplaylist,
|
||||||
LANG_WARN_ERASEDYNPLAYLIST_MENU,false,
|
LANG_WARN_ERASEDYNPLAYLIST_MENU,false,
|
||||||
"warn when erasing dynamic playlist",NULL),
|
"warn when erasing dynamic playlist",NULL),
|
||||||
|
@ -1025,7 +1027,7 @@ const struct settings_list settings[] = {
|
||||||
CHOICE_SETTING(0, backlight_on_button_hold,
|
CHOICE_SETTING(0, backlight_on_button_hold,
|
||||||
LANG_BACKLIGHT_ON_BUTTON_HOLD, 0, "backlight on button hold",
|
LANG_BACKLIGHT_ON_BUTTON_HOLD, 0, "backlight on button hold",
|
||||||
"normal,off,on", backlight_set_on_button_hold, 3,
|
"normal,off,on", backlight_set_on_button_hold, 3,
|
||||||
ID2P(LANG_BACKLIGHT_ON_BUTTON_HOLD_NORMAL), ID2P(LANG_OFF), ID2P(LANG_ON)),
|
ID2P(LANG_NORMAL), ID2P(LANG_OFF), ID2P(LANG_ON)),
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_LCD_SLEEP
|
#ifdef HAVE_LCD_SLEEP
|
||||||
|
@ -1047,7 +1049,7 @@ const struct settings_list settings[] = {
|
||||||
"eq hardware band 0 cutoff", "80Hz,105Hz,135Hz,175Hz", NULL, 4,
|
"eq hardware band 0 cutoff", "80Hz,105Hz,135Hz,175Hz", NULL, 4,
|
||||||
TALK_ID(80, UNIT_HERTZ), TALK_ID(105, UNIT_HERTZ),
|
TALK_ID(80, UNIT_HERTZ), TALK_ID(105, UNIT_HERTZ),
|
||||||
TALK_ID(135, UNIT_HERTZ), TALK_ID(175, UNIT_HERTZ)),
|
TALK_ID(135, UNIT_HERTZ), TALK_ID(175, UNIT_HERTZ)),
|
||||||
INT_SETTING(0, eq_hw_band0_gain, LANG_EQUALIZER_BAND_GAIN, 0,
|
INT_SETTING(0, eq_hw_band0_gain, LANG_GAIN, 0,
|
||||||
"eq hardware band 0 gain", UNIT_DB, EQ_HW_GAIN_MIN,
|
"eq hardware band 0 gain", UNIT_DB, EQ_HW_GAIN_MIN,
|
||||||
EQ_HW_GAIN_MAX, EQ_HW_GAIN_STEP, eq_hw_gain_format, NULL, NULL),
|
EQ_HW_GAIN_MAX, EQ_HW_GAIN_STEP, eq_hw_gain_format, NULL, NULL),
|
||||||
|
|
||||||
|
@ -1059,7 +1061,7 @@ const struct settings_list settings[] = {
|
||||||
"eq hardware band 1 bandwidth", "narrow,wide", NULL, 2,
|
"eq hardware band 1 bandwidth", "narrow,wide", NULL, 2,
|
||||||
ID2P(LANG_EQUALIZER_HARDWARE_BANDWIDTH_NARROW),
|
ID2P(LANG_EQUALIZER_HARDWARE_BANDWIDTH_NARROW),
|
||||||
ID2P(LANG_EQUALIZER_HARDWARE_BANDWIDTH_WIDE)),
|
ID2P(LANG_EQUALIZER_HARDWARE_BANDWIDTH_WIDE)),
|
||||||
INT_SETTING(0, eq_hw_band1_gain, LANG_EQUALIZER_BAND_GAIN, 0,
|
INT_SETTING(0, eq_hw_band1_gain, LANG_GAIN, 0,
|
||||||
"eq hardware band 1 gain", UNIT_DB, EQ_HW_GAIN_MIN,
|
"eq hardware band 1 gain", UNIT_DB, EQ_HW_GAIN_MIN,
|
||||||
EQ_HW_GAIN_MAX, EQ_HW_GAIN_STEP, eq_hw_gain_format, NULL, NULL),
|
EQ_HW_GAIN_MAX, EQ_HW_GAIN_STEP, eq_hw_gain_format, NULL, NULL),
|
||||||
|
|
||||||
|
@ -1071,7 +1073,7 @@ const struct settings_list settings[] = {
|
||||||
"eq hardware band 2 bandwidth", "narrow,wide", NULL, 2,
|
"eq hardware band 2 bandwidth", "narrow,wide", NULL, 2,
|
||||||
ID2P(LANG_EQUALIZER_HARDWARE_BANDWIDTH_NARROW),
|
ID2P(LANG_EQUALIZER_HARDWARE_BANDWIDTH_NARROW),
|
||||||
ID2P(LANG_EQUALIZER_HARDWARE_BANDWIDTH_WIDE)),
|
ID2P(LANG_EQUALIZER_HARDWARE_BANDWIDTH_WIDE)),
|
||||||
INT_SETTING(0, eq_hw_band2_gain, LANG_EQUALIZER_BAND_GAIN, 0,
|
INT_SETTING(0, eq_hw_band2_gain, LANG_GAIN, 0,
|
||||||
"eq hardware band 2 gain", UNIT_DB, EQ_HW_GAIN_MIN,
|
"eq hardware band 2 gain", UNIT_DB, EQ_HW_GAIN_MIN,
|
||||||
EQ_HW_GAIN_MAX, EQ_HW_GAIN_STEP, eq_hw_gain_format, NULL, NULL),
|
EQ_HW_GAIN_MAX, EQ_HW_GAIN_STEP, eq_hw_gain_format, NULL, NULL),
|
||||||
|
|
||||||
|
@ -1083,7 +1085,7 @@ const struct settings_list settings[] = {
|
||||||
"eq hardware band 3 bandwidth", "narrow,wide", NULL, 2,
|
"eq hardware band 3 bandwidth", "narrow,wide", NULL, 2,
|
||||||
ID2P(LANG_EQUALIZER_HARDWARE_BANDWIDTH_NARROW),
|
ID2P(LANG_EQUALIZER_HARDWARE_BANDWIDTH_NARROW),
|
||||||
ID2P(LANG_EQUALIZER_HARDWARE_BANDWIDTH_WIDE)),
|
ID2P(LANG_EQUALIZER_HARDWARE_BANDWIDTH_WIDE)),
|
||||||
INT_SETTING(0, eq_hw_band3_gain, LANG_EQUALIZER_BAND_GAIN, 0,
|
INT_SETTING(0, eq_hw_band3_gain, LANG_GAIN, 0,
|
||||||
"eq hardware band 3 gain", UNIT_DB, EQ_HW_GAIN_MIN,
|
"eq hardware band 3 gain", UNIT_DB, EQ_HW_GAIN_MIN,
|
||||||
EQ_HW_GAIN_MAX, EQ_HW_GAIN_STEP, eq_hw_gain_format, NULL, NULL),
|
EQ_HW_GAIN_MAX, EQ_HW_GAIN_STEP, eq_hw_gain_format, NULL, NULL),
|
||||||
|
|
||||||
|
@ -1091,7 +1093,7 @@ const struct settings_list settings[] = {
|
||||||
"eq hardware band 4 cutoff", "5.3kHz,6.9kHz,9kHz,11.7kHz", NULL, 4,
|
"eq hardware band 4 cutoff", "5.3kHz,6.9kHz,9kHz,11.7kHz", NULL, 4,
|
||||||
TALK_ID(5300, UNIT_HERTZ), TALK_ID(6900, UNIT_HERTZ),
|
TALK_ID(5300, UNIT_HERTZ), TALK_ID(6900, UNIT_HERTZ),
|
||||||
TALK_ID(9000, UNIT_HERTZ), TALK_ID(11700, UNIT_HERTZ)),
|
TALK_ID(9000, UNIT_HERTZ), TALK_ID(11700, UNIT_HERTZ)),
|
||||||
INT_SETTING(0, eq_hw_band4_gain, LANG_EQUALIZER_BAND_GAIN, 0,
|
INT_SETTING(0, eq_hw_band4_gain, LANG_GAIN, 0,
|
||||||
"eq hardware band 4 gain", UNIT_DB, EQ_HW_GAIN_MIN,
|
"eq hardware band 4 gain", UNIT_DB, EQ_HW_GAIN_MIN,
|
||||||
EQ_HW_GAIN_MAX, EQ_HW_GAIN_STEP, eq_hw_gain_format, NULL, NULL),
|
EQ_HW_GAIN_MAX, EQ_HW_GAIN_STEP, eq_hw_gain_format, NULL, NULL),
|
||||||
#endif
|
#endif
|
||||||
|
@ -1100,7 +1102,7 @@ const struct settings_list settings[] = {
|
||||||
"hold_lr_for_scroll_in_list",NULL),
|
"hold_lr_for_scroll_in_list",NULL),
|
||||||
CHOICE_SETTING(0, show_path_in_browser, LANG_SHOW_PATH, SHOW_PATH_OFF,
|
CHOICE_SETTING(0, show_path_in_browser, LANG_SHOW_PATH, SHOW_PATH_OFF,
|
||||||
"show path in browser", "off,current directory,full path", NULL, 3,
|
"show path in browser", "off,current directory,full path", NULL, 3,
|
||||||
ID2P(LANG_OFF), ID2P(LANG_SHOW_PATH_CURRENT), ID2P(LANG_SHOW_PATH_FULL)),
|
ID2P(LANG_OFF), ID2P(LANG_SHOW_PATH_CURRENT), ID2P(LANG_DISPLAY_FULL_PATH)),
|
||||||
|
|
||||||
#ifdef HAVE_AGC
|
#ifdef HAVE_AGC
|
||||||
{F_T_INT,&global_settings.rec_agc_preset_mic,LANG_RECORD_AGC_PRESET,INT(1),
|
{F_T_INT,&global_settings.rec_agc_preset_mic,LANG_RECORD_AGC_PRESET,INT(1),
|
||||||
|
@ -1120,16 +1122,16 @@ const struct settings_list settings[] = {
|
||||||
CHOICE_SETTING(0, remote_backlight_on_button_hold,
|
CHOICE_SETTING(0, remote_backlight_on_button_hold,
|
||||||
LANG_BACKLIGHT_ON_BUTTON_HOLD, 0, "remote backlight on button hold",
|
LANG_BACKLIGHT_ON_BUTTON_HOLD, 0, "remote backlight on button hold",
|
||||||
"normal,off,on", remote_backlight_set_on_button_hold, 3,
|
"normal,off,on", remote_backlight_set_on_button_hold, 3,
|
||||||
ID2P(LANG_BACKLIGHT_ON_BUTTON_HOLD_NORMAL), ID2P(LANG_OFF), ID2P(LANG_ON)),
|
ID2P(LANG_NORMAL), ID2P(LANG_OFF), ID2P(LANG_ON)),
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_HEADPHONE_DETECTION
|
#ifdef HAVE_HEADPHONE_DETECTION
|
||||||
CHOICE_SETTING(0, unplug_mode, LANG_UNPLUG, 0,
|
CHOICE_SETTING(0, unplug_mode, LANG_HEADPHONE_UNPLUG, 0,
|
||||||
"pause on headphone unplug", "off,pause,pause and resume", NULL, 3,
|
"pause on headphone unplug", "off,pause,pause and resume", NULL, 3,
|
||||||
ID2P(LANG_OFF), ID2P(LANG_PAUSE), ID2P(LANG_UNPLUG_RESUME)),
|
ID2P(LANG_OFF), ID2P(LANG_PAUSE), ID2P(LANG_HEADPHONE_UNPLUG_RESUME)),
|
||||||
INT_SETTING(0, unplug_rw, LANG_UNPLUG_RW, 0, "rewind duration on pause",
|
INT_SETTING(0, unplug_rw, LANG_HEADPHONE_UNPLUG_RW, 0, "rewind duration on pause",
|
||||||
UNIT_SEC, 0, 15, 1, NULL, NULL,NULL) ,
|
UNIT_SEC, 0, 15, 1, NULL, NULL,NULL) ,
|
||||||
OFFON_SETTING(0,unplug_autoresume,LANG_UNPLUG_DISABLE_AUTORESUME,false,
|
OFFON_SETTING(0,unplug_autoresume,LANG_HEADPHONE_UNPLUG_RESUME,false,
|
||||||
"disable autoresume if phones not present",NULL),
|
"disable autoresume if phones not present",NULL),
|
||||||
#endif
|
#endif
|
||||||
#if CONFIG_TUNER
|
#if CONFIG_TUNER
|
||||||
|
@ -1192,7 +1194,7 @@ const struct settings_list settings[] = {
|
||||||
#endif
|
#endif
|
||||||
ID2P(LANG_PREVIOUS_SCREEN), ID2P(LANG_MAIN_MENU),
|
ID2P(LANG_PREVIOUS_SCREEN), ID2P(LANG_MAIN_MENU),
|
||||||
ID2P(LANG_DIR_BROWSER), ID2P(LANG_TAGCACHE),
|
ID2P(LANG_DIR_BROWSER), ID2P(LANG_TAGCACHE),
|
||||||
ID2P(LANG_RESUME_PLAYBACK), ID2P(LANG_SETTINGS_MENU),
|
ID2P(LANG_RESUME_PLAYBACK), ID2P(LANG_SETTINGS),
|
||||||
#ifdef HAVE_RECORDING
|
#ifdef HAVE_RECORDING
|
||||||
ID2P(LANG_RECORDING),
|
ID2P(LANG_RECORDING),
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -916,12 +916,7 @@ static bool show_search_progress(bool init, int count)
|
||||||
if (current_tick - last_tick > HZ/4)
|
if (current_tick - last_tick > HZ/4)
|
||||||
{
|
{
|
||||||
gui_syncsplash(0, str(LANG_PLAYLIST_SEARCH_MSG), count,
|
gui_syncsplash(0, str(LANG_PLAYLIST_SEARCH_MSG), count,
|
||||||
#if CONFIG_KEYPAD == PLAYER_PAD
|
str(LANG_OFF_ABORT));
|
||||||
str(LANG_STOP_ABORT)
|
|
||||||
#else
|
|
||||||
str(LANG_OFF_ABORT)
|
|
||||||
#endif
|
|
||||||
);
|
|
||||||
if (action_userabort(TIMEOUT_NOBLOCK))
|
if (action_userabort(TIMEOUT_NOBLOCK))
|
||||||
return false;
|
return false;
|
||||||
last_tick = current_tick;
|
last_tick = current_tick;
|
||||||
|
@ -1604,7 +1599,7 @@ bool tagtree_insert_selection_playlist(int position, bool queue)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tc->filesindir <= 0)
|
if (tc->filesindir <= 0)
|
||||||
gui_syncsplash(HZ, str(LANG_END_PLAYLIST_PLAYER));
|
gui_syncsplash(HZ, str(LANG_END_PLAYLIST));
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
logf("insert_all_playlist");
|
logf("insert_all_playlist");
|
||||||
|
|
|
@ -95,6 +95,7 @@ struct clip_entry /* one entry of the index table */
|
||||||
struct voicefile /* file format of our voice file */
|
struct voicefile /* file format of our voice file */
|
||||||
{
|
{
|
||||||
int version; /* version of the voicefile */
|
int version; /* version of the voicefile */
|
||||||
|
int target_id; /* the rockbox target the file was made for */
|
||||||
int table; /* offset to index table, (=header size) */
|
int table; /* offset to index table, (=header size) */
|
||||||
int id1_max; /* number of "normal" clips contained in above index */
|
int id1_max; /* number of "normal" clips contained in above index */
|
||||||
int id2_max; /* number of "voice only" clips contained in above index */
|
int id2_max; /* number of "voice only" clips contained in above index */
|
||||||
|
@ -197,6 +198,11 @@ static void load_voicefile(void)
|
||||||
{
|
{
|
||||||
p_voicefile = (struct voicefile*)audiobuf;
|
p_voicefile = (struct voicefile*)audiobuf;
|
||||||
|
|
||||||
|
if (p_voicefile->target_id != TARGET_ID)
|
||||||
|
{
|
||||||
|
logf("Incompatible voice file (wrong target)");
|
||||||
|
goto load_err;
|
||||||
|
}
|
||||||
#if CONFIG_CODEC != SWCODEC
|
#if CONFIG_CODEC != SWCODEC
|
||||||
/* MASCODEC: now use audiobuf for voice then thumbnail */
|
/* MASCODEC: now use audiobuf for voice then thumbnail */
|
||||||
p_thumbnail = audiobuf + file_size;
|
p_thumbnail = audiobuf + file_size;
|
||||||
|
|
|
@ -1330,10 +1330,10 @@ void tree_restore(void)
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
{
|
{
|
||||||
screens[i].putsxy((LCD_WIDTH/2) -
|
screens[i].putsxy((LCD_WIDTH/2) -
|
||||||
((strlen(str(LANG_DIRCACHE_BUILDING)) *
|
((strlen(str(LANG_SCANNING_DISK)) *
|
||||||
screens[i].char_width)/2),
|
screens[i].char_width)/2),
|
||||||
LCD_HEIGHT-screens[i].char_height*3,
|
LCD_HEIGHT-screens[i].char_height*3,
|
||||||
str(LANG_DIRCACHE_BUILDING));
|
str(LANG_SCANNING_DISK));
|
||||||
gui_textarea_update(&screens[i]);
|
gui_textarea_update(&screens[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,12 @@ while(1) {
|
||||||
shift @ARGV;
|
shift @ARGV;
|
||||||
shift @ARGV;
|
shift @ARGV;
|
||||||
}
|
}
|
||||||
|
elsif($ARGV[0] eq "-i") {
|
||||||
|
# The target id name as used in TARGET_ID in the root makefile
|
||||||
|
$target_id=$ARGV[1];
|
||||||
|
shift @ARGV;
|
||||||
|
shift @ARGV;
|
||||||
|
}
|
||||||
elsif($ARGV[0] eq "-o") {
|
elsif($ARGV[0] eq "-o") {
|
||||||
$output=$ARGV[1];
|
$output=$ARGV[1];
|
||||||
shift @ARGV;
|
shift @ARGV;
|
||||||
|
@ -158,8 +164,8 @@ sub buildlangs {
|
||||||
for(@files) {
|
for(@files) {
|
||||||
my $output = $_;
|
my $output = $_;
|
||||||
$output =~ s/(.*)\.lang/$1.lng/;
|
$output =~ s/(.*)\.lang/$1.lng/;
|
||||||
print "$ROOT/tools/genlang -e=$dir/english.lang -t=$archos -b=$outputlang/$output $dir/$_\n" if($verbose);
|
print "$ROOT/tools/genlang -e=$dir/english.lang -t=$archos -i=$target_id -b=$outputlang/$output $dir/$_\n" if($verbose);
|
||||||
system ("$ROOT/tools/genlang -e=$dir/english.lang -t=$archos -b=$outputlang/$output $dir/$_ >/dev/null 2>&1");
|
system ("$ROOT/tools/genlang -e=$dir/english.lang -t=$archos -i=$target_id -b=$outputlang/$output $dir/$_ >/dev/null 2>&1");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
19
tools/configure
vendored
19
tools/configure
vendored
|
@ -1717,10 +1717,13 @@ clean:
|
||||||
\$(SILENT)rm -rf rockbox.zip TAGS @APPS@ firmware comsim sim lang.[ch]\
|
\$(SILENT)rm -rf rockbox.zip TAGS @APPS@ firmware comsim sim lang.[ch]\
|
||||||
manual *.pdf *.a credits.raw @OUTPUT@ bitmaps pluginbitmaps \
|
manual *.pdf *.a credits.raw @OUTPUT@ bitmaps pluginbitmaps \
|
||||||
@ARCHOSROM@ @FLASHFILE@ UI256.bmp rockbox-full.zip \
|
@ARCHOSROM@ @FLASHFILE@ UI256.bmp rockbox-full.zip \
|
||||||
html txt rockbox-manual*.zip sysfont.h rockbox-info.txt
|
html txt rockbox-manual*.zip sysfont.h rockbox-info.txt \
|
||||||
|
voicefontids
|
||||||
|
|
||||||
voice: tools
|
voice: tools
|
||||||
\$(TOOLSDIR)/genvoice.sh \$(ROOTDIR) \$(LANGUAGE) \$(ARCHOS) voicesettings.sh
|
\$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@ features
|
||||||
|
\$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done ; \\
|
||||||
|
\$(TOOLSDIR)/genvoice.sh \$(ROOTDIR) \$(LANGUAGE) \$(ARCHOS)\$\$feat \$(TARGET_ID) voicesettings.sh
|
||||||
|
|
||||||
tools:
|
tools:
|
||||||
\$(SILENT)\$(MAKE) -C \$(TOOLSDIR) CC=\$(HOSTCC) @TOOLSET@
|
\$(SILENT)\$(MAKE) -C \$(TOOLSDIR) CC=\$(HOSTCC) @TOOLSET@
|
||||||
|
@ -1736,20 +1739,24 @@ fontzip:
|
||||||
\$(SILENT)\$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(ARCHOS)\" -r "\$(ROOTDIR)" -f 1 -o rockbox-fonts.zip \$(TARGET) \$(BINARY)
|
\$(SILENT)\$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(ARCHOS)\" -r "\$(ROOTDIR)" -f 1 -o rockbox-fonts.zip \$(TARGET) \$(BINARY)
|
||||||
|
|
||||||
zip:
|
zip:
|
||||||
\$(SILENT)\$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(ARCHOS)\" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY)
|
\$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done ; \\
|
||||||
|
\$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(ARCHOS)\$\$feat\" -i \"\$(TARGET_ID)\" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY)
|
||||||
|
|
||||||
mapzip:
|
mapzip:
|
||||||
\$(SILENT)find . -name "*.map" | xargs zip rockbox-maps.zip
|
\$(SILENT)find . -name "*.map" | xargs zip rockbox-maps.zip
|
||||||
|
|
||||||
fullzip:
|
fullzip:
|
||||||
\$(SILENT)\$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(ARCHOS)\" -r "\$(ROOTDIR)" -f 2 -o rockbox-full.zip \$(TARGET) \$(BINARY)
|
\$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done; \\
|
||||||
|
\$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(ARCHOS)\$\$feat\" -i \"\$(TARGET_ID)\" -r "\$(ROOTDIR)" -f 2 -o rockbox-full.zip \$(TARGET) \$(BINARY)
|
||||||
|
|
||||||
7zip:
|
7zip:
|
||||||
\$(SILENT)\$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(ARCHOS)\" -o "rockbox.7z" -z "7za a" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY)
|
\$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done; \\
|
||||||
|
\$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(ARCHOS)\$\$feat\" -i \"\$(TARGET_ID)\" -o "rockbox.7z" -z "7za a" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY)
|
||||||
|
|
||||||
tar:
|
tar:
|
||||||
\$(SILENT)rm -f rockbox.tar
|
\$(SILENT)rm -f rockbox.tar
|
||||||
\$(SILENT)\$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(ARCHOS)\" -o "rockbox.tar" -z "tar --no-recursion -uf" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY)
|
\$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done; \\
|
||||||
|
\$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(ARCHOS)\$\$feat\" -i \"\$(TARGET_ID)\" -o "rockbox.tar" -z "tar --no-recursion -uf" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY)
|
||||||
|
|
||||||
bzip2: tar
|
bzip2: tar
|
||||||
\$(SILENT)bzip2 -f9 rockbox.tar
|
\$(SILENT)bzip2 -f9 rockbox.tar
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
# binary version for the binary lang file
|
# binary version for the binary lang file
|
||||||
my $langversion = 3; # 3 was the latest one used in the v1 format
|
my $langversion = 4; # 3 was the latest one used in the v1 format
|
||||||
|
|
||||||
# A note for future users and readers: The original v1 language system allowed
|
# A note for future users and readers: The original v1 language system allowed
|
||||||
# the build to create and use a different language than english built-in. We
|
# the build to create and use a different language than english built-in. We
|
||||||
|
@ -28,8 +28,8 @@ Usage: genlang [options] <langv2 file>
|
||||||
Make the tool create a [prefix].c and [prefix].h file.
|
Make the tool create a [prefix].c and [prefix].h file.
|
||||||
|
|
||||||
-b=<outfile>
|
-b=<outfile>
|
||||||
Make the tool create a binary language (.lng) file namaed [outfile].
|
Make the tool create a binary language (.lng) file named [outfile].
|
||||||
The use of this option requires that you also use -e.
|
The use of this option requires that you also use -e, -t and -i.
|
||||||
|
|
||||||
-u
|
-u
|
||||||
Update language file. Given the translated file and the most recent english
|
Update language file. Given the translated file and the most recent english
|
||||||
|
@ -48,6 +48,9 @@ Usage: genlang [options] <langv2 file>
|
||||||
separated with colons. This will make genlang to use all the specified
|
separated with colons. This will make genlang to use all the specified
|
||||||
strings when searching for a matching phrase.
|
strings when searching for a matching phrase.
|
||||||
|
|
||||||
|
-i=<target id>
|
||||||
|
The target id number, needed for -b.
|
||||||
|
|
||||||
-o
|
-o
|
||||||
Voice mode output. Outputs all id: and voice: lines for the given target!
|
Voice mode output. Outputs all id: and voice: lines for the given target!
|
||||||
|
|
||||||
|
@ -88,11 +91,18 @@ if(!$check) {
|
||||||
print "Please use at least one of -p, -u, -o and -b\n";
|
print "Please use at least one of -p, -u, -o and -b\n";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(($binary || $update || $voiceout) && !$english) {
|
if(($binary || $update || $voiceout) && !$english) {
|
||||||
print "Please use -e too when you use -b, -o or -u\n";
|
print "Please use -e too when you use -b, -o or -u\n";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
my $target_id = $i;
|
||||||
|
if($binary && !$target_id) {
|
||||||
|
print "Please specify a target id number (with -i)!\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
my $target = $t;
|
my $target = $t;
|
||||||
if(!$target && !$update) {
|
if(!$target && !$update) {
|
||||||
print "Please specify a target (with -t)!\n";
|
print "Please specify a target (with -t)!\n";
|
||||||
|
@ -586,7 +596,7 @@ elsif($binary) {
|
||||||
|
|
||||||
open(OUTF, ">$binary") or die "Can't create $binary";
|
open(OUTF, ">$binary") or die "Can't create $binary";
|
||||||
binmode OUTF;
|
binmode OUTF;
|
||||||
printf OUTF ("\x1a%c", $langversion); # magic lang file header
|
printf OUTF ("\x1a%c%c", $langversion, $target_id); # magic lang file header
|
||||||
|
|
||||||
# loop over the target phrases
|
# loop over the target phrases
|
||||||
for $i (1 .. $idcount) {
|
for $i (1 .. $idcount) {
|
||||||
|
|
|
@ -34,13 +34,17 @@ TTS_ENGINE=festival
|
||||||
ENCODER=lame
|
ENCODER=lame
|
||||||
# Where to save temporary files
|
# Where to save temporary files
|
||||||
TEMPDIR=/tmp
|
TEMPDIR=/tmp
|
||||||
|
# List of IDs to send to voicefont
|
||||||
|
VOICEFONTIDS=voicefontids
|
||||||
|
|
||||||
###################
|
###################
|
||||||
# End of settings #
|
# End of settings #
|
||||||
###################
|
###################
|
||||||
|
|
||||||
|
TARGET_ID="$4"
|
||||||
createvoicefile() {
|
createvoicefile() {
|
||||||
$VOICEFONT "$LANG_FILE" "$TEMPDIR/" "./$RLANG.voice"
|
$GENLANG -e=$ENGLISH -o -t=$TARGET $LANG_FILE > $VOICEFONTIDS
|
||||||
|
$VOICEFONT "$VOICEFONTIDS" "$TARGET_ID" "$TEMPDIR/" "./$RLANG.voice"
|
||||||
}
|
}
|
||||||
|
|
||||||
deletefiles() {
|
deletefiles() {
|
||||||
|
@ -106,7 +110,7 @@ generateclips() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ -z "$3" ]; then
|
if [ -z "$3" ]; then
|
||||||
echo "Usage: $0 rockboxdirectory language target [settingsfile]";
|
echo "Usage: $0 rockboxdirectory language target targetid [settingsfile]";
|
||||||
exit 32
|
exit 32
|
||||||
else
|
else
|
||||||
if [ ! -d "$1" ] || [ ! -f "$1/tools/genlang" ]; then
|
if [ ! -d "$1" ] || [ ! -f "$1/tools/genlang" ]; then
|
||||||
|
@ -117,12 +121,12 @@ else
|
||||||
echo "Error: $2 is not a valid language"
|
echo "Error: $2 is not a valid language"
|
||||||
exit 34
|
exit 34
|
||||||
fi
|
fi
|
||||||
if [ ! -z "$4" ]; then
|
if [ ! -z "$5" ]; then
|
||||||
if [ -f "$4" ]; then
|
if [ -f "$5" ]; then
|
||||||
# Read settings from file
|
# Read settings from file
|
||||||
source "$4"
|
source "$5"
|
||||||
else
|
else
|
||||||
echo "Error: $4 does not exist"
|
echo "Error: $5 does not exist"
|
||||||
exit 36
|
exit 36
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -90,10 +90,10 @@ int main (int argc, char** argv)
|
||||||
if (argc < 2)
|
if (argc < 2)
|
||||||
{
|
{
|
||||||
printf("Makes a Rockbox voicefont from a collection of mp3 clips.\n");
|
printf("Makes a Rockbox voicefont from a collection of mp3 clips.\n");
|
||||||
printf("Usage: voicefont <language file> <mp3 path> <output file>\n");
|
printf("Usage: voicefont <string id list file> <target id> <mp3 path> <output file>\n");
|
||||||
printf("\n");
|
printf("\n");
|
||||||
printf("Example: \n");
|
printf("Example: \n");
|
||||||
printf("voicefont english.lang voice\\ voicefont.bin\n");
|
printf("voicefont voicefontids.txt 2 voice\\ voicefont.bin\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,10 +123,10 @@ int main (int argc, char** argv)
|
||||||
}
|
}
|
||||||
fclose(pFile);
|
fclose(pFile);
|
||||||
|
|
||||||
pFile = fopen(argv[3], "wb");
|
pFile = fopen(argv[4], "wb");
|
||||||
if (pFile == NULL)
|
if (pFile == NULL)
|
||||||
{
|
{
|
||||||
printf("Error opening output file %s\n", argv[3]);
|
printf("Error opening output file %s\n", argv[4]);
|
||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
fseek(pFile, 16 + count*8, SEEK_SET); /* space for header */
|
fseek(pFile, 16 + count*8, SEEK_SET); /* space for header */
|
||||||
|
@ -137,8 +137,8 @@ int main (int argc, char** argv)
|
||||||
count_voiceonly++;
|
count_voiceonly++;
|
||||||
|
|
||||||
pos[i] = ftell(pFile);
|
pos[i] = ftell(pFile);
|
||||||
sprintf(mp3filename1, "%s%s.mp3", argv[2], names[i]);
|
sprintf(mp3filename1, "%s%s.mp3", argv[3], names[i]);
|
||||||
sprintf(mp3filename2, "%s%s.wav.mp3", argv[2], names[i]);
|
sprintf(mp3filename2, "%s%s.wav.mp3", argv[3], names[i]);
|
||||||
mp3filename = mp3filename1;
|
mp3filename = mp3filename1;
|
||||||
pMp3File = fopen(mp3filename, "rb");
|
pMp3File = fopen(mp3filename, "rb");
|
||||||
if (pMp3File == NULL)
|
if (pMp3File == NULL)
|
||||||
|
@ -168,18 +168,23 @@ int main (int argc, char** argv)
|
||||||
/* Create the file format: */
|
/* Create the file format: */
|
||||||
|
|
||||||
/* 1st 32 bit value in the file is the version number */
|
/* 1st 32 bit value in the file is the version number */
|
||||||
value = SWAP4(200); /* 2.00 */
|
value = SWAP4(300); /* 3.00 */
|
||||||
fwrite(&value, sizeof(value), 1, pFile);
|
fwrite(&value, sizeof(value), 1, pFile);
|
||||||
|
|
||||||
/* 2nd 32 bit value in the file is the header size (= 1st table position) */
|
/* 2nd 32 bit value in the file is the id number for the target
|
||||||
value = SWAP4(16); /* 16 bytes: for version, header size, number1, number2 */
|
we made the voce file for */
|
||||||
|
value = SWAP4(atoi(argv[2]));
|
||||||
fwrite(&value, sizeof(value), 1, pFile);
|
fwrite(&value, sizeof(value), 1, pFile);
|
||||||
|
|
||||||
/* 3rd 32 bit value in the file is the number of clips in 1st table */
|
/* 3rd 32 bit value in the file is the header size (= 1st table position) */
|
||||||
|
value = SWAP4(20); /* 20 bytes: for version, target id, header size, number1, number2 */
|
||||||
|
fwrite(&value, sizeof(value), 1, pFile);
|
||||||
|
|
||||||
|
/* 4th 32 bit value in the file is the number of clips in 1st table */
|
||||||
value = SWAP4(count-count_voiceonly);
|
value = SWAP4(count-count_voiceonly);
|
||||||
fwrite(&value, sizeof(value), 1, pFile);
|
fwrite(&value, sizeof(value), 1, pFile);
|
||||||
|
|
||||||
/* 4th bit value in the file is the number of clips in 2nd table */
|
/* 5th bit value in the file is the number of clips in 2nd table */
|
||||||
value = SWAP4(count_voiceonly);
|
value = SWAP4(count_voiceonly);
|
||||||
fwrite(&value, sizeof(value), 1, pFile);
|
fwrite(&value, sizeof(value), 1, pFile);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue