]> Pileus Git - ~andy/gtk/commitdiff
Avoid emitting superfluous preedit_changed signals. Thanks to Matthias.
authorTor Lillqvist <tml@novell.com>
Fri, 3 Mar 2006 14:16:45 +0000 (14:16 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Fri, 3 Mar 2006 14:16:45 +0000 (14:16 +0000)
2006-03-03  Tor Lillqvist  <tml@novell.com>

* gtk/gtkimcontextsimple.c (gtk_im_context_simple_commit_char)
(gtk_im_context_simple_reset): Avoid emitting superfluous
preedit_changed signals. Thanks to Matthias. (#319407)

ChangeLog
ChangeLog.pre-2-10
gtk/gtkimcontextsimple.c

index bac6b6b83633ae75f153f6739fa432637a100c71..c5adae625e12cfd3e8597ae9762e5f1d9bf49d31 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-03-03  Tor Lillqvist  <tml@novell.com>
+
+       * gtk/gtkimcontextsimple.c (gtk_im_context_simple_commit_char)
+       (gtk_im_context_simple_reset): Avoid emitting superfluous
+       preedit_changed signals. Thanks to Matthias. (#319407)
+
 2006-03-03  Michael Natterer  <mitch@imendio.com>
 
        Applied modified patch from maemo-gtk which makes separators more
index bac6b6b83633ae75f153f6739fa432637a100c71..c5adae625e12cfd3e8597ae9762e5f1d9bf49d31 100644 (file)
@@ -1,3 +1,9 @@
+2006-03-03  Tor Lillqvist  <tml@novell.com>
+
+       * gtk/gtkimcontextsimple.c (gtk_im_context_simple_commit_char)
+       (gtk_im_context_simple_reset): Avoid emitting superfluous
+       preedit_changed signals. Thanks to Matthias. (#319407)
+
 2006-03-03  Michael Natterer  <mitch@imendio.com>
 
        Applied modified patch from maemo-gtk which makes separators more
index 2433af793d31d65de81220f67043e3ea7ee78fce..2d07ac2176489c698cbac589f0fdce08bdf4fd19 100644 (file)
@@ -1032,10 +1032,13 @@ gtk_im_context_simple_commit_char (GtkIMContext *context,
   len = g_unichar_to_utf8 (ch, buf);
   buf[len] = '\0';
 
+  if (context_simple->tentative_match || context_simple->in_hex_sequence)
+    {
+      context_simple->tentative_match = 0;
+      context_simple->tentative_match_len = 0;
+      g_signal_emit_by_name (context_simple, "preedit_changed");
+    }
   context_simple->in_hex_sequence = FALSE;  
-  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, "commit", &buf);
 }
@@ -1519,11 +1522,13 @@ gtk_im_context_simple_reset (GtkIMContext *context)
 
   context_simple->compose_buffer[0] = 0;
 
+  if (context_simple->tentative_match || context_simple->in_hex_sequence)
+    {
+      context_simple->tentative_match = 0;
+      context_simple->tentative_match_len = 0;
+      g_signal_emit_by_name (context_simple, "preedit_changed");
+    }
   context_simple->in_hex_sequence = FALSE;
-  context_simple->tentative_match = 0;
-  context_simple->tentative_match_len = 0;
-  
-  g_signal_emit_by_name (context_simple, "preedit_changed");
 }
 
 static void