summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2012-11-28 12:54:36 +0100
committerSebastian Geerken <devnull@localhost>2012-11-28 12:54:36 +0100
commit90ca861dcdc37266b51f645951448f3757aeb80f (patch)
tree44c5f66ceeef56fbd53e3b969348b4025bfce665 /src
parent69d1b0097e8991679ec3c0df1eea149ae41b27c9 (diff)
parentc3457db125316fe83f9a6c714ac1dd76e70b581c (diff)
Merge.
Diffstat (limited to 'src')
-rw-r--r--src/dialog.cc1
-rw-r--r--src/form.cc16
2 files changed, 10 insertions, 7 deletions
diff --git a/src/dialog.cc b/src/dialog.cc
index 1b8fd2db..6a8fd071 100644
--- a/src/dialog.cc
+++ b/src/dialog.cc
@@ -13,6 +13,7 @@
#include <math.h> // for rint()
+#include <FL/fl_ask.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_File_Chooser.H>
#include <FL/Fl_Return_Button.H>
diff --git a/src/form.cc b/src/form.cc
index 92e06ab1..05042569 100644
--- a/src/form.cc
+++ b/src/form.cc
@@ -752,11 +752,12 @@ void Html_tag_open_select(DilloHtml *html, const char *tag, int tagsize)
type = DILLO_HTML_INPUT_SELECT;
res = factory->createOptionMenuResource ();
} else {
+ ListResource::SelectionMode mode;
+
type = DILLO_HTML_INPUT_SEL_LIST;
- res = factory->createListResource (multi ?
- ListResource::SELECTION_MULTIPLE :
- ListResource::SELECTION_EXACTLY_ONE,
- rows);
+ mode = multi ? ListResource::SELECTION_MULTIPLE
+ : ListResource::SELECTION_AT_MOST_ONE;
+ res = factory->createListResource (mode, rows);
}
Embed *embed = new Embed(res);
@@ -787,9 +788,10 @@ void Html_tag_close_select(DilloHtml *html)
DilloHtmlInput *input = Html_get_current_input(html);
DilloHtmlSelect *select = input->select;
- // BUG(?): should not do this for MULTI selections
- select->ensureSelection ();
-
+ if (input->type == DILLO_HTML_INPUT_SELECT) {
+ // option menu interface requires that something be selected */
+ select->ensureSelection ();
+ }
SelectionResource *res = (SelectionResource*)input->embed->getResource();
select->addOptionsTo (res);
}