- Fix build errors with gcc14:
uim-gcc14-fix.patch also run autogen.sh to refresh OBS-URL: https://build.opensuse.org/package/show/M17N/uim?expand=0&rev=73
This commit is contained in:
60
etc-x11-xim.d-uim
Normal file
60
etc-x11-xim.d-uim
Normal file
@@ -0,0 +1,60 @@
|
||||
OLD_PATH=$PATH
|
||||
PATH=/usr/bin:/usr/X11R6/bin:$PATH
|
||||
|
||||
if ! type -p uim-xim > /dev/null 2>&1 ; then
|
||||
echo "uim-xim is not available."
|
||||
return 1
|
||||
fi
|
||||
|
||||
export XMODIFIERS="@im=uim"
|
||||
export GTK_IM_MODULE=uim
|
||||
export QT_IM_SWITCHER=imsw-multi
|
||||
export QT_IM_MODULE=uim
|
||||
|
||||
uim-xim &
|
||||
|
||||
case "$WINDOWMANAGER" in
|
||||
*gnome*)
|
||||
# if applet is available, no need to start additional programs here
|
||||
if rpm -q uim-applet-gnome > /dev/null 2>&1 ; then
|
||||
PATH=$OLD_PATH
|
||||
# success:
|
||||
return 0
|
||||
fi;;
|
||||
esac
|
||||
|
||||
# start system-tray or stand-alone tool
|
||||
|
||||
look_for_uim_toolbar () {
|
||||
local p
|
||||
for p in $*; do
|
||||
if type -p "$p" > /dev/null 2>&1; then
|
||||
toolbar="$p"
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
toolbar=""
|
||||
look_for_uim_toolbar uim-toolbar-gtk3-systray uim-toolbar-gtk-systray
|
||||
|
||||
if [ -z "$toolbar" ]; then
|
||||
# no systray found, let's start a stand-alone toolbar
|
||||
case "$WINDOWMANAGER" in
|
||||
*plasma*)
|
||||
look_for_uim_toolbar \
|
||||
uim-toolbar-qt4 uim-toolbar-qt \
|
||||
uim-toolbar-gtk3 uim-toolbar-gtk;;
|
||||
*)
|
||||
look_for_uim_toolbar \
|
||||
uim-toolbar-gtk3 uim-toolbar-gtk \
|
||||
uim-toolbar-qt4 uim-toolbar-qt;;
|
||||
esac
|
||||
fi
|
||||
test -n "$toolbar" && $toolbar &
|
||||
unset toolbar
|
||||
|
||||
PATH=$OLD_PATH
|
||||
|
||||
# success:
|
||||
return 0
|
Reference in New Issue
Block a user