2004-10-25 Michael Natterer <mitch@gimp.org>
Don't store human readable and translatable enum/flag strings in
GEnumValue's and GTypeValue's fields but attach them to their
GType using separate structs and utility functions:
* tools/gimp-mkenums: added params and perl voodoo to support
generating a second array of values, which is used by the
Makefiles below to create and register arrays of value
descriptions.
* libgimpbase/gimpbasetypes.[ch]: added API to attach/retreive
arrays of translatable strings to/from enum and flags types. Added
structs GimpEnumDesc and GimpFlagsDesc for that purpose.
* libgimpbase/gimputils.[ch]: changed existing enum utility
functions, added new ones and added a symmetric API for flags.
* app/base/Makefile.am
* app/core/Makefile.am
* app/display/Makefile.am
* app/paint/Makefile.am
* app/text/Makefile.am
* app/tools/Makefile.am
* app/widgets/Makefile.am
* libgimp/Makefile.am
* libgimpbase/Makefile.am: changed *-enums.c generation rules
accordingly.
* app/base/base-enums.c
* app/core/core-enums.c
* app/display/display-enums.c
* app/paint/paint-enums.c
* app/text/text-enums.c
* app/tools/tools-enums.c
* app/widgets/widgets-enums.c
* libgimpbase/gimpbaseenums.c: regenerated.
* app/widgets/gimpenumstore.c
* app/widgets/gimpenumwidgets.c
* app/widgets/gimptemplateeditor.c
* libgimpwidgets/gimppreviewarea.c: follow the enum utility
function API changes.
2004-09-15 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimppreviewarea.c
(gimp_preview_area_[draw|blend|mask]): fixed code that handles
drawing outside of the preview area.
* plug-ins/common/unsharp.c (preview_update): draw the preview
directly from the pixel region.
* libgimpwidgets/gimppreviewarea.c: added a utility function
gimp_preview_area_queue_draw(), which queue the right part of the
preview to be redrawn. And use it in all the drawing functions. This
fix a problem where the preview wasn't updated correctly after a
resize.
2004-09-09 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimppreviewarea.[ch]: allow to set a maximum size
and center the preview area if its allocation extends the maximum.
* libgimpwidgets/gimppreview.[ch]: derive from GtkVBox, moved the
toggle button out of the table and put the table into an aspect
frame. Added an API to set the preview boundaries. Set the maximum
size of the GimpPreviewArea from that function.
* libgimpwidgets/gimpwidgets.def: added new entries.
* libgimp/gimpdrawablepreview.c: use gimp_preview_set_bounds().
* plug-ins/common/gauss.c: pack the preview widget so that it
resizes with the dialog.
* libgimpwidgets/gimppreviewarea.c (gimp_preview_area_blend)
(gimp_preview_area_mask): optimized the case where both buffers have
the same alpha for a given pixel.
2004-09-08 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimppreviewarea.c: factored out common code.
Reduced indentation level by closing a switch earlier.
* libgimpwidgets/gimppreviewarea.c
* libgimpwidgets/gimppreviewarea.h: added two functions:
gimp_preview_area_blend() to draw the blending of two buffers with
an opacity parameter, and gimp_preview_area_mask() to draw the
blending of two buffers, with a mask buffer. The code still needs some
polish, though.
* libgimp/gimpdrawablepreview.c
* libgimp/gimpdrawablepreview.h: use gimp_preview_area_mask() in
gimp_drawable_preview_draw(), so the previews are now much more
accurate (respecting the selection, if any).
Also made the buf parameter of gimp_drawable_preview_draw() a pointer
to constants.
2004-09-04 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimppreviewarea.[ch]: pass a GdkEventButton to
gimp_preview_area_menu_popup().
* libgimpwidgets/gimppreview.c: implement GtkWidget::popup_menu().
2004-09-03 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimppreviewarea.[ch]: added
gimp_preview_area_menu_popup(). Not completely finished yet...
* libgimpwidgets/gimppreview.c: use the new function.
2004-09-03 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimppreviewarea.c (CHECK_COLOR): swapped light
and gray checks to get a checkerboard that matches the image window.
2004-09-03 Sven Neumann <sven@gimp.org>
* libgimpbase/Makefile.am
* libgimpbase/gimpchecks.[ch] added gimp_checks_get_shades().
* app/base/temp-buf.c
* app/display/gimpdisplayshell-render.c
* libgimpwidgets/gimppreviewarea.c: use the new function instead
of replicating these numbers in three different places.
2004-09-02 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-render.c (check_combos): light and
dark check color were swapped for GIMP_CHECK_TYPE_GRAY_CHECKS.
* libgimpwidgets/gimppreviewarea.[ch]: added "check-size" and
"check-type" properties and draw the checkerboard accordingly.
2004-09-01 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimppreviewarea.[ch]: added new function
gimp_preview_area_set_offsets().
* libgimpwidgets/gimppreview.c: use the new function to let the
checkerboard scroll with the preview.
2004-07-31 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimppreviewarea.[ch]: added new function
gimp_preview_area_fill().
* libgimpwidgets/test-preview-area.c: added a test for new function.
* libgimp/gimpbrushmenu.c: ported to GimpPreviewArea.
2004-07-29 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimppreviewarea.c: only invalidate the buffer
on size_allocate; allocate a new one on the next call to
gimp_preview_area_draw(). Fixed buffer offset in expose method.
* libgimpwidgets/Makefile.am
* libgimpwidgets/test-preview-area.c: more a benchmark than a
test; quite similar to testrgb from the GTK+ source tree.
2004-07-29 Sven Neumann <sven@gimp.org>
* libgimpwidgets/Makefile.am
* libgimpwidgets/gimpwidgets.def
* libgimpwidgets/gimpwidgets.h
* libgimpwidgets/gimpwidgetstypes.h
* libgimpwidgets/gimppreviewarea.[ch]: added GimpPreviewArea, a
replacement for GtkPreview, loosely based on patches from Geert
Jordaens and David Odin. Fixes bug #144759.
* plug-ins/common/sharpen.c: use the new widget instead of a
GtkPreview; saves about 100 lines of rather complex code :)