--- /dev/null
+#define LOCALES_STRING "aa,af,am,an,ar,as,ast,az,be,ber,bg,bn,bo,br,bs,byn,C,ca,crh,cs,csb,cy,da,de,dz,el,en,es,et,eu,fa,fi,fil,fo,fr,fur,fy,ga,gd,gez,gl,gu,gv,ha,he,hi,hne,hr,hsb,ht,hu,hy,id,ig,ik,is,it,iu,iw,ja,ka,kk,kl,km,kn,ko,ks,ku,kw,ky,lg,li,lo,lt,lv,mai,mg,mi,mk,ml,mn,mr,ms,mt,nan,nb,nds,ne,nl,nn,no,nr,nso,oc,om,or,pa,pa,pap,pl,pt,ro,ru,rw,sa,sc,sd,se,shs,si,sid,sk,sl,so,sq,sr,ss,st,sv,ta,te,tg,th,ti,tig,tk,tl,tn,tr,ts,tt,ug,uk,ur,uz,ve,vi,wa,wo,xh,yi,yo,zh,zu"
#include <ibus.h>
#include "gdk-private.h"
+#include "locales.h"
struct _X11ICONN {
GList *clients;
static GHashTable *_connections = NULL;
static XIMS _xims = NULL;
static gchar _server_name[128] = "ibus";
+#ifdef LOCALES_STRING
+static gchar _locale[1024] = LOCALES_STRING;
+#else
static gchar _locale[1024] =
"aa,af,am,an,ar,as,az,be,bg,bn,br,bs,"
"ca,cs,cy,da,de,dz,el,en,es,et,eu,"
"se,si,sk,sl,so,sq,sr,ss,st,sv,"
"ta,te,tg,th,ti,tl,tn,tr,ts,tt,"
"uk,ur,uz,ve,vi,wa,xh,yi,zh,zu";
+#endif
static gboolean _kill_daemon = FALSE;
static gint g_debug_level = 0;
"Usage:\n"
" %s --help Show this message\n"
" --server-name= -n Setup xim sevrer name\n"
- " --locale= -l Setup support locale\n"
+ " --locale= -l Setup support locales\n"
+ " --locale-append= -a Append locales into the default support locales\n"
" --kill-daemon -k Kill ibus daemon when exit\n"
" --debug= -v Setup debug level\n",
name);
while (1) {
static struct option long_options [] = {
- {"debug", 1, 0, 0},
- {"server-name", 1, 0, 0},
- {"locale", 1, 0, 0},
- {"help", 0, 0, 0},
- {"kill-daemon", 0, 0, 0},
- {0, 0, 0, 0},
+ { "debug", 1, 0, 0},
+ { "server-name", 1, 0, 0},
+ { "locale", 1, 0, 0},
+ { "locale-append", 1, 0, 0},
+ { "help", 0, 0, 0},
+ { "kill-daemon", 0, 0, 0},
+ { 0, 0, 0, 0},
};
- c = getopt_long (argc, argv, "v:n:l:k",
+ c = getopt_long (argc, argv, "v:n:l:k:a",
long_options, &option_index);
if (c == -1) break;
else if (g_strcmp0 (long_options[option_index].name, "locale") == 0) {
strncpy (_locale, optarg, sizeof (_locale));
}
+ else if (g_strcmp0 (long_options[option_index].name, "locale-append") == 0) {
+ strncat (_locale, optarg, sizeof (_locale));
+ }
else if (g_strcmp0 (long_options[option_index].name, "help") == 0) {
_print_usage (stdout, argv[0]);
exit (EXIT_SUCCESS);
case 'l':
strncpy (_locale, optarg, sizeof (_locale));
break;
+ case 'a':
+ strncat (_locale, optarg, sizeof (_locale));
+ break;
case 'k':
_kill_daemon = TRUE;
break;