From 63bf2a90a6d6fb0859e4c9dd9fcac85de9adc0f1 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Tue, 9 Aug 2005 23:22:36 +0000 Subject: - 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 --- ui/rccnames.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) (limited to 'ui/rccnames.c') 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); } -- cgit v1.2.3