After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 95429 - Cannot rename a file with input methods
Cannot rename a file with input methods
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: Internationalization (i18n)
unspecified
Other opensolaris
: Normal major
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
: 89575 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2002-10-10 18:25 UTC by Hidetoshi Tajima
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
a patch to render correct preedit text (793 bytes, patch)
2002-11-07 20:44 UTC, Hidetoshi Tajima
none Details | Review

Description Hidetoshi Tajima 2002-10-10 18:25:01 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.
Comment 1 Alexander Larsson 2002-10-11 08:03:23 UTC
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.
 
Comment 2 Hidetoshi Tajima 2002-10-16 05:57:46 UTC
Alex: It was on multihead branch. I'll try HEAD tomorrow.
How about gnome-2-0 branch?
Comment 3 Hidetoshi Tajima 2002-10-16 06:02:06 UTC
I meant to say if I test HEAD and verify it works, can
you commit the fix to gnome-2-0 branch? Thanks!
Comment 4 Dave Bordoley [Not Reading Bug Mail] 2002-10-31 19:59:35 UTC
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.
Comment 5 Hidetoshi Tajima 2002-10-31 21:00:32 UTC
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.



Comment 6 Dave Bordoley [Not Reading Bug Mail] 2002-11-03 16:10:53 UTC
Hidetoshi :

I thought you mentioned above the input methods worked on head for you?


Comment 7 Dave Bordoley [Not Reading Bug Mail] 2002-11-03 16:44:22 UTC
*** Bug 89575 has been marked as a duplicate of this bug. ***
Comment 8 Hidetoshi Tajima 2002-11-04 01:41:56 UTC
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!
Comment 9 Hidetoshi Tajima 2002-11-05 01:25:14 UTC
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);
 	  

Comment 10 Hidetoshi Tajima 2002-11-07 20:44:00 UTC
Created attachment 12134 [details] [review]
a patch to render correct preedit text
Comment 11 Hidetoshi Tajima 2002-11-07 20:44:59 UTC
A clearer patch is attached. Okay to commit
to the HEAD?
Comment 12 Luis Villa 2002-11-19 23:29:18 UTC
Dave, Alex, can we get this on HEAD?
Comment 13 Dave Camp 2002-12-04 15:21:49 UTC
Yes, please commit.  Thanks.
Comment 14 Hidetoshi Tajima 2002-12-04 20:58:25 UTC
done, thanks.
Comment 15 Dave Camp 2002-12-08 01:08:39 UTC
FIXED then, thanks.