summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/librccui.c28
-rw-r--r--ui/rccnames.c3
2 files changed, 19 insertions, 12 deletions
diff --git a/ui/librccui.c b/ui/librccui.c
index f072c6e..c4ac1c0 100644
--- a/ui/librccui.c
+++ b/ui/librccui.c
@@ -112,11 +112,12 @@ static xmlNodePtr rccUiNodeFind(xmlXPathContextPtr xpathctx, const char *request
fullname = rccUiXmlGetText(node); \
if (fullname) { \
if (icnv) { \
- newsize = rccIConvRecode(icnv, tmpbuf, RCC_UI_MAX_STRING_CHARS, fullname, 0); \
- if (newsize != (size_t)-1) { \
+ tmpbuf = rccIConv(icnv, fullname, 0, NULL); \
+ if (tmpbuf) { \
cnode = xmlNewChild(node->parent, NULL, "Recoded", tmpbuf); \
fullname = rccUiXmlGetText(cnode); \
if (!fullname) fullname = rccUiXmlGetText(node); \
+ free(tmpbuf); \
} \
} \
var = fullname; \
@@ -154,11 +155,12 @@ static xmlNodePtr rccUiNodeFind(xmlXPathContextPtr xpathctx, const char *request
fullname = rccUiXmlGetText(node); \
if (fullname) { \
if (icnv) { \
- newsize = rccIConvRecode(icnv, tmpbuf, RCC_UI_MAX_STRING_CHARS, fullname, 0); \
- if (newsize != (size_t)-1) { \
+ tmpbuf = rccIConv(icnv, fullname, 0, NULL); \
+ if (tmpbuf) { \
cnode = xmlNewChild(node->parent, NULL, "Recoded", tmpbuf); \
fullname = rccUiXmlGetText(cnode); \
if (!fullname) fullname = rccUiXmlGetText(node); \
+ free(tmpbuf); \
} \
} \
\
@@ -197,8 +199,7 @@ int rccUiInit() {
unsigned int npos;
- size_t newsize;
- char tmpbuf[RCC_UI_MAX_STRING_CHARS+1];
+ char *tmpbuf;
char ctype_charset[32];
char locale[32];
rcc_iconv icnv;
@@ -271,11 +272,12 @@ int rccUiInit() {
if (!fullname) continue;
if (icnv) {
- newsize = rccIConvRecode(icnv, tmpbuf, RCC_UI_MAX_STRING_CHARS, fullname, 0);
- if (newsize != (size_t)-1) {
+ tmpbuf = rccIConv(icnv, fullname, 0, NULL);
+ if (tmpbuf) {
cnode = xmlNewChild(node->parent, NULL, "Recoded", tmpbuf);
fullname = rccUiXmlGetText(cnode);
if (!fullname) fullname = rccUiXmlGetText(node);
+ free(tmpbuf);
}
}
@@ -319,11 +321,12 @@ int rccUiInit() {
fullname = rccUiXmlGetText(node);
if (fullname) {
if (icnv) {
- newsize = rccIConvRecode(icnv, tmpbuf, RCC_UI_MAX_STRING_CHARS, fullname, 0);
- if (newsize != (size_t)-1) {
+ tmpbuf = rccIConv(icnv, fullname, 0, NULL);
+ if (tmpbuf) {
cnode = xmlNewChild(node->parent, NULL, "Recoded", tmpbuf);
fullname = rccUiXmlGetText(cnode);
if (!fullname) fullname = rccUiXmlGetText(node);
+ free(tmpbuf);
}
}
option_name->name = fullname;
@@ -346,11 +349,12 @@ int rccUiInit() {
fullname = rccUiXmlGetText(node);
if (fullname) {
if (icnv) {
- newsize = rccIConvRecode(icnv, tmpbuf, RCC_UI_MAX_STRING_CHARS, fullname, 0);
- if (newsize != (size_t)-1) {
+ tmpbuf = rccIConv(icnv, fullname, 0, NULL);
+ if (tmpbuf) {
cnode = xmlNewChild(node->parent, NULL, "Recoded", tmpbuf);
fullname = rccUiXmlGetText(cnode);
if (!fullname) fullname = rccUiXmlGetText(node);
+ free(tmpbuf);
}
}
option_name->value_names[k] = fullname;
diff --git a/ui/rccnames.c b/ui/rccnames.c
index 1e79e5b..b6d08dd 100644
--- a/ui/rccnames.c
+++ b/ui/rccnames.c
@@ -11,6 +11,7 @@ rcc_name rcc_default_language_names[RCC_MAX_LANGUAGES+1];
rcc_name rcc_default_language_names_embeded[RCC_MAX_LANGUAGES+1] = {
{"default", "Autodetect"},
{"off", "Dissable"},
+{"en", "English" },
{"ru","Russian"},
{"uk","Ukrainian"},
{"be","Belarussian"},
@@ -38,6 +39,8 @@ rcc_option_name rcc_default_option_names_embeded[RCC_MAX_OPTIONS+1] = {
{ RCC_OPTION_AUTODETECT_FS_NAMES, "Autodetect File Names", rcc_default_option_boolean_names },
{ RCC_OPTION_AUTODETECT_FS_TITLES, "Autodetect FS Titles", rcc_default_option_boolean_names },
{ RCC_OPTION_CONFIGURED_LANGUAGES_ONLY, "Enabled Languages", rcc_default_option_clo_names },
+ { RCC_OPTION_TRANSLATE, "Translate Text", rcc_default_option_boolean_names },
+ { RCC_OPTION_AUTOENGINE_SET_CURRENT, "AutoEngine Set Current Encoding", rcc_default_option_boolean_names },
{ RCC_MAX_OPTIONS }
};