GNOME Bugzilla – Bug 95429
Cannot rename a file with input methods
Last modified: 2004-12-22 21:47:04 UTC
Run nautilus in Japanese or Asisn locales, and then select a file and rename... in a pop-up menu. a text field window comes up, but input method cannot be used to input Japanese text and rename it with Japanese characters. ---- I queryed nautilus bugs with I18N keyword, but could not find any related to this problem. If there is a duplicated bug w/o I18N keyword, please close this bug and put I18N keyword to the existing one.
Was this in HEAD? If not, try again, because i recently redid the rename widget. It should (if no bugs) support IM, but i haven't tested it.
Alex: It was on multihead branch. I'll try HEAD tomorrow. How about gnome-2-0 branch?
I meant to say if I test HEAD and verify it works, can you commit the fix to gnome-2-0 branch? Thanks!
campd says no chance in porting rename widget back to 2.0.x. Marking fixed at the community level, not sure how this applies to ximian and sun. CCIng louie to deal with that.
Is anybody sure that rename works with input methods on the HEAD? I tested, but it did not. It seems that "event" signal in GnomeIconItem consumes key events which input methods would like to filter otherwise. Reopening - if somebody actually has verified it works, please close it.
Hidetoshi : I thought you mentioned above the input methods worked on head for you?
*** Bug 89575 has been marked as a duplicate of this bug. ***
Maybe I was not clear on the above comment. Let me start over. Here's short summary of what I've found so far. - Input method in rename is not working when view with icon style is selected, but it is in view in list style, so I suspect this is an issue of GnomeIconItem widget. - When input method is active, there are two handlers used in GtkEntry to process input method events. "preedit-changed" and "commit". Originally, I suspected "event" method of the GnomeIconItem prevented these input method handlers being called - but, this seems not be the case - both methods are being called. - The text processed in the "commit" handler of the GtkEntry is properly passed to "render" and 'draw" methods of the GnomeIconItem, so the commit text from the input method is okay to display on the rename(GnomeIconItem) widget. - The text processed in the "preedit-changed" handler is not passed to "render" or "draw" method of the GnomIconItem, so I cannot see any preedit text in the rename widget. - When input method is active, all the key-press events are expected to be given to input method first - but this is not so with the rename widget. (This is logged in bug 90082). I'll continue to debug on the last two issues from Monday. I appreciate any clue from any of the above..Thanks!
My above assessment was on gnome-2-0 which was before Alex's rename widget change to replace GnomeIconItem with eel-editable-editor. Now, I'm on the HEAD for eel + nautilus. By applying a small patch to set preedit text to pango layout, I could see input method's preedit text displaying well in test-eel-editable-editor program. I'm going to verify this on nautilus from now. BTW, here is a patch for eel-editable-label. Please review and commit if it looks okay. Index: eel-editable-label.c =================================================================== RCS file: /cvs/gnome/eel/eel/eel-editable-label.c,v retrieving revision 1.5 diff -u -r1.5 eel-editable-label.c --- eel-editable-label.c 1 Oct 2002 14:42:11 -0000 1.5 +++ eel-editable-label.c 5 Nov 2002 01:21:53 -0000 @@ -1014,8 +1014,10 @@ g_string_prepend_len (tmp_string, label->text, label->n_bytes); g_string_insert (tmp_string, label->selection_anchor, preedit_string); - label->layout = gtk_widget_create_pango_layout (widget, label->text); - + label->layout = gtk_widget_create_pango_layout (widget, NULL); + pango_layout_set_text (label->layout, + tmp_string->str, tmp_string->len); + pango_attr_list_splice (tmp_attrs, preedit_attrs, label->selection_anchor, preedit_length);
Created attachment 12134 [details] [review] a patch to render correct preedit text
A clearer patch is attached. Okay to commit to the HEAD?
Dave, Alex, can we get this on HEAD?
Yes, please commit. Thanks.
done, thanks.
FIXED then, thanks.