#!/bin/sh

mkdir -p $HOME/.wenju

mkdir -p $HOME/.gtk-2.0
gtk-query-immodules-2.0-32 >$HOME/.gtk-2.0/gtk.immodules

# If no root access, TIM modules and data can be installed like this:
#   ~/.gtk-2.0/immodules/       - im-tim.so or other immodules
#   ~/.gtk-2.0/gtk-immodules    - point GTK_IM_MODULE_FILE to this file
#   ~/.wenju/                   - TIM tables

# Note for Windows

# Under Windows, gtk-query-immodules-2.0 does not work correctly.
# First, it uses Windows directory separator backslash ("\") while
# loading a immodule expects forward slash ("/").  Second, under
# Windows, a virtual directory name "/target" is used to make
# installation destination relocatable.  So it is preferable to
# use the "/target" when specifing immodule location.  Edit the
# generated gtk.immodules under Windows.
# As of GTK+ 2.8, "/target" virtual directory is no longer valid,
# specify modules relative to package GTK+ 2 installed directory,
# for example, "../.gtk-2.0/immodules/im-tim.dll".

# Note for GNOME

# Since GTK+ 2.8, showing input methods in popup menu is controlled
# by "gtk-show-input-method-menu" setting.  It may be FALSE by
# default.  Change it using gconf-editor through
#   desktop->gnome->interface->show_input_method_menu
