How about adding a search path for gtk.immodules in user's home area?



Right now, the only default directory for gtk.immodules is
    sysconfdir/gtk-2.0/,
even though it can be explicitly set by GTK_IM_MODULE_FILE:
<blockquote>
GTK_IM_MODULE_FILE. Specifies the file listing the IM modules to load. This
environment variable overwrites the im_module_file specified in the RC files,
which in turn overwrites the default value sysconfdir/gtk-2.0/gtk.immodules
(sysconfdir is the sysconfdir specified when GTK+ was configured, usually
/usr/local/etc.) 
</blockquote>

For someone does not have root permission, he/she has to set environment
variable or edit RC file in order to use his/her own input method.  It is
doable but not very convenient.  If we can add, for example,
    ~/.gtk-2.0/,
in the search path for gtk.immodules before we check directory
    sysconfdir/gtk-2.0/,
it will be much easier for everyone.  For IM developer, he/she can install
files in the right place, either under home directory or system wide.  Then
for most users, they are not bothered by envrionment variables.

In order to do this, it seems glib could use something like
   gchar *g_get_filename_in_path(const gchar *search_path,
                                 const gchar *filename);
It will return the first existing filename in the path.

Regards,

Yao Zhang



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]