* app/brightness_contrast.c
* app/by_color_select.c
* app/color_balance.c
* app/color_picker.c
* app/curves.c
* app/histogram_tool.c
* app/hue_saturation.c
* app/levels.c
* app/posterize.c
* app/threshold.c
* app/transform_core.c: modified to call the cancel callback
instead of the ok callback when freed. modified to save the
last used drawable so that we might be able to check later
and restart the tool if need be.
* app/disp_callbacks.c
* app/gimage.c: modified tool restart/destruction code
* app/tools.c
* app/tools.h: added tools_initialize, made changes to
be able save the last used drawable in the tool.
--Matt
This fixes the crashes when closing an image with the by-color-select-dialog
associated to it still open and pressing "Reset" or clicking into the preview.
The checks produce some warnings like
** WARNING **: invalid class type (unknown)' in cast to impDrawable'
when failing, but I consider this less evil than a crash.
There is still a problem: Sometimes the by-color-select-dialog is closed
when the image is closed and can't be opened anymore. Anyone?
--Sven