Commit Graph

3009 Commits

Author SHA1 Message Date
Martin Nordholts 86e50ceb47 Fix typo in app/core/gimpimage.c.
svn path=/trunk/; revision=27949
2009-01-25 19:32:02 +00:00
Martin Nordholts 9609e93ca8 Format app/core/gimpimage.c a bit nicer.
svn path=/trunk/; revision=27948
2009-01-25 19:28:25 +00:00
Martin Nordholts 3b79e36d30 New method to get a string representation of the image type.
* app/core/gimpimage.[ch] (gimp_image_get_type_string): New method
to get a string representation of the image type.

* app/display/gimpdisplayshell-title.c
(gimp_display_shell_format_title): Ask the GimpImage for an image
type string instead of making assumptions about its
implementation.

svn path=/trunk/; revision=27947
2009-01-25 19:21:52 +00:00
Michael Natterer 6584aba5c2 app/core/Makefile.am new files implementing gimp_param_spec_duplicate()
2009-01-25  Michael Natterer  <mitch@gimp.org>

	* app/core/Makefile.am
	* app/core/gimpparamspecs-duplicate.[ch]: new files implementing
	gimp_param_spec_duplicate() which is supposed to duplicate any
	gimp or gegl GParamSpec (but doesn't do this yet).

	* app/tools/gimpgegltool.c: remove the code form here.


svn path=/trunk/; revision=27945
2009-01-25 18:01:47 +00:00
Michael Natterer d9b5207aa2 Change licence to GPLv3 (and to LGPLv3 for libgimp).
2009-01-17  Michael Natterer  <mitch@gimp.org>

	* all files with a GPL header and all COPYING files:

	Change licence to GPLv3 (and to LGPLv3 for libgimp).

	Cleaned up some copyright headers and regenerated the parsers in
	the ImageMap plugin.


svn path=/trunk/; revision=27913
2009-01-17 22:28:01 +00:00
Sven Neumann f171d10506 Bug 471344 – Circular brush strokes are not smooth and have corners
2009-01-10  Sven Neumann  <sven@gimp.org>

	Bug 471344 – Circular brush strokes are not smooth and have 
corners

	Bug 127785 – stroking with size linked to pressure sensitivity
	should scale the spacing

	* app/core/gimpcoords-interpolate.[ch]
	* app/display/gimpdisplayshell.[ch]
	* app/display/gimpdisplayshell-callbacks.[ch]
	* app/display/gimpdisplayshell-coords.[ch]: applied patch from
	Alexia Death that introduces a Catmul-Rom splines based event
	interpolation and also adapts the brush spacing to brush size.


svn path=/trunk/; revision=27898
2009-01-10 00:48:30 +00:00
Sven Neumann f8b964bf2d Bug 565112 – code duplication in app/core/gimpimage-snap.c
2009-01-01  Sven Neumann  <sven@gimp.org>

	Bug 565112 – code duplication in app/core/gimpimage-snap.c

	* app/core/gimpimage-snap.c: based on a patch from Daniel 
Hornung,
	add the utility function gimp_image_snap_distance().


svn path=/trunk/; revision=27869
2009-01-01 14:34:21 +00:00
Sven Neumann 45387a3900 Bug 565223 – Perspective transformation jagged edges / comb effect
2009-01-01  Sven Neumann  <sven@gimp.org>

	Bug 565223 – Perspective transformation jagged edges / comb effect

	* app/core/gimp-transform-region.c: reverted the code change, but
	not the cleanups, from commit r26786.


svn path=/trunk/; revision=27866
2009-01-01 13:56:37 +00:00
Martin Nordholts de38a9887b New offset getters for inline use.
* app/core/gimpitem.c
(gimp_item_get_offset_x)
(gimp_item_get_offset_y): New offset getters for inline use.

* app/core/gimpchannel.c
* app/core/gimpdrawable.c
* app/core/gimpimage-merge.c
* app/core/gimpimage-resize.c
* app/tools/gimptexttool.c: Don't access GimpItem offset members
directly, use gimp_item_set_offset() and
gimp_item_get_offset_[xy]() instead.

svn path=/trunk/; revision=27848
2008-12-28 12:43:07 +00:00
Martin Nordholts d37193fe18 Use gimp_item_set/get_image() instead of accessing the instance
member directly.

* app/core/gimpchannel.c
* app/core/gimpdrawable-brightness-contrast.c
* app/core/gimpdrawable-color-balance.c
* app/core/gimpdrawable-colorize.c
* app/core/gimpdrawable-curves.c
* app/core/gimpdrawable-desaturate.c
* app/core/gimpdrawable-hue-saturation.c
* app/core/gimpdrawable-invert.c
* app/core/gimpdrawable-levels.c
* app/core/gimpdrawable-posterize.c
* app/core/gimpdrawable-threshold.c
* app/core/gimplayer.c
* app/core/gimplayermask.c
* app/core/gimpselection.c
* app/dialogs/layer-add-mask-dialog.c
* app/text/gimptextlayer-xcf.c
* app/tools/gimprectangletool.c
* app/tools/gimptexttool.c
* app/tools/gimpvectortool.c
* app/vectors/gimpvectors-preview.c
* app/vectors/gimpvectors.c
* tools/pdbgen/pdb/layer.pdb

* app/pdb/layer-cmds.c: Regenerated.

svn path=/trunk/; revision=27840
2008-12-28 00:09:33 +00:00
Sven Neumann 4409f3853d Bug 564593 – crash when the drawable is changed while a color tools is
2008-12-27  Sven Neumann  <sven@gimp.org>

	Bug 564593 – crash when the drawable is changed while a color
	tools is active

	* app/core/gimpdrawable-shadow.c 
(gimp_drawable_merge_shadow_tiles):
	keep a reference to the shadow tiles because it might otherwise 
be
	free'd under our feet.


svn path=/trunk/; revision=27832
2008-12-27 15:14:48 +00:00
Martin Nordholts 4255e43681 Bug 555954 – Merge Tagging of Gimp Resources GSoC Project
Merge the rest of the tagging code developed on the tagging branch
by Aurimas Juška. Development will now continue in trunk.

* app/core/gimptag.[ch]: New files (not strictly true but almost)
implementing the represention of a tag.

* app/core/gimptagcache.[ch]: New files implementing functionality
for loading and saving tags to tags.xml, and assigning loaded tags
to tagged objects.

* app/core/gimpfilteredcontainer.[ch]: New files implementing a
tag filtered GimpContainer.

* app/widgets/gimptagentry.[ch]: New files implementing a
GtkEntry-like widget for entering tags.

* app/widgets/gimpcombotagentry.[ch]: New files implementing a
combobox-like widget for selecting tags.

* app/widgets/gimptagpopup.[ch]: New files implementing a popup of
all available tags that can be selected and combined in a
checkbox-like way.

* app/core/gimp.[ch]: Add a GimpTagCache member and manage tag
assignment and saving and loading to/from tags.xml.

* app/widgets/gimpdatafactoryview.c: Add the tag query and tag
assignment widgets to the UI and show the tag filtered items
instead of all items.

* app/core/Makefile.am
* app/widgets/Makefile.am: Add new files.

* app/core/core-types.h
* app/widgets/widgets-types.h: Add new types.

svn path=/trunk/; revision=27816
2008-12-20 14:46:54 +00:00
Martin Nordholts 4981816c0b Make instance members private and add getters for required members.
* app/core/gimpdatafactory.[ch]: Make instance members private and
add getters for required members.

(gimp_data_factory_get_container)
(gimp_data_factory_get_gimp)
(gimp_data_factory_has_data_new_func): The new getters.

* app/actions/context-commands.c
* app/actions/data-commands.c
* app/core/gimp-gradients.c
* app/core/gimp.c
* app/core/gimpcontext.c
* app/core/gimpdatafactory.c
* app/core/gimpdatafactory.h
* app/dialogs/convert-dialog.c
* app/dialogs/palette-import-dialog.c
* app/pdb/gimppdb-utils.c
* app/widgets/gimpbrushfactoryview.c
* app/widgets/gimpdataeditor.c
* app/widgets/gimpdatafactoryview.c
* app/widgets/gimpselectiondata.c
* app/widgets/gimpviewablebox.c
* tools/pdbgen/pdb/brush_select.pdb
* tools/pdbgen/pdb/brushes.pdb
* tools/pdbgen/pdb/gradient_select.pdb
* tools/pdbgen/pdb/gradients.pdb
* tools/pdbgen/pdb/palette_select.pdb
* tools/pdbgen/pdb/palettes.pdb
* tools/pdbgen/pdb/pattern_select.pdb
* tools/pdbgen/pdb/patterns.pdb: Use the getters.


* app/pdb/brush-select-cmds.c
* app/pdb/brushes-cmds.c
* app/pdb/gradient-select-cmds.c
* app/pdb/gradients-cmds.c
* app/pdb/palette-select-cmds.c
* app/pdb/palettes-cmds.c
* app/pdb/pattern-select-cmds.c
* app/pdb/patterns-cmds.c: Regenerated.

svn path=/trunk/; revision=27812
2008-12-19 21:58:17 +00:00
Sven Neumann 412c5b1806 reverted last change as it is totally bogus and the old code was correct.
2008-12-14  Sven Neumann  <sven@gimp.org>

	* app/core/gimp.c: reverted last change as it is totally bogus 
and
	the old code was correct.


svn path=/trunk/; revision=27788
2008-12-14 19:04:05 +00:00
Martin Nordholts fbb4a7c9ec We shall unref in dispose() and free in finalize(), not vice versa.
* app/core/gimp.c: We shall unref in dispose() and free in
finalize(), not vice versa.

svn path=/trunk/; revision=27787
2008-12-13 17:27:50 +00:00
Martin Nordholts 364d2cd84f Bug 555954 – Merge Tagging of Gimp Resources GSoC Project
Partial merge of code from Aurimas Juška.

* app/core/gimpdata.c: Implement GimpTagged::get_identifier() and
GimpTagged::get_checksum().

* app/core/gimpbrush.c: 
* app/core/gimpgradient.c
* app/core/gimppalette.c
* app/core/gimppattern.c: Implement GimpTagged::get_checksum().
They all use the GimpData implementation of
GimpTagged::get_identifier().

svn path=/trunk/; revision=27784
2008-12-13 11:58:24 +00:00
Martin Nordholts ddaa0b48ec s/temp_buf_data/temp_buf_get_data/
* app/base/pixel-region.c
* app/base/temp-buf.c
* app/base/temp-buf.h
* app/core/gimpbrush-load.c
* app/core/gimpbrush-scale.c
* app/core/gimpbrush.c
* app/core/gimpbrushgenerated.c
* app/core/gimpgradient.c
* app/core/gimpimage.c
* app/core/gimppalette.c
* app/core/gimppattern-load.c
* app/core/gimppattern.c
* app/core/gimppreviewcache.c
* app/core/gimpviewable.c
* app/paint-funcs/paint-funcs-generic.h
* app/paint/gimpbrushcore.c
* app/paint/gimpclone.c
* app/paint/gimperaser.c
* app/paint/gimpheal.c
* app/paint/gimpink.c
* app/paint/gimppaintbrush.c
* app/pdb/brush-cmds.c
* app/pdb/brushes-cmds.c
* app/pdb/drawable-cmds.c
* app/pdb/image-cmds.c
* app/pdb/pattern-cmds.c
* app/pdb/patterns-cmds.c
* app/text/gimpfont.c
* app/tools/gimpiscissorstool.c
* app/vectors/gimpvectors-preview.c
* app/widgets/gimpbrushselect.c
* app/widgets/gimppatternselect.c
* app/widgets/gimpviewrenderer.c

svn path=/trunk/; revision=27782
2008-12-13 10:35:53 +00:00
Martin Nordholts 70ed5218d6 Bug 555954 – Merge Tagging of Gimp Resources GSoC Project
Partial merge of code from Aurimas Juška.

* app/core/gimpdata.[ch] (gimp_data_make_internal): Add an
'identifier' parameter/instance struct member that can be used to
identify the internal GimpData object across sessions. It is the
internal-object counterpart to a file path.

* app/core/gimp.c
* app/core/gimpcurve.c
* app/core/gimpbrush.c
* app/core/gimppattern.c
* app/core/gimppalette.c
* app/core/gimpgradient.c
* app/core/gimp-gradients.c: Assign an identifier to the the
internal GimpData objects.

svn path=/trunk/; revision=27781
2008-12-12 07:03:42 +00:00
Martin Nordholts 41ad6f4ea4 Clarify documentation.
* app/core/gimptagged.c (gimp_tagged_get_identifier): Clarify
documentation.

svn path=/trunk/; revision=27780
2008-12-12 05:52:01 +00:00
Martin Nordholts dca385281f Bug 555954 – Merge Tagging of Gimp Resources GSoC Project
Partial merge of code from Aurimas Juška.

* app/core/gimptag.c: A new minimal GimpTag type with only a
gimp_tag_equals() class function so that we can

* app/core/gimptagged.c
* app/core/gimpdata.c (gimp_data_add_tag, gimp_data_remove_tag):
Adapt these to GimpTag being an object instead of a GQuark.

* app/core/core-types.h: Update GimpTag typedef.

* app/core/Makefile.am: Add gimptag.[ch].

svn path=/trunk/; revision=27778
2008-12-11 22:04:05 +00:00
Martin Nordholts d975ea725f Sort typedefs.
* app/core/core-types.h: Sort typedefs.

svn path=/trunk/; revision=27777
2008-12-11 21:17:22 +00:00
Martin Nordholts 83f1184219 Remove references to typedefs in config-types.h that are more annoying
* app/core/core-types.h: Remove references to typedefs in
config-types.h that are more annoying than helpful.

svn path=/trunk/; revision=27776
2008-12-11 21:10:07 +00:00
Martin Nordholts 3588c72fb8 Remove weird const qualifier.
* app/core/gimptagged.c (gimp_tagged_add_tag): Remove weird const
qualifier.

svn path=/trunk/; revision=27775
2008-12-11 20:21:54 +00:00
Martin Nordholts 25668c1535 Bug 555954 – Merge Tagging of Gimp Resources GSoC Project
Partial merge of code from Aurimas Juška.

* app/core/gimptagged.[ch]: Added GimpTagged::get_identifier() and
GimpTagged::get_checksum().

svn path=/trunk/; revision=27774
2008-12-11 20:15:08 +00:00
Martin Nordholts 7a3646c6f0 s/gimp_tagged_get_get_tags/gimp_tagged_get_tags/
* app/core/gimptagged.[ch]

svn path=/trunk/; revision=27773
2008-12-11 07:37:06 +00:00
Sven Neumann 83c66baef5 app/core/gimpchannel.c app/core/gimpdrawable-operation.c
2008-12-08  Sven Neumann  <sven@gimp.org>

	* app/core/gimpchannel.c
	* app/core/gimpdrawable-operation.c
	* app/core/gimpdrawablestack.c
	* app/core/gimpimage.c
	* app/core/gimpimagemap.c
	* app/core/gimplayer.c
	* app/core/gimpprojection.c: gegl_node_add_child() and
	gegl_node_remove_child() are public API in GEGL now.


svn path=/trunk/; revision=27770
2008-12-08 09:56:51 +00:00
Martin Nordholts bcb13c1378 app/core/gimp.c Sort #includes.
* app/core/gimp.c
* app/widgets/gimpdatafactoryview.c: Sort #includes.

svn path=/trunk/; revision=27766
2008-12-04 21:58:45 +00:00
Sven Neumann 73eccd7a22 Bug 563130 – Hue selection mode does not cross the 0-360 degrees line
2008-12-04  Sven Neumann  <sven@gimp.org>

	Bug 563130 – Hue selection mode does not cross the 0-360 degrees 
line

	* app/core/gimpimage-contiguous-region.c (pixel_difference):
	applied patch from Daniel Hornung.


svn path=/trunk/; revision=27764
2008-12-04 20:58:50 +00:00
Sven Neumann 86bab55c2f use "gegl:translate" instead of "gegl:shift".
2008-12-03  Sven Neumann  <sven@gimp.org>

	* app/core/gimpitem.c (gimp_item_get_offset_node): use
	"gegl:translate" instead of "gegl:shift".


svn path=/trunk/; revision=27750
2008-12-03 12:31:07 +00:00
Sven Neumann 97eb65b2ba renamed GeglNode shift to translate. Use "gegl:translate" instead of
2008-12-03  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimagemap.c: renamed GeglNode shift to translate.
	Use "gegl:translate" instead of "gegl:shift".


svn path=/trunk/; revision=27749
2008-12-03 11:29:15 +00:00
Sven Neumann 6ec38fb918 split spaghetti code into lots of helper functions.
2008-11-26  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage-duplicate.c: split spaghetti code into lots
	of helper functions.


svn path=/trunk/; revision=27719
2008-11-26 07:20:04 +00:00
Michael Natterer 558e2e17a9 make the entire selection API take GimpSelection arguments, not
2008-11-22  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpselection.[ch]: make the entire selection
	API take GimpSelection arguments, not GimpChannel.
	Clean up gimp_selection_load() a bit.

	* app/actions/select-commands.c
	* app/core/gimp-edit.c
	* app/core/gimpdrawable-transform.c
	* app/core/gimpimage-quick-mask.c
	* app/tools/gimpeditselectiontool.c
	* tools/pdbgen/pdb/selection.pdb: add the needed casts.

	* app/pdb/selection-cmds.c: regenerated.


svn path=/trunk/; revision=27711
2008-11-22 22:07:55 +00:00
Sven Neumann 64416069e0 app/core/gimpprojection.c (gimp_projection_get_tiles_at_level) cosmetics.
2008-11-21  Sven Neumann  <sven@gimp.org>

	* app/core/gimpprojection.c (gimp_projection_get_tiles_at_level)
	cosmetics.

	* app/display/gimpdisplayshell-render.[ch]: added const 
qualifier.


svn path=/trunk/; revision=27697
2008-11-21 17:59:04 +00:00
Martin Nordholts 1cf1276793 Move the rest of the class instance members to GimpContainerPriv and
* app/core/gimpcontainer.[ch]: Move the rest of the class instance
members to GimpContainerPriv and rename the member num_children to
n_children.

svn path=/trunk/; revision=27694
2008-11-20 23:51:39 +00:00
Martin Nordholts 2f25fb132f Use GimpContainer getters instead of poking into the class
instance struct.

* app/actions/context-commands.c
* app/actions/data-commands.c
* app/actions/plug-in-commands.c
* app/actions/templates-commands.c
* app/core/gimp-utils.c
* app/core/gimpdrawablestack.c
* app/core/gimpitemstack.c
* app/core/gimplist.c
* app/gui/gui-vtable.c
* app/widgets/gimpcontainerbox.c
* app/widgets/gimpcontainercombobox.c
* app/widgets/gimpcontainereditor.c
* app/widgets/gimpcontainerentry.c
* app/widgets/gimpcontainergridview.c
* app/widgets/gimpcontainerpopup.c
* app/widgets/gimpcontainertreeview-dnd.c
* app/widgets/gimpcontainertreeview.c
* app/widgets/gimpcontainerview-utils.c
* app/widgets/gimpcontainerview.c
* app/widgets/gimpdataeditor.c
* app/widgets/gimpdatafactoryview.c
* app/widgets/gimpsettingsbox.c
* app/widgets/gimpviewablebutton.c

svn path=/trunk/; revision=27693
2008-11-20 23:43:58 +00:00
Martin Nordholts 5aeb568650 s/gimp_container_children_type/gimp_container_get_children_type/
s/gimp_container_policy/gimp_container_get_policy/
s/gimp_container_num_children/gimp_container_get_n_children/

* app/actions/actions.c
* app/actions/file-actions.c
* app/actions/file-commands.c
* app/actions/tool-options-actions.c
* app/actions/tools-actions.c
* app/actions/tools-commands.c
* app/actions/vectors-actions.c
* app/core/gimpcontainer-filter.c
* app/core/gimpcontainer.c
* app/core/gimpcontainer.h
* app/core/gimpimage-convert.c
* app/core/gimpimage-flip.c
* app/core/gimpimage-merge.c
* app/core/gimpimage-resize.c
* app/core/gimpimage-rotate.c
* app/core/gimpimage-scale.c
* app/core/gimpimage-undo.c
* app/core/gimpimage.c
* app/core/gimpimagefile.c
* app/core/gimplist.c
* app/core/gimpundostack.c
* app/dialogs/palette-import-dialog.c
* app/dialogs/quit-dialog.c
* app/display/gimpdisplay.c
* app/display/gimpdisplayshell-layer-select.c
* app/display/gimpdisplayshell-title.c
* app/gui/gui-vtable.c
* app/menus/tool-options-menu.c
* app/tools/gimp-tools.c
* app/widgets/gimpcontrollerlist.c
* app/widgets/gimpimagepropview.c
* app/widgets/gimpsettingsbox.c
* app/widgets/gimpviewablebutton.c
* app/xcf/xcf-load.c
* app/xcf/xcf-save.c

svn path=/trunk/; revision=27692
2008-11-20 22:45:19 +00:00
Martin Nordholts 807095548b Don't expose class instance members marked as private.
* app/core/gimpcontainer.[ch]: Don't expose class instance members
marked as private.

svn path=/trunk/; revision=27691
2008-11-20 19:19:54 +00:00
Michael Natterer 37cff850af remove members "quick_mask_changed" and "alpha_changed" (the former was
2008-11-20  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpundo.h (struct GimpUndoAccumulator): remove members
	"quick_mask_changed" and "alpha_changed" (the former was unused
	and the latter is entirely handled by the image's flush
	accumulator now.

	* app/core/gimpimage-undo.c
	* app/core/gimplayerundo.c: changed accordingly.


svn path=/trunk/; revision=27690
2008-11-19 23:39:28 +00:00
Michael Natterer 49e65f1b84 add read-only "mask" property.
2008-11-20  Michael Natterer  <mitch@gimp.org>

	* app/core/gimplayer.c: add read-only "mask" property.


svn path=/trunk/; revision=27689
2008-11-19 23:37:15 +00:00
Michael Natterer b50a3994da image->quick_mask_state is a boolean, return it directly instead of "state
2008-11-20  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage-quick-mask.c (gimp_image_get_quick_mask_state):
	image->quick_mask_state is a boolean, return it directly instead
	of "state != NULL".


svn path=/trunk/; revision=27688
2008-11-19 23:34:43 +00:00
Michael Natterer ca594c6d11 chain up unconditionally.
2008-11-17  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawable.c (gimp_drawable_visibility_changed):
	chain up unconditionally.


svn path=/trunk/; revision=27677
2008-11-17 00:06:23 +00:00
Michael Natterer 6b579085a3 add boolean property "floating-selection" which indicates if the layer is
2008-11-17  Michael Natterer  <mitch@gimp.org>

	* app/core/gimplayer.[ch]: add boolean property
	"floating-selection" which indicates if the layer is a floating
	selection. Add new API gimp_layer_set_floating_sel_drawable()
	which sets layer->fs.drawable and emits notify on the property.
	Did some minor cleanup in the existing property code.

	* app/core/gimpfloatingselundo.c: use the new function instead of
	setting layer->fs.drawable manually.

	* app/core/gimplayer-floating-sel.c: same here. Remove some
	includes and local variables that are obsolete.


svn path=/trunk/; revision=27676
2008-11-17 00:02:15 +00:00
Michael Natterer 3216ed8eca Bug 560897 – Floating Selection, objects appearing in background
2008-11-15  Michael Natterer  <mitch@gimp.org>

	Bug 560897 – Floating Selection, objects appearing in background

	* app/core/gimpdrawable.c (gimp_drawable_init_src_region): use the
	right offsets (not off_y for both x and y) when applying the
	floating selection.


svn path=/trunk/; revision=27658
2008-11-15 13:29:15 +00:00
Michael Natterer f275cddbbf add member "gboolean floating_selection_changed".
2008-11-14  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage.[ch] (struct GimpImageFlushAccumulator):
	add member "gboolean floating_selection_changed".

	(gimp_image_set_floating_selection): new function which sets
	the image's floating_sel pointer and sets the flag in the
	accumulator to TRUE for later signal emission on flush.

	(gimp_image_projectable_flush): emit "floating-selection-changed"
	if the flag in the accumulator is TRUE.

	* app/core/gimpimage.c (gimp_image_add,remove_layer)
	* app/core/gimpfloatingselundo.c (gimp_floating_sel_undo_pop)
	* app/core/gimplayer-floating-sel.c (floating_sel_to_layer): use
	gimp_image_set_floating_selection() instead of setting
	image->floating_sel menually and remove all calls to
	gimp_image_floating_selection_changed().


svn path=/trunk/; revision=27650
2008-11-14 15:18:29 +00:00
Michael Natterer fb1660a4ea rename gimp_image_floating_sel() to gimp_image_get_floating_selection().
2008-11-14  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage.[ch]: rename gimp_image_floating_sel() to
	gimp_image_get_floating_selection().

	* app/actions/channels-actions.c
	* app/actions/image-actions.c
	* app/actions/layers-actions.c
	* app/actions/layers-commands.c
	* app/actions/select-actions.c
	* app/core/gimpdrawable.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage-quick-mask.c
	* app/core/gimplayer-floating-sel.c
	* app/core/gimpselection.c
	* app/display/gimpdisplayshell-layer-select.c
	* app/display/gimpdisplayshell.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpfreeselecttool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimprectangleselecttool.c
	* app/tools/gimpregionselecttool.c
	* app/tools/gimpselectiontool.c
	* app/tools/gimptexttool.c
	* app/widgets/gimpdrawabletreeview.c
	* app/widgets/gimplayertreeview.c
	* app/xcf/xcf-save.c
	* tools/pdbgen/pdb/image.pdb: changed accordingly, replaced some
	instances of direct acces by the accessor.

	* app/pdb/image-cmds.c: regenerated.


svn path=/trunk/; revision=27649
2008-11-14 15:01:44 +00:00
Michael Natterer 9476973c62 add read-only boolean properties "visible" and "linked".
2008-11-13  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpitem.c: add read-only boolean properties "visible"
	and "linked".


svn path=/trunk/; revision=27638
2008-11-13 15:06:34 +00:00
Sven Neumann ada8336822 added gimp_image_get_display_name().
2008-11-13  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage.[ch]: added gimp_image_get_display_name().

	* app/dialogs/palette-import-dialog.c
	* app/display/gimpdisplayshell-close.c
	* app/display/gimpdisplayshell-title.c
	* app/pdb/gimppdb-utils.c

	* app/widgets/gimpviewabledialog.c: use the new method instead 
of
	getting the image URI and mangling it with
	file_utils_uri_display_basename().


svn path=/trunk/; revision=27637
2008-11-13 12:09:05 +00:00
Sven Neumann b37c8bcf0a app/core/Makefile.am added GIMP_ERROR as general error domain.
2008-11-12  Sven Neumann  <sven@gimp.org>

	* app/core/Makefile.am
	* app/core/gimperror.[ch]: added GIMP_ERROR as general error 
domain.

	* app/core/gimpchannel.c
	* app/core/gimpdrawable-bucket-fill.c
	* app/core/gimpimage-convert.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage.c
	* app/core/gimplayer-floating-sel.c
	* app/core/gimplayer.c
	* app/core/gimplayermask.c
	* app/core/gimpselection.c
	* app/core/gimptooloptions.c
	* app/paint/gimpbrushcore.c
	* app/paint/gimpclone.c
	* app/paint/gimpheal.c
	* app/paint/gimppaintcore-stroke.c
	* app/paint/gimpperspectiveclone.c
	* app/paint/gimpsourcecore.c
	* app/tools/gimpblendtool.c
	* app/tools/gimpbrightnesscontrasttool.c
	* app/tools/gimpcolorbalancetool.c
	* app/tools/gimpcolorizetool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimpdesaturatetool.c
	* app/tools/gimpgegltool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimpposterizetool.c
	* app/tools/gimpthresholdtool.c
	* app/vectors/gimpvectors-import.c: use GIMP_ERROR as error 
domain
	instead of 0, which is not accepted by g_set_error_literal().

	* app/gui/session.c
	* app/menus/menus.c
	* app/vectors/gimpvectors-export.c
	* app/widgets/gimpdevices.c: use G_FILE_ERROR as error domain 
for
	file errors.


svn path=/trunk/; revision=27628
2008-11-12 10:56:06 +00:00
Michael Natterer 65b2a60455 add read-only "offset-x" and "offset-y" properties. Call
2008-11-11  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpitem.c: add read-only "offset-x" and "offset-y"
	properties. Call gimp_item_set_offset() from all places that set
	offset_x and offset_y in this file. Freeze and thaw GObject
	notification around all calls to virtual functions which might
	emit notify. Add missing notifications whenever width and height
	change.

	* app/core/gimpimage-rotate.c: use gimp_item_set_offset() instead
	of setting the values manually.


svn path=/trunk/; revision=27623
2008-11-11 21:14:52 +00:00
Michael Natterer 19e7f9e316 app/core/gimpprojection.[ch] add code that keeps the gegl processor around
2008-11-10  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpprojection.[ch]
	* app/core/gimpprojection-construct.c: add code that keeps the
	gegl processor around across calls, but destroy it anyway until
	gegl_processor_set_rectangle() is fixed.


svn path=/trunk/; revision=27607
2008-11-10 22:15:40 +00:00
Michael Natterer fb3fca651b use GIMP_CURVE_FREE, not _SMOOTH. Fixes the resp. PDB call.
2008-11-10  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawable-curves.c (gimp_drawable_curves_explicit):
	use GIMP_CURVE_FREE, not _SMOOTH. Fixes the resp. PDB call.


svn path=/trunk/; revision=27601
2008-11-10 15:18:40 +00:00
Sven Neumann 83dd28e7a0 use NC_() to provide translation contexts.
2008-11-10  Sven Neumann  <sven@gimp.org>

	* app/core/gimpunit.c: use NC_() to provide translation 
contexts.


svn path=/trunk/; revision=27600
2008-11-10 11:41:51 +00:00
Sven Neumann 345abd7c8f Bug 559725 – Allow to set image-type and image-num-layers for thumbnail
2008-11-10  Sven Neumann  <sven@gimp.org>

	Bug 559725 – Allow to set image-type and image-num-layers for
	thumbnail

	* app/file/file-open.[ch] (file_open_thumbnail): added 
parameters
	for image-type and number of layers. Try to get these from the
	procedure return values. Changes based on a patch from "tks".

	* app/core/gimpimagefile.c (gimp_imagefile_create_thumbnail)
	(gimp_thumbnail_set_info): set image-type and number of layers 
if
	specified.


svn path=/trunk/; revision=27595
2008-11-10 08:21:36 +00:00
Michael Natterer 6f6ecb4ffa app/core/gimpdrawable-foreground-extract.c app/core/gimpdrawable-preview.c
2008-11-10  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawable-foreground-extract.c
	* app/core/gimpdrawable-preview.c 
	* app/core/gimplayer-project.c: use gimp_drawable_get_colormap()
	instead of gimp_image_get_colormap().


svn path=/trunk/; revision=27592
2008-11-10 01:43:34 +00:00
Michael Natterer 1cdf6c5b7f remove floating_sel_remove() and reorder one function.
2008-11-09  Michael Natterer  <mitch@gimp.org>

	* app/core/gimplayer-floating-sel.[ch]: remove
	floating_sel_remove() and reorder one function.

	* app/core/gimpimage.c (gimp_image_remove_layer): add the single
	line of special code that needs to be done when removing a
	floating selection.

	* app/core/gimpselection.c
	* app/actions/layers-commands.c
	* tools/pdbgen/pdb/floating_sel.pdb: changed accordingly.

	* app/pdb/floating-sel-cmds.c: regenerated.

	* app/core/core-enums.[ch]
	* app/core/gimpimage-undo.c: remove enum value
	GIMP_UNDO_GROUP_FS_REMOVE.


svn path=/trunk/; revision=27583
2008-11-09 18:45:16 +00:00
Michael Natterer 40f27d6b81 app/core/gimpdrawable.c app/core/gimpimage-convert.c
2008-11-09  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawable.c
	* app/core/gimpimage-convert.c
	* app/core/gimpprojection-construct.c
	* app/tools/gimpeditselectiontool.c
	* app/widgets/gimplayertreeview.c
	* app/xcf/xcf-save.c: remove inclusion of "gimplayer-floating-sel.h"


svn path=/trunk/; revision=27582
2008-11-09 18:36:29 +00:00
Michael Natterer 509feafa4a made floating_sel_composite() private and simplify it a lot by using
2008-11-09  Michael Natterer  <mitch@gimp.org>

	* app/core/gimplayer-floating-sel.[ch]: made
	floating_sel_composite() private and simplify it a lot by using
	gimp_rectangle_intersect().


svn path=/trunk/; revision=27580
2008-11-09 17:15:00 +00:00
Michael Natterer 855b114f50 Bye bye floating_sel_rigor() and floating_sel_relax():
2008-11-09  Michael Natterer  <mitch@gimp.org>

	Bye bye floating_sel_rigor() and floating_sel_relax():

	* app/core/gimpdrawable.[ch] (gimp_drawable_init_src_region):
	implement compositing the floating selection on the fly. Add
	return parameter "TileManager **temp_tiles" which returns the temp
	buffer used for compositing; the caller has to unref the tiles.

	* app/core/gimpchannel-project.c
	* app/core/gimplayer-project.c: unref the temp_tiles.

	* app/core/gimplayer.[ch]: remove members fs.backing_store and
	fs.initial.

	* app/core/gimplayer-floating-sel.[ch]: remove functions rigor(),
	relax(), store() and restore(), they are not needed any longer.
	Some minor cleanup, more to come.

	* app/core/gimpprojection-construct.c: don't composite the
	floating selection before projecting because that happens on the
	fly now.

	* app/core/core-enums.[ch]
	* app/core/gimpfloatingselundo.c
	* app/core/gimpimage-undo-push.[ch]: remove the rigor and relax
	undos.

	* app/core/gimpdrawable.c
	* app/core/gimpimage-convert.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage.c
	* app/core/gimplayer.c
	* app/xcf/xcf-save.c: remove all calls to rigor and relax and all
	implementations of virtual functions that were just there to
	rigor/releax around chaining up.

	* tools/pdbgen/pdb/floating_sel.pdb: remove all code from the
	rigor and relax wrappers and deprecate the API.

	* app/pdb/floating-sel-cmds.c
	* libgimp/gimpfloatingsel_pdb.[ch]: regenerated.

	* plug-ins/file-xjt/xjt.c: don't call rigor and relax.


svn path=/trunk/; revision=27579
2008-11-09 16:49:37 +00:00
Michael Natterer 198416450d add optional parameter "PixelRegion *destPR" to
2008-11-08  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawable.[ch]: add optional parameter "PixelRegion
	*destPR" to GimpDrawable::apply_region().

	* app/core/gimpdrawable-combine.[ch]: if the passed destPR is !=
	NULL, write the result of the combination into that region instead
	of the drawable's tiles. The region must have the exact size of
	the result.

	* app/core/gimp-edit.c
	* app/core/gimpchannel.c
	* app/core/gimpdrawable-blend.c
	* app/core/gimpdrawable-bucket-fill.c
	* app/core/gimpdrawable-shadow.c
	* app/core/gimpdrawable-stroke.c
	* app/core/gimpimagemap.c
	* app/core/gimplayer-floating-sel.c
	* app/paint/gimppaintcore.c: pass NULL as destPR. Code actually
	using this feature follows.


svn path=/trunk/; revision=27574
2008-11-08 19:52:18 +00:00
Michael Natterer ca62c2aa0e add new function gimp_drawable_init_src_region() which will initialize a
2008-11-08  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawable.[ch]: add new function
	gimp_drawable_init_src_region() which will initialize a
	PixelRegion on this drawable's "projection" (with the floating
	selection combined), but for now just uses drawable->tiles.

	* app/core/gimpchannel-project.c
	* app/core/gimplayer-project.c: use it instead of
	pixel_region_init() on the drawable's tiles.


svn path=/trunk/; revision=27573
2008-11-08 17:23:21 +00:00
Michael Natterer 667b4558de cleanup.
2008-11-08  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawable-combine.c: cleanup.


svn path=/trunk/; revision=27572
2008-11-08 17:20:34 +00:00
Michael Natterer 6d2a6d5efa Abstract the legacy projection code away into a virtual function of
2008-11-08  Michael Natterer  <mitch@gimp.org>

	Abstract the legacy projection code away into a virtual function
	of GimpDrawable:

	* app/core/gimpdrawable.[ch]: add new virtual function
	GimpDrawable::project_region() which projects an area of a
	drawable onto a passed in PixelRegion.

	* app/core/Makefile.am
	* app/core/gimpchannel-project.[ch]
	* app/core/gimplayer-project.[ch]: new files which implement it.

	* app/core/gimpchannel.c
	* app/core/gimplayer.c: hook it in.

	* app/core/gimpprojection-construct.c: get rid all the projection
	code moved to above new files and project all drawables in one
	loop.

	* app/core/gimpprojectable.[ch]: remove the legacy methods
	get_colormap() and get_components(), they are not needed any
	longer.

	* app/core/gimpimage.c: changed accordingly.


svn path=/trunk/; revision=27571
2008-11-08 00:16:40 +00:00
Sven Neumann f8666de70f improved error handling. Fixes compiler warnings about ignoring the return
2008-11-07  Sven Neumann  <sven@gimp.org>

	* app/core/gimppalette-load.c (gimp_palette_load_aco): improved
	error handling. Fixes compiler warnings about ignoring the 
return
	value of read().


svn path=/trunk/; revision=27570
2008-11-07 09:32:23 +00:00
Michael Natterer 0b2061c150 move the invalidate_previews() API from here...
2008-11-06  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawablestack.[ch]: move the invalidate_previews()
	API from here...

	* app/core/gimpitemstack.[ch]: ...to here.

	* app/core/gimpimage.c: changed accordingly.


svn path=/trunk/; revision=27569
2008-11-06 19:44:51 +00:00
Michael Natterer a3d556c0ca app/core/Makefile.am app/core/core-types.h new GimpList subclass which
* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpitemstack.[ch]: new GimpList subclass which (for
	now) does nothing but taking ownership of its children by the
	means of g_object_ref_sink().

	* app/core/gimpdrawablestack.[ch]: derive from GimpItemStack.

	* app/core/gimpimage.c: use a GimpItemStack instead of a plain
	GimpList for the list of vectors. Remove code which takes
	ownerships of added items from gimp_image_add_layer(),
	add_channel() and add_vectors().


svn path=/trunk/; revision=27568
2008-11-06 19:09:59 +00:00
Sven Neumann 02817081ff use NC_() to mark enum values for translation. Use a lower-case short form
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-06 08:28:28 +00:00
Michael Natterer f31a539917 some minor cleanups.
2008-11-05  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage.c: some minor cleanups.


svn path=/trunk/; revision=27561
2008-11-05 21:48:06 +00:00
Michael Natterer c0cc7c1156 add new function gimp_drawable_stack_invalidate_previews() which does just
2008-11-05  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawablestack.[ch]: add new function
	gimp_drawable_stack_invalidate_previews() which does just what it
	says.

	* app/core/gimpimage.[ch]: merge invalidate_layer_previews() and
	invalidate_channels_previews() into a single invalidate_previews()
	and replace all calls to the old functions by calls to
	gimp_drawable_stack_invalidate_previews().

	* app/file/file-open.c: changed accordingly.


svn path=/trunk/; revision=27560
2008-11-05 20:48:59 +00:00
Michael Natterer 4381e415a0 remove call to gimp_image_invalidate_layer_previews(), they are
2008-11-05  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage-convert.c (gimp_image_convert): remove call
	to gimp_image_invalidate_layer_previews(), they are invalidated by
	exchanging their tiles and by setting the image's colormap anyway.


svn path=/trunk/; revision=27559
2008-11-05 20:38:30 +00:00
Michael Natterer c4f43d49c2 This should remove any image or viewable dependency from the projection
2008-11-05  Michael Natterer  <mitch@gimp.org>

	This should remove any image or viewable dependency from the
	projection (apart from the projectable's get_image() method, but
	that one is not supposed to return the projection's model but
	rather the image the projection is part of).

	* app/core/gimpprojectable.[ch]: add vfunc get_size() which
	completes the API needed for GEGL projection.

	Add vfuncs get_layers(), get_channels(), get_components() and
	get_colormap() which are needed for the legacy projection code.

	* app/core/gimpimage.c: implement the new methods.

	* app/core/gimpprojection.c
	* app/core/gimpprojection-construct.c: use them and remove all
	calls to image and viewable API.


svn path=/trunk/; revision=27558
2008-11-05 20:10:51 +00:00
Michael Natterer 62a74f9da6 add signal "structure-changed" and API to emit it.
2008-11-05  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpprojectable.[ch]: add signal "structure-changed"
	and API to emit it.

	* app/core/gimpimage.c: emit it when the image emits
	"mode-changed" and "size-changed".

	* app/core/gimpprojection.c: connect to the new signal instead of
	"mode-changed" and "size-changed" to get rid of one more image
	dependency.


svn path=/trunk/; revision=27556
2008-11-04 23:22:45 +00:00
Michael Natterer 7d8b7f5534 add vitrual function invalidate_preview().
2008-11-04  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpprojectable.[ch]: add vitrual function
	invalidate_preview().

	* app/core/gimpimage.c: implement it and redirect to
	gimp_viewable_invalidate_preview().

	* app/core/gimpprojection.c: call the new API instead of
	gimp_viewable_invalidate_preview(). Some cleanup in the disabled
	cow-projection code.


svn path=/trunk/; revision=27553
2008-11-04 20:13:12 +00:00
Michael Natterer 716e00f88b Unfinished first step to make the projection independent of GimpImage,
2008-11-04  Michael Natterer  <mitch@gimp.org>

	Unfinished first step to make the projection independent of
	GimpImage, also one step closer to layer grouping.

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpprojectable.[ch]: add new interface which abstracts
	something that can have a projection attached to it. Has "update"
	and "flush" signals and get_graph() and get_image()
	vfuncs. get_image() is temporary until the hack is finishes.

	* app/core/gimpimage.[ch]: implement GimpProjectableInterface,
	remove "update" and "flush" signals and made get_graph() a private
	implementation of the interface method. Moved interface method
	implementations after virtual function implementations.

	* app/core/gimpprojection.[ch]: change member "image" to
	"projectable" and use the projectable API as often as
	possible. Still some implicit dependencies on the projectable
	being an image left but it's getting close.

	* app/core/gimpprojection-construct.c: same here.


svn path=/trunk/; revision=27552
2008-11-04 18:06:36 +00:00
Sven Neumann 4762b73403 bumped minimum required version of GLib to 2.18.0.
2008-11-04  Sven Neumann  <sven@sven>

	* configure.in: bumped minimum required version of GLib to 
2.18.0.

	* INSTALL: document the updated dependency.

	* app/core/gimp.[ch]: introduced gimp_message_literal(), a 
variant
	of gimp_message() that takes a literal string.

	* app/errors.[ch]: removed format arguments from 
gimp_fatal_error()
	and gimp_terminate() and let them take a literal string instead.

	* app/tools/gimptool.[ch]: introduced 
gimp_tool_message_literal(),
	a variant of gimp_tool_message() that takes a literal string.

	* app/actions/documents-commands.c
	* app/actions/drawable-commands.c
	* app/actions/edit-commands.c
	* app/actions/error-console-commands.c
	* app/actions/file-commands.c
	* app/actions/gradients-commands.c
	* app/actions/image-commands.c
	* app/actions/layers-commands.c
	* app/actions/palettes-commands.c
	* app/actions/plug-in-commands.c
	* app/actions/select-commands.c
	* app/actions/vectors-commands.c
	* app/config/gimprc.c
	* app/core/gimp-modules.c
	* app/core/gimp-parasites.c
	* app/core/gimp-templates.c
	* app/core/gimp-units.c
	* app/core/gimpchannel.c
	* app/core/gimpcontainer-filter.c
	* app/core/gimpdrawable-bucket-fill.c
	* app/core/gimpimage-convert.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage.c
	* app/core/gimpimagefile.c
	* app/core/gimplayer-floating-sel.c
	* app/core/gimplayer.c
	* app/core/gimpselection.c
	* app/dialogs/convert-dialog.c
	* app/dialogs/dialogs.c
	* app/dialogs/palette-import-dialog.c
	* app/dialogs/preferences-dialog.c
	* app/dialogs/quit-dialog.c
	* app/dialogs/stroke-dialog.c
	* app/display/gimpdisplayshell-dnd.c
	* app/file/file-open.c
	* app/file/file-procedure.c
	* app/file/file-save.c
	* app/file/file-utils.c
	* app/gegl/gimpcurvesconfig.c
	* app/gegl/gimplevelsconfig.c
	* app/gui/gui-message.c
	* app/gui/gui.c
	* app/gui/session.c
	* app/paint/gimpbrushcore.c
	* app/paint/gimpclone.c
	* app/paint/gimpheal.c
	* app/paint/gimpperspectiveclone.c
	* app/paint/gimpsourcecore.c
	* app/pdb/gimppdb-utils.c
	* app/pdb/gimpprocedure.c
	* app/plug-in/gimpplugin-message.c
	* app/plug-in/gimpplugin.c
	* app/plug-in/gimppluginmanager-restore.c
	* app/plug-in/gimppluginprocedure.c
	* app/text/gimptextlayer.c
	* app/tools/gimp-tools.c
	* app/tools/gimpaligntool.c
	* app/tools/gimpblendtool.c
	* app/tools/gimpbrightnesscontrasttool.c
	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpcolorbalancetool.c
	* app/tools/gimpcolorpickertool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimpdesaturatetool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpforegroundselecttool.c
	* app/tools/gimpfreeselecttool.c
	* app/tools/gimpgegltool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimpimagemaptool-settings.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimppainttool.c
	* app/tools/gimpposterizetool.c
	* app/tools/gimpselectiontool.c
	* app/tools/gimpsourcetool.c
	* app/tools/gimpthresholdtool.c
	* app/tools/gimptransformtool.c
	* app/tools/gimpvectortool.c
	* app/widgets/gimpactionview.c
	* app/widgets/gimpcontrollerlist.c
	* app/widgets/gimpcontrollers.c
	* app/widgets/gimpdataeditor.c
	* app/widgets/gimpdevices.c
	* app/widgets/gimpdnd-xds.c
	* app/widgets/gimperrordialog.c
	* app/widgets/gimphelp.c
	* app/widgets/gimpitemtreeview.c
	* app/widgets/gimppdbdialog.c
	* app/widgets/gimpsettingsbox.c
	* app/widgets/gimpvectorstreeview.c
	* app/widgets/gimpwidgets-utils.c
	* app/xcf/xcf-load.c
	* tools/pdbgen/pdb/convert.pdb
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/floating_sel.pdb
	* tools/pdbgen/pdb/image.pdb: use the _literal variants for
	g_set_error(), gimp_message() and gimp_tool_message().

	* app/pdb/convert-cmds.c
	* app/pdb/edit-cmds.c
	* app/pdb/floating-sel-cmds.c
	* app/pdb/image-cmds.c: regenerated.


svn path=/trunk/; revision=27548
2008-11-04 12:33:09 +00:00
Michael Natterer 87dc343b21 remove public functions get_tiles(), get_image(), get_image_type() and
2008-11-04  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpprojection.[ch]: remove public functions
	get_tiles(), get_image(), get_image_type() and get_bytes().

	* app/actions/debug-commands.c
	* app/actions/layers-commands.c
	* app/core/gimpprojection-construct.c
	* app/display/gimpdisplayshell-render.c
	* app/paint/gimppaintcore.c
	* tools/pdbgen/pdb/layer.pdb: use the GimpPickable API insatead.

	* app/pdb/layer-cmds.c: regenerated.


svn path=/trunk/; revision=27547
2008-11-04 12:07:17 +00:00
Sven Neumann b5ff19f743 reverted last change as the code in tile-pyramid does care about the pixel
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 09:07:38 +00:00
Michael Natterer 6f300a579c changed "type" parameter into "bytes" because tile managers don't care
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-11-04 08:50:04 +00:00
Sven Neumann fe520925b7 app/base/Makefile.am app/core/Makefile.am app/display/Makefile.am
2008-11-03  Sven Neumann  <sven@gimp.org>

	
	* 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: micro-optimization in the 
generated
	enum registration code.

	* 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=27538
2008-11-03 21:38:13 +00:00
Michael Natterer b994ab724e app/core/gimp-edit.c app/core/gimpchannel.c
2008-11-03  Michael Natterer  <mitch@gimp.org>

	* app/core/gimp-edit.c
	* app/core/gimpchannel.c
	* app/core/gimpdrawable-transform.c
	* app/core/gimpdrawable.c
	* app/core/gimpdrawablemodundo.c
	* app/core/gimplayer.c
	* app/core/gimplayermask.c
	* app/core/gimpselection.c
	* app/text/gimptext-compat.c
	* app/text/gimptextlayer-xcf.c
	* app/vectors/gimpvectorsmodundo.c
	* app/widgets/gimpviewrendererdrawable.c
	* app/xcf/xcf-load.c
	* app/xcf/xcf-save.c
	* tools/pdbgen/pdb/layer.pdb: use accessors for item->offset_x,y.
	Some minor unrelated cleanups.

	* app/pdb/layer-cmds.c: regenerated.


svn path=/trunk/; revision=27537
2008-11-03 21:17:50 +00:00
Michael Natterer 56b5909c8a add "GimpImageType type" parameter because there are only a few calls to
2008-11-03  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawable.[ch] (gimp_drawable_set_tiles): add
	"GimpImageType type" parameter because there are only a few calls
	to this function which (can easily pass the current type); however
	most calls to gimp_drawable_set_tiles_full() were just using the
	function because of the type argument and passed in the item's
	current offsets (which means peeking into the item struct or using
	temp variables).

	* app/core/gimpdrawable-offset.c (gimp_drawable_offset)
	* app/text/gimptextlayer.c (gimp_text_layer_render)
	* app/tools/gimptransformtool.c (gimp_transform_tool_doit): pass
	the type to set_tiles().

	* app/core/gimpchannel.c (gimp_channel_convert)
	* app/core/gimpimage-convert.c (gimp_image_convert)
	* app/core/gimplayer.c (gimp_layer_convert,add_alpha,flatten):
	change calls to set_tiles_full() into set_tiles() because the
	offset doesn't change.


svn path=/trunk/; revision=27535
2008-11-03 20:51:46 +00:00
Michael Natterer 740ab5e633 renamed gimp_item_width() to gimp_item_get_width() and gimp_item_height()
2008-11-03  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpitem.[ch]: renamed
	gimp_item_width() to gimp_item_get_width() and
	gimp_item_height() to gimp_item_get_height().

	* app/actions/channels-commands.c
	* app/actions/drawable-commands.c
	* app/actions/layers-commands.c
	* app/core/<many>.c
	* app/dialogs/offset-dialog.c
	* app/dialogs/resize-dialog.c
	* app/dialogs/scale-dialog.c
	* app/display/gimpdisplayshell-dnd.c
	* app/display/gimpdisplayshell.c
	* app/paint/gimpbrushcore.c
	* app/paint/gimpdodgeburn.c
	* app/paint/gimpink.c
	* app/paint/gimppaintcore.c
	* app/paint/gimpsmudge.c
	* app/text/gimptextlayer-xcf.c
	* app/text/gimptextlayer.c
	* app/tools/gimpaligntool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpforegroundselecttool.c
	* app/tools/gimpimagemaptool.c
	* app/tools/gimprectangletool.c
	* app/tools/gimpregionselecttool.c
	* app/tools/gimptexttool.c
	* app/vectors/gimpvectors.c
	* app/vectors/gimpvectorsmodundo.c
	* app/widgets/gimptoolbox-dnd.c
	* app/widgets/gimpviewrendererdrawable.c
	* app/widgets/gimpviewrenderervectors.c
	* app/xcf/xcf-load.c
	* app/xcf/xcf-save.c
	* tools/pdbgen/pdb/drawable.pdb: changed accordingly.

	* app/pdb/drawable-cmds.c: regenerated.


svn path=/trunk/; revision=27531
2008-11-03 00:09:01 +00:00
Martin Nordholts c3b7be242c Instantiate offset_node on-demand.
* app/core/gimpitem.c: Instantiate offset_node on-demand.

* app/core/gimpdrawable.c: Use gimp_item_set_offset().

svn path=/trunk/; revision=27530
2008-11-02 23:16:47 +00:00
Michael Natterer 5b68a1d0eb renamed gimp_item_offsets() to gimp_item_get_offset() and
2008-11-03  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpitem.[ch]: renamed
	gimp_item_offsets() to gimp_item_get_offset() and
	gimp_item_set_offsets() to gimp_item_set_offset().

	* app/actions/drawable-commands.c
	* app/actions/layers-commands.c
	* app/core/<many>.c
	* app/display/gimpdisplayshell-dnd.c
	* app/display/gimpdisplayshell-preview.c
	* app/display/gimpdisplayshell-transform.c
	* app/display/gimpdisplayshell.c
	* app/paint/gimppaintcore-stroke.c
	* app/paint/gimppaintcore.c
	* app/paint/gimpsourcecore.c
	* app/text/gimptextlayer-xcf.c
	* app/tools/<many>.c
	* app/widgets/gimptoolbox-dnd.c
	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/drawable_transform.pdb
	* tools/pdbgen/pdb/selection.pdb
	* tools/pdbgen/pdb/transform_tools.pdb
	* tools/pdbgen/pdb/vectors.pdb: changed accordingly.

	* app/pdb/drawable-cmds.c
	* app/pdb/drawable-transform-cmds.c
	* app/pdb/selection-cmds.c
	* app/pdb/vectors-cmds.c
	* app/pdb/transform-tools-cmds.c: regenerated.


svn path=/trunk/; revision=27529
2008-11-02 23:03:29 +00:00
Martin Nordholts 594bc84ace New function that sets the offset of the item and also keeps the
* app/core/gimpitem.c (gimp_item_set_offsets): New function that
sets the offset of the item and also keeps the offset_node in
sync.

* app/core/gimpdrawable.c (gimp_drawable_real_set_tiles): Use the
function instead of setting the offsets directly. Fixes corrupted
display when cropping images with GEGL enabled for the projection.

svn path=/trunk/; revision=27528
2008-11-02 22:44:33 +00:00
Martin Nordholts 93577a2eec Moved the shift_node from GimpLayer to GimpItem, and call it offset_node.
* app/core/gimpitem.[ch]: Moved the shift_node from GimpLayer to
GimpItem, and call it offset_node. Also added
gimp_item_get_offset_node() meant to be used in the same way as
gimp_item_offsets().

(gimp_item_real_translate): Keep the offset_node up to date.

* app/core/gimplayer.[ch]: Don't manage the offset_node, get it
from GimpItem instead.

svn path=/trunk/; revision=27527
2008-11-02 22:29:05 +00:00
Michael Natterer a748e3f58e add new functions gimp_get_image_iter(), display_iter() and
2008-11-02  Michael Natterer  <mitch@gimp.org>

	* app/core/gimp.[ch]: add new functions gimp_get_image_iter(),
	display_iter() and tool_info_iter().

	* app/tools/gimp-tools.c
	* app/tools/gimptexttool.c
	* app/tools/gimpvectortool.c
	* app/dialogs/quit-dialog.c
	* app/gui/gui.c
	* app/menus/windows-menu.c
	* app/actions/images-commands.c
	* app/actions/tools-actions.c
	* app/actions/windows-actions.c
	* app/actions/tool-options-commands.c
	* app/display/gimpdisplay.c
	* app/display/gimpdisplay-foreach.c
	* app/widgets/gimptoolbox.c
	* tools/pdbgen/pdb/image.pdb: use them here.

	* app/pdb/image-cmds.c: regenerated.


svn path=/trunk/; revision=27526
2008-11-02 21:34:14 +00:00
Michael Natterer d1ca165b4e add new functions gimp_image_get_layer_iter(), channel_iter() and
2008-11-02  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage.[ch]: add new functions
	gimp_image_get_layer_iter(), channel_iter() and vectors_iter()
	which return the GList inside the resp. GimpList.

	* app/actions/channels-actions.c
	* app/actions/layers-actions.c
	* app/actions/vectors-actions.c
	* app/core/gimpimage-convert.c
	* app/core/gimpimage-crop.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-flip.c
	* app/core/gimpimage-item-list.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage-resize.c
	* app/core/gimpimage-rotate.c
	* app/core/gimpimage-scale.c
	* app/core/gimpimage.c
	* app/core/gimpimage.h
	* app/core/gimpprojection-construct.c
	* app/display/gimpdisplayshell-draw.c
	* app/file/file-open.c
	* app/tools/gimpaligntool.c
	* app/tools/gimpdrawtool.c
	* app/vectors/gimpvectors-compat.c
	* app/vectors/gimpvectors-export.c
	* app/widgets/gimplayertreeview.c
	* app/xcf/xcf-save.c
	* tools/pdbgen/pdb/image.pdb: use the new functions instead of
	peeking both into the image and the list. Remove inclusions of
	"gimplist.h" or change them into "gimpcontainer.h" if needed.

	* app/pdb/image-cmds.c: regenerated.


svn path=/trunk/; revision=27524
2008-11-02 20:46:57 +00:00
Michael Natterer c14c84ba63 add "update" signal with the same signature as GimpImage::update().
2008-11-02  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawablestack.[ch]: add "update" signal with the
	same signature as GimpImage::update(). Install handlers for the
	drawables' "update" and "visibility-changed" signals and emit
	"update" accordingly, item offsets taken into account. Also emit
	"update" when drawables are added, removed and reordered.

	* app/core/gimpimage.[ch]: remove handlers and tons of code that
	makes sure the image emits "update" on any of the above handled
	events and simply connect the layer and channel stacks' "update"
	signal to gimp_image_update().


svn path=/trunk/; revision=27523
2008-11-02 19:53:51 +00:00
Michael Natterer 50ac74be1e remove the mask_node and simply set both opacity and the layer mask's
2008-11-02  Michael Natterer  <mitch@gimp.org>

	* app/core/gimplayer.[ch]: remove the mask_node and simply set
	both opacity and the layer mask's source node on the opacity_node.
	Needs latest SVN GEGL.


svn path=/trunk/; revision=27522
2008-11-02 18:39:10 +00:00
Martin Nordholts 24fac1de0f Move the base GeglNode here in preparation for moving the GimpLayer
* app/core/gimpitem.[ch]: Move the base GeglNode here in
preparation for moving the GimpLayer gegl:shift op to here as
well. After all, the offsets are properties of GimpItem and not
GimpLayer.

* app/core/gimpdrawable.[ch]: Delegate appropriate stuff to the
GimpItem base class, like part of the visibility toggling and the
creation and destruction of the GimpItem node.

* app/core/gimplayer.c
* app/core/gimpchannel.c
* app/core/gimpdrawablestack.c: Changed accordingly, use the new
function names.

* app/core/gimpitempropundo.c
* app/vectors/gimpvectors-warp.c
* app/vectors/gimpvectorsmodundo.c: Include gegl.h instead of
glib-object.h

svn path=/trunk/; revision=27521
2008-11-02 16:39:38 +00:00
Martin Nordholts a9e187586b Prefix the GIMP GEGL operations with "gimp:" instead of "gimp-" so we
* app/gegl/gimpoperation*.c: Prefix the GIMP GEGL operations with
"gimp:" instead of "gimp-" so we follow the GEGL prefix style and
better serialize to XML.

* app/tools/gimp*tool.c

* app/core/gimpdrawable-*.c
* app/core/gimpdrawable.c
* app/core/gimpimagemap.c
* app/core/gimpprojection.c: Changed accordingly.

svn path=/trunk/; revision=27512
2008-11-01 12:08:35 +00:00
Sven Neumann 94dd20dadc bumped minimum required version of Cairo to 1.6.4.
2008-10-31  Sven Neumann  <sven@gimp.org>

	* configure.in: bumped minimum required version of Cairo to 
1.6.4.

	* app/core/gimpscanconvert.c: use 
cairo_format_stride_for_width().


svn path=/trunk/; revision=27488
2008-10-31 07:20:07 +00:00
Michael Natterer 82ca223376 change member "gboolean stroking" into "gint stroking_count". Add push/pop
2008-10-29  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpselection.[ch]: change member "gboolean stroking"
	into "gint stroking_count". Add push/pop API to increase/decrease
	the counter. Pretend the selection is empty if the counter is > 0.
	Enables correctly rendering vector layers even if there is a
	selection.


svn path=/trunk/; revision=27464
2008-10-29 19:55:58 +00:00
Sven Neumann 755621571c Bug 558420 – projection incorrect with alpha-less layers
2008-10-29  Sven Neumann  <sven@gimp.org>

	Bug 558420 – projection incorrect with alpha-less layers

	* app/core/gimpprojection-construct.c 
(gimp_projection_initialize):
	need to initialize the projection if the covering layer is not
	opaque.


svn path=/trunk/; revision=27460
2008-10-29 19:17:30 +00:00
Martin Nordholts 1f7b2c257e Completed the rename with gimp:layer-mode -> gimp:point-layer-mode and
* app/gegl/gimpoperationpointlayermode.c: Completed the rename
with gimp:layer-mode -> gimp:point-layer-mode and also did some
formating.

* app/core/gimplayer.c: Changed accordingly.

svn path=/trunk/; revision=27408
2008-10-25 21:02:46 +00:00
Martin Nordholts 1a19f7315a Instead of having one GEGL operation per layer mode, make
GimpOperationLayerMode instantiable and add a GimpLayerModeEffects
property to it that we check in ::process() to blend pixels
together.

* app/gegl/gimpoperationlayermode.[ch]: Do the change described
above. Currently only Normal and Addition are implemented. Normal
so that we don't need a special case for the gegl:normal op. Also,
the Dissolve layer mode is not a point op and needs to be
implemented elsewhere.

* app/gegl/gimpoperation*mode.c: Removed.

* app/gegl/gimp-gegl-utils.[ch]: Removed
gimp_layer_mode_to_gegl_operation().

* app/core/gimplayer.c

* app/gegl/Makefile.am
* app/gegl/gimp-gegl.c: Adapt.

svn path=/trunk/; revision=27400
2008-10-25 13:29:55 +00:00
Michael Natterer f0c79b81e3 Merge a modified and enhanced patch from the vector layer branch:
2008-10-25  Michael Natterer  <mitch@gimp.org>

	Merge a modified and enhanced patch from the vector layer branch:

	* app/core/gimpdrawable-stroke.[ch]: add new public API
	gimp_drawable_fill_boundary() and gimp_drawable_fill_vectors().

	Split the internal code up so that there are functions which turn
	the BoundSegs and GimpVectors into a GimpScanConvert and changed
	gimp_drawable_stroke_scan_convert() so it can either fill the
	shape or stroke it.


svn path=/trunk/; revision=27399
2008-10-25 13:12:48 +00:00
Michael Natterer 39af762f61 More merging from SOC 2006's vector layer branch:
2008-10-25  Michael Natterer  <mitch@gimp.org>

	More merging from SOC 2006's vector layer branch:

	* app/core/gimpitem.[ch]: add "gboolean push_undo" to
	GimpItem::stroke().

	* app/core/gimpdrawable-stroke.[ch]
	* app/paint/gimppaintcore-stroke.[ch]
	* app/paint/gimppaintcore.[ch] (gimp_paint_core_finish): add
	"push_undo" parameters here too.

	* app/actions/select-commands.c
	* app/actions/vectors-commands.c
	* app/core/gimpchannel.c
	* app/core/gimpselection.c
	* app/dialogs/stroke-dialog.c
	* app/tools/gimppainttool.c
	* app/vectors/gimpvectors.c
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/paint_tools.pdb
	* tools/pdbgen/pdb/paths.pdb: pass TRUE all over the place.

	* app/pdb/edit-cmds.c
	* app/pdb/paint-tools-cmds.c
	* app/pdb/paths-cmds.c: regenerated.


svn path=/trunk/; revision=27398
2008-10-25 11:59:03 +00:00
Michael Natterer a92925361b bail out if the notification is not about one of our own properties (but
2008-10-25  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpcontext.c (gimp_context_parent_notify): bail out if
	the notification is not about one of our own properties
	(but from a subclass).


svn path=/trunk/; revision=27394
2008-10-25 09:14:16 +00:00
Michael Natterer efb6d15acf add "gboolean use_context_color" parameter to gimp_stroke_options_new()
2008-10-25  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpstrokeoptions.[ch]: add "gboolean use_context_color"
	parameter to gimp_stroke_options_new() and set the passed context
	as parent of the new options only if it's TRUE. Also fixed the
	GimpConfig::duplicate() implementation to really duplicate the
	object and not just return an object containing default values.

	* app/core/gimpfilloptions.[ch]: add gimp_fill_options_new().

	* app/actions/select-commands.c
	* app/dialogs/stroke-dialog.c
	* app/actions/vectors-commands.c
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/paths.pdb: pass TRUE to gimp_stroke_options_new().

	* app/pdb/edit-cmds.c
	* app/pdb/paths-cmds.c: regenerated.


svn path=/trunk/; revision=27393
2008-10-25 08:52:20 +00:00
Michael Natterer 90c26cf10e add non-serializable properties pattern-view-type and pattern-view-size
2008-10-25  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpfilloptions.[ch]: add non-serializable properties
	pattern-view-type and pattern-view-size which are used only by the
	new UI below.

	* app/widgets/gimpfilleditor.[ch]: added boolean edit-context
	property. If TRUE, add widgets to edit the context's foreground and
	pattern. Add "edit_context" parameter to gimp_fill_editor_new().

	* app/widgets/gimpstrokeeditor.[ch]: add the same parameter here.

	* app/widgets/gimpwidgets-utils.[ch]: add gimp_enum_radio_box_add()
	which does the same as the existing gimp_enum_radio_frame_add().

	* app/dialogs/stroke-dialog.c: pass FALSE for "edit_context"
	because this dialog takes its foreground and pattern from the user
	context and doesn't need it's own GUI for them.


svn path=/trunk/; revision=27392
2008-10-24 22:34:24 +00:00
Michael Natterer 1a453c37df app/core/Makefile.am app/core/core-types.h remove this mis-engineered
2008-10-24  Michael Natterer  <mitch@gimp.org>

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpstrokedesc.[ch]: remove this mis-engineered
	abstraction...

	* app/core/gimpstrokeoptions.[ch]: ...and add its properties and
	API here.

	* app/core/gimpitem.[ch]: GimpItem::stroke() take a
	GimpStrokeOptions instead of a GimpStrokeDesc.

	* app/core/gimpchannel.c
	* app/core/gimpselection.c
	* app/vectors/gimpvectors.c
	* app/actions/select-commands.c
	* app/actions/vectors-commands.c
	* app/dialogs/stroke-dialog.c
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/paths.pdb: changed accordingly.

	* app/pdb/edit-cmds.c
	* app/pdb/paths-cmds.c: regenerated.


svn path=/trunk/; revision=27388
2008-10-24 07:37:46 +00:00
Michael Natterer 50ad791fff Another merge from the vector layer branch:
2008-10-24  Michael Natterer  <mitch@gimp.org>

	Another merge from the vector layer branch:

	* app/core/gimpstrokedesc.c (gimp_stroke_desc_new): make sure
	each stroke desc always has GimpPaintInfo.


svn path=/trunk/; revision=27383
2008-10-23 22:48:46 +00:00
Michael Natterer 3dfef0f15a rename GimpStrokeStyle to GimpFillStyle.
2008-10-23  Michael Natterer  <mitch@gimp.org>

	* app/core/core-enums.[ch]: rename GimpStrokeStyle to GimpFillStyle.

	* app/core/gimpfilloptions.[ch]
	* app/core/gimpdrawable-stroke.c
	(gimp_drawable_stroke_scan_convert): changed accordingly.


svn path=/trunk/; revision=27379
2008-10-23 21:30:28 +00:00
Michael Natterer 67a5eaea68 Merge a part of SOC 2006's vector layer branch:
2008-10-23  Michael Natterer  <mitch@gimp.org>

	Merge a part of SOC 2006's vector layer branch:

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpfilloptions.[ch]: new GimpContext subclass factored
	out of GimpStrokeOptions. Has "style" and "antialias" properties.

	* app/core/gimpstrokeoptions.[ch]: derive from GimpFillOptions
	and remove said properties.

	* app/core/gimpdrawable-stroke.c
	(gimp_drawable_stroke_scan_convert): changed accordingly.


svn path=/trunk/; revision=27378
2008-10-23 21:18:39 +00:00
Sven Neumann b6ae85b74c app/core/gimpimagefile.c formatting.
2008-10-22  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimagefile.c
	* app/plug-in/gimpplugin-progress.c: formatting.


svn path=/trunk/; revision=27357
2008-10-22 06:00:06 +00:00
Martin Nordholts e38ca5490a Rename the convenient channel offset defines from FOO_PIX to FOO as this
* app/base/base-types.h: Rename the convenient channel offset
defines from FOO_PIX to FOO as this increases readability.

* app/base/color-balance.c
* app/base/colorize.c
* app/base/desaturate.c
* app/base/hue-saturation.c
* app/base/siox.c
* app/base/threshold.c

* app/core/gimp-edit.c
* app/core/gimp-transform-region.c
* app/core/gimpchannel.c
* app/core/gimpdrawable-bucket-fill.c
* app/core/gimpdrawable-convert.c
* app/core/gimpdrawable-stroke.c
* app/core/gimpdrawable.c
* app/core/gimpimage-convert.c
* app/core/gimpimage.c
* app/core/gimppalette-import.c
* app/core/gimppickable.c

* app/gegl/gimpoperation*mode.c
* app/gegl/gimpoperationcolorbalance.c
* app/gegl/gimpoperationcolorize.c
* app/gegl/gimpoperationhuesaturation.c
* app/gegl/gimpoperationlevels.c
* app/gegl/gimpoperationposterize.c
* app/gegl/gimpoperationthreshold.c

* app/paint-funcs/subsample-region.c

* app/paint/gimpclone.c
* app/paint/gimppaintbrush.c

* app/widgets/gimpviewrenderer.c: Adapt.

svn path=/trunk/; revision=27324
2008-10-19 13:47:09 +00:00
Sven Neumann e25c82e21a Applied patch from Alexia Death as attached to bug #471344:
2008-10-18  Sven Neumann  <sven@gimp.org>

	Applied patch from Alexia Death as attached to bug #471344:
	
	* app/core/Makefile.am
	* app/core/gimpcoords-interpolate.[ch]: new files with
	interpolation code taken from ...

	* app/vectors/gimpbezierstroke.c: ... here.

	* app/Makefile.am (AM_LDFLAGS): make it link.


svn path=/trunk/; revision=27314
2008-10-18 18:46:15 +00:00
Sven Neumann 8f425553a7 added signal Gimp::image-opened to announce that an image has been loaded
2008-10-17  Sven Neumann  <sven@sven>

	* app/core/gimp.[ch]: added signal Gimp::image-opened to 
announce
	that an image has been loaded and a display was created for it.

	* app/file/file-open.c (file_open_with_proc_and_display): call
	gimp_opened() to emit the new signal.

	* app/gui/dbus-service.xml
	* app/gui/gimpdbusservice.[ch]: propagate the 'opened' signal to
	listeners of the "org.gimp.GIMP.UI" DBus service.

	* app/gui/gui-unique.c: formatting.


svn path=/trunk/; revision=27297
2008-10-17 12:03:08 +00:00
Michael Natterer 880a699cae configure.in require GEGL >= 0.0.21.
2008-10-14  Michael Natterer  <mitch@gimp.org>

	* configure.in
	* app/sanity.c: require GEGL >= 0.0.21.

	* app/core/gimpchannel.c
	* app/core/gimpdrawable-brightness-contrast.c
	* app/core/gimpdrawable-invert.c
	* app/core/gimpimage.c
	* app/core/gimpimagemap.c
	* app/core/gimplayer.c
	* app/gegl/gimp-gegl-utils.c
	* app/tools/gimpbrightnesscontrasttool.c: GEGL operation names
	are now "gegl:"-prefixed.

	* app/core/gimpimagemap.c: set the node's "dont-cache" property
	unconditionally.


svn path=/trunk/; revision=27284
2008-10-14 22:44:42 +00:00
Michael Natterer 5fa6af0e1f add a default implementation of GimpDrawable::get_node() which contains a
2008-10-14  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawable.[ch]: add a default implementation of
	GimpDrawable::get_node() which contains a layer mode node.
	Implement GimpItem::visibility_changed() and turn the node into a
	nop when the drawable is invisible. Added public function
	gimp_drawable_get_mode_node() so subclasses can plug stuff
	into its "aux" pad.

	* app/core/gimplayer.[ch]
	* app/core/gimpchannel.[ch]: changed accordingly (remove
	duplicated member and code that is now in GimpDrawable).


svn path=/trunk/; revision=27277
2008-10-14 18:32:07 +00:00
Michael Natterer ef1df223a8 add a "use_gegl" boolean member.
2008-10-11  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpprojection.h: add a "use_gegl" boolean member.

	* app/core/gimpprojection-construct.c (gimp_projection_construct):
	use the boolean instead of hardcoding FALSE.

	* app/actions/view-actions.c
	* app/actions/view-commands.[ch]: add a "Use GEGL" action and
	callback which sets the boolean and exposes the display.

	* menus/image-menu.xml.in: add it to the "View" menu.


svn path=/trunk/; revision=27242
2008-10-11 19:17:42 +00:00
Michael Natterer 0e88239524 add a projection node and implement GimpDrawable::get_node(). Reconfigure
2008-10-11  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpchannel.[ch]: add a projection node and
	implement GimpDrawable::get_node(). Reconfigure the node in
	visibility_changed(), set_color(), set_opacity() and
	set_show_masked().

	* app/core/gimpimage.c (gimp_image_get_graph): enable code that
	projects the channels stack on top of the layer stack.

	* app/core/gimpprojection-construct.c: remove the call to
	gimp_projection_construct_channels() from the GEGL code path. Also
	don't touch proj->construct_flag.


svn path=/trunk/; revision=27230
2008-10-11 10:29:19 +00:00
Michael Natterer e28e864ac6 remove obsolete assertion and redundant cast.
2008-10-11  Michael Natterer  <mitch@gimp.org>

	* app/core/gimplayer.c (gimp_layer_get_node): remove obsolete
	assertion and redundant cast.


svn path=/trunk/; revision=27229
2008-10-11 10:23:01 +00:00
Michael Natterer 302bda6c66 add GimpContainer::add() implementation, it's needed after all even though
2008-10-11  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawablestack.c: add GimpContainer::add()
	implementation, it's needed after all even though everybody uses
	gimp_container_insert() on drawable stacks.

	(gimp_drawable_stack_remove_node): no need to have a special check
	for newly added nodes, this can't happen any more now that we have
	an add() impl.

	(gimp_drawable_stack_get_graph): free the reverse list.


svn path=/trunk/; revision=27228
2008-10-11 10:18:46 +00:00
Michael Natterer 26de288d8b Fix old bug in the GimpContainer implementation that wasn't visible before
2008-10-11  Michael Natterer  <mitch@gimp.org>

	Fix old bug in the GimpContainer implementation that wasn't
	visible before the drawable stack completly b0rked when removing
	the second-last item:

	* app/core/gimpcontainer.c: add default implementations of ::add()
	and ::remove() and update container->num_children there instead of
	in the gimp_container_add() and _remove() wrapper functions.
	This way not only external callbacks connected to the "add" and
	"remove" signals are called with the correct num_children, also
	implemtations of ::add() and ::remove() in subclass have the right
	number available before/after upchaining. Add paranoia code to the
	wrapper functions which check if the subclass reall chains up.

	* app/core/gimplist.c: chain up in add() and remove().


svn path=/trunk/; revision=27227
2008-10-11 10:14:21 +00:00
Michael Natterer 012581b1b9 simplify by getting rid of code duplication.
2008-10-10  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawablestack.c
	(gimp_drawable_stack_add_node)
	(gimp_drawable_stack_remove_node): simplify by getting rid of code
	duplication.


svn path=/trunk/; revision=27217
2008-10-10 21:53:34 +00:00
Michael Natterer a037de0f18 move all the code that creates a graph of drawables and all
2008-10-10  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawablestack.[ch]: move all the code that creates
	a graph of drawables and all adding/removing/reordering code from
	GimpImage to this file.

	* app/core/gimpimage.c: remove the code here and use the layer
	stack's subgraph instead. Add #if 0'ed code that blends the
	channels on top of that but that doesn't work because channels
	don't provide nodes yet.


svn path=/trunk/; revision=27216
2008-10-10 21:18:24 +00:00
Michael Natterer 513c1b80f6 app/core/core-types.h app/core/Makefile.am new GimpList subclass stub
2008-10-10  Michael Natterer  <mitch@gimp.org>

	* app/core/core-types.h
	* app/core/Makefile.am
	* app/core/gimpdrawablestack.[ch]: new GimpList subclass stub
	which will manage the subgraphs of layers and channels and is also
	the first step towards layer tree.

	* app/core/gimpimage.c (gimp_image_init): keep the layers and
	channels in GimpDrawableStacks instead of plain GimpLists.


svn path=/trunk/; revision=27212
2008-10-10 20:04:03 +00:00
Michael Natterer b479b7b346 add virtual function GimpDrawable::get_node() which returns a node to be
2008-10-10  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawable.[ch]: add virtual function
	GimpDrawable::get_node() which returns a node to be plugged into
	the projection.

	* app/core/gimplayer.[ch]: remove public get_node() api and
	implement the virtual function instead.

	* app/core/gimpimage.c: changed accordingly.


svn path=/trunk/; revision=27211
2008-10-10 19:36:17 +00:00
Michael Natterer 5ad366c642 implement GimpItem::visibility-changed and turn the layer's node into a
2008-10-10  Michael Natterer  <mitch@gimp.org>

	* app/core/gimplayer.c: implement GimpItem::visibility-changed
	and turn the layer's node into a nop when the layer is invisible.

	(gimp_layer_get_node): connect the stuff to a nop here too for
	invisible layers.


svn path=/trunk/; revision=27208
2008-10-10 13:52:13 +00:00
Michael Natterer 73a9bcf327 Bug 554983 – Layers Projection using GEGL
2008-10-10  Michael Natterer  <mitch@gimp.org>

	Bug 554983 – Layers Projection using GEGL

	First projection using GEGL, wheeeee. Disabled by default because
	it doesn't work with floating selection (and will not, FS
	refactoring is in the queue).

	* app/core/gimpimage.[ch]: add gimp_image_get_graph() which
	returns a GeglNode representing the image's projection.

	(gimp_image_add_layer_node)
	(gimp_image_remove_layer_node): new utility functions to add and
	remove layer nodes to/from the graph.

	(gimp_image_add_layer)
	(gimp_image_remove_layer)
	(gimp_image_position_layer): call them to keep the graph up to date.

	* app/core/gimpdrawable.c (gimp_drawable_real_update): invalidate
	the source node.

	* app/core/gimpprojection.[ch]: keep a projection graph around and
	add gimp_projection_get_sink_node() which returns the node that
	writes to the projection tiles.

	* app/core/gimpprojection-construct.c: add
	gimp_projection_construct_gegl() which is a few-liner that uses a
	GeglProcessor to run the projection graph.

	(gimp_projection_construct): call the new function (disabled by
	default).


svn path=/trunk/; revision=27207
2008-10-10 12:24:56 +00:00
Michael Natterer dba9e0c5e8 add new functions gimp_image_get_layer_by_index(), _channel_by_index() and
2008-10-10  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage.[ch]: add new functions
	gimp_image_get_layer_by_index(), _channel_by_index() and
	_vectors_by_index().

	* app/core/gimpprojection-construct.c
	* app/display/gimpdisplayshell-layer-select.c
	* app/xcf/xcf-load.c: use them instead of looking the items up
	in image->container and casting the return value.


svn path=/trunk/; revision=27206
2008-10-10 11:45:00 +00:00
Michael Natterer f2a6b781e4 the "shift" operation's x and y properties are doubles not ints.
2008-10-10  Michael Natterer  <mitch@gimp.org>

	* app/core/gimplayer.c (gimp_layer_translate)
	(gimp_layer_get_node): the "shift" operation's x and y properties
	are doubles not ints.

	(gimp_layer_apply_mask): properly disconnect the mask node.

	(gimp_layer_set_opacity): the opacity node has a "value" property,
	not "opacity".


svn path=/trunk/; revision=27205
2008-10-10 11:30:56 +00:00
Michael Natterer 517e58cdeb Address Bug 554983 – Layers Projection using GEGL
2008-10-09  Michael Natterer  <mitch@gimp.org>

	Address Bug 554983 – Layers Projection using GEGL

	* app/gegl/gimp-gegl-utils.[ch]: add (imcomplete) function
	gimp_layer_mode_to_gegl_operation() from bug #554983.

	* app/core/gimpdrawable.[ch]: add gimp_drawable_get_source_node()
	which returns a GimpOperationTileSource for the drawable's
	tiles.

	(gimp_drawable_real_set_tiles)
	(gimp_drawable_configure): set the node's "tiles" property.

	* app/core/gimplayer.[ch]: add gimp_layer_get_node() which returns
	a GeglNode with proxy "input" and "output" pads to be plugged
	into the projection graph. The node has children for opacity,
	mask, layer mode and layer offset.

	(gimp_layer_translate)
	(gimp_layer_add_mask)
	(gimp_layer_apply_mask)
	(gimp_layer_set_opacity)
	(gimp_layer_set_mode): reconfigure the respective nodes.

	* app/core/gimpimage.[ch]: keep a "graph" node around and destroy
	it in finalize(). Not even a stub, just a silly GEGL dependency.


svn path=/trunk/; revision=27204
2008-10-09 20:44:23 +00:00
Michael Natterer 5503e6a055 Add GEGL_CFLAGS and #includes as if gimpdrawable.h and gimpimage.h had a
2008-10-09  Michael Natterer  <mitch@gimp.org>

	Add GEGL_CFLAGS and #includes as if gimpdrawable.h and gimpimage.h
	had a GEGL dependency (they will have in the next commit, but I
	wanted to keep the commit separate).

	* app/dialogs/Makefile.am
	* app/file/Makefile.am
	* app/gui/Makefile.am
	* app/menus/Makefile.am
	* app/paint/Makefile.am
	* app/plug-in/Makefile.am
	* app/text/Makefile.am
	* app/vectors/Makefile.am
	* app/widgets/Makefile.am
	* app/xcf/Makefile.am: add GEGL_CFLAGS.

	* app/actions/*.c
	* app/core/*.c
	* app/dialogs/*.c
	* app/display/*.c
	* app/file/*.c
	* app/gui/*.c
	* app/menus/*.c
	* app/paint/*.c
	* app/pdb/gimppdb-utils.c
	* app/pdb/gimpprocedure.c
	* app/plug-in/*.c
	* app/text/*.c
	* app/tools/*.c
	* app/vectors/*.c
	* app/widgets/*.c
	* app/xcf/*.c: add <gegl.h> or replace <glib-object.h> by <gegl.h>
	to all files which include a drawable subclass or gimpimage.h

	* tools/pdbgen/app.pl: include <gegl.h> instead of <glib-object.h>
	in all generated files.

	* app/pdb/*-cmds.c: regenerated.

	* data/images/gimp-splash.png: the goat is still sleeping.
	By Aurore Derriennic.


svn path=/trunk/; revision=27202
2008-10-09 20:24:04 +00:00
Michael Natterer 0e4a35a2d8 Remove the last code duplication from the undo system (or if not the last
2008-10-09  Michael Natterer  <mitch@gimp.org>

	Remove the last code duplication from the undo system (or if not
	the last then at least the most ugly):

	* app/core/gimpimage.[ch] (gimp_image_add_layer,channel,vectors):
	add "gboolean push_undo" parameter and add the item without
	touching undo if it's TRUE. Changed assertions from
	g_object_is_floating() to !gimp_item_is_attached() so they also
	take items from the undo stack and not only newly created ones.

	(gimp_image_remove_layer,channel,vectors): add "push_undo"
	parameter here too. Also add a "new_active" parameter where an
	optional new active item can be passed.

	(gimp_image_remove_layer,channel): these functions must not be
	called with push_undo=FALSE and a floating selection attached to
	the layer/channel. This can't currently happen; added warnings in
	case other code is changed and makes it happen anyway.

	* app/core/gimpchannelundo.c
	* app/core/gimplayerundo.c
	* app/vectors/gimpvectorsundo.c: use above functions to add/remove
	items instead of duplicating (parts of) their code. Pass
	push_undo=FALSE and the previously active item to the remove()
	functions.

	* app/actions/channels-commands.c
	* app/actions/edit-commands.c
	* app/actions/layers-commands.c
	* app/actions/vectors-commands.c
	* app/core/gimp-edit.c
	* app/core/gimpchannelundo.c
	* app/core/gimpimage-crop.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage-quick-mask.c
	* app/core/gimpimage-scale.c
	* app/core/gimplayer-floating-sel.c
	* app/core/gimplayerundo.c
	* app/core/gimpselection.c
	* app/core/gimptemplate.c
	* app/display/gimpdisplayshell-dnd.c
	* app/text/gimptext-compat.c
	* app/tools/gimptexttool.c
	* app/tools/gimpvectortool.c
	* app/vectors/gimpvectors-import.c
	* app/vectors/gimpvectorsundo.c
	* app/widgets/gimpchanneltreeview.c
	* app/widgets/gimpitemtreeview.[ch]
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimptoolbox-dnd.c
	* app/widgets/gimpvectorstreeview.c
	* app/xcf/xcf-load.c
	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/paths.pdb: changed accordingly (pass TRUE
	unless it's a new image like when loading and XCF file).

	* app/pdb/image-cmds.c
	* app/pdb/paths-cmds.c: regenerated.


svn path=/trunk/; revision=27200
2008-10-09 19:40:41 +00:00
Michael Natterer e21935a7b9 Bug 134956 – Curves tool doesn't save free curves
2008-10-09  Michael Natterer  <mitch@gimp.org>

	Bug 134956 – Curves tool doesn't save free curves

	* app/core/gimpmarshal.list
	* app/widgets/gimpsettingsbox.[ch]: add signal "file-dialog-setup"
	and emit it when the export/import file chooser is fully
	constructed. Callbacks can then do additional things to the
	dialog, like adding custom buttons.

	* app/tools/gimpcurvestool.h
	* app/tools/gimplevelstool.h: add boolean member
	"export_old_format".

	* app/tools/gimpcurvestool.c
	* app/tools/gimplevelstool.c (gimp_*_tool_dialog): connect to
	the settings box' "file-dialog-setup".

	(gimp_*_tool_export_setup): new callback which adds a toggle to
	the file choosers that allows to export to the old format.
	Default saving the new format, we defaulted to the old one before.

	(gimp_*_tool_settings_export): check the "export_old_format"
	boolean and only save the cruft format if it is TRUE; chain up
	otherwise, which generically saves the new format.

	* app/tools/gimplevelstool.c (gimp_levels_tool_settings_import):
	add the same file format detection code as in the curves tool
	so it transparently loads old and new levels files.


svn path=/trunk/; revision=27194
2008-10-09 15:25:59 +00:00
Sven Neumann ecccddd372 use GIMP_MINOR_VERSION to determine the version to migrate from.
2008-10-09  Sven Neumann  <sven@sven>

	* app/core/gimp-user-install.c (gimp_user_install_detect_old):
	use GIMP_MINOR_VERSION to determine the version to migrate from.


svn path=/trunk/; revision=27192
2008-10-09 13:24:50 +00:00
Michael Natterer 97b8f51049 when saving a curve of type GIMP_CURVE_FREE, don't use
2008-10-09  Michael Natterer  <mitch@gimp.org>

	* app/gegl/gimpcurvesconfig.c (gimp_curves_config_save_cruft):
	when saving a curve of type GIMP_CURVE_FREE, don't use
	gimp_curve_get_point() because that returns nothing for free
	curves.

	(gimp_curves_config_load_cruft): reset the curve before loading it.

	* app/core/gimpcurve.c (gimp_curve_get_point): instead of above
	mentioned uninitialized nonsense, at least return -1,-1 for free
	curves.


svn path=/trunk/; revision=27190
2008-10-09 09:44:08 +00:00
Michael Natterer 62e7dcc640 reorder sections consistently. Remove redundant CFLAGS.
2008-10-07  Michael Natterer  <mitch@gimp.org>

	* app/*/Makefile.am: reorder sections consistently. Remove
	redundant CFLAGS.


svn path=/trunk/; revision=27163
2008-10-07 11:58:14 +00:00
Michael Natterer 90db7d443c paranoia fix for hypothetical but harmful misbehavior: when setting the
2008-10-06  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpcontext.c (gimp_context_real_set_display): paranoia
	fix for hypothetical but harmful misbehavior: when setting the
	display from !=NULL to NULL, also set the image to NULL instead of
	relying on whatever obscure implicit behavior of other parts of
	GIMP which set a new display right away or make sure the image
	goes away together with the display.


svn path=/trunk/; revision=27145
2008-10-06 19:54:42 +00:00
Michael Natterer eed8f2c326 g_return_if_fail() on the mask's image being the same as the layer's
2008-10-06  Michael Natterer  <mitch@gimp.org>

	* app/core/gimplayer.c (gimp_layer_add_mask): g_return_if_fail()
	on the mask's image being the same as the layer's image. The PDB
	already checks for this.

	* app/core/gimpimage.c (gimp_image_add_layer,channel,vectors):
	remove calls to gimp_item_set_image() because we only accept
	itmes of this image anyway.


svn path=/trunk/; revision=27138
2008-10-06 09:26:44 +00:00
Michael Natterer 9a720b654f some formatting cleanups.
2008-10-05  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage-contiguous-region.c: some formatting cleanups.

	(find_contiguous_segment): changed to return gboolean not gint.


svn path=/trunk/; revision=27134
2008-10-05 13:54:36 +00:00
Hans Breuer d94419a9fd updated include <string.h> for memcmp() include <string.h> for strcmp()
2008-10-03  Hans Breuer  <hans@breuer.org>

	* **/makefie.msc gimpdefs.msc app/gimpcore.def : updated
	* app/core/gimpcurve.c : include <string.h> for memcmp()
	* app/gegl/gimpcurvesconfig.c : include <string.h> for strcmp()

svn path=/trunk/; revision=27118
2008-10-03 19:27:54 +00:00
Michael Natterer 6865bb9e2b Bug 546924 – "New Image" misscalculating dimensions for non-pixel sized
2008-09-30  Michael Natterer  <mitch@gimp.org>

	Bug 546924 – "New Image" misscalculating dimensions for non-pixel
	sized templates

	* app/core/gimptemplate.h: added private param flag
	GIMP_TEMPLATE_PARAM_COPY_FIRST.

	* app/core/gimptemplate.c (gimp_template_class_init): set the flag
	on the resolution properties.

	* app/dialogs/image-new-dialog.c (image_new_template_changed):
	make sure the resolution properties are copied first.

	* libgimpconfig/gimpconfig-utils.c (gimp_config_sync): remove
	comment about fixing the template editor. That's not true any
	more.


svn path=/trunk/; revision=27091
2008-09-30 16:06:24 +00:00
Michael Natterer 8938cca43f no need to memcpy() the arrays, they are properly copied by
2008-09-29  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpcurve.c (gimp_curve_copy): no need to memcpy() the
	arrays, they are properly copied by gimp_config_sync() now. Add
	call to gimp_data_dirty() so GimpCurvesConfig gets notified.

	* app/gegl/gimpcurvesconfig.c (gimp_curves_config_set_property):
	use gimp_config_copy() instead of copying the curve menually.


svn path=/trunk/; revision=27076
2008-09-29 12:33:58 +00:00
Sven Neumann 95cd081d13 added a 'restored' flag to the Gimp object and set it in
2008-09-25  Sven Neumann  <sven@gimp.org>

	* app/core/gimp.[ch]: added a 'restored' flag to the Gimp object
	and set it in gimp_real_restore(). Added method 
gimp_is_restored().

	* app/gui/gui.c: call gui_unique_init() in gui_init() instead of
	that later in gui_restore_after_callback(). By doing so we start
	our DBus service (or message proxy window on Win32) much earlier
	in the start process, thus reducing the time frame where two
	instances of gimp can be launched.

	* app/gui/gui-unique.c
	* app/gui/gimpdbusservice.c: wait handling the queued file-open
	requests until gimp is fully restored.

	* app/gui/splash.c (splash_update): only run one iteration of 
the
	main loop. Doing it in a while loop can cause us to get stuck if
	the gimp-unique service already added an idle handler.


svn path=/trunk/; revision=27049
2008-09-25 08:56:58 +00:00
Simon Budig 4372c0754b whitespace fix
2008-09-20  Simon Budig  <simon@gimp.org>

	* app/core/gimpcurve.c: whitespace fix

	* app/gegl/gimplevelsconfig.c: make sure that the points set by
	default gets unset before calculating the levels->curves
	transition. We don't want stray points in the corners.


svn path=/trunk/; revision=27018
2008-09-19 22:41:58 +00:00
Sven Neumann c6be62a797 app/core/gimpcurve.c (gimp_curve_plot) formatting.
2008-09-18  Sven Neumann  <sven@gimp.org>

	* app/core/gimpcurve.c (gimp_curve_plot)
	* app/gegl/gimplevelsconfig.c 
(gimp_levels_config_to_curves_config):
	formatting.


svn path=/trunk/; revision=27002
2008-09-18 21:55:28 +00:00
Simon Budig 1f788a5af2 comment fix
2008-09-18  Simon Budig  <simon@gimp.org>

	* app/core/gimpcurve.c: comment fix

	* app/gegl/gimplevelsconfig.c: improve the levels->curves
	transition. Not perfect, the result does not match a "real"
	gamma correction, especially in the dark areas, where the
	curves are too dark compared to the levels.


svn path=/trunk/; revision=27001
2008-09-18 19:48:04 +00:00
Sven Neumann d9a2d8242e no need to check if the drawable is attached as shadow tiles are per
2008-09-18  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdrawable-shadow.c 
(gimp_drawable_get_shadow_tiles):
	no need to check if the drawable is attached as shadow tiles are
	per drawable now.


svn path=/trunk/; revision=26986
2008-09-17 23:26:02 +00:00
Michael Natterer 68c21b49e9 Revert the change which adds GError parameters to
2008-09-17  Michael Natterer  <mitch@gimp.org>

	Revert the change which adds GError parameters to
	gimp_image_add_{channel,layer,vectors}():

	* app/actions/channels-commands.c
	* app/actions/edit-commands.c
	* app/actions/layers-commands.c
	* app/actions/vectors-commands.c
	* app/core/gimp-edit.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage-quick-mask.c
	* app/core/gimpimage.[ch]
	* app/core/gimplayer-floating-sel.c
	* app/core/gimpselection.c
	* app/core/gimptemplate.c
	* app/display/gimpdisplayshell-dnd.c
	* app/text/gimptext-compat.c
	* app/tools/gimptexttool.c
	* app/tools/gimpvectortool.c
	* app/vectors/gimpvectors-import.c
	* app/widgets/gimpchanneltreeview.c
	* app/widgets/gimpitemtreeview.[ch]
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimptoolbox-dnd.c
	* app/widgets/gimpvectorstreeview.c
	* app/xcf/xcf-load.c: revert.

	Instead, fix it at the PDB level:

	* app/core/gimpimage.c: turn the "added to wrong image" warning
	into a g_return_val_if_fail() assertion.

	* app/pdb/gimppdb-utils.[ch] (gimp_pdb_item_is_floating): add a
	"dest_image" parameter and fail if the passed item is not for this
	image.

	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/layer.pdb
	* tools/pdbgen/pdb/paths.pdb: pass the dest image to
	gimp_pdb_item_is_floating().

	* app/pdb/image-cmds.c
	* app/pdb/layer-cmds.c
	* app/pdb/paths-cmds.c: regenerated.


svn path=/trunk/; revision=26970
2008-09-17 11:41:54 +00:00
Michael Natterer b0dab70de8 add GError parameter to gimp_image_add_{channel,layer,vectors}() and
2008-09-17  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage.[ch]: add GError parameter to
	gimp_image_add_{channel,layer,vectors}() and remove calls to
	g_warning(). Changed checks to be possible failures at all.

	* app/widgets/gimpitemtreeview.h (GimpAddItemFunc): add the GError
	here too.

	* app/actions/channels-commands.c
	* app/actions/edit-commands.c
	* app/actions/layers-commands.c
	* app/actions/vectors-commands.c
	* app/core/gimp-edit.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage-quick-mask.c
	* app/core/gimplayer-floating-sel.c
	* app/core/gimpselection.c
	* app/core/gimptemplate.c
	* app/display/gimpdisplayshell-dnd.c
	* app/text/gimptext-compat.c
	* app/tools/gimptexttool.c
	* app/tools/gimpvectortool.c
	* app/vectors/gimpvectors-import.c
	* app/widgets/gimpchanneltreeview.c
	* app/widgets/gimpitemtreeview.c
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimptoolbox-dnd.c
	* app/widgets/gimpvectorstreeview.c
	* app/xcf/xcf-load.c: pass a NULL error.

	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/paths.pdb: pass the error.

	* app/pdb/image-cmds.c
	* app/pdb/paths-cmds.c: regenerated.


svn path=/trunk/; revision=26963
2008-09-17 08:27:35 +00:00
Sven Neumann b2ad06a19f added GError parameter to gimp_image_{raise,lower}_{channel,layer,vectors}
2008-09-16  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage.[ch]: added GError parameter to
	gimp_image_{raise,lower}_{channel,layer,vectors} functions and
	removed calls to g_message().

	* app/actions/channels-commands.c
	* app/actions/layers-commands.c
	* app/actions/vectors-commands.c: pass NULL for the GError
	parameter as these actions are insensitive if they would fail.

	* tools/pdbgen/pdb/image.pdb: changed accordingly. Corrected the
	documentation.

	* app/pdb/image-cmds.c
	* libgimp/gimpimage_pdb.c: regenerated.


svn path=/trunk/; revision=26953
2008-09-16 20:56:41 +00:00
Sven Neumann db7c35373d unified error messages.
2008-09-16  Sven Neumann  <sven@gimp.org>

	* app/core/gimppalette-load.c (gimp_palette_load): unified error
	messages.


svn path=/trunk/; revision=26952
2008-09-16 20:25:15 +00:00
Michael Natterer d2307c1bf6 add GError parameter and replace g_message() by g_set_error().
2008-09-15  Michael Natterer  <mitch@gimp.org>

	* app/core/gimplayer.[ch] (gimp_layer_add_mask): add GError
	parameter and replace g_message() by g_set_error().

	* app/core/gimplayermaskundo.c
	* app/xcf/xcf-load.c
	* app/actions/layers-commands.c: pass NULL errors since these
	places know what they are doing. Ha ha...

	* tools/pdbgen/pdb/layer.pdb
	* tools/pdbgen/pdb/image.pdb: pass the error so we get more real
	error messages for failed PDB calls.

	* app/pdb/image-cmds.c
	* app/pdb/layer-cmds.c: regenerated.


svn path=/trunk/; revision=26948
2008-09-15 21:05:01 +00:00
Michael Natterer c985f2e2a5 changed GimpBrush::get_extension() to return const gchar* instead of
2008-09-12  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdata.h: changed GimpBrush::get_extension() to return
	const gchar* instead of gchar*

	* app/core/gimpbrush.c
	* app/core/gimpbrushgenerated.c
	* app/core/gimpcurve.c
	* app/core/gimpgradient.c
	* app/core/gimppalette.c
	* app/core/gimppattern.c: changed accordingly.


svn path=/trunk/; revision=26935
2008-09-12 10:35:35 +00:00
Michael Natterer af9817b466 make a string pointer const.
2008-09-11  Michael Natterer  <mitch@gimp.org>

	* app/core/gimp-modules.c (gimp_modules_unload): make a string
	pointer const.


svn path=/trunk/; revision=26927
2008-09-11 17:19:07 +00:00
Martin Nordholts 0cc59223c1 Bug 551141 – "Select all" does not work
* app/core/gimpchannel.c (gimp_channel_real_all): We don't want to
clear the region, we want to fill it with OPAQUE_OPACITY.

svn path=/trunk/; revision=26891
2008-09-07 06:47:17 +00:00