2008-11-06 Sven Neumann <sven@gimp.org>
* tools/gimp-mkenums: use NC_() to mark enum values for
translation.
Use a lower-case short form of the type name as translation
context.
* libgimp/libgimp-intl.h: define the NC_() macro as noop.
* libgimpbase/gimpbasetypes.[ch]
* libgimpbase/gimpbase.def: added new functions to set and
get a translation context on an enum type.
* app/base/Makefile.am
* app/core/Makefile.am
* app/display/Makefile.am
* app/paint/Makefile.am
* app/plug-in/Makefile.am
* app/text/Makefile.am
* app/tools/Makefile.am
* app/widgets/Makefile.am
* libgimp/Makefile.am
* libgimpbase/Makefile.am:
* libgimpconfig/Makefile.am
* libgimpthumb/Makefile.am
* libgimpwidgets/Makefile.am: register the translation context
with the enum types.
* app/display/display-enums.h
* libgimpbase/gimpbaseenums.h
* libgimpconfig/gimpcolorconfig-enums.h: removed old-style
explicit
translation context.
* app/base/base-enums.c
* app/core/core-enums.c
* app/display/display-enums.c
* app/paint/paint-enums.c
* app/plug-in/plug-in-enums.c
* app/text/text-enums.c
* app/tools/tools-enums.c
* app/widgets/widgets-enums.c
* libgimpbase/gimpbaseenums.c
* libgimpconfig/gimpcolorconfig-enums.c
* libgimpwidgets/gimpwidgetsenums.c: regenerated.
svn path=/trunk/; revision=27562
2008-11-04 Sven Neumann <sven@sven>
* app/base/tile-pyramid.[ch] (tile_pyramid_new):
* app/core/gimpprojection.c
(gimp_projection_get_tiles_at_level):
reverted last change as the code in tile-pyramid does care about
the pixel format and it should continue to reject types that it
cannot handle.
svn path=/trunk/; revision=27545
2008-11-04 Michael Natterer <mitch@gimp.org>
* app/base/tile-pyramid.[ch] (tile_pyramid_new): changed "type"
parameter into "bytes" because tile managers don't care about
the pixel format of their tiles. Reordered parameters to match
tile_manager_new().
* app/core/gimpprojection.c (gimp_projection_get_tiles_at_level):
pass the bytes instead of the image type.
svn path=/trunk/; revision=27544
2008-10-08 Sven Neumann <sven@gimp.org>
* app/base/tile-cache.c: use a GMutex instead of a GStaticMutex
as the latter needs API that causes compiler warnings about
dereferencing of type-punned pointers.
svn path=/trunk/; revision=27170
2008-09-25 Michael Natterer <mitch@gimp.org>
* app/base/colorize.c (colorize_calculate): fix calculation of
final lookup table to not darken the image.
svn path=/trunk/; revision=27062
2008-09-04 Tor Lillqvist <tml@novell.com>
* app/base/base-utils.h
* app/base/base-utils.c: The return type of get_pid() should be
gint, not GPid. This matches also the C library on Windows, in
which the return type of getpid() is int, not a pointer or
intptr_t. The use for GPid in the GLib API is as a "handle" to a
descendant processes, returned by the g_spawn_*() functions, and
passed to the g_child_watch_*() functions, not as a "process
identifier".
svn path=/trunk/; revision=26866
2008-09-01 Sven Neumann <sven@gimp.org>
* app/paint-funcs/paint-funcs.[ch]: added clear_region().
* app/base/tile-manager-crop.c
* app/core/gimpchannel.c
* app/core/gimpimage-merge.c
* app/core/gimpmaskundo.c
* app/core/gimpprojection-construct.c: use it instead of calling
color_region() with a zero color.
svn path=/trunk/; revision=26826
2008-08-25 Sven Neumann <sven@gimp.org>
* app/base/tile-manager.c (read_pixel_data_1): changed to
silently
return in case of out-of-bounds access. There's code that relies
on this.
* app/base/pixel-surround.[ch]: added SMEAR as another edge
strategy for the PixelSurround helper.
* core/gimp-transform-region.c: changed accordingly.
svn path=/trunk/; revision=26767
2008-08-25 Sven Neumann <sven@gimp.org>
* app/base/tile-private.h: provide a macro version of
tile_data_pointer().
* app/base/tile.c (tile_data_pointer): turned into a wrapper
around the TILE_DATA_POINTER() macro.
* app/base/tile-manager.c (read_pixel_data) (read_pixel_data_1)
(write_pixel_data) (write_pixel_data_1): access tile struct
members directly and use the new macro to access the tile data.
svn path=/trunk/; revision=26757
2008-08-25 Sven Neumann <sven@gimp.org>
* app/base/tile-manager.c (read_pixel_data_1): removed redundant
check that is already performed by tile_manager_get_tile_num().
Warn if an out-of-bounds read is requested, instead of silently
doing nothing.
svn path=/trunk/; revision=26755
2008-08-08 Sven Neumann <sven@gimp.org>
* app/base/tile-manager.c: implement
tile_manager_get_tile_coordinates() by calling
tile_manager_get_tile_col_row() instead of the other way around.
Saves two multiplications and divisions for each call of
tile_manager_get_tile_col_row().
svn path=/trunk/; revision=26446
2008-08-07 Sven Neumann <sven@gimp.org>
* app/base/tile-manager.c (tile_manager_invalidate_tile): fixed
broken copy-on-write code. The old code did not insert the new
tile in the tile-manager's tile pointer array.
(tile_manager_map): changed in a similar way as
tile_manager_invalidate_tile(). This code was not broken, but it
is easier to read now.
* app/base/tile-private.h: moved a comment.
* app/core/gimpselection.c (gimp_selection_extract): removed
workaround for above bug.
svn path=/trunk/; revision=26419
2008-08-05 Sven Neumann <sven@gimp.org>
* app/base/tile-manager.h
* app/base/tile-pyramid.h: moved a misplaced comment to the
right
place.
svn path=/trunk/; revision=26382
2008-07-22 Sven Neumann <sven@gimp.org>
* app/base/gimphistogram.[ch]: added new method
gimp_histogram_duplicate().
* app/widgets/gimphistogrameditor.c
(gimp_histogram_editor_frozen_update): instead of recalculating
the histogram, use a duplicate for the background histogram.
svn path=/trunk/; revision=26270
2008-05-21 Sven Neumann <sven@gimp.org>
* app/base/desaturate.[ch]: changed to take a pointer as first
argument as all PixelProcessor functions.
* app/core/gimpdrawable-desaturate.c: changed accordingly.
* app/tools/gimpdesaturatetool.[ch]: added legacy code path.
svn path=/trunk/; revision=25730
2008-05-21 Sven Neumann <sven@gimp.org>
* app/base/Makefile.am
* app/base/desaturate.[ch]: moved legacy desaturate code here.
* app/core/gimpdrawable-desaturate.c: use the code in app/base.
svn path=/trunk/; revision=25728
2008-04-28 Sven Neumann <sven@gimp.org>
* app/base/hue-saturation.c (hue_saturation): applied patch from
Michael Deal that fixes use of the overlap option (bug #527085).
svn path=/trunk/; revision=25539
2008-03-28 Mukund Sivaraman <muks@mukund.org>
Fixes for some Sparse reported issues in app/
* app/core/gimpdrawable-operation.c: Added prototype for
gegl_node_add_child().
* app/core/gimpcurve.c: Remove C99 code
* app/tools/gimpcurvestool.c
* app/tools/gimpperspectiveclonetool.c
* app/vectors/gimpstroke.c: Mark functions as static.
* app/base/siox.c: state is a pointer.
* app/plug-in/gimppluginprocframe.c: values is a pointer.
* app/plug-in/plug-in-rc.c: plug_in_rc_parse() returns a pointer.
* app/plug-in/gimpinterpreterdb.c: Check program[0] for '\0'
instead of the pointer program itself.
svn path=/trunk/; revision=25292
2008-02-07 Michael Natterer <mitch@gimp.org>
* app/base/base-utils.[ch]: add get_pid() which returns getpid().
* app/base/base.c
* app/base/tile-swap.c
* app/core/gimp-utils.c
* app/plug-in/gimppluginshm.c
* app/widgets/gimpselectiondata.c
* tools/pdbgen/pdb/misc.pdb: use it instead of getpid() and remove
all the #ifdef'ed includes getpid() needs.
* tools/pdbgen/app.pl: remove support for these includes. Also
remove some perl cruft in the include handling which is not needed
any longer.
* app/pdb/misc_cmds.c: regenerated.
svn path=/trunk/; revision=24827
2008-02-04 Michael Natterer <mitch@gimp.org>
* app/base/gimphistogram.[ch]: add refcounting and replace free()
API by ref() and unref().
* app/core/gimpdrawable-equalize.c
* app/core/gimpdrawable-levels.c
* app/widgets/gimphistogrameditor.c
* tools/pdbgen/pdb/color.pdb: replace calls to
gimp_histogram_free() by gimp_histogram_unref().
* app/pdb/color_cmds.c: regenerated.
* app/widgets/gimphistogramview.c: reference the histograms so we
don't need the widget's users to keep them around while the widget
exists.
* app/tools/gimpcurvestool.[ch]: remove the histogram from the
tool struct and just create one locally to set it on the histogram
view widget.
Unrelated:
* app/tools/gimplevelstool.[ch]
* app/tools/gimpthresholdtool.[ch]: renamed "hist" members to
"histogram" plus some cleanup.
svn path=/trunk/; revision=24792
2008-01-28 Michael Natterer <mitch@gimp.org>
* app/base/tile-manager.c
* plug-ins/common/lcms.c: use G_STRLOC instead of
G_GNUC_FUNCTION (which is now deprecated).
svn path=/trunk/; revision=24727
2008-01-24 Michael Natterer <mitch@gimp.org>
* app/gegl/Makefile.am
* app/gegl/gegl-types.h
* app/gegl/gimpcolorbalanceconfig.[ch]: new config object.
* app/gegl/gimpoperationcolorbalance.[ch]: use it.
* app/tools/gimpcolorbalancetool.[ch]: port to
GimpColorBalanceConfig and use the old ColorBalance cruft only in
map(). The effect of the GEGL operator is now even more different
from the cruft code because I removed a hack that was applying an
additional factor when mapping between the ColorBalance values and
the new properties, but that was only a workaround to make it look
more similar anyway. Will have to fix this properly.
* app/base/color-balance.[ch]: remove API that is now obsolete.
svn path=/trunk/; revision=24701
2008-01-23 Michael Natterer <mitch@gimp.org>
* app/gegl/gimpoperationlevels.[ch]
(gimp_operation_levels_map_input): new utility function which maps
a single value.
* app/tools/gimplevelstool.[ch] (levels_update_adjustments): use the
new function to create the input arrays for gimp_color_bar_set_buffer().
Removed the Levels struct from the GimpLevelsTool struct and only
use it in map() when needed.
* app/base/levels.[ch]: remove obsolete API and struct members.
svn path=/trunk/; revision=24682
2008-01-22 Michael Natterer <mitch@gimp.org>
* app/gegl/Makefile.am
* app/gegl/gegl-types.h
* app/gegl/gimphuesaturationconfig.[ch]: new config object.
* app/gegl/gimpoperationhuesaturation.[ch]: remove all properties
and add a "config" property. Also add API to map a single GimpRGB
needed by the hue-saturation tool's color areas.
* app/tools/gimphuesaturationtool.[ch]: switch to using
GimpHueSaturationConfig, use the old HueSaturation struct only in
map().
* app/base/hue-saturation.[ch]: remove API that's no longer needed.
svn path=/trunk/; revision=24667
2008-01-21 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable-levels.c: port to GEGL and use the new
code path when use-gegl is TRUE.
* app/base/levels.[ch]: remove stretch and pick APIs which are not
used any longer.
svn path=/trunk/; revision=24659
2007-12-29 Michael Natterer <mitch@gimp.org>
* app/base/tile-manager.[ch]: add boxed type GIMP_TYPE_TILE_MANAGER.
* app/gegl/gimpoperationtilesink.c
* app/gegl/gimpoperationtilesource.c: use GParamSpecBoxed instead
of GParamSpecPointer for the tile-manager properties and ref them
properly. Some cleanup.
svn path=/trunk/; revision=24465
2007-12-18 Sven Neumann <sven@gimp.org>
* app/base/tile-pyramid.c: use the coordinate parameters in
tile_data_pointer() instead of adjusting the pointer manually.
svn path=/trunk/; revision=24392