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 116540 - GtkContainer needs to deal with RTL
GtkContainer needs to deal with RTL
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
2.2.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks: 76219
 
 
Reported: 2003-07-02 15:15 UTC by Soren Sandmann Pedersen
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
rtl support for tab focus moving (1.63 KB, patch)
2003-07-08 22:17 UTC, Matthias Clasen
none Details | Review

Description Soren Sandmann Pedersen 2003-07-02 15:15:13 UTC
The focus handler in gtkcontainer.c does not deal with RTL at all. But the
direction TAB_FORWARD and TAB_BACKWARD needs to be reversed in RTL mode.

There may be other widgets with wrong focus handlers
Comment 1 Matthias Clasen 2003-07-08 06:57:20 UTC
I don't think GtkContainer is the right level to deal with this. A 
vbox shouldn't reverse its focus chain in rtl mode. 
Comment 2 Soren Sandmann Pedersen 2003-07-08 10:46:19 UTC
It would certainly have to me more involved than just reversing the
focus chain, perhaps something like reversing the horizontal sort when
direction is TAB_FORWARD/TAB_BACKWARD.

(As if focus handling in gtkcontainer.c wasn't involved enough).
Comment 3 Owen Taylor 2003-07-08 11:53:55 UTC
gtkcontainer is exactly the right place for this ... if
we can make focusing work for LTR in gtkcontainer.c, we
can make it work for RTL.

The function where the change would be made is
gtk_container_focus_sort_tab() ... you could either
use g_list_sort_with_data() or have a tab_compare_ltr()
and a tab_compare_rtl()
Comment 4 Matthias Clasen 2003-07-08 22:16:51 UTC
Ok, I should have looked at the code before making that comment. Here
is a patch to make gtk_container_focus_sort_tab() aware of the text
direction. 
Comment 5 Matthias Clasen 2003-07-08 22:17:45 UTC
Created attachment 18148 [details] [review]
rtl support for tab focus moving
Comment 6 Owen Taylor 2003-07-08 22:43:04 UTC
Looks fine to me