summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2005-07-18 15:22:28 +0000
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2005-07-18 15:22:28 +0000
commit537c4b33fdf6e143243d5a0d286eeb247362e806 (patch)
treed8a94cfaa4a71ffc826b7d8176c54445369539f3 /ui
parent4032f92867e5570f130e4175b3b4fb61240f9752 (diff)
downloadlibrcc-537c4b33fdf6e143243d5a0d286eeb247362e806.tar.gz
librcc-537c4b33fdf6e143243d5a0d286eeb247362e806.tar.bz2
librcc-537c4b33fdf6e143243d5a0d286eeb247362e806.tar.xz
librcc-537c4b33fdf6e143243d5a0d286eeb247362e806.zip
API Improvements
- Removed 'rlen' return parameters there not necessary for multibyte encodings - Two versions of recode functions: rccRecode -> rccRecode, rccSizedRecode - Class Types: CONST, SKIP_SAVELOAD - New recode functions: rccToCharset, rccFromCharset - More new recode functions: rccRecodeToCharset, rccRecodeFromCharset, rccRecodeCharsets - New function: rccGetCompiledConfiguration - All warnings are fixed - Perform "File Name" search only if there are non ISO8859-1 chars in the name. - Do not copy invalid characters, - skip them. - Fixed error in rccRecode with 'Recoding Cache' switched On. - Strip leading and trailing spaces in rccDB4 get/set
Diffstat (limited to 'ui')
-rw-r--r--ui/gtk.c4
-rw-r--r--ui/librccui.c6
-rw-r--r--ui/rccmenu.c1
-rw-r--r--ui/rccnames.c11
4 files changed, 8 insertions, 14 deletions
diff --git a/ui/gtk.c b/ui/gtk.c
index da909eb..749405e 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -64,7 +64,7 @@ int rccUiMenuSet(rcc_ui_menu_context ctx, rcc_ui_id id) {
}
-static int rccGtkMenuLanguageCB(GtkWidget * w, gpointer item) {
+static void rccGtkMenuLanguageCB(GtkWidget * w, gpointer item) {
rccUiRestoreLanguage(((rcc_ui_menu_context)item)->uictx);
}
@@ -108,7 +108,7 @@ int rccUiMenuConfigureWidget(rcc_ui_menu_context ctx) {
}
language_id = rccGetSelectedLanguage(rccctx);
- if (language_id < 0) language_id = 0;
+ if (language_id == (rcc_language_id)-1) language_id = 0;
if (ctx->widget) menu = ctx->widget;
else {
diff --git a/ui/librccui.c b/ui/librccui.c
index 608e04a..f072c6e 100644
--- a/ui/librccui.c
+++ b/ui/librccui.c
@@ -54,6 +54,7 @@
static const char *rccUiXmlGetText(xmlNodePtr node) {
if ((node)&&(node->children)&&(node->children->type == XML_TEXT_NODE)&&(node->children->content)) return node->children->content;
+ return NULL;
}
static xmlNodePtr rccUiNodeFind(xmlXPathContextPtr xpathctx, const char *request, ...) {
@@ -178,7 +179,7 @@ int rccUiInit() {
xmlDocPtr xmlctx;
xmlXPathContextPtr xpathctx = NULL;
xmlXPathObjectPtr obj;
- xmlNodeSetPtr node_set;
+ xmlNodeSetPtr node_set = NULL;
xmlNodePtr node, cnode;
xmlAttrPtr attr;
@@ -189,7 +190,7 @@ int rccUiInit() {
char *search[4];
rcc_option option;
- const char *opt, *val;
+ const char *opt;
rcc_option_name *option_name;
const char *value_name;
const char *class_name;
@@ -551,6 +552,7 @@ int rccUiSetOptionNames(rcc_ui_context ctx, rcc_option_name *names) {
int rccUiSetClassNames(rcc_ui_context ctx) {
if (!ctx) return -1;
ctx->class_names = 1;
+ return 0;
}
int rccUiRestoreLanguage(rcc_ui_context ctx) {
diff --git a/ui/rccmenu.c b/ui/rccmenu.c
index da04cbd..5a51c56 100644
--- a/ui/rccmenu.c
+++ b/ui/rccmenu.c
@@ -1,4 +1,5 @@
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include "internal.h"
diff --git a/ui/rccnames.c b/ui/rccnames.c
index 933c910..1e79e5b 100644
--- a/ui/rccnames.c
+++ b/ui/rccnames.c
@@ -1,4 +1,5 @@
#include <stdio.h>
+#include <string.h>
#include <librcc.h>
@@ -62,7 +63,6 @@ typedef enum rcc_name_type_t {
} rcc_name_type;
rcc_name *rccUiGetRccName(rcc_ui_context ctx, const char *findname, unsigned char type) {
- const char *res;
unsigned int i,j;
rcc_name *names[2], *nm;
@@ -108,8 +108,6 @@ rcc_name *rccUiGetLanguageRccName(rcc_ui_context ctx, const char *lang) {
}
const char *rccUiGetLanguageName(rcc_ui_context ctx, const char *lang) {
- const char *res;
- unsigned int i,j;
rcc_name *names;
names = rccUiGetLanguageRccName(ctx, lang);
@@ -123,8 +121,6 @@ rcc_name *rccUiGetCharsetRccName(rcc_ui_context ctx, const char *charset) {
}
const char *rccUiGetCharsetName(rcc_ui_context ctx, const char *charset) {
- const char *res;
- unsigned int i,j;
rcc_name *names;
names = rccUiGetCharsetRccName(ctx, charset);
@@ -138,8 +134,6 @@ rcc_name *rccUiGetEngineRccName(rcc_ui_context ctx, const char *engine) {
}
const char *rccUiGetEngineName(rcc_ui_context ctx, const char *engine) {
- const char *res;
- unsigned int i,j;
rcc_name *names;
names = rccUiGetEngineRccName(ctx, engine);
@@ -153,8 +147,6 @@ rcc_name *rccUiGetClassRccName(rcc_ui_context ctx, const char *cl) {
}
const char *rccUiGetClassName(rcc_ui_context ctx, const char *cl) {
- const char *res;
- unsigned int i,j;
rcc_name *names;
names = rccUiGetClassRccName(ctx, cl);
@@ -185,7 +177,6 @@ rcc_option_name *rccUiGetOptionRccName(rcc_ui_context ctx, rcc_option option) {
}
const char *rccUiGetOptionName(rcc_ui_context ctx, rcc_option option) {
- unsigned int i;
rcc_option_name *name;
name = rccUiGetOptionRccName(ctx, option);