lin-club  

Re: 'r2l' continuation

Nadav Har'El
Tue, 03 Jul 2001 01:44:50 -0700

On Tue, Jul 03, 2001, Eli Billauer wrote about "Re: 'r2l' continuation":
> I can't see the big deal in remaining back compatible with such a .rev-file
> based system. It's not like there is a lot of software depending on that .rev
> file (well, there was some written over the last week :) ).
> 
> Let's try to think what would make a user feel comforable. In my opinion, the
> switch from right to left should, if possible, be done on a window basis.
> Meaning: Give a quick interface to change the direction in one window at a
> time. The default may be set by .rev, if you insist.

I haven't been following this "r2l" thread, so I hope the question I have
wouldn't be too stupid.

Even if you do want a screen-wide hebrew-english setting (vs. a window-specific
one - I think years of Windows-using means most people are used to a screen-wide
setting), why use a file? A file has many problems, the most important one
is that not all programs running on your X-Windows screen necessarily have
access to that file, or know where to find it!

Why not use a real X-Windows based approach, based on atoms and properties
on the root window? Similarly to the way the X selection, xrdb, window-manager
hints, and so on, work, for example (you wouldn'suggest want the X selection
should be kept in a file, would you? Actually the X selection is slightly
different from the rest, but that's an irrelevant detail now).
If people want to know more about this approach, I can try explaining more
about it - or you can just go and read the ICCCM (the official X-Windows
Inter-Client Communications Convention Manual).

BTW, using this approach, a client can wait for an event that a property
on the root window (for example) has changed, and voila, it knows if to
switch direction. No need to poll files, or anything.

> The logic behind this? Let's face it: If you're running hebrew on Linux,
> you're about to view files with both logical and visual Hebrew at the same
> time. Let's imagine that you have two Netscape windows open, one page happens
> to be in logic hebrew, the second in visual. I think that anything but a nice
> way to switch only one of them, will be very annoying.
> 
> The nicest possible GUI, IMHO, is a little button on the title bar. Press it,
> and the text in that window switches. The refresh can be done on the entire
> window -- I think that the user will forgive a heavy refresh, if that ends up
> with readable text.

Maybe I'm missing something - I thought you were talking about changing the
input language, but now I understand you're talking about reversing the
text in windows. In that case certainly switching only one window makes more
sense.

> This meaning playing with the Window manager. I think.  Does the window
> manager have any way to pass the application some attributes?

Sure! The window manager (or any X-client, actually) can put "properties"
on Windows, that other clients (e.g., the client running in that window)
can read. The client can even wait for an event of this property changing.
Again, the ICCCM (and manuals like XInternAtom, XChangeProperty,
XDeleteProperty, PropertyChangeMask, and so on).

> And let's drop any forks or threads. This is supposed to be a robust library,
> working with any application, and there's no chance that any of us will think
> about all the side effects of creating a monster with two heads. If that
> means no recurrent polling of .rev, well, see my opinion above.

Again, no need to poll. Use established X-Windows Inter-client Communication
mechanisms, and their event-driven model, instead!


-- 
Nadav Har'El                        |     Tuesday, Jul  3 2001, 12 Tammuz 5761
[EMAIL PROTECTED]             |-----------------------------------------
Phone: +972-53-245868, ICQ 13349191 |Willpower: The ability to eat only one
http://nadav.harel.org.il           |salted peanut.