Yes this is pretty lame, but we must prevent write access to these
items under all circumstances, and we have no other way but killing
the plug-in (it should not write to the drawable directly anyway)
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.
* app/plug-in/gimppluginprocedure.[ch]
(gimp_plug_in_procedure_get_sensitive): change GimpImageType
parameter to GimpDrawable and do the type check internally.
* app/actions/plug-in-actions.c (plug_in_actions_update): pass the
active drawable instead of its type.
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-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-10-23 Michael Natterer <mitch@gimp.org>
* app/plug-in/gimppluginprocframe.c
(gimp_plug_in_proc_frame_dispose): set proc_frame->procedure to
NULL *after* calling gimp_plug_in_cleanup(). Fixes the crash on
windows in bug #557061 (but not the bug).
svn path=/trunk/; revision=27376
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-06 Michael Natterer <mitch@gimp.org>
* app/plug-in/plug-in-menu-path.c (menu_path_mappings): add a
fallback mapping from <Toolbox> to <Image> so we catch really
everything that wants to go to <Toolbox>.
svn path=/trunk/; revision=27147
2008-10-02 Michael Natterer <mitch@gimp.org>
* app/plug-in/gimppluginprocframe.c: keep a reference to the
proc_frame's procedure. We can't asume it's always there since it
could be a temporary one and its plug-in might die during
procedure execution, taking the temp_proc with it.
svn path=/trunk/; revision=27112
2008-10-01 Tor Lillqvist <tml@novell.com>
* app/plug-in/gimpplugin.c: Don't #define _GNU_SOURCE on Windows
as it confuses newest mingw headers.
svn path=/trunk/; revision=27096
2008-09-18 Tor Lillqvist <tml@novell.com>
* app/plug-in/gimppluginshm.c: Use INVALID_HANDLE_VALUE instead of
INVALID_FILE_HANDLE which was an misunderstanding.
svn path=/trunk/; revision=26989
2008-09-05 Michael Natterer <mitch@gimp.org>
* app/plug-in/gimpplugindebug.[ch] (gimp_plug_in_debug_argv): made
the "args" parameter const.
* app/plug-in/gimpplugin.c (gimp_plug_in_open): made some strings
const.
svn path=/trunk/; revision=26877
2008-09-02 Sven Neumann <sven@gimp.org>
* app/plug-in/gimppluginshm.c: if INVALID_FILE_HANDLE is
undefined,
define it as the constant that we used to use here.
svn path=/trunk/; revision=26839
2008-09-01 Sven Neumann <sven@gimp.org>
* app/plug-in/gimppluginshm.c (gimp_plug_in_shm_new): use the
constant INVALID_FILE_HANDLE instead of 0xFFFFFFFF. Fixes shared
memory tile transport on 64bit Windows systems.
svn path=/trunk/; revision=26827
2008-08-21 Sven Neumann <sven@gimp.org>
* app/plug-in/gimppluginprocedure.[ch]
* app/plug-in/gimptemporaryprocedure.c: moved error handling for
asynchronous procedure calls to a central place. Use the plug-in
label instead of the procedure name for the error message.
svn path=/trunk/; revision=26703
2008-08-21 Sven Neumann <sven@gimp.org>
* app/plug-in/gimppluginprocedure.c
* app/plug-in/gimptemporaryprocedure.c: don't just free the
return
values when running procedures asynchronously. Instead examine
them and display the error message if there's one.
* app/plug-in/gimppluginmanager-call.c
(gimp_plug_in_manager_call_run_temp): return NULL if
procedure->plug_in is not set.
* app/plug-in/gimpplugin-message.c: comment.
svn path=/trunk/; revision=26700
2008-08-19 Michael Natterer <mitch@gimp.org>
* app/plug-in/gimpplugin.[ch] (struct GimpPlugIn)
* app/plug-in/gimppluginprocframe.[ch] (struct GimpPlugInProcFrame):
move the error_handler from the plug-in to the proc-frame.
* app/plug-in/gimppluginprocframe.c
* app/plug-in/gimpplugin-message.c: changed accordingly.
svn path=/trunk/; revision=26661
2008-08-19 Sven Neumann <sven@gimp.org>
Complements the fix for bug #344818:
* libgimpbase/gimpbaseenums.[ch]: added new enum
GimpPDBErrorHandler.
* tools/pdbgen/enums.pl: regenerated.
* app/plug-in/gimpplugin.[ch]: added error_handler to
GimpPlugIn.
* app/plug-in/gimpplugin-message.c
(gimp_plug_in_handle_proc_run):
only display an error message for a failed procedure call if the
plug-in's error-handler is set to
GIMP_PDB_ERROR_HANDLER_INTERNAL.
* tools/pdbgen/pdb/plug_in.pdb: added PDB getter and setter for
the plug-in's error-handler.
* app/pdb/plug-in-cmds.c
* app/pdb/internal-procs.c
* libgimp/gimpenums.c.tail
* libgimp/gimpplugin_pdb.[ch]: regenerated.
* plug-ins/common/file-compressor.c
* plug-ins/file-uri/uri.c: set the error-handler to
GIMP_PDB_ERROR_HANDLER_PLUGIN as these plug-ins are forwarding
the
error with their return values.
svn path=/trunk/; revision=26656
2008-08-17 Sven Neumann <sven@gimp.org>
* app/plug-in/gimpplugin-progress.c
(gimp_plug_in_progress_cancel_callback): introduced a utility
function to reduce code duplication.
* app/pdb/gimppdb.c (gimp_pdb_execute_procedure_by_name):
changed
to use g_error_new_literal().
svn path=/trunk/; revision=26616
2008-08-16 Sven Neumann <sven@gimp.org>
* app/plug-in/gimpplugin-message.c
(gimp_plug_in_handle_proc_run):
removed the term 'PDB' from the user-visible error messages.
svn path=/trunk/; revision=26601
2008-08-16 Sven Neumann <sven@gimp.org>
If a procedure call fails, pass a string describing the error as
the second return value. First step towars fixing bug #344818.
* app/pdb/gimpprocedure.[ch] (gimp_procedure_get_return_values):
added a GError parameter. If it is set, pass the error message
to
the return values.
* app/pdb/gimppdberror.h: added some more error codes.
* app/pdb/gimppdb.c
* app/xcf/xcf.c: pass errors to
gimp_procedure_get_return_values().
* app/plug-in/gimpplugin-message.c
(gimp_plug_in_handle_proc_run):
show a different error message for execution vs. calling errors.
* app/plug-in/gimpplugin-progress.c
(gimp_plug_in_progress_cancel_callback): pass the error
GIMP_PDB_CANCELLED to gimp_procedure_get_return_values().
* app/plug-in/gimppluginmanager-call.[ch]
(gimp_plug_in_manager_call_run): removed the
'destroy_return_vals'
parameter.
* app/plug-in/gimppluginprocedure.c: destroy the return values
here.
* app/plug-in/gimppluginprocframe.c: pass an error to
gimp_procedure_get_return_values().
* tools/pdbgen/app.pl
* tools/pdbgen/pdb/fileops.pdb: generate code that passes the
error to gimp_procedure_get_return_values().
* app/pdb/*-cmds.c: regenerated.
* plug-ins/pygimp/pygimp-pdb.c: extract the error message from
the
return values and pass it to the exception that is thrown.
svn path=/trunk/; revision=26593
2008-08-14 Sven Neumann <sven@gimp.org>
* app/plug-in/gimpplugin-message.c
(gimp_plug_in_handle_proc_run):
use G_STRFUNC in another error message that I missed earlier.
svn path=/trunk/; revision=26570
2008-08-14 Sven Neumann <sven@gimp.org>
* app/plug-in/gimpplugin-message.c
(gimp_plug_in_handle_tile_get):
use G_STRFUNC to get the proper function name in the error
message.
svn path=/trunk/; revision=26564
2008-07-14 Sven Neumann <sven@gimp.org>
Add new PDB data type PDB_COLORARRAY for using arrays of GimpRGB
colors as argument or return value.
* libgimpbase/gimpbaseenums.[ch] (enum GimpPDBArgType): replaced
the unused GIMP_PDB_BOUNDARY with GIMP_PDB_COLORARRAY.
* libgimpbase/gimpprotocol.h: increased GIMP_PROTOCOL_VERSION.
(struct _GPParam): added d_colorarray entry to the union.
* libgimpbase/gimpprotocol.c
* libgimp/gimp.[ch]
* app/pdb/gimp-pdb-compat.c
* app/plug-in/plug-in-params.c
* app/plug-in/gimpplugin-message.c
* tools/pdbgen/pdb.pl: deal with the new data type.
* tools/pdbgen/enums.pl: regenerated.
* plug-ins/pygimp/pygimp-pdb.c
* plug-ins/script-fu/scheme-wrapper.c: handle the new data type.
svn path=/trunk/; revision=26189
2008-06-12 Michael Natterer <mitch@gimp.org>
* app/plug-in/plug-in-menu-path.c (menu_path_mappings): also map
<Toolbox>/File/Acquire to <Image>/File/New/Acquire.
svn path=/trunk/; revision=25935
2008-05-06 Michael Natterer <mitch@gimp.org>
* app/plug-in/gimpplugin-message.c: split
gimp_plug_in_handle_tile_request() into two functions:
gimp_plug_in_handle_tile_put() and gimp_plug_in_handle_tile_get().
svn path=/trunk/; revision=25578
2008-05-06 Michael Natterer <mitch@gimp.org>
* app/plug-in/gimpplugin-message.c
(gimp_plug_in_handle_proc_install): show an error message instead
of crashing when a plug-in registers a prodecure with a NULL
argument or return value name. Also introduce two macros which
make the utf-8 validation of all strings much more readable.
svn path=/trunk/; revision=25577
2008-04-21 Michael Natterer <mitch@gimp.org>
* app/plug-in/gimpplugin-cleanup.c: do the actual cleanup in
utility functions and reduce gimp_plug_in_cleanup() to merely
iterating the cleanup lists.
svn path=/trunk/; revision=25511
2008-04-21 Michael Natterer <mitch@gimp.org>
Move the shadow tiles from the image to the drawable.
Fixes bug #100469.
* app/core/Makefile.am
* app/core/gimpdrawable-shadow.[ch]: new files implementing
the shadow tiles.
* app/core/gimpimage.[ch]: remove the shadow tile manager from the
GimpImage struct. Remove gimp_image_get_shadow_tiles() and
_free_shadow_tiles().
* app/core/gimpdrawable.[ch]: add the shadow tile manager
here. Remove get_shadow_tiles() and merge_shadow(). Free the
shadow tiles in finalize and when the drawable gets removed from
the image.
* 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-equalize.c
* app/core/gimpdrawable-hue-saturation.c
* app/core/gimpdrawable-invert.c
* app/core/gimpdrawable-levels.c
* app/core/gimpdrawable-operation.c
* app/core/gimpdrawable-posterize.c
* app/core/gimpdrawable-threshold.c
* app/core/gimpimagemap.c: changed accordingly. Free the shadow tiles
after using them.
* app/plug-in/gimpplugin-cleanup.[ch]: add
gimp_plug_in_cleanup_add_shadow() and _remove_shadow() which keep
track of whether shadow tiles were created on behalf of a plug-in
procedure.
(gimp_plug_in_cleanup): free shadow tiles which were created but
not destroyed by a plug-in procedure.
* app/plug-in/gimpplugin-message.c (plug_in_handle_tile_request):
call gimp_plug_in_cleanup_add_shadow() whenever a plug-in requests
shadow tiles.
* tools/pdbgen/pdb/drawable.pdb: use the new drawable shadow
API. Add new procedure gimp-drawable-free-shadow. Call
gimp_plug_in_cleaup_remove_shadow() when it gets called.
* tools/pdbgen/pdb/image.pdb: deprecate gimp-image-free-shadow.
Calling it has no effect any longer.
* app/pdb/drawable-cmds.c
* app/pdb/image-cmds.c
* app/pdb/internal-procs.c
* libgimp/gimpimage_pdb.[ch]
* libgimp/gimpdrawable_pdb.[ch]: regenerated.
svn path=/trunk/; revision=25510
2008-04-17 Michael Natterer <mitch@gimp.org>
Add some infrastructure that will be used soon:
* app/plug-in/gimppluginprocframe.[ch]: replace "cleanup" list
by two lists "image_cleanups" and "item_cleanups" and call
gimp_plug_in_cleanup() if any of them is non-NULL.
* app/plug-in/gimpplugin-cleanup.c: add private new() and free()
functions for GimpPlugInCleanupImage structs and add the same
infrastructure for GimpPlugInCleanupItem structs which are
currently unused.
svn path=/trunk/; revision=25497
2008-04-14 Michael Natterer <mitch@gimp.org>
* app/plug-in/gimpplugin-message.c (gimp_plug_in_handle_tile_req):
made messages about killed plug-ins due to invalid tile requests
more verbose. They are good for debugging only and not translated,
so more info can't hurt. Also fail (kill the plug-in) if a tile is
requested that lives on the undo stack.
svn path=/trunk/; revision=25487