Fix FLUID image problems.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2591 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet 2002-08-16 20:10:21 +00:00
parent a2c193c777
commit ab53ef9a44
3 changed files with 17 additions and 9 deletions

View File

@ -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.

View File

@ -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;
if (images) {
for (a = 0;; a++) if (images[a] == this) break;
numimages--;
for (; a < numimages; a++) images[a] = images[a+1];
img->release();
}
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 $".
//

View File

@ -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 $".
//