Re: Changing the default input method



On Fri, 2006-12-22 at 19:20 +0530, Anupama Chandwani wrote:
> >
> >How can I change the default GTK+ input method used by a system? I've
> >seen mention of the GTK_IM_MODULE enviroment variable, but it does not
> >seem to have any effect.
> >

Sorry for the late reply. I didn't see your email because it only went
to the list. I know some people like that.

> In gtkimcontextsimple.c there is a variable "global_context_id"

This is actually in gtkimmulticontext.c, which handles the right-click
menu of all input methods. However, it is a static variable, so it can
not be used from any other file or library.

Did you manage to actually change this variable somehow, without
patching GTK+ itself?

>  which
> maintains the input method of gtk. Setting that to "myinputmethod"
> will help you have it as default. But do this after initialisation of
> the module, else it will give a undefined refrence to you input
> method.

I guess you are somehow managing to do this by doing it in the module
itself, which might be OK because the symbol would not be linked until
the input module was loaded.

However, this would force the use of the input method by default for all
widgets and all applications. I can do that more simply by just using
"*" for the locale in the GtkIMContextInfo struct when the input method
registers itself.

But I would like for the application to choose the input method for some
widgets at runtime.

> >For instance, I've tried
> >export GTK_IM_MODULE="myinputmethod";gtk-demo
> >
> >Also, is there any way to change this at runtime, with a C function
> >call?

-- 
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com




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