diff options
author | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2005-08-09 23:22:36 +0000 |
---|---|---|
committer | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2005-08-09 23:22:36 +0000 |
commit | 63bf2a90a6d6fb0859e4c9dd9fcac85de9adc0f1 (patch) | |
tree | f18ef0378e787945d5fd722b2c2793b878143221 /ui/rccnames.c | |
parent | 9d4628df369b92016b7fc3bfc7fed6d06ff2ca9a (diff) | |
download | librcc-63bf2a90a6d6fb0859e4c9dd9fcac85de9adc0f1.tar.gz librcc-63bf2a90a6d6fb0859e4c9dd9fcac85de9adc0f1.tar.bz2 librcc-63bf2a90a6d6fb0859e4c9dd9fcac85de9adc0f1.tar.xz librcc-63bf2a90a6d6fb0859e4c9dd9fcac85de9adc0f1.zip |
- Russian Engine is really renamed
- Translate to English is fixed
- Default charset for "all" languages
- Support for per-class additional and dissabled charsets
- Use 'GetSomethingNumber' instead of 'GetSomethingList'. 'GetSomethingList' functions are depricated.
- rccUiGetSomethingName gets id's on the input instead of names
Diffstat (limited to 'ui/rccnames.c')
-rw-r--r-- | ui/rccnames.c | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/ui/rccnames.c b/ui/rccnames.c index 8b5b4a0..d3d54d7 100644 --- a/ui/rccnames.c +++ b/ui/rccnames.c @@ -113,9 +113,12 @@ rcc_name *rccUiGetLanguageRccName(rcc_ui_context ctx, const char *lang) { return rccUiGetRccName(ctx, lang, RCC_NAME_TYPE_LANGUAGE); } -const char *rccUiGetLanguageName(rcc_ui_context ctx, const char *lang) { +const char *rccUiGetLanguageName(rcc_ui_context ctx, rcc_language_id language_id) { + const char *lang; rcc_name *names; + lang = rccGetLanguageName(ctx->rccctx, language_id); + names = rccUiGetLanguageRccName(ctx, lang); if ((names)&&(names->name)) return names->name; @@ -126,8 +129,13 @@ rcc_name *rccUiGetCharsetRccName(rcc_ui_context ctx, const char *charset) { return rccUiGetRccName(ctx, charset, RCC_NAME_TYPE_CHARSET); } -const char *rccUiGetCharsetName(rcc_ui_context ctx, const char *charset) { +const char *rccUiGetCharsetName(rcc_ui_context ctx, rcc_language_id language_id, rcc_class_id class_id, rcc_charset_id charset_id) { + rcc_language_config config; + const char *charset; rcc_name *names; + + config = rccGetConfig(ctx->rccctx, language_id); + charset = rccConfigGetClassCharsetName(config, class_id, charset_id); names = rccUiGetCharsetRccName(ctx, charset); if ((names)&&(names->name)) return names->name; @@ -139,9 +147,14 @@ rcc_name *rccUiGetEngineRccName(rcc_ui_context ctx, const char *engine) { return rccUiGetRccName(ctx, engine, RCC_NAME_TYPE_ENGINE); } -const char *rccUiGetEngineName(rcc_ui_context ctx, const char *engine) { +const char *rccUiGetEngineName(rcc_ui_context ctx, rcc_language_id language_id, rcc_engine_id engine_id) { + rcc_language_config config; + const char *engine; rcc_name *names; + config = rccGetConfig(ctx->rccctx, language_id); + engine = rccConfigGetEngineName(config, engine_id); + names = rccUiGetEngineRccName(ctx, engine); if ((names)&&(names->name)) return names->name; @@ -152,13 +165,16 @@ rcc_name *rccUiGetClassRccName(rcc_ui_context ctx, const char *cl) { return rccUiGetRccName(ctx, cl, RCC_NAME_TYPE_CLASS); } -const char *rccUiGetClassName(rcc_ui_context ctx, const char *cl) { +const char *rccUiGetClassName(rcc_ui_context ctx, rcc_class_id class_id) { + const char *cl; rcc_name *names; + cl = rccGetClassName(ctx->rccctx, class_id); + names = rccUiGetClassRccName(ctx, cl); if ((names)&&(names->name)) return names->name; - return NULL; + return rccGetClassFullName(ctx->rccctx, (rcc_class_id)class_id); } |