summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcorvid <corvid@lavabit.com>2009-01-28 08:39:59 -0300
committercorvid <corvid@lavabit.com>2009-01-28 08:39:59 -0300
commit62d7451dc6f07d389dbbb7af9bf8e52d278d7cb7 (patch)
tree657135e7ddea7cab96f3e2c6df1f6b3258b95476
parent53195f4017d77ad814d5526631f4dbd4c487cc19 (diff)
Removed the "generate_submit" dillorc option
-rw-r--r--dillorc5
-rw-r--r--src/form.cc33
-rw-r--r--src/prefs.c6
-rw-r--r--src/prefs.h1
4 files changed, 7 insertions, 38 deletions
diff --git a/dillorc b/dillorc
index 01bf47cd..0f374faf 100644
--- a/dillorc
+++ b/dillorc
@@ -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
diff --git a/src/form.cc b/src/form.cc
index 15a97e93..d0796ddf 100644
--- a/src/form.cc
+++ b/src/form.cc
@@ -102,7 +102,6 @@ public: //BUG: for now everything is public
lout::misc::SimpleVector<DilloHtmlInput*> *inputs;
int num_entry_fields;
- int num_submit_buttons;
DilloHtmlReceiver *form_receiver;
@@ -349,25 +348,12 @@ void Html_tag_open_form(DilloHtml *html, const char *tag, int tagsize)
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 @@ void Html_tag_close_form(DilloHtml *html, int TagIdx)
// a_Dw_button_set_sensitive(DW_BUTTON(input_i->widget), TRUE);
// }
// }
- }
+// }
html->InFlags &= ~IN_FORM;
html->InFlags &= ~IN_SELECT;
@@ -935,7 +921,6 @@ DilloHtmlForm::DilloHtmlForm (DilloHtml *html2,
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 @@ DilloUrl *DilloHtmlForm::buildQueryUrl(DilloHtmlInput *active_input)
_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 @@ void DilloHtmlForm::addInput(DilloHtmlInput *input, DilloHtmlInputType type)
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++;
}
}
diff --git a/src/prefs.c b/src/prefs.c
index 8980d838..c60430f0 100644
--- a/src/prefs.c
+++ b/src/prefs.c
@@ -75,7 +75,6 @@ typedef enum {
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 @@ static const SymNode_t symbols[] = {
{ "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 @@ static int Prefs_parse_pair(char *name, char *value)
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 @@ void a_Prefs_init(void)
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);
diff --git a/src/prefs.h b/src/prefs.h
index 90bcc0f3..1e638c8e 100644
--- a/src/prefs.h
+++ b/src/prefs.h
@@ -66,7 +66,6 @@ struct _DilloPrefs {
char *font_cursive;
char *font_fantasy;
char *font_monospace;
- bool_t generate_submit;
bool_t enterpress_forces_submit;
bool_t middle_click_opens_new_tab;
char *search_url;