From 218b5b4002b14930206d7168d0efcec73dfb242f Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Oct 21 2008 08:56:42 +0000 Subject: - Read %%{_sysconfdir}/X11/xinput.d/none.conf for non-CJKI locales to make consistency in the status on im-chooser. so it would /disables/ IM regardless of what the kind of locales you use and what the kind of IM you installed. NOTE: if you can't input any characters with GTK application, you may implicitly use the different buiit-in immodule. you can modify none.conf to get the right thing then. - imsettings-r210.patch: backport to allow starting none without warnings. --- diff --git a/imsettings-constraint-of-language.patch b/imsettings-constraint-of-language.patch index ed04604..1374842 100644 --- a/imsettings-constraint-of-language.patch +++ b/imsettings-constraint-of-language.patch @@ -1,19 +1,25 @@ -diff -ruN imsettings-0.101.1.orig/data/xinput.sh.in.in imsettings-0.101.1/data/xinput.sh.in.in ---- imsettings-0.101.1.orig/data/xinput.sh.in.in 2008-06-03 20:53:49.000000000 +0900 -+++ imsettings-0.101.1/data/xinput.sh.in.in 2008-06-12 23:03:51.000000000 +0900 -@@ -43,7 +43,14 @@ +diff -ruN imsettings-0.105.0.orig/data/xinput.sh.in.in imsettings-0.105.0/data/xinput.sh.in.in +--- imsettings-0.105.0.orig/data/xinput.sh.in.in 2008-10-11 14:54:28.000000000 +0900 ++++ imsettings-0.105.0/data/xinput.sh.in.in 2008-10-21 14:57:51.000000000 +0900 +@@ -152,7 +152,20 @@ SHORT_DESC="User Specific" fi elif [ -r "$SYS_XINPUTRC" ]; then - source "$SYS_XINPUTRC" + # FIXME: This hardcoded list has to be gone in the future. + _language_list="as bn gu hi ja kn ko ml mr ne or pa si ta te th ur vi zh" ++ _sourced_xinputrc=0 + for i in $_language_list; do + if echo $tmplang | grep -q -E "^$i"; then + source "$SYS_XINPUTRC" ++ _sourced_xinputrc=1 + break + fi + done ++ if [ $_sourced_xinputrc -eq 0 ]; then ++ # Read none.conf to set up properly for locales not listed the above. ++ source @XINPUT_PATH@/none.conf ++ fi fi [ -z "$XIM" ] && XIM=none diff --git a/imsettings-disable-xim.patch b/imsettings-disable-xim.patch deleted file mode 100644 index db1343c..0000000 --- a/imsettings-disable-xim.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -pruN imsettings-0.101.2.orig/data/xinput.sh.in.in imsettings-0.101.2/data/xinput.sh.in.in ---- imsettings-0.101.2.orig/data/xinput.sh.in.in 2008-06-03 20:53:49.000000000 +0900 -+++ imsettings-0.101.2/data/xinput.sh.in.in 2008-06-26 11:52:33.000000000 +0900 -@@ -60,8 +60,8 @@ export GTK_IM_MODULE - [ -n "$QT_IM_MODULE" ] && export QT_IM_MODULE - - # setup XMODIFIERS --XMODIFIERS="@im=imsettings" --export XMODIFIERS -+[ -z "$XMODIFIERS" -a -n "$XIM" ] && XMODIFIERS="@im=$XIM" -+[ -n "$XMODIFIERS" ] && export XMODIFIERS - - # start IM via imsettings - IMSETTINGS_MODULE=${SHORT_DESC:-${XIM}} diff --git a/imsettings-r210.patch b/imsettings-r210.patch new file mode 100644 index 0000000..373f742 --- /dev/null +++ b/imsettings-r210.patch @@ -0,0 +1,43 @@ +2008-10-21 Akira TAGOH + + * src/factory.c (imsettings_manager_real_start_im): allow to start none + without any warnings. + +Index: src/factory.c +=================================================================== +--- src/factory.c (revision 209) ++++ src/factory.c (working copy) +@@ -517,19 +517,22 @@ + pidfile = NULL; + } + +- xim_prog = imsettings_info_get_xim_program(info); +- xim_args = imsettings_info_get_xim_args(info); +- if (xim_prog == NULL) { +- g_set_error(error, IMSETTINGS_GERROR, IMSETTINGS_GERROR_INVALID_IMM, +- _("No XIM server is available in %s"), module); +- goto end; ++ /* hack to allow starting none.conf */ ++ if (strcmp(module, "none") != 0) { ++ xim_prog = imsettings_info_get_xim_program(info); ++ xim_args = imsettings_info_get_xim_args(info); ++ if (xim_prog == NULL) { ++ g_set_error(error, IMSETTINGS_GERROR, IMSETTINGS_GERROR_INVALID_IMM, ++ _("No XIM server is available in %s"), module); ++ goto end; ++ } ++ pidfile = _build_pidfilename(xinputfile, priv->display_name, "xim"); ++ ++ /* bring up a XIM server */ ++ if (!_start_process(xim_prog, xim_args, pidfile, lang, error)) ++ goto end; + } +- pidfile = _build_pidfilename(xinputfile, priv->display_name, "xim"); + +- /* bring up a XIM server */ +- if (!_start_process(xim_prog, xim_args, pidfile, lang, error)) +- goto end; +- + /* FIXME: We need to take care of imsettings per X screens? + */ + /* FIXME: have to deal with the errors */ diff --git a/imsettings.spec b/imsettings.spec index ccd6a39..201f743 100644 --- a/imsettings.spec +++ b/imsettings.spec @@ -1,6 +1,6 @@ Name: imsettings Version: 0.105.0 -Release: 3%{?dist} +Release: 4%{?dist} License: LGPLv2+ URL: http://code.google.com/p/imsettings/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -14,7 +14,7 @@ Source0: http://imsettings.googlecode.com/files/%{name}-%{version}.tar.bz2 # workaround for KDE, it will be removed when we have a correct fix Source1: imsettings-kde.sh Patch0: imsettings-constraint-of-language.patch -Patch1: imsettings-disable-xim.patch +Patch1: imsettings-r210.patch Summary: Delivery framework for general Input Method configuration Group: Applications/System @@ -79,7 +79,7 @@ This package contains a plugin to get this working on Xfce. %prep %setup -q %patch0 -p1 -b .0-lang -#%%patch1 -p1 -b .1-xim +%patch1 -p0 -b .1-allow-none-to-start %build %configure \ @@ -187,6 +187,15 @@ fi %changelog +* Tue Oct 21 2008 Akira TAGOH - 0.105.0-4 +- Read %%{_sysconfdir}/X11/xinput.d/none.conf for non-CJKI locales to make + consistency in the status on im-chooser. so it would /disables/ IM regardless + of what the kind of locales you use and what the kind of IM you installed. + NOTE: if you can't input any characters with GTK+ application, you may + implicitly use the different buiit-in immodule. you can modify none.conf to + get the right thing then. +- imsettings-r210.patch: backport to allow starting none without warnings. + * Fri Oct 17 2008 Than Ngo 0.105.0-3 - readd the workaround for KDE