Bug fixes from Howard.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2933 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet
2003-01-28 20:42:14 +00:00
parent c25988a756
commit 226715d978
6 changed files with 18 additions and 14 deletions
+3
View File
@@ -1,6 +1,9 @@
CHANGES IN FLTK 1.1.3 CHANGES IN FLTK 1.1.3
- Documentation updates. - Documentation updates.
- Additional NULL checks in Fl_Button,
fl_draw_boxtype(), Fl_File_Chooser, and
Fl_Window::hotspot().
- The Fl_Preferences header file needed to FL_EXPORT all - The Fl_Preferences header file needed to FL_EXPORT all
of the nested classes for WIN32. of the nested classes for WIN32.
- Fl_Double_Window couldn't be nested on WIN32. [SF Bug - Fl_Double_Window couldn't be nested on WIN32. [SF Bug
+1
View File
@@ -39,6 +39,7 @@ OTHER CONTRIBUTORS
George Garvey George Garvey
Mikael Hultgren Mikael Hultgren
Stuart Levy Stuart Levy
Howard Lightstone
Mike Lindner Mike Lindner
Alexander Mai Alexander Mai
Alexander Rabi Alexander Rabi
+3 -3
View File
@@ -1,5 +1,5 @@
// //
// "$Id: Fl_Button.cxx,v 1.4.2.6.2.19 2002/11/11 20:22:21 easysw Exp $" // "$Id: Fl_Button.cxx,v 1.4.2.6.2.20 2003/01/28 20:42:08 easysw Exp $"
// //
// Button widget for the Fast Light Tool Kit (FLTK). // Button widget for the Fast Light Tool Kit (FLTK).
// //
@@ -124,7 +124,7 @@ int Fl_Button::handle(int event) {
// background... // background...
int X = x() > 0 ? x() - 1 : 0; int X = x() > 0 ? x() - 1 : 0;
int Y = y() > 0 ? y() - 1 : 0; int Y = y() > 0 ? y() - 1 : 0;
window()->damage(FL_DAMAGE_ALL, X, Y, w() + 2, h() + 2); if (window()) window()->damage(FL_DAMAGE_ALL, X, Y, w() + 2, h() + 2);
} else redraw(); } else redraw();
return 1; return 1;
} else return 0; } else return 0;
@@ -156,5 +156,5 @@ Fl_Button::Fl_Button(int X, int Y, int W, int H, const char *l)
} }
// //
// End of "$Id: Fl_Button.cxx,v 1.4.2.6.2.19 2002/11/11 20:22:21 easysw Exp $". // End of "$Id: Fl_Button.cxx,v 1.4.2.6.2.20 2003/01/28 20:42:08 easysw Exp $".
// //
+5 -5
View File
@@ -1,5 +1,5 @@
// //
// "$Id: Fl_File_Chooser2.cxx,v 1.1.2.28 2002/11/20 15:49:24 easysw Exp $" // "$Id: Fl_File_Chooser2.cxx,v 1.1.2.29 2003/01/28 20:42:11 easysw Exp $"
// //
// More Fl_File_Chooser routines. // More Fl_File_Chooser routines.
// //
@@ -122,7 +122,7 @@ Fl_File_Chooser::count()
// printf("Fl_File_Chooser::count(): filename=\"%s\"\n", filename); // printf("Fl_File_Chooser::count(): filename=\"%s\"\n", filename);
if (filename == NULL || filename[0] == '\0') if (!filename || !filename[0])
return (0); return (0);
// Is the file name just the current directory? // Is the file name just the current directory?
@@ -457,7 +457,7 @@ Fl_File_Chooser::fileNameCB()
// Get the filename from the text field... // Get the filename from the text field...
filename = (char *)fileName->value(); filename = (char *)fileName->value();
if (filename == NULL || filename[0] == '\0') { if (!filename || !filename[0]) {
okButton->deactivate(); okButton->deactivate();
return; return;
} }
@@ -1004,7 +1004,7 @@ Fl_File_Chooser::value(int f) // I - File number
if (!(type_ & MULTI)) { if (!(type_ & MULTI)) {
name = fileName->value(); name = fileName->value();
if (name[0] == '\0') return NULL; if (!name || !name[0]) return NULL;
else if (fl_filename_isdir(name)) { else if (fl_filename_isdir(name)) {
if (type_ & DIRECTORY) { if (type_ & DIRECTORY) {
// Strip trailing slash, if any... // Strip trailing slash, if any...
@@ -1159,5 +1159,5 @@ unquote_pathname(char *dst, // O - Destination string
// //
// End of "$Id: Fl_File_Chooser2.cxx,v 1.1.2.28 2002/11/20 15:49:24 easysw Exp $". // End of "$Id: Fl_File_Chooser2.cxx,v 1.1.2.29 2003/01/28 20:42:11 easysw Exp $".
// //
+3 -3
View File
@@ -1,5 +1,5 @@
// //
// "$Id: Fl_Window_hotspot.cxx,v 1.7.2.3.2.3 2002/04/15 20:30:06 easysw Exp $" // "$Id: Fl_Window_hotspot.cxx,v 1.7.2.3.2.4 2003/01/28 20:42:13 easysw Exp $"
// //
// Common hotspot routines for the Fast Light Tool Kit (FLTK). // Common hotspot routines for the Fast Light Tool Kit (FLTK).
// //
@@ -71,7 +71,7 @@ void Fl_Window::hotspot(int X, int Y, int offscreen) {
void Fl_Window::hotspot(const Fl_Widget *o, int offscreen) { void Fl_Window::hotspot(const Fl_Widget *o, int offscreen) {
int X = o->w()/2; int X = o->w()/2;
int Y = o->h()/2; int Y = o->h()/2;
while (o != this) { while (o != this && o) {
X += o->x(); Y += o->y(); X += o->x(); Y += o->y();
o = o->window(); o = o->window();
} }
@@ -80,5 +80,5 @@ void Fl_Window::hotspot(const Fl_Widget *o, int offscreen) {
// //
// End of "$Id: Fl_Window_hotspot.cxx,v 1.7.2.3.2.3 2002/04/15 20:30:06 easysw Exp $". // End of "$Id: Fl_Window_hotspot.cxx,v 1.7.2.3.2.4 2003/01/28 20:42:13 easysw Exp $".
// //
+3 -3
View File
@@ -1,5 +1,5 @@
// //
// "$Id: fl_boxtype.cxx,v 1.8.2.4.2.10 2002/08/09 03:17:30 easysw Exp $" // "$Id: fl_boxtype.cxx,v 1.8.2.4.2.11 2003/01/28 20:42:14 easysw Exp $"
// //
// Box drawing code for the Fast Light Tool Kit (FLTK). // Box drawing code for the Fast Light Tool Kit (FLTK).
// //
@@ -267,7 +267,7 @@ void Fl::set_boxtype(Fl_Boxtype t, Fl_Boxtype f) {
} }
void fl_draw_box(Fl_Boxtype t, int x, int y, int w, int h, Fl_Color c) { void fl_draw_box(Fl_Boxtype t, int x, int y, int w, int h, Fl_Color c) {
if (t) fl_box_table[t].f(x,y,w,h,c); if (t && fl_box_table[t].f) fl_box_table[t].f(x,y,w,h,c);
} }
//extern Fl_Widget *fl_boxcheat; // hack set by Fl_Window.cxx //extern Fl_Widget *fl_boxcheat; // hack set by Fl_Window.cxx
@@ -295,5 +295,5 @@ const {
} }
// //
// End of "$Id: fl_boxtype.cxx,v 1.8.2.4.2.10 2002/08/09 03:17:30 easysw Exp $". // End of "$Id: fl_boxtype.cxx,v 1.8.2.4.2.11 2003/01/28 20:42:14 easysw Exp $".
// //