Code Freeze break request



Hi, there seems to be a problem in EelEditableLabel (used by Nautilus
for icon view renames) and input methods. Here is on example of the
problem:

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=203865

We're calling gtk_im_context_reset() when commiting the preedit text,
which causes any remaining state in the preedit to be cleared, which is
causing these issues.

The attached patch fixes this problem. Is that ok to commit?

Also, the problem seems to exist in GtkEntry too. A bug report with a
testcase and a fix is at:
http://bugzilla.gnome.org/show_bug.cgi?id=353803

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a short-sighted pirate vagrant from the Mississippi delta. She's a 
green-fingered red-headed magician's assistant from a different time and 
place. They fight crime! 
? a
? eel-2.15.2.tar.gz
? eel-2.15.91.tar.gz
? eel-2.15.92.tar.gz
? eel-reset-im.patch
? po/stamp-it
Index: eel/eel-editable-label.c
===================================================================
RCS file: /cvs/gnome/eel/eel/eel-editable-label.c,v
retrieving revision 1.17
diff -u -p -r1.17 eel-editable-label.c
--- eel/eel-editable-label.c	16 Feb 2006 21:32:43 -0000	1.17
+++ eel/eel-editable-label.c	1 Sep 2006 09:42:08 -0000
@@ -2296,6 +2296,11 @@ eel_editable_label_enter_text (EelEditab
 {
   GtkEditable *editable = GTK_EDITABLE (label);
   gint tmp_pos;
+  gboolean old_need_im_reset;
+
+  /* Never reset the im while commiting, as that resets possible im state */
+  old_need_im_reset = label->need_im_reset;
+  label->need_im_reset = FALSE;
 
   if (label->selection_end != label->selection_anchor)
     gtk_editable_delete_selection (editable);
@@ -2310,6 +2315,8 @@ eel_editable_label_enter_text (EelEditab
   gtk_editable_insert_text (GTK_EDITABLE (label), str, strlen (str), &tmp_pos);
   tmp_pos = g_utf8_offset_to_pointer (label->text, tmp_pos) - label->text;
   eel_editable_label_select_region_index (label, tmp_pos, tmp_pos);
+
+  label->need_im_reset = old_need_im_reset;
 }
 
 /* IM Context Callbacks


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]