Takashi Iwai
13484062ed
- updated to uim-1.7.1: Major updates, see release notes of 1.6.0, 1.6.1, 1.7.0 and 1.7.1: http://uim.googlecode.com/svn/tags/uim-1.6.0/RELNOTE http://uim.googlecode.com/svn/tags/uim-1.6.1/RELNOTE http://uim.googlecode.com/svn/tags/uim-1.7.0/RELNOTE http://uim.googlecode.com/svn/tags/uim-1.7.1/RELNOTE - Enabled Gtk3 IM build - Re-enabled applet build for FACTORY, created uim-applet-gnome sub-package - Enable libedit properly - Enable m17n-lib - Clean up spec file OBS-URL: https://build.opensuse.org/request/show/77555 OBS-URL: https://build.opensuse.org/package/show/M17N/uim?expand=0&rev=18
61 lines
1.2 KiB
Plaintext
61 lines
1.2 KiB
Plaintext
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
|
|
*kde*)
|
|
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
|