#124278 Visual cue for radiobuttons should differ from that of checkbuttons in links

Package:
links
Source:
links2
Description:
Web browser running in text mode
Submitter:
David Weinehall
Date:
2011-08-19 01:09:03 UTC
Severity:
minor
#124278#5
Date:
2001-12-17 01:14:15 UTC
From:
To:
links uses the same visual cue, "[ ]", to denote both radiobuttons and
checkbuttons. This is confusing, hence this patch to change it to use
"( )" for radiobuttons, which is what lynx and w3m uses.

The patch fixes both the menubar in the program, and the html-renderer.

Oh, pardon the removal of 3 extraoneous whitespace.


Regards: David Weinehall
  _                                                                 _
 // David Weinehall <tao@acc.umu.se> /> Northern lights wander      \\
//  Maintainer of the v2.0 kernel   //  Dance across the winter sky //
\>  http://www.acc.umu.se/~tao/    </   Full colour fire           </
--- links-0.96/html.c.old	Mon Dec 17 00:29:44 2001
+++ links-0.96/html.c	Mon Dec 17 01:40:52 2001
@@ -455,7 +455,7 @@
 	struct html_element *e;
 	struct html_element *ep;
 	if ((void *)(ep = html_stack.next) == &html_stack || !html_stack.next) {
-	   	internal("html stack empty");
+		internal("html stack empty");
 		return;
 	}
 	if (!(e = mem_alloc(sizeof(struct html_element)))) return;
@@ -1218,10 +1218,13 @@
 			for (i = 0; i < fc->size; i++) put_chrs("_", 1, put_chars_f, ff);
 			break;
 		case FC_CHECKBOX:
-		case FC_RADIO:
 			format.attr |= AT_BOLD;
 			put_chrs("[ ]", 8, put_chars_f, ff);
 			break;
+		case FC_RADIO:
+			format.attr |= AT_BOLD;
+			put_chrs("( )", 8, put_chars_f, ff);
+			break;
 		case FC_IMAGE:
 			if (format.image) mem_free(format.image), format.image = NULL;
 			if ((al = get_url_val(a, "src")) || (al = get_url_val(a, "dynsrc"))) {
@@ -1246,7 +1249,7 @@
 	}
 	kill_html_stack_item(&html_top);
 	put_chrs(" ", 1, put_chars_f, ff);
-
+
 	hid:
 	special_f(ff, SP_CONTROL, fc);
 }
@@ -2386,4 +2389,3 @@
 	add_to_str(head, hdl, "\r\n");
 	goto se;
 }
-
--- links-0.96/bfu.c.old	Tue Jun 12 13:09:28 2001
+++ links-0.96/bfu.c	Mon Dec 17 01:28:35 2001
@@ -448,8 +448,8 @@
 		int co;
 		unsigned char *text;
 		case D_CHECKBOX:
-			if (di->checked) print_text(term, di->x, di->y, 3, "[X]", COLOR_DIALOG_CHECKBOX);
-			else print_text(term, di->x, di->y, 3, "[ ]", COLOR_DIALOG_CHECKBOX);
+			if (di->checked) print_text(term, di->x, di->y, 3, (!di->item->gid) ? "[X]" : "(X)", COLOR_DIALOG_CHECKBOX);
+			else print_text(term, di->x, di->y, 3, (!di->item->gid) ? "[ ]" : "( )", COLOR_DIALOG_CHECKBOX);
 			if (sel) {
 				set_cursor(term, di->x + 1, di->y, di->x + 1, di->y);
 				set_window_ptr(dlg->win, di->x, di->y);

#124278#8
Date:
2001-12-22 01:26:44 UTC
From:
To:
Hello,

Here's a beautifier patch from a fellow netizen.
Fixes that radio buttons and checkboxes look the same.

By the way I start packaging "elinks" branch into debian,
as the main branch does not get its bugs fixed, and it's
more and more hard for me to take the heat about the bugs.
I hope elinks will eventually merge to links, or became
the main branch, whatever. It needs a branch with the ability
to get its bugs fixed.

a question... is the experimental branch of the elinks
branch :) stable enough to give it to the masses for testing,
or shall I stick to the stable elinks? opinions? fears?

