GNOME Bugzilla – Bug 118540
Dynamic bidi base direction for GtkEntry
Last modified: 2011-02-04 16:16:03 UTC
The base direction for GtkEntry should be based on the contents of the entry and the current state of the keyboard, rather statically determined by gtk_widget_get_direction(). See bug 70451. [ Filing separate bugs for each widget, since I find bugs with lots of different things going on hard to work with ]
Changes from your version: - Renamed p_dir variables to pango_dir - Removed call: pango_layout_set_alignment (layout, pango_dir); Doesn't make any real sense (wrong type for the argument...) and shouldn't be necessary. Alignment doesn't have an effect for single-line layouts. - Introduced draw_insertion_cursor() utility function to clean up insertion-cursor drawing code. - Call gtk_entry_recompute() in gtk_entry_keymap_direction_changed() instead of doing the operations synchronously. - Removed unused widget_direction variables in gtkentry.c - Indentation fixes - Changed resolved_dir into a bitfield and moved it into the bitfield block; initial patch broke bin-compat by changing the size of the GtkEntry structure.
Created attachment 18764 [details] [review] Revised patch
Mon Mar 1 10:31:11 2004 Owen Taylor <otaylor@redhat.com> * gtk/gtkentry.c: Implement auto-bidi-direction, based on a patch from Dov Grobgeld. (#118540)