Jens Arm wrote 11 lines
> Fine update :)
>
> But xpm's which are added and then e.g. shown in a ListView are only as a mix of colors shown.
> (in the Image List Editor, too. If you open it a second time)
>
In the console I get such an error/warning:
WARNING: [TgtkObject.LoadFromPixbufData] loading data FAILED!
thats probably because of one of two reasons, a) your gdk-pixbuf is too old, I would suggest 0.18, but anything >= 0.13 should work. and b) the bitmap saving code is incomplete, and at best a buggy hack. I haven't had a chance to look in a long while, but when I wrote it I was just trying to fill in as much of the blanks with regards to canvas and graphics components as possible, so full functionality was never finished.
The biggest problem is that in gtk1.2 there is no way to save information to a file, though it can be loaded via gdk-pixbuf, so the routine to save it is not correct for various reasons. The most important reason is that the code is designed around win32 api which is not a particularly sane way for handling multiple file formats, much less proper data formatting to save to a file.So right now the code attempts to dump the proper bitmap header to a file, and grab the bits into the proper format and dump them as well. Since however the pallette functionality has not been completed either, this is not entirely feasible.
In any event, until such time as palette code can be properly handled in the gtk interface, and the bitmap code can be more sanely implemented, or an external library can be found to export GdkPixbuf's to a file, this is simply not going to work properly for all images. Especially for non-Index'ed images.
I would suggest trying to use only indexed 256 color images. Or only load images at runtime via the image/graphics load from file routines.
Or better yet, finish the code! I have many grandios plans for this, but the truth being I simply do not have the time to work on any of them, nor have had for several months,and while eventually I hope to be able to do many things, especially within the Win32, GTK2 and future GNOME2 interfaces, the biggest stumbling block will be gtk1/gnome1. And though at this point it almost becomes moot as GTK1 is fast becoming obsolete,GTK1 is still the main development interface, and thus the most stable.
Andrew