1 --- imsettings-1.3.0/data/xinput.sh.in.in.orig 2012-07-27 21:01:48.901935186 +0200
2 +++ imsettings-1.3.0/data/xinput.sh.in.in 2012-07-27 21:06:32.818589937 +0200
6 # Copyright (C) 1999-2004,2007-2011 Red Hat, Inc. All rights reserved. This
7 # copyrighted material is made available to anyone wishing to use, modify,
8 # copy, or redistribute it subject to the terms and conditions of the
11 # X Input method setup script
13 -function log_init() {
15 if [ ! -n "$DRY_RUN" ]; then
16 if [ -f $HOME/.imsettings.log ]; then
17 mv $HOME/.imsettings.log $LOGFILE.bak
27 -function is_dbus_enabled() {
29 imsettings-check --check-dbus
33 -function is_imsettings_enabled() {
34 +is_imsettings_enabled() {
35 [ -z "$DISABLE_IMSETTINGS" ] && is_dbus_enabled
38 -function check_imsettings_capability() {
39 +check_imsettings_capability() {
41 imsettings-check --check-modules >/dev/null
47 -function lookup_desktop() {
56 -function get_desktop() {
58 if [ -n "$GDMSESSION" ]; then
59 GUESS_DESKTOP="\$GDMSESSION"
65 -function is_gtk_supported() {
67 [ -n "$IMSETTINGS_DISABLE_DESKTOP_CHECK" ] && return 0
68 case "$(get_desktop|tr '[A-Z]' '[a-z]')" in
74 -function is_qt_supported() {
76 [ -n "$IMSETTINGS_DISABLE_DESKTOP_CHECK" ] && return 0
77 case "$(get_desktop|tr '[A-Z]' '[a-z]')" in
83 -function is_xim_supported() {
85 [ -n "$IMSETTINGS_DISABLE_DESKTOP_CHECK" ] && return 0
86 if check_imsettings_capability xim; then
92 -function setup_gtk_immodule() {
93 +setup_gtk_immodule() {
94 if is_imsettings_enabled && is_gtk_supported; then
95 # Ensure GTK_IM_MODULE is empty. otherwise GTK+ doesn't pick up immodule through XSETTINGS
101 -function setup_qt_immodule() {
102 +setup_qt_immodule() {
103 if is_imsettings_enabled && is_qt_supported; then
104 # FIXME: Qt doesn't support XSETTINGS for immodule yet.
105 # We still need to go with the older way.
110 -function setup_xim() {
112 if is_imsettings_enabled && is_xim_supported; then
114 XMODIFIERS="@im=imsettings"
119 -function run_imsettings() {
122 if [ -n "$DRY_RUN" ]; then
123 log "*** DRY RUN MODE: running IM through imsettings"
128 -function run_xim() {
131 if [ -n "$DRY_RUN" ]; then
132 log "*** DRY RUN MODE: running IM without imsettings"
137 -function print_result() {
140 if [ $? -eq 0 ]; then
146 -function print_info() {
148 log "imsettings information"
149 log "=========================="
150 log "XINPUTRC: $READ_XINPUTRC"
151 @@ -248,13 +248,13 @@
153 if [ -r /etc/profile.d/lang.sh ]; then
155 - source /etc/profile.d/lang.sh
156 + . /etc/profile.d/lang.sh
157 elif [ -r /etc/default/locale ]; then
159 - source /etc/default/locale
160 + . /etc/default/locale
161 elif [ -r /etc/env.d/02locale ]; then
163 - source /etc/env.d/02locale
164 + . /etc/env.d/02locale
166 [ -n "$oldterm" ] && export TERM=$oldterm
169 [ -f "$HOME/.xinputrc.bak" ] && mv $HOME/.xinputrc.bak $CONFIGDIR/xinputrc.bak
171 if [ -r "$USER_XINPUTRC" -a "x$IMSETTINGS_DISABLE_USER_XINPUTRC" = "xno" ]; then
172 - source "$USER_XINPUTRC"
174 READ_XINPUTRC=$USER_XINPUTRC
175 if [ ! -h "$USER_XINPUTRC" ]; then
176 SHORT_DESC="User Specific"
179 for i in $_im_language_list; do
180 if echo $tmplang | grep -q -E "^$i"; then
181 - source "$SYS_XINPUTRC"
183 READ_XINPUTRC=$SYS_XINPUTRC
187 _xcompose_language_list="am_ET el_GR fi_FI pt_BR ru_RU"
188 for i in $_xcompose_language_list; do
189 if echo $tmplang | grep -q -E "^$i"; then
190 - source @XINPUT_PATH@/xcompose.conf
191 + . @XINPUT_PATH@/xcompose.conf
197 if [ $_sourced_xinputrc -eq 0 ]; then
198 # Read none.conf to set up properly for locales not listed the above.
199 - source @XINPUT_PATH@/none.conf
200 + . @XINPUT_PATH@/none.conf
204 --- imsettings-1.2.4/data/xinputinfo.sh.in.orig 2011-03-08 07:39:32.000000000 +0100
205 +++ imsettings-1.2.4/data/xinputinfo.sh.in 2011-07-17 22:57:52.000000000 +0200
210 # Copyright (C) 2008 Red Hat, Inc. All rights reserved.
213 # Foundation, Inc., 59 Temple Place - Suite 330,
214 # Boston, MA 02111-1307, USA.
216 -function is_script() {
218 if [ "x$(sed -re '/^[ ]?*[a-zA-Z0-9_]+=.*/{d};/[ ]?*#.*/{d}' $1)" = "x" ]; then
223 if [ -r /etc/profile.d/lang.sh ]; then
225 - source /etc/profile.d/lang.sh
226 + . /etc/profile.d/lang.sh
227 elif [ -r /etc/default/locale ]; then
229 - source /etc/default/locale
230 + . /etc/default/locale
231 elif [ -r /etc/env.d/02locale ]; then
233 - source /etc/env.d/02locale
234 + . /etc/env.d/02locale
236 [ -n "$oldterm" ] && export TERM=$oldterm
239 unset AUXILIARY_PROGRAM AUXILIARY_ARGS GTK_IM_MODULE ICON IMSETTINGS_IGNORE_ME LONG_DESC PREFERENCE_PROGRAM PREFERENCE_ARGS QT_IM_MODULE SHORT_DESC XIM XIM_PROGRAM XIM_ARGS IS_XIM
241 if [ $# -gt 0 ]; then
244 IMSETTINGS_FILENAME=$1
246 [ -z "$IMSETTINGS_DISABLE_USER_XINPUTRC" ] && IMSETTINGS_DISABLE_USER_XINPUTRC=no
248 if [ -r "$USER_XINPUTRC" -a "x$IMSETTINGS_DISABLE_USER_XINPUTRC" = "xno" ]; then
249 - source "$USER_XINPUTRC"
251 IMSETTINGS_FILENAME=$USER_XINPUTRC
252 elif [ -r "$SYS_XINPUTRC" ]; then
253 - source "$SYS_XINPUTRC"
255 IMSETTINGS_FILENAME=$SYS_XINPUTRC