From fdfe5b42f687fbf3d4537541cc1b0bd9b8c2c090 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Fri, 8 Jul 2005 14:45:55 +0000 Subject: 08.07.2005 --- ui/gtk.c | 6 ++---- ui/librccui.c | 9 +++++---- ui/rccnames.c | 2 +- 3 files changed, 8 insertions(+), 9 deletions(-) (limited to 'ui') diff --git a/ui/gtk.c b/ui/gtk.c index c8e3a59..2fdf2f4 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -126,7 +126,7 @@ int rccUiMenuConfigureWidget(rcc_ui_menu_context ctx) { config = rccGetConfig(rccctx, language_id); charset_id = rccConfigGetSelectedCharset(config, (rcc_class_id)ctx->id); - if (charset_id < 0) charset_id = 0; + if (charset_id == (rcc_charset_id)-1) charset_id = 0; gtk_option_menu_set_history(GTK_OPTION_MENU(menu), charset_id); break; case RCC_UI_MENU_ENGINE: @@ -148,12 +148,10 @@ int rccUiMenuConfigureWidget(rcc_ui_menu_context ctx) { gtk_option_menu_remove_menu(GTK_OPTION_MENU(menu)); gtk_option_menu_set_menu(GTK_OPTION_MENU(menu), list); - config = rccGetConfig(rccctx, language_id); engine_id = rccConfigGetCurrentEngine(config); - if (engine_id < 0) engine_id = 0; + if (engine_id == (rcc_engine_id)-1) engine_id = 0; gtk_option_menu_set_history(GTK_OPTION_MENU(menu), engine_id); - break; case RCC_UI_MENU_OPTION: if (!ctx->widget) { diff --git a/ui/librccui.c b/ui/librccui.c index c868708..3b8bcdc 100644 --- a/ui/librccui.c +++ b/ui/librccui.c @@ -165,12 +165,9 @@ int rccUiRestoreLanguage(rcc_ui_context ctx) { rcc_class_ptr *classes; rcc_language_id language_id; - rcc_language_config config; - if (!ctx) return -1; language_id = (rcc_language_id)rccUiMenuGet(ctx->language); - config = rccGetConfig(ctx->rccctx, language_id); rccUiMenuConfigureWidget(ctx->engine); //rccUiMenuSet(ctx->engine, (rcc_ui_id)rccConfigGetSelectedEngine(config)); @@ -386,6 +383,7 @@ rcc_ui_frame rccUiGetEngineFrame(rcc_ui_context ctx, const char *title) { rcc_ui_frame frame; rcc_ui_box engine; rcc_ui_box opt; + const char *optname; if (!ctx) return NULL; @@ -400,7 +398,10 @@ rcc_ui_frame rccUiGetEngineFrame(rcc_ui_context ctx, const char *title) { rccUiFrameAdd(framectx, engine); for (i=0; i