diff options
author | Owen Taylor <otaylor@redhat.com> | 2001-11-02 20:48:15 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2001-11-02 20:48:15 +0000 |
commit | 7f63b5db980f2f73301bb47211f806574c0426de (patch) | |
tree | abb08fa8e6b8425452153beb909f3db4a246b496 /gtk/gtkimmulticontext.c | |
parent | 782107bc11110ca90c2046f6b6f0546594254115 (diff) | |
download | gdk-pixbuf-7f63b5db980f2f73301bb47211f806574c0426de.tar.gz |
Patch from HideToshi Tajima (#51922)
Fri Nov 2 15:30:34 2001 Owen Taylor <otaylor@redhat.com>
Patch from HideToshi Tajima (#51922)
* gtk/gtkimmulticontext.c: Proxy set_use_preedit().
* gtk/modules/input/gtkimcontextxim.[ch]: Implement
set_use_preedit().
* gtk/modules/input/gtkimcontextxim.[ch]: If we have
to destroy the input context because we change the
client window or use_preedit, make sure we empty
the preedit string.
Diffstat (limited to 'gtk/gtkimmulticontext.c')
-rw-r--r-- | gtk/gtkimmulticontext.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gtk/gtkimmulticontext.c b/gtk/gtkimmulticontext.c index 4d4cce66b..ea51bab2d 100644 --- a/gtk/gtkimmulticontext.c +++ b/gtk/gtkimmulticontext.c @@ -45,6 +45,8 @@ static void gtk_im_multicontext_focus_out (GtkIMContext static void gtk_im_multicontext_reset (GtkIMContext *context); static void gtk_im_multicontext_set_cursor_location (GtkIMContext *context, GdkRectangle *area); +static void gtk_im_multicontext_set_use_preedit (GtkIMContext *context, + gboolean use_preedit); static gboolean gtk_im_multicontext_get_surrounding (GtkIMContext *context, gchar **text, gint *cursor_index); @@ -115,6 +117,7 @@ gtk_im_multicontext_class_init (GtkIMMulticontextClass *class) im_context_class->focus_out = gtk_im_multicontext_focus_out; im_context_class->reset = gtk_im_multicontext_reset; im_context_class->set_cursor_location = gtk_im_multicontext_set_cursor_location; + im_context_class->set_use_preedit = gtk_im_multicontext_set_use_preedit; im_context_class->set_surrounding = gtk_im_multicontext_set_surrounding; im_context_class->get_surrounding = gtk_im_multicontext_get_surrounding; @@ -321,6 +324,17 @@ gtk_im_multicontext_set_cursor_location (GtkIMContext *context, gtk_im_context_set_cursor_location (slave, area); } +static void +gtk_im_multicontext_set_use_preedit (GtkIMContext *context, + gboolean use_preedit) +{ + GtkIMMulticontext *multicontext = GTK_IM_MULTICONTEXT (context); + GtkIMContext *slave = gtk_im_multicontext_get_slave (multicontext); + + if (slave) + gtk_im_context_set_use_preedit (slave, use_preedit); +} + static gboolean gtk_im_multicontext_get_surrounding (GtkIMContext *context, gchar **text, |