lynx-dev
[Top][All Lists]
Advanced

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

Re: lynx-dev idea regarding 'Submit' links


From: brian j. pardy
Subject: Re: lynx-dev idea regarding 'Submit' links
Date: Fri, 6 Nov 1998 18:37:49 -0800

Here's a patch for what I was talking about. It'll make the statusline
give the address to submit to when in advanced user mode. Also fixes one
small typo in LYMainLoop.c. FWIW, credit for this idea goes to
<address@hidden>.

(I haven't tested with mailto type forms, I can't find any to check out,
but it works with others.)

Adds a few extra entries to LYMessages_en.h that'll need to be propagated
through to the others, I figure...

diff -cr lynx2-8-1/LYMessages_en.h lynx2.8.2dev.1.bri/LYMessages_en.h
*** lynx2-8-1/LYMessages_en.h   Fri Nov  6 18:14:59 1998
--- lynx2.8.2dev.1.bri/LYMessages_en.h  Fri Nov  6 18:24:41 1998
***************
*** 67,78 ****
--- 67,84 ----
   "(Radio Button)   Use right-arrow or <return> to toggle."
  #define FORM_LINK_RADIO_UNM_MSG \
   "UNMODIFIABLE form radio button.  Use UP or DOWN arrows or tab to move off."
+ #define FORM_LINK_SUBMIT_PREFIX \
+  "Submit ('x' for no cache) to "
+ #define FORM_LINK_RESUBMIT_PREFIX \
+  "Submit to "
  #define FORM_LINK_SUBMIT_MESSAGE \
   "(Form submit button) Use right-arrow or <return> to submit ('x' for no 
cache)."
  #define FORM_LINK_RESUBMIT_MESSAGE \
   "(Form submit button) Use right-arrow or <return> to submit."
  #define FORM_LINK_SUBMIT_DIS_MSG \
   "DISABLED form submit button.  Use UP or DOWN arrows or tab to move off."
+ #define FORM_LINK_SUBMIT_MAILTO_PREFIX \
+  "Submit mailto form to "
  #define FORM_LINK_SUBMIT_MAILTO_MSG \
   "(mailto form submit button) Use right-arrow or <return> to submit."
  #define FORM_LINK_SUBMIT_MAILTO_DIS_MSG \
diff -cr lynx2-8-1/src/LYMainLoop.c lynx2.8.2dev.1.bri/src/LYMainLoop.c
*** lynx2-8-1/src/LYMainLoop.c  Fri Nov  6 18:14:59 1998
--- lynx2.8.2dev.1.bri/src/LYMainLoop.c Fri Nov  6 18:23:49 1998
***************
*** 1033,1039 ****
  
            /*
             *  Set the remaining document elements and add to
!            *  the visitied links list. - FM
             */
            if (ownerS_address != NULL) {
                if (HTOutputFormat == WWW_SOURCE && !HText_getOwner())
--- 1033,1039 ----
  
            /*
             *  Set the remaining document elements and add to
!            *  the visited links list. - FM
             */
            if (ownerS_address != NULL) {
                if (HTOutputFormat == WWW_SOURCE && !HText_getOwner())
***************
*** 1398,1409 ****
                            if (no_mail) {
                                statusline(FORM_LINK_SUBMIT_MAILTO_DIS_MSG);
                            } else {
!                               statusline(FORM_LINK_SUBMIT_MAILTO_MSG);
                            }
                        } else if (links[curdoc.link].form->no_cache) {
!                           statusline(FORM_LINK_RESUBMIT_MESSAGE);
                        } else {
!                           statusline(FORM_LINK_SUBMIT_MESSAGE);
                        }
                        break;
                    case F_RESET_TYPE:
--- 1398,1436 ----
                            if (no_mail) {
                                statusline(FORM_LINK_SUBMIT_MAILTO_DIS_MSG);
                            } else {
!                                 if(user_mode == ADVANCED_MODE) {
!                                     char *submit_str = NULL;
! 
!                                     StrAllocCopy(submit_str, 
FORM_LINK_SUBMIT_MAILTO_PREFIX);
!                                     StrAllocCat(submit_str, 
links[curdoc.link].form->submit_action);
!                                     statusline(submit_str);
!                                     FREE(submit_str);
!                                 } else {
!                                     statusline(FORM_LINK_SUBMIT_MAILTO_MSG);
!                                 }
                            }
                        } else if (links[curdoc.link].form->no_cache) {
!                             if(user_mode == ADVANCED_MODE) {
!                                 char *submit_str = NULL;
! 
!                                 StrAllocCopy(submit_str, 
FORM_LINK_RESUBMIT_PREFIX);
!                                 StrAllocCat(submit_str, 
links[curdoc.link].form->submit_action);
!                                 statusline(submit_str);
!                                 FREE(submit_str);
!                             } else {
!                                 statusline(FORM_LINK_RESUBMIT_MESSAGE); 
!                             }
                        } else {
!                             if(user_mode == ADVANCED_MODE) {
!                                 char *submit_str = NULL;
! 
!                                 StrAllocCopy(submit_str, 
FORM_LINK_SUBMIT_PREFIX);
!                                 StrAllocCat(submit_str, 
links[curdoc.link].form->submit_action);
!                                 statusline(submit_str);
!                                 FREE(submit_str);
!                             } else {
!                               statusline(FORM_LINK_SUBMIT_MESSAGE);
!                             }
                        }
                        break;
                    case F_RESET_TYPE:

-- 
Non-sequiturs make me eat lampshades.

reply via email to

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