diff -Naur dillo-0.2.1/src/html.c dillo-0.2.1-jv/src/html.c --- dillo-0.2.1/src/html.c Fri Jun 16 21:02:43 2000 +++ dillo-0.2.1-jv/src/html.c Sun Jun 25 11:27:25 2000 @@ -1148,6 +1148,9 @@ gtk_entry_set_text(GTK_ENTRY(input->widget), input->init_str); break; case DILLO_HTML_INPUT_CHECKBOX: + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(input->widget), + input->init_val); + break; case DILLO_HTML_INPUT_RADIO: gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(input->widget), input->init_val); @@ -1427,6 +1430,11 @@ widget, name, init_str, FALSE); } else if (!g_strcasecmp(type, "checkbox")) { widget = gtk_check_button_new(); + gtk_toggle_button_set_mode(GTK_TOGGLE_BUTTON(widget), FALSE); + /* Guess this shouldn't be done here, but it kept getting + * annoyingly small and hard to see + */ + gtk_widget_set_usize(widget, 10, 10); if (Html_tag_param(tag, tagsize, "value", value, sizeof(value))) init_str = value; else @@ -1443,10 +1451,13 @@ !strcmp(form->inputs[input_index].name, name)) ){ group = gtk_radio_button_group(GTK_RADIO_BUTTON (form->inputs[input_index].widget)); - break; + break; } } + /* BUG: The buttons become squares instead of diamonds */ widget = gtk_radio_button_new(group); + gtk_toggle_button_set_mode(GTK_TOGGLE_BUTTON(widget), FALSE); + gtk_widget_set_usize(widget, 10, 10); if (Html_tag_param(tag, tagsize, "value", value, sizeof(value))) init_str = value; else @@ -1467,7 +1478,12 @@ init_str = value; else init_str = ""; - widget = gtk_button_new_with_label(init_str); + + if(init_str == "") { + widget = gtk_button_new_with_label("submit"); + } else { + widget = gtk_button_new_with_label(init_str); + } Html_add_input(form, DILLO_HTML_INPUT_SUBMIT, widget, name, init_str, FALSE); gtk_signal_connect(GTK_OBJECT(widget), "clicked", @@ -1669,19 +1685,19 @@ if (input->select->size < input->select->num_options) { scrolledwindow = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwindow), - GTK_POLICY_AUTOMATIC, + GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); - gtk_container_add(GTK_CONTAINER(scrolledwindow), input->widget); + gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW + (scrolledwindow), + input->widget); + + /* Calculate the height of the scrolled window */ + gtk_widget_size_request(input->widget, &input->widget->requisition); + gtk_widget_set_usize(scrolledwindow, -1, input->select->size * + (input->select->options->menuitem-> + requisition.height + 0.2)); gtk_widget_show(input->widget); input->widget = scrolledwindow; - - /* todo: better size negotiation. Ideally, the scrolledwindow - * would be the same width as the list, and would be size times - * the height of a single list element. It might be possible to - * do this by explicitly doing a size_request on the list, then - * doing a gtk_widget_set_usize on the scrolledwindow, but that - * seems heavyhanded. It might be the right way to do it, - * though. */ } gtk_widget_show(input->widget);