diff options
| author | Bill Spitzak <spitzak@gmail.com> | 1999-03-13 20:07:21 +0000 |
|---|---|---|
| committer | Bill Spitzak <spitzak@gmail.com> | 1999-03-13 20:07:21 +0000 |
| commit | 2316172e5f79f129b7f5369b8c99f03e101aa7f9 (patch) | |
| tree | 28cf29cb979565796255a9a29dd429b9dfc2d3bf | |
| parent | fcaa42485f4ffaebc1b881934b2407e1c1115955 (diff) | |
Fixed fluid bug that caused styles patch to crash when you delete menu item.
Changed a comment in Fl.cxx
Changed valuators demo to remove code to set value() on some widgets and
put the value into the gui box instead.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@421 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | fluid/Fl_Type.cxx | 6 | ||||
| -rw-r--r-- | src/Fl.cxx | 6 | ||||
| -rw-r--r-- | test/valuators.fl | 14 |
3 files changed, 12 insertions, 14 deletions
diff --git a/fluid/Fl_Type.cxx b/fluid/Fl_Type.cxx index 49b814bf5..be5d5dad0 100644 --- a/fluid/Fl_Type.cxx +++ b/fluid/Fl_Type.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Type.cxx,v 1.6 1999/02/17 16:31:47 mike Exp $" +// "$Id: Fl_Type.cxx,v 1.6.2.1 1999/03/13 20:07:19 bill Exp $" // // Widget type code for the Fast Light Tool Kit (FLTK). // @@ -465,13 +465,13 @@ void Fl_Type::open() { void Fl_Type::setlabel(const char *) {} Fl_Type::~Fl_Type() { - if (parent) parent->remove_child(this); // warning: destructor only works for widgets that have been add()ed. if (widget_browser) widget_browser->deleting(this); if (prev) prev->next = next; else first = next; if (next) next->prev = prev; else last = prev; if (current == this) current = 0; modflag = 1; + if (parent) parent->remove_child(this); } int Fl_Type::is_parent() const {return 0;} @@ -648,5 +648,5 @@ void Fl_Type::read_property(const char *c) { int Fl_Type::read_fdesign(const char*, const char*) {return 0;} // -// End of "$Id: Fl_Type.cxx,v 1.6 1999/02/17 16:31:47 mike Exp $". +// End of "$Id: Fl_Type.cxx,v 1.6.2.1 1999/03/13 20:07:19 bill Exp $". // diff --git a/src/Fl.cxx b/src/Fl.cxx index 25c012f36..032268a8c 100644 --- a/src/Fl.cxx +++ b/src/Fl.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl.cxx,v 1.24.2.1 1999/03/12 19:17:53 carl Exp $" +// "$Id: Fl.cxx,v 1.24.2.2 1999/03/13 20:07:20 bill Exp $" // // Main event handling code for the Fast Light Tool Kit (FLTK). // @@ -225,7 +225,7 @@ int Fl::check() { if (numtimeouts) {fl_elapsed(); call_timeouts();} fl_wait(1, 0.0); flush(); - return Fl_X::first ? 1 : 0; // return 0 if no windows + return Fl_X::first != 0; // return true if there is a window } int Fl::ready() { @@ -682,5 +682,5 @@ int fl_old_shortcut(const char* s) { } // -// End of "$Id: Fl.cxx,v 1.24.2.1 1999/03/12 19:17:53 carl Exp $". +// End of "$Id: Fl.cxx,v 1.24.2.2 1999/03/13 20:07:20 bill Exp $". // diff --git a/test/valuators.fl b/test/valuators.fl index bd75c772b..4d955c337 100644 --- a/test/valuators.fl +++ b/test/valuators.fl @@ -9,7 +9,7 @@ Function {} {open } { Fl_Window {} { label {Valuator classes, showing values for type()} open - xywh {414 83 567 506} color 43 selection_color 43 + xywh {370 393 567 506} color 43 selection_color 43 code0 {\#include <stdio.h>} visible } { Fl_Box {} { @@ -131,24 +131,22 @@ fflush(stdout);} Fl_Dial {} { label 0 callback {printf("%g \\r",o->value()); -fflush(stdout);} selected - xywh {315 280 65 65} color 10 selection_color 1 labelsize 8 +fflush(stdout);} + xywh {315 280 65 65} color 10 selection_color 1 labelsize 8 value 0.5 code0 {o->angles(0,315);} } Fl_Dial {} { label FL_LINE_DIAL callback {printf("%g \\r",o->value()); fflush(stdout);} - xywh {395 280 65 65} type Line color 10 selection_color 1 labelsize 8 - code1 {o->value(0.5);} + xywh {395 280 65 65} type Line color 10 selection_color 1 labelsize 8 value 0.5 } Fl_Dial {} { label FL_FILL_DIAL callback {printf("%g \\r",o->value()); -fflush(stdout);} - xywh {475 280 65 65} type Fill color 10 selection_color 1 labelsize 8 +fflush(stdout);} selected + xywh {475 280 65 65} type Fill color 10 selection_color 1 labelsize 8 value 1 code0 {o->angles(0,360);} - code1 {o->value(1.0);} } Fl_Box {} { label Fl_Roller |
