summaryrefslogtreecommitdiff
path: root/fluid
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2007-01-24 20:32:54 +0000
committerMatthias Melcher <fltk@matthiasm.com>2007-01-24 20:32:54 +0000
commite36d3a07ce69b648b9157cf97c2aafb8f67461a9 (patch)
treea14bfe840d3631c3c719c4c79257301934c02064 /fluid
parentecdd893933dfcca8466a4af8c75b88e526af2e4d (diff)
- Fluid avoids writing unsopported combinations of the
"when()" flags (STR #1501) - Fl_Browser_ would allow keyboard callbacks even though "when()" was set to "never" (STR #1501) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5639 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'fluid')
-rw-r--r--fluid/Fl_Widget_Type.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/fluid/Fl_Widget_Type.cxx b/fluid/Fl_Widget_Type.cxx
index 910f332d7..d7851f9c5 100644
--- a/fluid/Fl_Widget_Type.cxx
+++ b/fluid/Fl_Widget_Type.cxx
@@ -2223,9 +2223,15 @@ void Fl_Widget_Type::write_widget_code() {
if (i & FL_ALIGN_INSIDE) write_c("|FL_ALIGN_INSIDE");
write_c(");\n");
}
- if (o->when() != tplate->when() || subclass())
+ // avoid the unsupported combination of flegs when user sets
+ // "when" to "FL_WHEN_NEVER", but keeps the "no change" set.
+ // FIXME: This could be reflected in the GUI by graying out the button.
+ Fl_When ww = o->when();
+ if (ww==FL_WHEN_NOT_CHANGED)
+ ww = FL_WHEN_NEVER;
+ if (ww != tplate->when() || subclass())
write_c("%s%s->when(%s);\n", indent(), var,
- item_name(whensymbolmenu, o->when()));
+ item_name(whensymbolmenu, ww));
if (!o->visible() && o->parent())
write_c("%s%s->hide();\n", indent(), var);
if (!o->active())