Mercurial > dillo_port1.3
changeset 831:57b524516de4
Removed the "generate_submit" dillorc option
author | corvid <corvid@lavabit.com> |
---|---|
date | Wed, 28 Jan 2009 08:39:59 -0300 |
parents | 17b50727731a |
children | 047b4a747338 |
files | dillorc src/form.cc src/prefs.c src/prefs.h |
diffstat | 4 files changed, 7 insertions(+), 38 deletions(-) [+] |
line wrap: on
line diff
--- a/dillorc Tue Jan 27 18:34:41 2009 -0300 +++ b/dillorc Wed Jan 28 08:39:59 2009 -0300 @@ -204,11 +204,6 @@ # useful to keep away from the mouse by forcing enter to submit. #enterpress_forces_submit=NO -# Some forms lack a submit button, and dillo can generate a custom one -# internally. Unfortunately there's no guarantee for it to work. :( -# (my experience is that forms that lack a submit rely on Javascript) -#generate_submit=NO - # A mouse's middle click over a link opens a new Tab. # If you prefer to open a new Window instead, set it to NO. #middle_click_opens_new_tab=YES
--- a/src/form.cc Tue Jan 27 18:34:41 2009 -0300 +++ b/src/form.cc Wed Jan 28 08:39:59 2009 -0300 @@ -102,7 +102,6 @@ lout::misc::SimpleVector<DilloHtmlInput*> *inputs; int num_entry_fields; - int num_submit_buttons; DilloHtmlReceiver *form_receiver; @@ -349,25 +348,12 @@ void Html_tag_close_form(DilloHtml *html, int TagIdx) { - static const char *const SubmitTag = - "<input type='submit' value='?Submit?' alt='dillo-generated-button'>"; - DilloHtmlForm *form; +// DilloHtmlForm *form; // int i; - - if (html->InFlags & IN_FORM) { - form = html->getCurrentForm (); - /* If we don't have a submit button and the user desires one, - let's add a custom one */ - if (form->num_submit_buttons == 0) { - if (prefs.show_extra_warnings || form->num_entry_fields != 1) - BUG_MSG("FORM lacks a Submit button\n"); - if (prefs.generate_submit) { - BUG_MSG(" (added a submit button internally)\n"); - Html_tag_open_input(html, SubmitTag, strlen(SubmitTag)); - form->num_submit_buttons = 0; - } - } - +// +// if (html->InFlags & IN_FORM) { +// form = html->getCurrentForm (); +// // /* Make buttons sensitive again */ // for (i = 0; i < form->inputs->size(); i++) { // input_i = form->inputs->get(i); @@ -383,7 +369,7 @@ // a_Dw_button_set_sensitive(DW_BUTTON(input_i->widget), TRUE); // } // } - } +// } html->InFlags &= ~IN_FORM; html->InFlags &= ~IN_SELECT; @@ -935,7 +921,6 @@ submit_charset = dStrdup(charset); inputs = new misc::SimpleVector <DilloHtmlInput*> (4); num_entry_fields = 0; - num_submit_buttons = 0; showing_hiddens = false; form_receiver = new DilloHtmlReceiver (this); } @@ -1009,7 +994,7 @@ _MSG("DilloHtmlForm::buildQueryUrl: action=%s\n",URL_STR_(action)); - if (active_input && num_submit_buttons > 0) { + if (active_input) { if ((active_input->type == DILLO_HTML_INPUT_SUBMIT) || (active_input->type == DILLO_HTML_INPUT_IMAGE) || (active_input->type == DILLO_HTML_INPUT_BUTTON_SUBMIT)) { @@ -1469,10 +1454,6 @@ if (type == DILLO_HTML_INPUT_PASSWORD || type == DILLO_HTML_INPUT_TEXT) { num_entry_fields++; - } else if (type == DILLO_HTML_INPUT_SUBMIT || - type == DILLO_HTML_INPUT_BUTTON_SUBMIT || - type == DILLO_HTML_INPUT_IMAGE) { - num_submit_buttons++; } }
--- a/src/prefs.c Tue Jan 27 18:34:41 2009 -0300 +++ b/src/prefs.c Wed Jan 28 08:39:59 2009 -0300 @@ -75,7 +75,6 @@ DRC_TOKEN_FORCE_MY_COLORS, DRC_TOKEN_FULLWINDOW_START, DRC_TOKEN_FW_FONT, - DRC_TOKEN_GENERATE_SUBMIT, DRC_TOKEN_GEOMETRY, DRC_TOKEN_HOME, DRC_TOKEN_HTTP_LANGUAGE, @@ -144,7 +143,6 @@ { "font_serif", DRC_TOKEN_FONT_SERIF }, { "force_my_colors", DRC_TOKEN_FORCE_MY_COLORS }, { "fullwindow_start", DRC_TOKEN_FULLWINDOW_START }, - { "generate_submit", DRC_TOKEN_GENERATE_SUBMIT }, { "geometry", DRC_TOKEN_GEOMETRY }, { "home", DRC_TOKEN_HOME }, { "http_language", DRC_TOKEN_HTTP_LANGUAGE }, @@ -374,9 +372,6 @@ dFree(prefs.font_monospace); prefs.font_monospace = dStrdup(value); break; - case DRC_TOKEN_GENERATE_SUBMIT: - prefs.generate_submit = (strcmp(value, "YES") == 0); - break; case DRC_TOKEN_ENTERPRESS_FORCES_SUBMIT: prefs.enterpress_forces_submit = (strcmp(value, "YES") == 0); break; @@ -498,7 +493,6 @@ prefs.font_cursive = dStrdup(D_FONT_CURSIVE); prefs.font_fantasy = dStrdup(D_FONT_FANTASY); prefs.font_monospace = dStrdup(D_FONT_MONOSPACE); - prefs.generate_submit = FALSE; prefs.enterpress_forces_submit = FALSE; prefs.middle_click_opens_new_tab = TRUE; prefs.search_url = dStrdup(D_SEARCH_URL);