Apply and heavily modify patch from remyDev which adds "lock position"
to GimpItem, similar to "lock content". Lock position disables all
sorts of translation and transform, from the GUI and the PDB.
Cleaned up some aspects of the lock content code as well because a
second instance of similar code always shows what went wrong the first
time.
and implement it in GimpLayer to unset the removed flag on the layer
mask. Remove layer mask special casing from gimp_image_add_layer().
Make sure that all an item's children get their removed flag unset in
gimp_item_unset_removed().
- The image *must* now be passed to g_object_new() when creating items
- Remove the "image" parameter from all item configure() functions
- Set the item's ID in gimp_item_set_image() if it has none yet
There is nothing drawable-specific in there, and having them on
GimpItem enables some simplifications, esp. in upcoming PDB
wrappers. None of these refactorings is in this commit though.
Which replaces all the deparate functions to turn layers, channels,
layer masks and vectors into selections. Use the new virtual function
all over the place instead of calling the functions in
gimpchannel-select.c manually.
Description of undo actions should be marked as action descriptions,
and not as commands. This is required for translation for some
language (like Hebrew) that require a different grammatical tense for
describing actions
this is pretty pointless from an abstraction point of view, but using
these functions will make the code a lot more readable by getting rid
of tons of ugly casts to and from GimpViewable whenever getting an
item's parent.
Sets the "width" and "height" properties and emits notifications and
"size-changed" if anything has changed. This in only to be used by
functions that actually resize the item, it does not scale/resize
anything.
Add gimp_item_can_lock_content() and gimp_layer_can_lock_alpha() which
return TRUE unless the item is a grop (has children), because group
items will be considered to have lock_content always TRUE and
lock_alpha always FALSE.
Took patch from Martin Nordholts and ported it to add a "lock-content"
property, signal and API in the same way as it's done for "visible"
and "linked".
This is just a utility function like gimp_image_get_layer_iter()
in order to avoid including "core/gimplist.h" whenever a file needs
access to the actual GList inside the container.
* app/core/gimpitem.[ch]: add virtual function ::get_container() plus
pubic API wrapper which returns the children of the item's parent
viewable, or the right toplevel container of its image.
Add utility function get_index() which returns the item's index
within its container.
* app/core/gimpchannel.c
* app/vectors/gimpvectors.c: implement get_container() and return
the right image container.
* app/core/gimplayer.[ch]: same here, and remove previously added
public get_container() API.
* app/core/gimplayermask.c
* app/core/gimpselection.c: implement get_container() for these GimpChannel
subclasses and return NULL.
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
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-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