lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lynx-dev patch to spawn extra lynx's


From: Klaus Weide
Subject: Re: lynx-dev patch to spawn extra lynx's
Date: Thu, 16 Sep 1999 03:18:44 -0500 (CDT)

Someone had a somewhat similar idea a while ago; see patch and discussion
starting at
<http://www.flora.org/lynx-dev/html/month0399/threads.html#00863>.
I don't think it led to anything as far as the mainstream lynx code is
concerned.

On Wed, 15 Sep 1999, Richard E. Hawkins wrote:

> But there may now be a cleaner way to do this--more in keeping with my 
> original thinking.  Ideally, the existing run_external should run the 
> command
> 
>   xterm -e "lynx <theulr> &"
> 
> (for unix & X). Thsi shoudl probably be user definable if for no other 
> reason than to allow automatically choosing huge letters rather than 
> normal for the xterm.
> 
> I've noticed that external programs are *not* sent to the background 
> when launched, but rather that lynx waits for them. Is there some 
> particular reason for this?  In a windowed environment, spawning seems 
> more natural.

EXTERN should be able to do that just fine; first get it to work with
the '.' key. :)

> Another change I found is that BUTTON2 is now used to pop up a menu. I 
> had assumed that I'd use button 2 just to keepin line with netscape and 
> mosaic. What should I try to attach this behavior to?  

My impression is that there isn't much interest in the mouse stuff among
the regulars here, at least as far as anything more than left-button
navigation is concerned.  One or two people did the initial patches to
add more than left button iirc, and by default their design survived.
The reason that the menu was added for the middle button may just be that
the right button was already used for more-or-less unconditional PREV_DOC
by the very first mouse support.

Maybe you wouldn't find too much resistence if you sugested that middle &
right button should be swapped, or something like that.  Otoh not everyone
has three buttons.  I don't know how this all plays out for DOS, Windows,
OS/2.  Maybe all this should be configurable.  OTOH as already mentioned,
there isn't too much interest in all this for most folks.

Last I looked the mouse popup worked only with ncurses (and maybe
OS/2?), not with slang.

> Can I use  a 
> double-clicked button?

I don't think it's possible to distinguish double-clicks for slang.
(Or if it is possible, the lynx code doesn't currently use it, see
sl_parse_mouse_event/sl_read_mouse_event.)

> Anyway, I see the behavior as:
> 
> 1) get_mouse_link, just as if button 1 were pressed
> 2) get the url.  If I'm reading things right (my c is more than a 
> little rusty), then if mouse_link has a value other than -1, there is a 
> link, and i can find the url in links[mouse_link].something.   is that 
> something "target"?
> 3) concatenate     xterm -e \"lynx     &links[mouse_link].target    \" &
> 4) send this concatenated string to LYSystem
> 
> Am I on track?

If you are happy with <some mouse click> having just the same effect
as pressing '.', then maybe you don't have to mess with mainloop() at
all.  I hope you agree that would be preferable. :) You would somehow
have to make LYgetch_for() return '.' or LYReverseKeymap(LYK_EXTERN)
or LAC_TO_LKC0(LYK_EXTERN) under the right circumstances.  In addition
to setting mouse_link, which means set_clicked_link needs to get
called.  Note that there are two incarnations of LYgetch_for,
(basically) one for slang/unix the other for the rest of the world...

   Klaus



reply via email to

[Prev in Thread] Current Thread [Next in Thread]