|
From: | Jan Djärv |
Subject: | Re: [Itai Seggev] Bug#439559: emacs22-gtk: forward/back buttons backwards when GTK is set to RTL language |
Date: | Mon, 03 Sep 2007 08:21:53 +0200 |
User-agent: | Thunderbird 2.0.0.6 (X11/20070728) |
Itai Seggev skrev:
On Thu, Aug 30, 2007 at 08:10:26AM +0200, Jan Djärv wrote:Itai Seggev skrev:It seems that some themes don't supply RTL information. Can you try some other themes and see if the forward-history/back-history are correct for any of them? Crux, Bluecurve or Clearlooks works for me.On Tue, Aug 28, 2007 at 12:19:43PM +0200, Jan Djärv wrote:I've made a fix in CVS HEAD, can you try that?OK, I've downloaded and compiled CVS HEAD. After about 2 minutes of testing, it seems that the next-node/previous-node buttons are correctly ordered for a RTL language, but that forward-history/back-history are still in the LTR orientation. I'llplay some more with it after work and see if there are any additional issues.OK, so it is a problem with some themes and not others. In particular with gtk-qt. However, if the problem really is with the theme, why is it that the next/previous buttons are OK, and only the back/forward buttons don't look right. Perhaps whatever changes to next/previous could also be applied to forward/back so that they also look OK in allthemes.
The difference is that next/previous are not Gtk+ stock icons (i.e. defined by the theme), but forward/back are. Gtk+ handles RTL/LTR by itself when stock icons are used, but only if the theme supplies that information.
So in theory we should ask Gtk+ if RTL is used, and if so, does the stock icons have any RTL information? Unfortunately, the Gtk+ API does not give us access to RTL information for individual themed icons. So sometimes Gtk+ does the right thing, sometimes it does not, depending on the theme used.
We could "untheme" forward/back, but that would be too drastic. The best I can think of for your situation is to
a) file a bug report on the theme you are using. The root cuase is there.b) As a workaround, you can "untheme" forward/back by customizing x-gtk-stock-map (M-x customize-variable<RET>x-gtk-stock-map<RET>). Delete the rows for etc/images/left-arrow and etc/images/right-arrow. The downside is that forward/back are now not themed. But all themes will be correct RTL-wise.
c) You can also swap icons in x-gtk-stock-map, so you map etc/images/left-arrow to gtk-go-forward and etc/images/right-arrow to gtk-go-back. But remember that you did this if you change theme or your theme is fixed so that it supplies RTL information.
Well, it would look like a "normal" tool bar, like the one you get with locale "C".So the menu bar would the RTL, but the toolbar would be LTR? That's abit wiered, but I guess better than the current situation.
Emacs 22 and emacs CVS HEAD now behave the same in this regard, so forcing LTR is not an option anymore.
Jan D.
[Prev in Thread] | Current Thread | [Next in Thread] |