lynx-dev
[Top][All Lists]
Advanced

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

Re: lynx-dev Forms based options (patch)


From: Leonid Pauzner
Subject: Re: lynx-dev Forms based options (patch)
Date: Sat, 1 Aug 1998 18:03:33 +0400 (MSD)

(Sorry, I cannot read the reply on my lynx-dev post
because www.flora.org became unavailable for me,
please cc: to my e-mail if any.)

Patch against dev19 (part of my yesterday's): fix typo and correct HTML.

It is generally desired for lynx to have the first link on a page
not an input field so you can navigate with keys normally;
I duplicate accept/reset buttons at the beginning for this reason.
Also, I move assume_char_set input _after_ RawMode input -
it fix (more-or-less) the problem we discuss yesterday.

Leonid.



--- old\lyoption.c      Fri Jul 31 09:34:40 1998
+++ lyoption.c  Sat Aug  1 13:40:20 1998
@@ -3331,7 +3331,7 @@
        /*
         * prefered_doc_char
         */
-       if (!strcmp(data[i].tag, prefered_doc_lang_string)) {
+       if (!strcmp(data[i].tag, prefered_doc_char_string)) {
            FREE(pref_charset);
            StrAllocCopy(pref_charset, data[i].value);
        }
@@ -3567,10 +3567,10 @@
     StrAllocCopy(*newfile, print_filename);
     LYforce_no_cache = TRUE;

-    fprintf(fp0, "<head>\n<title>%s</title>\n</head>\n<body>\n",
+    fprintf(fp0, "<html><head>\n<title>%s</title>\n</head>\n<body>\n",
            OPTIONS_TITLE);

-    fprintf(fp0,"<h1>Options Menu (%s Version %s)</h1><pre>\n",
+    fprintf(fp0,"<h1>Options Menu (%s Version %s)</h1>\n",
            LYNX_NAME, LYNX_VERSION);

     /*
@@ -3588,6 +3588,18 @@
            secure_string, secure_value);

     /*
+     * visible preformated text begins here
+     */
+    fprintf(fp0,"<pre>\n\n");
+
+    /*
+     * save/reset
+     */
+    fprintf(fp0,"<input type=\"submit\" value=\"Accept Changes\">");
+    fprintf(fp0," <input type=\"reset\" value=\"Reset\">");
+    fprintf(fp0," Use the back key to cancel changes.\n\n");
+
+       /*
      * editor
      */
     fprintf(fp0,"<%s>Editor:</%s> ", label_string, label_string);
@@ -3663,6 +3675,33 @@
            (pref_charset && pref_charset[0])?pref_charset:empty_string);

     /*
+     * display_char_set
+     */
+    fprintf(fp0,"<%s>Display character set:</%s> ", label_string,
+           label_string);
+    fprintf(fp0,"<select name=\"%s\">\n", display_char_set_string);
+    for (i = 0; LYchar_set_names[i]; i++) {
+       fprintf(fp0,"<option %s value=\"%d\">%s</options>\n",
+               (i==current_char_set)?selected_string:empty_string,
+               i, LYchar_set_names[i]);
+    }
+    fprintf(fp0,"</select>\n");
+
+    /*
+     * raw_mode
+     */
+    fprintf(fp0,"<%s>Raw 8-bit or CJK mode:</%s> ", label_string,
+           label_string);
+    fprintf(fp0,"<select name=\"%s\">\n", raw_mode_string);
+    fprintf(fp0,"<option %s value=\"%s\">%s</option>\n",
+           (LYRawMode)?empty_string:selected_string,
+           off_string, off_string);
+    fprintf(fp0,"<option %s value=\"%s\">%s</option>\n",
+           (LYRawMode)?selected_string:empty_string,
+           on_string, on_string);
+    fprintf(fp0,"</select>\n");
+
+    /*
      * assume_char_set
      */
     /*
@@ -3692,33 +3731,6 @@
     }

     /*
-     * display_char_set
-     */
-    fprintf(fp0,"<%s>Display character set:</%s> ", label_string,
-           label_string);
-    fprintf(fp0,"<select name=\"%s\">\n", display_char_set_string);
-    for (i = 0; LYchar_set_names[i]; i++) {
-       fprintf(fp0,"<option %s value=\"%d\">%s</options>\n",
-               (i==current_char_set)?selected_string:empty_string,
-               i, LYchar_set_names[i]);
-    }
-    fprintf(fp0,"</select>\n");
-
-    /*
-     * raw_mode
-     */
-    fprintf(fp0,"<%s>Raw 8-bit or CJK mode:</%s> ", label_string,
-           label_string);
-    fprintf(fp0,"<select name=\"%s\">\n", raw_mode_string);
-    fprintf(fp0,"<option %s value=\"%s\">%s</option>\n",
-           (LYRawMode)?empty_string:selected_string,
-           off_string, off_string);
-    fprintf(fp0,"<option %s value=\"%s\">%s</option>\n",
-           (LYRawMode)?selected_string:empty_string,
-           on_string, on_string);
-    fprintf(fp0,"</select>\n");
-
-    /*
      * show_color
      */
 #if defined(USE_SLANG) || defined(COLOR_CURSES)
@@ -3911,11 +3923,17 @@
     /*
      * save/reset
      */
-    fprintf(fp0,"<p>Use the back key to cancel changes.\n");
+    fprintf(fp0,"\n");
     fprintf(fp0,"<input type=\"submit\" value=\"Accept Changes\">");
-    fprintf(fp0," <input type=\"reset\" value=\"Reset\">\n");
-    fprintf(fp0,"</p>");
+    fprintf(fp0," <input type=\"reset\" value=\"Reset\">");
+    fprintf(fp0," Use the back key to cancel changes.\n");
+
+    /*
+     * close HTML
+     */
+    fprintf(fp0,"</pre>\n");
     fprintf(fp0,"</body>\n");
+    fprintf(fp0,"</html>\n");

     fclose(fp0);
     return(0);



reply via email to

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