summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/input-russian.txt1
-rw-r--r--examples/rcc-example.xml23
-rw-r--r--examples/rcc-gtk-config.c16
3 files changed, 32 insertions, 8 deletions
diff --git a/examples/input-russian.txt b/examples/input-russian.txt
index b89c105..aa60118 100644
--- a/examples/input-russian.txt
+++ b/examples/input-russian.txt
@@ -4,3 +4,4 @@
привет
Good Morning
Guten Abend
+Çäîðîâåíüê³ Áóëè
diff --git a/examples/rcc-example.xml b/examples/rcc-example.xml
index 5bf50b6..6bad1f3 100644
--- a/examples/rcc-example.xml
+++ b/examples/rcc-example.xml
@@ -22,14 +22,27 @@
<Charset>MACCYRILLIC</Charset>
</Charsets>
</Language>
- <Language name="ja">
- <FullName>Japanese</FullName>
+ <Language name="uk">
+ <FullName>Ukrainian</FullName>
+ <Engines>
+ <Engine>russian</Engine>
+ </Engines>
<Charsets>
<Charset>UTF-8</Charset>
- <Charset>ISO-2022-JP</Charset>
- <Charset>EUC-JP</Charset>
- <Charset>SHIFT-JIS</Charset>
+ <Charset>KOI8-U</Charset>
+ <Charset>CP1251</Charset>
+ <Charset>IBM865</Charset>
+ <Charset>ISO8859-5</Charset>
+ <Charset>MACCYRILLIC</Charset>
+ <Charset>CP1125</Charset>
</Charsets>
+ <Aliases>
+ <Alias>ru_UA</Alias>
+ </Aliases>
+ <Relations>
+ <Parrent>en</Parrent>
+ <Parrent>ru</Parrent>
+ </Relations>
</Language>
</Languages>
<Options>
diff --git a/examples/rcc-gtk-config.c b/examples/rcc-gtk-config.c
index 7758f09..b055597 100644
--- a/examples/rcc-gtk-config.c
+++ b/examples/rcc-gtk-config.c
@@ -1,3 +1,5 @@
+#include <stdio.h>
+#include <string.h>
#include <gtk/gtk.h>
#include <librcc.h>
@@ -17,7 +19,7 @@ static rcc_class classes[] = {
{ NULL }
};
-static char *config;
+static char *config = NULL;
static rcc_context ctx;
static rcc_ui_context uictx;
@@ -30,13 +32,20 @@ static void apply_cb(GtkWidget * w, gpointer data)
int main (int argc, char *argv[])
{
+ unsigned int i;
+ unsigned char all_mode = 0;
GtkWidget *window1;
GtkWidget *save, *close, *hbox;
GtkWidget *box;
- if (argc<1) config = argv[0];
- else config = argv[1];
+ for (i=1;i<argc;i++) {
+ if (!strcmp(argv[i],"--all")) all_mode = 1;
+ else if (!strcmp(argv[i], "--")) break;
+ else if ((!config)&&(strncmp(argv[i],"-",1))) config = argv[i];
+ }
+ if (i==1)
+ printf("Usage: rcc-config [ --all ] [ <config name> ]\n");
gtk_set_locale ();
gtk_init (&argc, &argv);
@@ -46,6 +55,7 @@ int main (int argc, char *argv[])
ctx = rccCreateContext(NULL, 0, 0, classes, 0);
rccLoad(ctx, config);
uictx = rccUiCreateContext(ctx);
+ if (all_mode) rccUiUnHideOption(uictx, RCC_OPTION_ALL);
window1 = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_policy(GTK_WINDOW (window1), FALSE, FALSE, TRUE);