I got it. Thanks Tomas ... Just one more question: is it ok to have more than one instance of gtk_im_context for the same app ? I am asking because currently I'm doing like this: for each new created window I have a instance of gtk_im_context tied to it (as an instance variable) - and everything works fine until the moment I close my first window: the vkb stops poping up after my custom editable forms get focus (it keeps working if I close any other window instead of the first one though). I do not understand this behaviour once each window has its own gtk_im_context instance ...
So my question is: can I have more than one instance of gtk_im_context objects for the same app, or should I declare it a static variable (only a single object tied to class instead of instance) ? regards On 5/24/06, Antonio Gomes <[EMAIL PROTECTED]> wrote:
On 5/24/06, Tomas Junnonen <[EMAIL PROTECTED]> wrote: > ext Antonio Gomes wrote: > > On 5/24/06, Tomas Junnonen <[EMAIL PROTECTED]> wrote: > >> ext Antonio Gomes wrote: > >> > all, > >> > > >> > is there any drawback of calling gtk_context_im_show|hide methods by > >> > my own? I mean gtk and the hildon input method is suppose to care > >> > about this, but sometimes I am forcing it to show up or hide (for > >> > specific cases). > >> > >> It's perfectly fine to do this. GTK and hildon input methods do take > >> care of the common cases, but if you want to connect the VKB behavior to > >> use-cases that are specific to your application or if you're > >> implementing widgets of your own, that's what the functions are there > >> for. > >> > > > > Great. So, I facing problems with consecutive callings of > > gtk_context_im_hide|show. Situation: > > > > * An custom editable widget gets the focus -> the vkb pops up. > > * pressing 'tab' automatically jump up the focus to the next focusable > > widget, right ? Ok ... > > * In cases when this next widget is also an editable one, in my > > implementation vkb gets hide (because of the 'focus out' event got > > fired from the former widget) and then show up, ('focus in' event from > > the current focusable/editable widget), but this popping up fails. > > > > So I wonder if there is an way to avoid the preliminary hiding in > > cases like this (jumping from an editable widget to another one). This > > way, it would make my app faster (consecutives hiding/pop ups of the > > vkb is heavy) as well as avoid the problem I am facing ... > > Set the use-show-hide property on the IM context of your custom widget > and the VKB won't get hidden on focus out. Like this: > g_object_set (G_OBJECT (widget->im_context), "use-show-hide", TRUE, NULL); > app [9809]: GLIB WARNING ** GLib-GObject - IA__g_object_set_valist: object class `GtkIMMulticontext' has no property named `use-show-hide' That seems to be GtkIMContext(Simple) specif. Is there a similar for GtkIMMulticontext ? regards -- --Antonio Gomes
-- --Antonio Gomes _______________________________________________ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers