]> Pileus Git - ~andy/gtk/commitdiff
Call gtk_entry_set_position_internal() that takes a new "reset_IM"
authorOwen Taylor <otaylor@redhat.com>
Tue, 17 Dec 2002 02:59:18 +0000 (02:59 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Tue, 17 Dec 2002 02:59:18 +0000 (02:59 +0000)
Mon Dec 16 21:39:28 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkentry.c (gtk_entry_enter_text): Call
        gtk_entry_set_position_internal() that takes a
        new "reset_IM" parameter, so that we avoid the
        problem where committing text would reset the
        input method. (#74381, Kang Jeong-Hee)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkentry.c

index 648f21940b352fef490342950b499d027c1eb8b0..680e0de3043a18dfb19c34ca419c7bad5094ea8d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Mon Dec 16 21:39:28 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkentry.c (gtk_entry_enter_text): Call
+       gtk_entry_set_position_internal() that takes a
+       new "reset_IM" parameter, so that we avoid the
+       problem where committing text would reset the
+       input method. (#74381, Kang Jeong-Hee)
+
 2002-12-17  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtkcontainer.c: Fix a few doc comments.
index 648f21940b352fef490342950b499d027c1eb8b0..680e0de3043a18dfb19c34ca419c7bad5094ea8d 100644 (file)
@@ -1,3 +1,11 @@
+Mon Dec 16 21:39:28 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkentry.c (gtk_entry_enter_text): Call
+       gtk_entry_set_position_internal() that takes a
+       new "reset_IM" parameter, so that we avoid the
+       problem where committing text would reset the
+       input method. (#74381, Kang Jeong-Hee)
+
 2002-12-17  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtkcontainer.c: Fix a few doc comments.
index 648f21940b352fef490342950b499d027c1eb8b0..680e0de3043a18dfb19c34ca419c7bad5094ea8d 100644 (file)
@@ -1,3 +1,11 @@
+Mon Dec 16 21:39:28 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkentry.c (gtk_entry_enter_text): Call
+       gtk_entry_set_position_internal() that takes a
+       new "reset_IM" parameter, so that we avoid the
+       problem where committing text would reset the
+       input method. (#74381, Kang Jeong-Hee)
+
 2002-12-17  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtkcontainer.c: Fix a few doc comments.
index 648f21940b352fef490342950b499d027c1eb8b0..680e0de3043a18dfb19c34ca419c7bad5094ea8d 100644 (file)
@@ -1,3 +1,11 @@
+Mon Dec 16 21:39:28 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkentry.c (gtk_entry_enter_text): Call
+       gtk_entry_set_position_internal() that takes a
+       new "reset_IM" parameter, so that we avoid the
+       problem where committing text would reset the
+       input method. (#74381, Kang Jeong-Hee)
+
 2002-12-17  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtkcontainer.c: Fix a few doc comments.
index 648f21940b352fef490342950b499d027c1eb8b0..680e0de3043a18dfb19c34ca419c7bad5094ea8d 100644 (file)
@@ -1,3 +1,11 @@
+Mon Dec 16 21:39:28 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkentry.c (gtk_entry_enter_text): Call
+       gtk_entry_set_position_internal() that takes a
+       new "reset_IM" parameter, so that we avoid the
+       problem where committing text would reset the
+       input method. (#74381, Kang Jeong-Hee)
+
 2002-12-17  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtkcontainer.c: Fix a few doc comments.
index 648f21940b352fef490342950b499d027c1eb8b0..680e0de3043a18dfb19c34ca419c7bad5094ea8d 100644 (file)
@@ -1,3 +1,11 @@
+Mon Dec 16 21:39:28 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkentry.c (gtk_entry_enter_text): Call
+       gtk_entry_set_position_internal() that takes a
+       new "reset_IM" parameter, so that we avoid the
+       problem where committing text would reset the
+       input method. (#74381, Kang Jeong-Hee)
+
 2002-12-17  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtkcontainer.c: Fix a few doc comments.
index 2e9e7aa54cf45f00cc1c561daba4aaff489598e6..9f5f9fa63b501639b44d479e798ce6977e26e1d1 100644 (file)
@@ -1751,22 +1751,29 @@ gtk_entry_get_chars      (GtkEditable   *editable,
 }
 
 static void
-gtk_entry_real_set_position (GtkEditable *editable,
-                            gint         position)
+gtk_entry_set_position_internal (GtkEntry    *entry,
+                                gint         position,
+                                gboolean     reset_im)
 {
-  GtkEntry *entry = GTK_ENTRY (editable);
-  
   if (position < 0 || position > entry->text_length)
     position = entry->text_length;
 
   if (position != entry->current_pos ||
       position != entry->selection_bound)
     {
-      gtk_entry_reset_im_context (entry);
+      if (reset_im)
+       gtk_entry_reset_im_context (entry);
       gtk_entry_set_positions (entry, position, position);
     }
 }
 
+static void
+gtk_entry_real_set_position (GtkEditable *editable,
+                            gint         position)
+{
+  gtk_entry_set_position_internal (GTK_ENTRY (editable), position, TRUE);
+}
+
 static gint
 gtk_entry_get_position (GtkEditable *editable)
 {
@@ -2359,7 +2366,7 @@ gtk_entry_enter_text (GtkEntry       *entry,
 
   tmp_pos = entry->current_pos;
   gtk_editable_insert_text (editable, str, strlen (str), &tmp_pos);
-  gtk_editable_set_position (editable, tmp_pos);
+  gtk_entry_set_position_internal (entry, tmp_pos, FALSE);
 }
 
 /* All changes to entry->current_pos and entry->selection_bound