2008-08-07 Sven Neumann <sven@gimp.org>
* app/core/gimpselection.c (gimp_selection_extract): aded a
comment explaining why copy_region_nocow() is being used here.
svn path=/trunk/; revision=26418
2008-08-05 Martin Nordholts <martinn@svn.gnome.org>
* app/core/gimpimage.c (gimp_image_real_size_changed_detailed):
Clarify the design with a comment.
svn path=/trunk/; revision=26388
2008-08-04 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage.[ch] (GimpImage::size-changed-detailed):
change double to int in signal parameters.
Remove gimp_image_emit_size_changed_signals() and call
gimp_viewable_size_changed() in size-changed-detailed's default
handler.
* app/core/gimpimageundo.[ch]
* app/core/gimpimage-undo-push.[ch]: change double to int in
previous-origin related code.
* app/core/gimpimage-undo.c
* app/core/gimpimage-scale.c
* app/core/gimpimage-crop.c
* app/core/gimpimage-rotate.c
* app/core/gimpimage-resize.c: call gimp_image_size_changed_detailed()
instead of the removed gimp_image_emit_size_changed_signals()
* app/display/gimpdisplayshell-scroll.[ch]: remove
gimp_display_shell_handle_size_changed_detailed() because it
handles both scrolling and scaling and doesn't belong here.
* app/display/gimpdisplayshell-handlers.c: moved its code back to
gimp_display_shell_size_changed_detailed_handler() and follow the
double -> int change above.
svn path=/trunk/; revision=26367
2008-08-04 Martin Nordholts <martinn@svn.gnome.org>
* app/core/gimpimage.c (gimp_image_emit_size_changed_signals): The
parameters should be named previous_origin_[xy].
svn path=/trunk/; revision=26365
2008-08-03 Martin Nordholts <martinn@svn.gnome.org>
Further work for completing bug #362915 that makes changes to the
image size (e.g when cropping) be much more nicely handled by
display shell.
* app/core/gimpimage.[ch]: Add new signal
GimpImage::size-changed-detailed that is emited whenever
GimpViewable::size-changed is. The new signal provides additional
information, namely the previous origin relative to the current
origin. Cliens choose what specific signal to listen to depending
on how much info they need.
* app/display/gimpdisplayshell-handlers.c: Connect to
GimpImage::size-changed-detailed instead of
GimpViewable::size-changed since the shell wants information about
the previous image origin.
(gimp_display_shell_resolution_changed_handler): Use
gimp_display_shell_scale_resize() instead to avoid display
garbage.
* app/display/gimpdisplayshell-scale.[ch]: Add new utility
function gimp_display_shell_center_image_on_next_size_allocate().
* app/display/gimpdisplayshell-scroll.[ch]
(gimp_display_shell_handle_size_changed_detailed): New function
that replaces logic in gimp_display_shell_handle_size_changed and
that takes previous-origin of the image into account and adjusts
the offset so that the image content that remains doesn't move. If
the window is resized on image resize, just center the image
afterwards.
* app/core/gimpimage-undo-push.[ch]
(gimp_image_undo_push_image_size): Add previous-origin paremeters.
* app/core/gimpimageundo.[ch]: Add and manage previous-origin
properties so that the display shell offset can be appropriately
adjusted also when undoing.
* app/core/gimpundo.h
* app/core/gimpimage-undo.c: Add previous_origin members to the
undo accumulator and emit that information when the size of the
image changes due to the undo.
* app/core/gimpimage-crop.c (gimp_image_crop)
* app/core/gimpimage-scale.c (gimp_image_scale)
* app/core/gimpimage-rotate.c (gimp_image_rotate)
* app/core/gimpimage-resize.c (gimp_image_resize_with_layers):
Supply information about the previous-origin of the image to the
size-changed signals and the undo system.
svn path=/trunk/; revision=26354
2008-07-23 Sven Neumann <sven@gimp.org>
* app/paint/gimppaintcore-stroke.[ch]: also implement brush
dynamics emulation for stroking selections.
* app/core/gimpchannel.c: pass the 'emulate-dynamics' parameter
to
gimp_paint_core_stroke_boundary().
svn path=/trunk/; revision=26293
2008-07-21 Sven Neumann <sven@gimp.org>
* app/core/gimpstrokedesc.[ch]: added boolean property
'emulate-brush-dynamics', in preparation for bug #543706.
* app/dialogs/stroke-dialog.c: added a toggle for the new
parameter.
svn path=/trunk/; revision=26255
2008-07-18 Sven Neumann <sven@gimp.org>
* app/core/core-types.h: removed delta_time, delta_x, delta_y,
distance and random from the GimpCoords struct. These don't need
to be kept here and they can't be properly interpolated.
* app/core/gimpcoords.c: changed accordingly.
* app/xcf/xcf-load.c (xcf_load_vector): the size of the
GimpCoords
struct changed.
* app/display/gimpdisplayshell.[ch] (struct _GimpDisplayShell):
added some members to store values from the last event that are
needed in gimp_display_shell_eval_event() and which are not any
longer part of GimpCoords.
* app/display/gimpdisplayshell-coords.c
(gimp_display_shell_eval_event): changed accordingly.
* app/paint/gimppaintoptions.c: calculate a random number when
one
is needed.
* app/paint/gimpbrushcore.c (gimp_brush_core_interpolate):
GimpCoords doesn't have a "random" field any longer.
svn path=/trunk/; revision=26232
2008-07-18 Sven Neumann <sven@gimp.org>
* app/core/core-types.h (GIMP_COORDS_DEFAULT_VALUES): initialize
all members of the GimpCoords struct.
svn path=/trunk/; revision=26231
2008-07-17 Sven Neumann <sven@gimp.org>
* app/core/gimpcoords.c (gimp_coords_mix): also mix in the new
members of the GimpCoords struct.
svn path=/trunk/; revision=26230
2008-07-12 Martin Nordholts <martinn@svn.gnome.org>
* app/core/gimpmarshal.list: Added
VOID__DOUBLE_DOUBLE_DOUBLE_DOUBLE marshaller.
* app/widgets/gimpnavigationview.c: Make the "marker-changed"
signal also pass the marker width and height as parameters.
* app/display/gimpnavigationeditor.c: Updated accordingly.
svn path=/trunk/; revision=26160
2008-07-12 Sven Neumann <sven@gimp.org>
* app/core/gimpparamspecs.[ch]: added GIMP_TYPE_COLOR_ARRAY and
GIMP_TYPE_PARAM_COLOR_ARRAY in preparation for fixing bug
#332206.
svn path=/trunk/; revision=26150
2008-07-10 Sven Neumann <sven@sven-sun.berlin.jpk.com>
* app/core/gimpdata.[ch]: renamed gimp_data_name_compare() to
gimp_data_compare() and changed it to keep the data in three
groups: internal, writable and system resource files. Inside the
groups the sorting order is alphabetical.
* app/core/gimpdatafactory.c (gimp_data_factory_new): changed
accordingly.
svn path=/trunk/; revision=26100
2008-06-25 Michael Natterer <mitch@gimp.org>
* app/core/gimpmarshal.list: add marshaller BOOLEAN__STRING for
the change below.
* app/widgets/gimpsettingsbox.[ch]: add the import/export dialogs
here. Add a bunch of parameters to new() to be used by the
dialogs, they are not properties yet. Changed import() and
export() signals to pass the selected filename and return a
boolean indicating success.
* app/tools/gimpimagemaptool-settings.c: remove the dialog code
here and connect the import/export functions directly to above
GimpSettingsBox signals.
* app/tools/gimpimagemaptool.[ch]: remove file dialog member.
svn path=/trunk/; revision=25991
2008-06-04 Sven Neumann <sven@gimp.org>
* app/core/gimpdrawable-operation.c (gimp_drawable_apply_operation):
no need to check for the 'dont-cache' property now that we depend
on the newer GEGL.
svn path=/trunk/; revision=25888
2008-05-22 Michael Natterer <mitch@gimp.org>
Applied slightly modified and fixed patch from Alexia Death which
adds a "random" axis to the paint dynamics and fixes some issues
in the previous paint dynamics commits. Fixes bug #529431.
* app/core/core-types.h: add a "random" axis to GimpCoords.
* app/display/gimpdisplayshell-coords.c: set it to a random value.
* app/display/gimpdisplayshell-callbacks.c: on button_press,
use the dynamics from the last motion event to avoid blotches
at the beginning of paint strokes.
* app/paint/gimppaintoptions.[ch]: add random properties the same
way we do pressure and velocity. Add get_dynamic_size(),
get_dynamic_color() and get_dynamic_hardness() functions which
look at all dynamic parameters of the passed coords.
* app/tools/gimppaintoptions-gui.c: add gui for the random options.
* app/paint/gimpbrushcore.[ch]: remove calc_brush_scale() and use
gimp_paint_options_get_dynamic_size_instead().
Add "dynamic_hardness" parameters to paste_canvas(),
replace_canvas() and get_brush_mask().
* app/paint/gimpairbrushoptions.c
* app/paint/gimpclone.c
* app/paint/gimpconvolve.c
* app/paint/gimpdodgeburn.c
* app/paint/gimperaser.c
* app/paint/gimpheal.c
* app/paint/gimppaintbrush.c
* app/paint/gimpsmudge.c: calculate the dynamic hardness and pass
it to above brush core functions. Use the get_dynamic_color() to
calculate the gradient color.
svn path=/trunk/; revision=25758
2008-05-22 Sven Neumann <sven@gimp.org>
* app/tools/gimp-tools.c (gimp_tools_init): added a call to
gimp_tool_options_create_folder().
* app/core/gimp-user-install.c (gimp_user_install_items): no need
to create the tool-options folder here if we are doing that on
each startup.
svn path=/trunk/; revision=25749
2008-05-21 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable-process.c (gimp_drawable_process): add
missing include and missing call to gimp_drawable_mask_intersect().
svn path=/trunk/; revision=25736
2008-05-21 Sven Neumann <sven@gimp.org>
* app/core/Makefile.am
* app/core/gimpdrawable-process.[ch]: new file holding code to
apply a PixelProcessor to the full drawable.
* app/core/gimpdrawable-desaturate.c
* app/core/gimpdrawable-invert.c: use the new helper function.
* app/core/gimpdrawable-desaturate.[ch]
(gimp_drawable_desaturate):
take a GimpProgress parameter.
* tools/pdbgen/pdb/color.pdb: changed accordingly.
* app/pdb/color-cmds.c: regenerated.
svn path=/trunk/; revision=25734
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-05-21 Sven Neumann <sven@gimp.org>
Add Desaturate as an image-map tool with live preview (bug #533808):
* app/gegl/Makefile.am
* app/gegl/gegl-types.h
* app/gegl/gimpdesaturateconfig.[ch]: added config object for the
desaturate point filter.
* app/gegl/gimpoperationdesaturate.[ch]: derive from
GimpOperationPointFilter. Unrolled the inner loop.
* app/core/gimpdrawable-desaturate.c: changed accordingly.
* app/tools/Makefile.am
* app/tools/gimpdesaturatetool.[ch]: added desaturate as an
imagemap tool. So far only the GEGL code path is implemented.
* app/tools/gimp-tools.c: register the new tool.
* app/dialogs/dialogs.c: register the new tool dialog.
* app/dialogs/Makefile.am
* app/dialogs/desaturate-dialog.[ch]: removed the desaturate dialog.
* app/actions/drawable-actions.c
* app/actions/drawable-commands.[ch]: removed action
"drawable-desaturate".
* app/widgets/gimphelp-ids.h: changed help IDs accordingly.
* menus/image-menu.xml.in: replaced "drawable-desaturate" with
"tools-desaturate".
* libgimpwidgets/gimpstock.h: added a define for
GIMP_STOCK_TOOL_DESATURATE.
svn path=/trunk/; revision=25726
2008-05-20 Michael Natterer <mitch@gimp.org>
* app/core/Makefile.am
* app/core/core-types.h
* app/core/gimpimagemapconfig.[ch]: new GimpViewable subclass
which has a "time" property. Sets the object's name to a date
string if a time != 0 gets set. Has a compare function which first
sorts the objects with a timestamp in MRU order and then the
objects without timestamp by name.
* app/gegl/gimpbrightnesscontrastconfig.[ch]
* app/gegl/gimpcolorbalanceconfig.[ch]
* app/gegl/gimpcolorizeconfig.[ch]
* app/gegl/gimpcurvesconfig.[ch]
* app/gegl/gimphuesaturationconfig.[ch]
* app/gegl/gimplevelsconfig.[ch]
* app/gegl/gimpposterizeconfig.[ch]
* app/gegl/gimpthresholdconfig.[ch]: derive from GimpImageMapConfig.
* app/tools/gimpimagemaptool.c: sort the settings container with
above compare function.
* app/tools/gimpimagemaptool-settings.c: add utility functions
for loading and saving the settings container. In the settings
combo, add a separator between MRU items and favorites.
* app/Makefile.am: make the thing link.
svn path=/trunk/; revision=25724
2008-05-20 Michael Natterer <mitch@gimp.org>
* app/core/gimplist.c (gimp_list_uniquefy_name): don't crash if an
object has a NULL name. Move variables to local scopes. Remove
redundant casts.
svn path=/trunk/; revision=25723
2008-05-19 Michael Natterer <mitch@gimp.org>
* app/core/gimpcurve.c
(gimp_curve_set_n_points)
(gimp_curve_set_n_samples): set "identity" to TRUE if appropriate.
(gimp_curve_calculate): don't set it to TRUE when there are no
control points.
svn path=/trunk/; revision=25708
2008-05-19 Sven Neumann <sven@gimp.org>
* app/core/gimpcurve-map.c (gimp_curve_map_pixels): fixed the call
to memcpy() in the CURVE_NONE case.
svn path=/trunk/; revision=25707
2008-05-18 Michael Natterer <mitch@gimp.org>
* app/core/gimpcurve.c: implement (de)serializing of the points
and samples arrays using GValueArray. Set "identity" to FALSE
after deserializing.
svn path=/trunk/; revision=25704
2008-05-18 Michael Natterer <mitch@gimp.org>
* app/core/gimptoolinfo.[ch]: add
gimp_tool_info_build_options_filename() which creates a filename
under $GIMPDIR/tool-options/ with an optional suffix.
* app/core/gimptooloptions.c
* app/core/gimptoolpresets.c: use it and remove own build_filename()
functions.
svn path=/trunk/; revision=25701
2008-05-18 Michael Natterer <mitch@gimp.org>
* app/core/gimpstrokeoptions.[ch]: renamed public function
set_dash_pattern() to take_dash_pattern() to clarify memory
management of the passed GArray.
* app/widgets/gimpdasheditor.c
* app/widgets/gimpstrokeeditor.c: changed accordingly.
svn path=/trunk/; revision=25700