diff options
| author | Matthias Melcher <github@matthiasm.com> | 2024-12-27 20:56:02 -0500 |
|---|---|---|
| committer | Matthias Melcher <github@matthiasm.com> | 2024-12-27 20:56:10 -0500 |
| commit | 050cbabdfe2fdbd1337736f017456012e2437b2d (patch) | |
| tree | 21efed95ef5368e67a7a6377ab0a3a2f936e4426 /fluid/factory.cxx | |
| parent | 2100655a1b55d1c77932b649b758f2eab1107fcb (diff) | |
Fluid: Rename Stratgy constants to comply with CMP.
Capitalized constants.
Added flag to indicate creation by user or file.
Removed global variable 'reading_file'.
Diffstat (limited to 'fluid/factory.cxx')
| -rw-r--r-- | fluid/factory.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/fluid/factory.cxx b/fluid/factory.cxx index 61eb3479c..a96a1ec45 100644 --- a/fluid/factory.cxx +++ b/fluid/factory.cxx @@ -1355,9 +1355,9 @@ Fl_Type *add_new_widget_from_user(const char *inName, Strategy strategy, bool an static void cbf(Fl_Widget *, void *v) { Fl_Type *t = NULL; if (Fl_Type::current && Fl_Type::current->can_have_children()) - t = ((Fl_Type*)v)->make(kAddAsLastChild); + t = ((Fl_Type*)v)->make(Strategy::AS_LAST_CHILD); else - t = ((Fl_Type*)v)->make(kAddAfterCurrent); + t = ((Fl_Type*)v)->make(Strategy::AFTER_CURRENT); select_only(t); } @@ -1370,9 +1370,9 @@ static void cbf(Fl_Widget *, void *v) { static void cb(Fl_Widget *, void *v) { Fl_Type *t = NULL; if (Fl_Type::current && Fl_Type::current->can_have_children()) - t = add_new_widget_from_user((Fl_Type*)v, kAddAsLastChild); + t = add_new_widget_from_user((Fl_Type*)v, Strategy::AS_LAST_CHILD); else - t = add_new_widget_from_user((Fl_Type*)v, kAddAfterCurrent); + t = add_new_widget_from_user((Fl_Type*)v, Strategy::AFTER_CURRENT); select_only(t); } @@ -1546,9 +1546,7 @@ Fl_Type *add_new_widget_from_file(const char *inName, Strategy strategy) { Fl_Type *prototype = typename_to_prototype(inName); if (!prototype) return NULL; - reading_file = 1; // makes labels be null Fl_Type *new_node = prototype->make(strategy); - reading_file = 0; return new_node; } |
