lynx-dev
[Top][All Lists]
Advanced

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

lynx-dev alternative DIY patch for non-auto-input-field-entering


From: Klaus Weide
Subject: lynx-dev alternative DIY patch for non-auto-input-field-entering
Date: Thu, 29 Jul 1999 00:09:33 -0500 (CDT)

An alternative do-it-yourself patch for Vlad's new feature.

This is meant to demonstrate what I was talking about -
(1) a simpler approach and (2) a different way of displaying
a text imput field that is 'current' but not 'activated'.

Use either as-is (then there will be no way to turn the 'modal
behavior' OFF).  Or - this is where the DIY comes in if you wish -
combine with some option-handling code, possibly from Vlad's code,
and replace the two 'FALSE' with <a variable which is FALSE(!) if
the new modular behavior is desired, and which is TRUE for the
regular auto-entering behavior>.  But for a quick demonstration
just applying the patch to LYMainLoop.c is all that's needed
(no recompilation of other source files necessary).

Various things are wrong or not done here, at least:
 - different statusline text missing
 - ENTER after editing (non-submitting) input fields never moves
   to next field or link.  (Does it with Vlad's code?)
 - ENTER on last TEXTAREA line does not grow the textarea at all
 - interaction with mouse not tested at all (as for Vlad's code)

Those could be added/corrected in various ways; the result might look
similar to Vlad's code in many respects, but with the important
difference remaining that no argument is added to change_form_link for
just-as-if-editing display, and no change to highlight() necessary.

One small "feature" that comes for free (maybe unnoticed by many,
possibly very useful to some, so worth pointing out), the -show_cursor
is honored and has the expected effect.

Could someone please compare this to Vlad's code, and comment on the
'visual' differences (and overlook the things mentioned above as
missing).   I admit I still haven't tried his code, but I think
I understand the main differences from his code and explanations.


   Klaus

--- lynx2-8-3.old/src/LYMainLoop.c      Wed Jul 28 22:30:10 1999
+++ lynx2-8-3/src/LYMainLoop.c  Wed Jul 28 23:34:59 1999
@@ -1641,9 +1641,11 @@
           show_help = FALSE;
        }
 
-       if (!(nlinks > 0 &&
+       if (!(FALSE && nlinks > 0 &&
              links[curdoc.link].type == WWW_FORM_LINK_TYPE &&
              (links[curdoc.link].form->type == F_TEXT_TYPE ||
+              links[curdoc.link].form->type == F_TEXT_SUBMIT_TYPE ||
+              links[curdoc.link].form->type == F_PASSWORD_TYPE ||
               links[curdoc.link].form->type == F_TEXTAREA_TYPE)))
             /*
              *  Highlight current link.
@@ -1687,7 +1689,7 @@
            /*
             *  Normal, non-traversal handling.
             */
-           if (nlinks > 0 &&
+           if (FALSE && nlinks > 0 &&
                links[curdoc.link].type == WWW_FORM_LINK_TYPE &&
                (links[curdoc.link].form->type == F_TEXT_TYPE ||
                 links[curdoc.link].form->type == F_TEXT_SUBMIT_TYPE ||


reply via email to

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