Re: Patch for Automated RTL widgets
- From: George <jirka 5z com>
- To: gtk-devel-list gnome org
- Subject: Re: Patch for Automated RTL widgets
- Date: Mon, 2 Oct 2000 00:45:30 -0700
On Sat, Sep 30, 2000 at 04:10:22PM -0200, Ali Abdin wrote:
> I am resending this because apparently my first mail didn't get through
> (possible due to the gnome.org DNS issues)
> Anyway, attached is a patch for gtk_init that checks wether your locale
> (LC_ALL or LANG) is Arabic or Hebrew, if it is then it will automatically set
> the widget direction to RTL.
> I think this is needed because LTR widgets with Arabic characters is not a
> very nice thing to look at. You can still run apps the traditional way by
> unsetting the locale for just that specific app.
> This beats the alternative of having to manually set the text direction (by
> calling gtk_widget_set_default_direction in each and every app that wants to
> have an RTL direction.
Note one caveat:
It doesn't deal with aliases. For example it would set RTL for
"LANG=hungarian", and it wouldn't set it for "LANG=hebrew.iso88598", both of
which are valid locales on my system.
It could be done if g_i18n_* stuff with unaliasing gets stuffed into glib.
Then you could just check the first two letters of the first string in the
George <jirka 5z com>
If the facts don't fit the theory, change the facts.
-- Albert Einstein
] [Thread Prev