diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-08-16 20:10:21 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-08-16 20:10:21 +0000 |
| commit | ab53ef9a444b7a32295e68e3faa98308a5e33cf0 (patch) | |
| tree | bf181e04328cf127c2b4256d6dc35f2e208e2e97 | |
| parent | a2c193c777fab8e0cc7a87df9df1578dbbbf2555 (diff) | |
Fix FLUID image problems.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2591 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | CHANGES | 3 | ||||
| -rw-r--r-- | fluid/Fluid_Image.cxx | 16 | ||||
| -rw-r--r-- | fluid/fluid.cxx | 7 |
3 files changed, 17 insertions, 9 deletions
@@ -1,5 +1,8 @@ CHANGES IN FLTK 1.1.0 + - FLUID didn't register the image formats in the + fltk_images library, and had some other image + management problems. - Fixed one more redraw bug in Fl_Browser_ where we weren't using the box function to erase empty space in the list. diff --git a/fluid/Fluid_Image.cxx b/fluid/Fluid_Image.cxx index 2e94f4c4a..da934a093 100644 --- a/fluid/Fluid_Image.cxx +++ b/fluid/Fluid_Image.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fluid_Image.cxx,v 1.7.2.9.2.11 2002/08/09 22:57:00 easysw Exp $" +// "$Id: Fluid_Image.cxx,v 1.7.2.9.2.12 2002/08/16 20:10:21 easysw Exp $" // // Pixmap label support for the Fast Light Tool Kit (FLTK). // @@ -156,7 +156,7 @@ Fluid_Image* Fluid_Image::find(const char *iname) { Fluid_Image *ret = new Fluid_Image(iname); - if (!ret->img->w() || !ret->img->h()) { + if (!ret->img || !ret->img->w() || !ret->img->h()) { delete ret; ret = 0; read_error("%s : unrecognized image format", iname); @@ -196,10 +196,12 @@ void Fluid_Image::decrement() { Fluid_Image::~Fluid_Image() { int a; - for (a = 0;; a++) if (images[a] == this) break; - numimages--; - for (; a < numimages; a++) images[a] = images[a+1]; - img->release(); + if (images) { + for (a = 0;; a++) if (images[a] == this) break; + numimages--; + for (; a < numimages; a++) images[a] = images[a+1]; + } + if (img) img->release(); free((void*)name_); } @@ -219,5 +221,5 @@ Fluid_Image *ui_find_image(const char *oldname) { // -// End of "$Id: Fluid_Image.cxx,v 1.7.2.9.2.11 2002/08/09 22:57:00 easysw Exp $". +// End of "$Id: Fluid_Image.cxx,v 1.7.2.9.2.12 2002/08/16 20:10:21 easysw Exp $". // diff --git a/fluid/fluid.cxx b/fluid/fluid.cxx index d1be42831..d4509797e 100644 --- a/fluid/fluid.cxx +++ b/fluid/fluid.cxx @@ -1,5 +1,5 @@ // -// "$Id: fluid.cxx,v 1.15.2.13.2.30 2002/08/09 22:57:00 easysw Exp $" +// "$Id: fluid.cxx,v 1.15.2.13.2.31 2002/08/16 20:10:21 easysw Exp $" // // FLUID main entry for the Fast Light Tool Kit (FLTK). // @@ -762,6 +762,9 @@ int main(int argc,char **argv) { return 1; } const char *c = argv[i]; + + fl_register_images(); + make_main_window(); if (c) set_filename(c); if (!compile_only) { @@ -797,5 +800,5 @@ int main(int argc,char **argv) { } // -// End of "$Id: fluid.cxx,v 1.15.2.13.2.30 2002/08/09 22:57:00 easysw Exp $". +// End of "$Id: fluid.cxx,v 1.15.2.13.2.31 2002/08/16 20:10:21 easysw Exp $". // |