thanks,
grin
----- Forwarded message from David Weinehall <tao@acc.umu.se> ----- links uses the same visual cue, "[ ]", to denote both radiobuttons and checkbuttons. This is confusing, hence this patch to change it to use "( )" for radiobuttons, which is what lynx and w3m uses. The patch fixes both the menubar in the program, and the html-renderer. Oh, pardon the removal of 3 extraoneous whitespace. Regards: David Weinehall _ _ // David Weinehall <tao@acc.umu.se> /> Northern lights wander \\ // Maintainer of the v2.0 kernel // Dance across the winter sky // \> http://www.acc.umu.se/~tao/ </ Full colour fire </
--- links-0.96/html.c.old Mon Dec 17 00:29:44 2001 +++ links-0.96/html.c Mon Dec 17 01:40:52 2001 @@ -455,7 +455,7 @@ struct html_element *e; struct html_element *ep; if ((void *)(ep = html_stack.next) == &html_stack || !html_stack.next) { - internal("html stack empty"); + internal("html stack empty"); return; } if (!(e = mem_alloc(sizeof(struct html_element)))) return; @@ -1218,10 +1218,13 @@ for (i = 0; i < fc->size; i++) put_chrs("_", 1, put_chars_f, ff); break; case FC_CHECKBOX: - case FC_RADIO: format.attr |= AT_BOLD; put_chrs("[ ]", 8, put_chars_f, ff); break; + case FC_RADIO: + format.attr |= AT_BOLD; + put_chrs("( )", 8, put_chars_f, ff); + break; case FC_IMAGE: if (format.image) mem_free(format.image), format.image = NULL; if ((al = get_url_val(a, "src")) || (al = get_url_val(a, "dynsrc"))) { @@ -1246,7 +1249,7 @@ } kill_html_stack_item(&html_top); put_chrs(" ", 1, put_chars_f, ff); - + hid: special_f(ff, SP_CONTROL, fc); } @@ -2386,4 +2389,3 @@ add_to_str(head, hdl, "\r\n"); goto se; } - --- links-0.96/bfu.c.old Tue Jun 12 13:09:28 2001 +++ links-0.96/bfu.c Mon Dec 17 01:28:35 2001 @@ -448,8 +448,8 @@ int co; unsigned char *text; case D_CHECKBOX: - if (di->checked) print_text(term, di->x, di->y, 3, "[X]", COLOR_DIALOG_CHECKBOX); - else print_text(term, di->x, di->y, 3, "[ ]", COLOR_DIALOG_CHECKBOX); + if (di->checked) print_text(term, di->x, di->y, 3, (!di->item->gid) ? "[X]" : "(X)", COLOR_DIALOG_CHECKBOX); + else print_text(term, di->x, di->y, 3, (!di->item->gid) ? "[ ]" : "( )", COLOR_DIALOG_CHECKBOX); if (sel) { set_cursor(term, di->x + 1, di->y, di->x + 1, di->y); set_window_ptr(dlg->win, di->x, di->y);
#124278#9
Date:
2001-12-22 12:49:01 UTC
From:
To:
Dear diary, on Sat, Dec 22, 2001 at 02:26:44AM CET, I got a letter, where Peter
Gervai <grin@tolna.net> told me, that...
Applied to STABLE and merged to the rest of my branches.
Cool. Well, AFAIK elinks is only maintained branch of links for now, as Mikulas
has no time for links now.
There are bugs, but it shouldn't crash randomly, just some things can work
weird. However nothing fatal, I would say. And we won't get it fixed when noone
will use it :). So I would give it to the masses _for testing_ :).