Apply heavily modified patch from Es Swartz which adds PDB API for
brush size, angle and aspect ratio, as well as a full interface for
ink. Changed to patch to add all procedures to the "context" group
instead of creating new PDB groups, properly use the new
GimpPDBContext APIs for paint options, and did some general cleanup.
(Warning, completely untested).
Make gimp_image_get_uri() and gimp_image_get_filename() behave as in
the GIMP 2.6 days. Add new functions gimp_image_get_xcf_uri(),
gimp_image_get_exported_uri() and gimp_image_get_imported_uri().
Same fix for the PDB: if the item to transform is a group layer, call
gimp_item_transform()/rotate()/... directly instead of going through
the wrong cut/transform/paste code path.
gimp-item-find-parasite -> gimp-item-get-parasite
gimp-item-list-parasites -> gimp-item-get-parasite-list
Also changed the signature of gimp-item-get-parasite-list's C wrapper
in libgimp to be sane.
Add "gboolean merge_active_group" to gimp_image_merge_visible_layers()
and pass FALSE from the PDB wrapper so plug-in invoked layer merging
always acts on the toplevel container as it did in 2.6. Do the same
when opening an image as layer.
Also, added a "Merge within active group only" toggle to the merge
layers dialog and pass it down to the core, but default to TRUE here
so.
Set the text box mode to "fixed", and convert the passed in pixels to
the text layer's unit when setting the text box' width and height.
Spotted by Massimo.
and simply add them to the list of "compat_procs" which have a
replacement with identical signature. Move the libgimp C functions to
non-generated files.
and rename them yet again to be gimp_item_foo_parasite() instead of
gimp_item_parasite_foo() because the latter is just a misnaming (they
are not GimpItemParasites, they are GimpParasites attached to
GimpItems, just as layers are attached to images).
when dealing with native window handles. Also get rid of using
GdkNativeWindow and simply consistently use guint32 all over the
place. This is more obvious and consistent and keeps the diff to the
gtk3-port branch smaller.
namely ellipse_select(), free_select(), rect_select() and
round_rect_select() because they are fully replaced by the new
gimp_image_select_foo() functions. Will deprecate the rest as soon as
I have figured how to put the parameter overkill of the remaining
functions into context properties.
This was actually documented to be the return value of all transform
procedures since 1.2, but it was always broken and returned the
passed-in drawable. Therefore it's only fixed for the new item API,
the old procedures keep their semantics (and will all be deprecated
anyway).
that have a replacement with identical signature. Register them as
compat aliases with the PDB instead. Implement the libgimp API
manually, calling the new item functions.
Works for all item types, and has much less functions and parameters
than the drawable transform API because it uses the new context
states. Untested and not finished!
Instead, add utility functions that calculate the centers for rotate
and flip and use them where we used to pass "auto_center". This looks
pretty much poinless, but a commit will follow that makes it look
better...
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.
The gimp_drawable_fill() already mentioned the bucket fill tool.
However the procedure that the developer is most likely looking
for is gimp_edit_fill(), so mention that as well.
which all take "parent" parameters and allow to insert items in a
tree. We don't have channel or vectors trees (yet) but API symmetry is
more important here than a currently useless parameter.
Initially contains antialias, feather and feather radius for the
upcoming gimp-item-to-selection preocedure. Keeping states in the
context reduces the number of parameters of procedures, and both the
state API and the API using the states can be changed/deprecated
independently. Make sure that all procedures and all plug-ins get
GimpPDBContexts instead of plain GimpContexts passed.
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.
The item groups has all the duplicated functionality from drawable
and vectors (name, visible, linked etc).
Hijack the unused GIMP_PDB_REGION and turn it into GIMP_PDB_ITEM;
change all protocol aware files accordingly and bump the protocol
version number. Change script-fu to handle the new type.
Add "image" parameter to gimp_pdb_item_is_attached() and if non-NULL,
make sure the item is attached to that image, and not only attached to
any image. Change wrappers to pass an image where it makes sense.
Fix totally broken value ranges of integer PDB parameters. Magically,
the bug was affecting only exactly the two cases mentioned in above
bug report.
* tools/pdbgen/pdb.pl (arg_parse): return <, <=, > and >= literally
instead of applying a mapping that was originally meant for
generated C code that would e.g. transform "0 <= int32 < 10" into
"if (value < 0 || value >= 10) fail". This inversion of all
operators is now wrong because PDB parameters have been turned into
GParamSpecs which always need inclusive ranges as min and max
values.
* tools/pdbgen/pdbgen.pl (arrayexpand): generated array length type
specs must be "0 <= int32", not "0 < int32".
* tools/pdbgen/app.pl: when generating integer param specs, check if
the value range is specified in terms of < instead of <=, and
add/subtract 1, resuting in the inclusive range needed for integer
GParamSpecs.
* app/pdb/color-cmds.c: regenerated, fixing the two broken ranges
mentioned in the bug report.
Will enable it again when I fixed it properly, it's clearly a
non-trivial problem that needs some thinking. Disabled for now because
it causes crashes.
Use the new API whenever we want to determine the item's effective
lock state (whether we can write to the item's content or not). Use
gimp_item_get_lock_content() only in code that actually deals with
*this* item's locked state, which is only the PDB wrappers and GUI to
modify the flag on the item itself.
Begin to consider GimpObject::name as private and always use
gimp_object_get_name(). Change gimp_object_get_name() to take an
untyped pointer so we don't have to do so awfully many casts. There is
a runtime check for the type inside the function anyway.
"lock-content" will be separate from "is-group" soon, so add separate
checks for groups. Also remove some checks that were added to make
wrappers invokable even though the group appeared locked.
New function returns FALSE and sets an appropriate error if invoked on
a group item. Use it from gimp_pdb_get_vectors_stroke() because if we
ever get vectors groups, they will have no strokes.
Flipping horizontally and vertically as well as rotating by multiples
of 90° works fine now for group layers, enable it even though they
appear locked. It seems that group == locked idea is not as allmighty
as i thought :(
* app/pdb/gimppdb-utils.[ch]: add "gboolean writable" to
gimp_pdb_layer_is_text_layer() because that's called on
all text layers anyway.
* tools/pdbgen/pdb/text_layer.pdb
* tools/pdbgen/pdb/vectors.pdb: pass TRUE if we want to modify the layer.
* app/pdb/text-layer-cmds.c
* app/pdb/vectors-cmds.c: regenerated.
* app/pdb/gimppdb-utils.[ch]: add "gboolean writable" parameter to
gimp_pdb_item_is_attached() because this function is called on
almost all items where a check for locked is needed.
* tools/pdbgen/pdb/*.pdb: pass writable = TRUE in all checks for items
that are modified. Add explicit calls to gimp_pdb_item_is_writable()
in some rare cases.
* app/pdb/*-cmds.c: regenerated.
Add support for having obsolete data resources. An obsolete resource
is not shown in the UI or managed in any way, but it will be
considered when plug-ins requests resources. This in order to maintain
backwards compatibility for plug-ins.
* app/core/gimpimage.[ch]: make the parent parameter public in
add_layer(), add_layers(), add_channel() and add_vectors().
* app/vectors/gimpvectors-import.[ch]: add parent parameters to
the vectors import functions.
* app/core/gimpchannelundo.[ch]
* app/core/gimplayerundo.[ch]
* app/vectors/gimpvectorsundo.[ch]
* app/core/gimpimage-undo-push.[ch]: remember the parent item when
removing layers, channels and vectors.
* app/actions/channels-commands.c
* app/actions/debug-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/dialogs/file-open-dialog.c
* app/display/gimpdisplayshell-dnd.c
* app/text/gimptext-compat.c
* app/tools/gimptexttool.c
* app/tools/gimpvectortool.c
* app/widgets/gimptoolbox-dnd.c
* app/xcf/xcf-load.c
* tools/pdbgen/pdb/image.pdb
* tools/pdbgen/pdb/paths.pdb
* tools/pdbgen/pdb/vectors.pdb: pass NULL as parent item to above
functions and add FIXMEs all over the place because there is some
more hacking needed to make adding with index = -1 (on top of the
current item) work again.
* app/pdb/image-cmds.c
* app/pdb/paths-cmds.c
* app/pdb/vectors-cmds.c: regenerated.
* app/core/gimpimage-duplicate.c: duplicate the original image's
tree structure in the copy.
* app/widgets/gimpitemtreeview.[ch]: add parent to GimpAddItemFunc,
add utility function gimp_item_tree_view_get_drop_index() which
figures where to add something dropped to an item tree.
* app/widgets/gimpchanneltreeview.c
* app/widgets/gimplayertreeview.c
* app/widgets/gimpvectorstreeview.c: changed accordingly, using above
new GimpItemTreeView API.
2009-03-31 Sven Neumann <sven@gimp.org>
Bug 568479 – add PDB procedures to manipulate size of text box
* tools/pdbgen/pdb/text_layer.pdb: add gimp-text-layer-resize,
based on a patch from Barak Itkin.
* app/pdb/internal-procs.c
* app/pdb/text-layer-cmds.c
* libgimp/gimptextlayer_pdb.[ch]: regenerated.
svn path=/trunk/; revision=28235
2009-03-04 Sven Neumann <sven@gimp.org>
Bug 574149 – Can't get name/filename of files loaded from URI
* tools/pdbgen/pdb/image.pdb: added new procedure
gimp-image-get-uri.
* app/pdb/image-cmds.c
* libgimp/gimpimage_pdb.c: regenerated.
* plug-ins/pygimp/pygimp-image.c: wrap the new procedure into an
Image attribute.
svn path=/trunk/; revision=28103
2009-03-04 Sven Neumann <sven@gimp.org>
Bug 574149 – Can't get name/filename of files loaded from URI
* tools/pdbgen/pdb/image.pdb (image_get_name_invoker): use
gimp_image_get_display_name().
* app/pdb/image-cmds.c
* libgimp/gimpimage_pdb.c: regenerated.
svn path=/trunk/; revision=28099
2009-01-28 Sven Neumann <sven@gimp.org>
* app/pdb/gimpprocedure.c (gimp_procedure_execute): don't set an
error if the procedure was cancelled.
svn path=/trunk/; revision=27967
* app/pdb/gimpprocedure.[ch] (gimp_procedure_create_override): New
helper function that creates a new GimpProcedure that can be used
to override an existing procedure.
svn path=/trunk/; revision=27950
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-04 Sven Neumann <sven@gimp.org>
* tools/pdbgen/pdb/convert.pdb: fixed an error in the
documentation
of the gimp-image-convert-rgb procedure.
* app/pdb/convert-cmds.c
* libgimp/gimpconvert_pdb.c: regenerated.
svn path=/trunk/; revision=27758
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-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 Sven Neumann <sven@gimp.org>
Bug 559292 – SOTA Chrome cannot accept different textures
* app/pdb/gimppdb-utils.c (gimp_pdb_image_is_base_type)
(gimp_pdb_image_is_not_base_type): gimp_object_get_name() may
return NULL for images. Use gimp_image_get_uri() instead.
svn path=/trunk/; revision=27635
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 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-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-10-29 Sven Neumann <sven@gimp.org>
Bug 558451 – Cannot build GIMP using Sun CC on Solaris 2.8
* app/pdb/gimp-pdb-compat.c
* app/gegl/gimpoperationtilesink.c
* app/gegl/gimpoperationtilesource.c
* app/tools/gimpgegltool.c: applied patches from Eric Lamarque
fixing the build using Sun CC on Solaris.
svn path=/trunk/; revision=27467
2008-10-27 Sven Neumann <sven@gimp.org>
* libgimpbase/gimpbaseenums.[ch]: added new enum
GimpTextHintStyle.
* libgimp/gimpenums.c.tail
* tools/pdbgen/enums.pl: regenerated.
* app/text/gimptext.[ch]: added new property "hint-style".
Removed
"autohint" property and mapped the boolean property "hinting" to
the new enum property "hint-style".
* app/text/gimptextlayout-render.c
(gimp_text_layout_render_flags):
use "hint-style".
* app/tools/gimptextoptions.[ch]: changed tool options
accordingly.
* tools/pdbgen/pdb/text_layer.pdb: deprecated the "hinting" API
and introduced getters and setters for "hint-style".
* app/pdb/text-layer-cmds.c
* app/pdb/internal-procs.c
* libgimp/gimptextlayer_pdb.[ch]: regenerated.
svn path=/trunk/; revision=27432
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-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 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