aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjcid <devnull@localhost>2008-01-31 14:49:53 +0100
committerjcid <devnull@localhost>2008-01-31 14:49:53 +0100
commit52a3edae5ffd80fea27394c5b1daa41fe0187bec (patch)
tree4cc4d636336a26813d3bc07306880717fdece780 /src
parenta5b7b23aab62f681a59125185ec0d9a4dae44527 (diff)
- Uncommented the spam safe part of image inputs.
Diffstat (limited to 'src')
-rw-r--r--src/html.cc31
1 files changed, 16 insertions, 15 deletions
diff --git a/src/html.cc b/src/html.cc
index ca9b9ef4..9702dd33 100644
--- a/src/html.cc
+++ b/src/html.cc
@@ -4073,7 +4073,7 @@ static void Html_tag_open_input(DilloHtml *html, const char *tag, int tagsize)
Widget *widget = NULL;
Embed *embed = NULL;
char *value, *name, *type, *init_str;
-// const char *attrbuf, *label;
+ const char *attrbuf, *label;
bool_t init_val = FALSE;
int input_idx;
@@ -4145,29 +4145,30 @@ static void Html_tag_open_input(DilloHtml *html, const char *tag, int tagsize)
// gtk_widget_set_sensitive(widget, FALSE); /* Until end of FORM! */
// gtk_signal_connect(GTK_OBJECT(widget), "clicked",
// GTK_SIGNAL_FUNC(Html_reset_form), html_lb);
-// } else if (!dStrcasecmp(type, "image")) {
-// if (URL_FLAGS(html->base_url) & URL_SpamSafe) {
-// /* Don't request the image, make a text submit button instead */
-// inp_type = DILLO_HTML_INPUT_SUBMIT;
-// attrbuf = Html_get_attr(html, tag, tagsize, "alt");
-// label = attrbuf ? attrbuf : value ? value : name ? name : "Submit";
-// init_str = dStrdup(label);
-// widget = gtk_button_new_with_label(init_str);
+ } else if (!dStrcasecmp(type, "image")) {
+ if (URL_FLAGS(html->base_url) & URL_SpamSafe) {
+ /* Don't request the image; make a text submit button instead */
+ inp_type = DILLO_HTML_INPUT_SUBMIT;
+ attrbuf = Html_get_attr(html, tag, tagsize, "alt");
+ label = attrbuf ? attrbuf : value ? value : name ? name : "Submit";
+ init_str = dStrdup(label);
+ LabelButtonResource *label_b_r = HT2LT(html)->getResourceFactory()
+ ->createLabelButtonResource(init_str);
+ widget = embed = new Embed (label_b_r);
// gtk_widget_set_sensitive(widget, FALSE); /* Until end of FORM! */
-// gtk_signal_connect(GTK_OBJECT(widget), "clicked",
-// GTK_SIGNAL_FUNC(Html_submit_form), html_lb);
+ label_b_r->connectClicked (form->form_receiver);
// } else {
// inp_type = DILLO_HTML_INPUT_IMAGE;
// /* use a dw_image widget */
// widget = (GtkWidget*) Html_input_image(html, tag, tagsize,
// html_lb, form->action);
// init_str = value;
-// }
-// } else if (!dStrcasecmp(type, "file")) {
-// /* todo: implement it! */
+ }
+ } else if (!dStrcasecmp(type, "file")) {
+ /* todo: implement it! */
// inp_type = DILLO_HTML_INPUT_FILE;
// init_str = (value) ? value : NULL;
-// MSG("An input of the type \"file\" wasn't rendered!\n");
+ MSG("An input of the type \"file\" wasn't rendered!\n");
} else if (!dStrcasecmp(type, "button")) {
inp_type = DILLO_HTML_INPUT_BUTTON;
if (value) {