diff options
author | Matthias Clasen <mclasen@redhat.com> | 2008-03-15 04:24:50 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2008-03-15 04:24:50 +0000 |
commit | 3a2df1836ec07b2f87058d4b1d20f5941b3b88ef (patch) | |
tree | 527941c2b869048c71283082e0329264fbf0943e /gtk/gtkimcontextsimple.c | |
parent | 57fa18345fdaf97ecdb1b09202f7116f41335b76 (diff) | |
download | gtk+-3a2df1836ec07b2f87058d4b1d20f5941b3b88ef.tar.gz |
Emit preedit_start/_end as appropriate. (#521934, Huang Peng)
2008-03-15 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkimcontextsimple.c: Emit preedit_start/_end as
appropriate. (#521934, Huang Peng)
svn path=/trunk/; revision=19878
Diffstat (limited to 'gtk/gtkimcontextsimple.c')
-rw-r--r-- | gtk/gtkimcontextsimple.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gtk/gtkimcontextsimple.c b/gtk/gtkimcontextsimple.c index 20624cf8ab..e8bc4cd652 100644 --- a/gtk/gtkimcontextsimple.c +++ b/gtk/gtkimcontextsimple.c @@ -161,6 +161,7 @@ gtk_im_context_simple_commit_char (GtkIMContext *context, context_simple->tentative_match = 0; context_simple->tentative_match_len = 0; g_signal_emit_by_name (context_simple, "preedit_changed"); + g_signal_emit_by_name (context_simple, "preedit_end"); } g_signal_emit_by_name (context, "commit", &buf); @@ -724,6 +725,7 @@ gtk_im_context_simple_filter_keypress (GtkIMContext *context, context_simple->compose_buffer[0] = 0; g_signal_emit_by_name (context_simple, "preedit_changed"); + g_signal_emit_by_name (context_simple, "preedit_end"); } return TRUE; @@ -733,7 +735,7 @@ gtk_im_context_simple_filter_keypress (GtkIMContext *context, } /* Ignore modifier key presses */ - for (i=0; i < G_N_ELEMENTS (gtk_compose_ignore); i++) + for (i = 0; i < G_N_ELEMENTS (gtk_compose_ignore); i++) if (event->keyval == gtk_compose_ignore[i]) return FALSE; @@ -786,6 +788,9 @@ gtk_im_context_simple_filter_keypress (GtkIMContext *context, } g_signal_emit_by_name (context_simple, "preedit_changed"); + + if (!context_simple->in_hex_sequence) + g_signal_emit_by_name (context_simple, "preedit_end"); return TRUE; } @@ -819,6 +824,7 @@ gtk_im_context_simple_filter_keypress (GtkIMContext *context, context_simple->modifiers_dropped = FALSE; context_simple->tentative_match = 0; + g_signal_emit_by_name (context_simple, "preedit_start"); g_signal_emit_by_name (context_simple, "preedit_changed"); return TRUE; @@ -877,6 +883,9 @@ gtk_im_context_simple_filter_keypress (GtkIMContext *context, g_signal_emit_by_name (context_simple, "preedit_changed"); + if (!context_simple->in_hex_sequence) + g_signal_emit_by_name (context_simple, "preedit_end"); + return TRUE; } } @@ -914,6 +923,7 @@ gtk_im_context_simple_reset (GtkIMContext *context) context_simple->tentative_match = 0; context_simple->tentative_match_len = 0; g_signal_emit_by_name (context_simple, "preedit_changed"); + g_signal_emit_by_name (context_simple, "preedit_end"); } } |