Wed Jun 23 23:52:54 BST 1999 Andy Thomas <alt@gimp.org>
* gimp/app/gimppreviewcache.c
* gimp/app/gimppreviewcache.h
* gimp/app/drawable_cmds.c
* gimp/app/gdisplay.c
* gimp/app/gimpdrawableP.h
* gimp/app/gimage_cmds.c
* gimp/app/Makefile.am
* gimp/app/layers_dialog.c
* gimp/app/channel.c
* gimp/app/lc_dialog.c
* gimp/app/lc_dialog.h
* gimp/app/lc_dialogP.h
* gimp/app/layer.c
* gimp/app/gimpdrawable.c
* gimp/app/internal_procs.c
* gimp/libgimp/gimp.h
* gimp/libgimp/gimpimage.c
* gimp/libgimp/gimpdrawable.c
* gimp/libgimp/gimpmenu.c
* gimp/tools/pdbgen/pdb/drawable.pdb
* gimp/tools/pdbgen/pdb/gimage.pdb
Added thumbnail image preview functions.
Previews are visible on the L&C&P dialogs as well as in the
drawables/channels/ menus generated for plugins
(see the bumpmap & Mapobject plugins).
PDB interface exists to simply extract a thumbnail preview
of a given size. This is much quicker & more efficient
than getting the image data tile-by-tile if you only need a small
image since a "preview cache" has been implemented. This cache also
reduces the number of times the tiles cached is scanned since smaller
previews are always generated from large ones if they exists and
are valid.
Some possible usages (I don't intend to implement these ideas. Just
suggestions). More plugins using the thumbnail preview (ie any that
use multiple images). Indication of "active image" somewhere.....
Actually almost anywhere a drawable/image name appears.
1999-06-23 Michael Natterer <mitschel@cs.tu-berlin.de>
* app/brightness_contrast.c
* app/by_color_select.c
* app/curves.c
* app/disp_callbacks.c
* app/histogram_tool.c
* app/hue_saturation.c
* app/levels.c
* app/posterize.c
* app/threshold.c:
Factored out the cleaning up code to the tool dialog's "cancel"
callbacks because they are called from every function which is
aborting the tool. This should fix the remaining segfaults.
I probably killed a feature of "Levels". The tool wanted to
preserve it's drawable all the time, so it was possible to select
colors from other displays. If this was the intended behaviour,
please flame me and I will try to set the "preserve" flag
correctly.
* plug-ins/common/Makefile.am: "struc" was in the Makefile but not
in the directory.
1999-06-21 Michael Natterer <mitschel@cs.tu-berlin.de>
* app/context_manager.c: namespace cleanups.
* app/commands.[ch]
* app/menus.c: moved the "Toggle Selection" menu entry to "View",
sprinkled some separators and made the layers/channels/paths popup
menus consistent with Tigert's last ops buttons change.
* app/fileops.c
* app/plug_in.c: check for gdisplay_active() returning NULL in
some more places.
* app/[all tool related files]:
- Turned the ToolAction and ToolState #define's into typedef'ed
enums, so the compiler can do some more sanity checking.
- Removed one more unused global variable "active_tool_layer".
- Removed some #include's from tools.c.
- Standardized the individual tools' structure names.
- Moved showing/hiding the tool options to separate functions.
- Stuff...
* app/commands.c
* app/disp_callbacks.c
* app/gdisplay.c
* app/tools.c: fixed the segfaults which happened when the image
of one of the tools which have dialogs (levels/posterize/...) was
deleted. My approach was to do stricter sanity checking and to set
some gdisplay pointers correctly where appropriate, so I can't
tell exactly where the bug was.
The curves tool now(??) updates on every _second_ display change
only, which is really obscure.
Finding/changing the display to operate on should definitely be
done by connecting to the user context's "display_changed"
signal.
* app/gimpset.c: emit the "remove" signal _after_ removing the
pointer from the set. If this was not a bug but a feature, please
let me know, we'll need two signals then.
* app/Makefile.am: cosmetic change
* app/plug_in.c: reordered #includes to prevent MAX/MIN conflict
* app/menus.c: removed the weird translation code in favor of
the item factory translation function. This may have broken some
.po files.. we'll see. Also, added some more tearoffs and made
tearoffs appear automagically when plugins register menu entries.
* libgimp/gimpimage.c
* libgimp/gimpenums.h: redid the GOrientation enum to match the
app. Removed special casing in the handler.
* plug-ins/guillotine/guillotine.c: small clean up
-Yosh
* libgimp/gimpfeatures.h.win32: Update version.
* app/file_new_dialog.c: Include gimpcontext.h.
* app/gdisplay.c: Don't pass a pointer as an int parameter,
pass the result of an inequality comparison to zero.
* app/makefile.msc: Add new files.
* plug-ins/makefile.msc: Build the ps plug-in, too.
* plug-ins/ps/ps.c: Add code to use a "real" output file, not a
pipe (needed with Win32 port of ghostscript).
Use g_strdup_printf() instead of separate g_malloc() and sprintf()
calls. No need to check failure of g_malloc(), it aborts on
failure. Open files in binary mode.
(Win32:) Use indirect command line file to guard for too long
command line. (Not sure if this is really needed.) Use the
gswin32c program.
1999-06-21 Michael Natterer <mitschel@cs.tu-berlin.de>
* app/context_manager.c: connect to the user context's
"display_changed" and to the image context's "remove" signal to
avoid dangling references and to set the menu sensitivity on
display change.
* app/disp_callbacks.c
* app/file_new_dialog.c
* app/fileops.c
* app/gdisplay.c
* app/gdisplay_ops.c
* app/gimpcontext.c
* app/interface.[ch]: entirely moved the active display stuff to
the user context:
- The active display is set by any event in the display shell,
by File/New and File/Open.
- gdisplay_delete() resets the active display to NULL if we
deleted the active display.
- Reduced gdisplay_active() to a single statement returning the
context's active display. Should replace it by a macro.
- gdisplay_flush_whenever() sets the menu sensitivity for the
active display.
- Removed global variable popup_shell since it was only set all
the time but never used. I guess it's original job is now done
by the context anyway.
- gdisplay_set_menu_sensitivity() works with gdisp == NULL.
- There are mysterious Gdk-CRITICALs if both <Image> and one of
it's sub-menus are teared-off. Probably a gtk+ bug.
To do all this stuff at a central place, there needs to be a
GimpSet of displays (and ideally, GDisplay should be a GtkObject).
* app/commands.c
* app/lc_dialog.c: fixed segfaults happening with teared-off menus.
1999-06-20 Michael Natterer <mitschel@cs.tu-berlin.de>
* app/commands.c
* app/disp_callbacks.c
* app/gdisplay.c
* app/lc_dialog.c
* app/menus.c: applied a patch from <Simon.Budig@unix-ag.org>
which implements tear-off-menus(!!!). Modified it to use the
GimpContext.
The sensitivity of the menu entries is not updated after
executing a command. This leaves the sensitivity in the state
before the command was executed (which is buggy). Will probably
have to update the sensitivity from gdisplays_flush().
Simon called the patch "temporary" but it looks pretty stable to
me. Please test it :-)
* app/context_manager.[ch]: minor changes.
* app/gimpcontext.[ch]: the user context keeps track of the
current display and image. The image is set automatically from
gimp_context_set_display().
Still have to figure out how this should interact with
gdisplay_active() (the current state is a hack).
Made the context attributes real GtkObject arguments.
Pass the changed attributes to the callbacks which connect to
the <attribute>_changed signals.
* app/gimpset.[ch]
* app/gimpsetF.h
* app/gimpsetP.h: made the gimpset properly derivable by adding
signal slots to the object class structure. Added copyright
headers.
* app/gimpsignal.[ch]: new type gimp_sigtype_double, copyright
header and my usual indentation fanaticism.
1999-06-19 Michael Natterer <mitschel@cs.tu-berlin.de>
* app/gimpcontext.[ch]: added some functions. Still does nothing.
* app/bezier_select.c
* app/devices.c
* app/tools.[ch]: removed global variable active_tool_type
because it was always equal to active_tool->type.
1999-06-18 Michael Natterer <mitschel@cs.tu-berlin.de>
* app/Makefile.am
* app/context_manager.[ch]: new files. Currently only init and
destroy the static contexts (user, standard and default).
* app/app_procs.c: call the context manager's init and free
functions. Still have to figure out the right time to do this.
* app/gimpcontext.[ch]: alpha version 0.0.1 :-)
Features:
- Each context has a name
- Attributes: opacity, paint mode, image, display
- Signal emission on attribute change
- Possibility to set a "parent" context
- Each attribute can be defined or undefined. In the latter case
the values are taken from the parent context.
- Possibility to pass a template and parent context to the
constructor
Bugs:
- Many attributes/functions still missing
- It's connected to nothing
1999-06-17 Michael Natterer <mitschel@cs.tu-berlin.de>
* app/Makefile.am
* app/gimpcontext.[ch]: new files. Does nothing yet. Checked in
because I found some bugs while hacking it:
* libgimp/gimpchainbutton.[ch]
* libgimp/gimpfileselection.[ch]
* libgimp/gimppatheditor.[ch]
* libgimp/gimpsizeentry.[ch]
* libgimp/gimpunitmenu.[ch]: fixed some cut & paste bugs and some
gtk 1.0 artefacts in the object class initialisation code.
1999-06-17 Michael Natterer <mitschel@cs.tu-berlin.de>
* app/preferences_dialog.c: the tree title doesn't behave like a
button anymore.
Made the thumbnail option look like the other option menus.
* README.win32: Mention using GNU gettext.
* config.h.win32: Enable NLS stuff. Remove the X11 & Unix vs. Win32
feature test macros, we use those from glibconfig.h and gdkconfig.h.
* app/makefile.msc: Use gettext. New object files.
* app/batch.c: No need to include <io.h> on Win32.
* app/errorconsole.c
* app/plug_in.c
* app/tile_swap.c: Include <glib.h> early to get Win32 feature
test macros from <glibconfig.h>.
* app/gimpset.c: Remove unnecessary (?) warning.
* app/main.c
* libgimp/stdplugins-intl.h: If no LOCALEDIR defined
(as on Win32), use the "locale" subdir in gimp_data_directory().
* app/palette.c: Open palette file in text mode.
* app/session.c
* app/text_tool.c: Use GDK's GDK_WINDOWING feature test macro
if available, not WINDOWS_DISPLAY.
* libgimp/gimpfeatures.h.win32: Correct GIMP_VERSION.
* libgimp/makefile.msc: Use gettext.
* plug-ins/makefile.msc: Use gettext. Add some missing
plug-ins. Advice how to build "unofficial" plug-ins.
* plug-ins/FractalExplorer/FractalExplorer.c
* plug-ins/faxg3/faxg3.c
* plug-ins/gbr/gbr.c
* plug-ins/gz/gz.c: Include <glib.h> early.
* plug-ins/tga/tga.c: Include config.h, use HAVE_UNISTD_H.
Also fixed a small bug in the pattern code that let a pattern stay
up if the user focussed on another widget before releasing mouse button.
Modified Files:
ChangeLog app/devices.c app/gimprc.c app/gimprc.h
app/interface.c app/preferences_dialog.c app/indicator_area.c