More than 2000 lines of code less in app/, instead of
if (instance->member)
{
g_object_unref/g_free/g_whatever (instance->member);
instance->member = NULL;
}
we now simply use
g_clear_object/pointer (&instance->member);
- don't include <gdk-pixbuf/gdk-pixbuf.h> in headers in app/
- instead, include it in many .c files instead of <glib-object.h>,
finally acknowledging the fact that app/ depends on gdk-pixbuf almost
globally
- fix up includes as if libgimpbase depended in GIO, which it soon will
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.
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-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-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-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-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-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-03-28 Mukund Sivaraman <muks@mukund.org>
Fixes for some Sparse reported issues in app/
* app/core/gimpdrawable-operation.c: Added prototype for
gegl_node_add_child().
* app/core/gimpcurve.c: Remove C99 code
* app/tools/gimpcurvestool.c
* app/tools/gimpperspectiveclonetool.c
* app/vectors/gimpstroke.c: Mark functions as static.
* app/base/siox.c: state is a pointer.
* app/plug-in/gimppluginprocframe.c: values is a pointer.
* app/plug-in/plug-in-rc.c: plug_in_rc_parse() returns a pointer.
* app/plug-in/gimpinterpreterdb.c: Check program[0] for '\0'
instead of the pointer program itself.
svn path=/trunk/; revision=25292
2007-03-16 Michael Natterer <mitch@gimp.org>
* app/plug-in/gimppluginprocframe.c
(gimp_plug_in_proc_frame_get_return_vals): don't just g_free() the
GValueArray after we memcpy()-stole its values because this both
leaks the contained array of GValues and crashes with glib trunk
where GValueArray is slice-allocated. Instead, free the array of
GValues manually, set it to NULL and use g_value_array_free().
svn path=/trunk/; revision=22134
2007-03-16 Michael Natterer <mitch@gimp.org>
Fix stuck progress bars (bug #393832):
* app/plug-in/gimpplugin-progress.[ch] (gimp_plug_in_progress_end):
added PlugInProcFrame parameter instead of blindly using the topmost
in the procedure stack...
* app/plug-in/gimppluginprocframe.c
(gimp_plug_in_proc_frame_dispose): ...because we call it from here,
when the proc_frame is already removed from the procedure stack.
Unrelated:
* plug-ins/script-fu/scripts/difference-clouds.scm: use
RUN-INTERACTVE instead of 0, added (gimp-displays-flush)
* plug-ins/common/snoise.c (solid_noide): update the progress to
1.0 after rendering.
svn path=/trunk/; revision=22131
2006-11-02 Michael Natterer <mitch@gimp.org>
Don't let each terminating plug-in procedure end its progress,
because that progress may still be in use by another plug-in.
* app/plug-in/gimpplugin-progress.[ch]
(gimp_plug_in_progress_attach)
(gimp_plug_in_progress_detach): new functions which maintain
a simple attach count for a GimpProgress
* app/plug-in/gimpplugin-progress.c
* app/plug-in/gimppluginprocframe.c: call attach() when setting
proc_frame->progress. Call detach() in gimp_plug_in_progress_end()
and only call gimp_progress_end() if detaching lowered the attach
count to 0.
2006-11-01 Michael Natterer <mitch@gimp.org>
* app/plug-in/gimppluginprocframe.c
(gimp_plug_in_proc_frame_get_return_vals): no need to truncate the
GValueArray if the plug-in returned too much values, simply return
all values instead.
2006-10-25 Michael Natterer <mitch@gimp.org>
Added mechanism that should prevent undo corruption by
broken plug-ins and scripts. Work in progress.
* app/plug-in/Makefile.am
* app/plug-in/gimpplugin-cleanup.[ch]: new files that (for now)
keep track of the undo groups plug-in procedures open and close,
and can fix an image's undo group state after a plug-in messed.
* app/plug-in/gimppluginprocframe.h (struct GimpPlugInProcFrame):
keep a list of plug-in cleanup structs.
* app/plug-in/gimppluginprocframe.c
(gimp_plug_in_proc_frame_dispose): call gimp_plug_in_cleanup() if
the list is not empty.
* tools/pdbgen/pdb/undo.pdb: keep track of undo groups using
the new gimp_plug_in_cleanup_undo_group_start() and _end()
functions. Fail if any of the functions returns FALSE.
* app/pdb/undo_cmds.c: regenerated.
2006-05-03 Michael Natterer <mitch@gimp.org>
Made an object out of the plug-in struct. Also change refcounting
considerably:
- gimp_plug_in_open() adds a reference that is only dropped by
gimp_plug_in_close().
- temporarily ref the plug-in while handling messages.
- remporarily ref the plug-in while a recursive main loop is
running.
- each caller of gimp_plug_in_new() also unrefs the plug-in before
returning, the only reference that persists across functions
(that keeps the plug-in alive) is the one added by open().
* app/plug-in/plug-in.[ch]
* app/plug-in/plug-in-context.[ch]
* app/plug-in/plug-in-message.[ch]
* app/plug-in/plug-in-progress.[ch]: removed these files...
* app/plug-in/gimpplugin.[ch]
* app/plug-in/gimpplugin-context.[ch]
* app/plug-in/gimpplugin-message.[ch]
* app/plug-in/gimpplugin-progress.[ch]: ...and added here as GObject.
* app/plug-in/plug-in-proc-frame.[ch]: removed...
* app/plug-in/gimppluginprocframe.[ch]: ...and added with a namespace.
* app/plug-in/Makefile.am
* app/plug-in/plug-in-types.h
* app/plug-in/gimppluginmanager-call.c
* app/plug-in/gimppluginmanager-file.c
* app/plug-in/gimppluginmanager.[ch]
* app/pdb/gimppluginprocedure.c
* app/pdb/gimptemporaryprocedure.c
* app/pdb/gimptemporaryprocedure.h
* tools/pdbgen/pdb/context.pdb
* tools/pdbgen/pdb/drawable.pdb
* tools/pdbgen/pdb/help.pdb
* tools/pdbgen/pdb/message.pdb
* tools/pdbgen/pdb/plug_in.pdb
* tools/pdbgen/pdb/progress.pdb
* tools/pdbgen/pdb/undo.pdb: changed accordingly.
* app/pdb/context_cmds.c
* app/pdb/drawable_cmds.c
* app/pdb/help_cmds.c
* app/pdb/message_cmds.c
* app/pdb/plug_in_cmds.c
* app/pdb/progress_cmds.c
* app/pdb/undo_cmds.c: regenerated.
2006-04-05 Michael Natterer <mitch@gimp.org>
* app/plug-in/plug-in-proc-frame.[ch]: added
plug_in_proc_frame_get_return_vals().
* app/plug-in/plug-in-run.c: removed plug_in_get_return_vals()
and call plug_in_proc_frame_get_return_vals() instead.
Don't leak stuff in case calling the plug-in fails.
2004-12-14 Michael Natterer <mitch@gimp.org>
* app/plug-in/plug-in-proc-frame.[ch]: added "gint ref_count" to
the PlugInProcFrame struct. Added new functions
plug_in_proc_frame_ref/unref().
(plug_in_proc_frame_new): set the ref_count to 1.
* app/plug-in/plug-in.[ch] (plug_in_proc_frame_push): return the
new proc_frame.
(plug_in_proc_frame_pop): use unref() instead of free().
* app/plug-in/plug-in-run.c (plug_in_temp_run): ref the proc_frame
while running its main loop. Removed the call to
plug_in_proc_frame_pop().
* app/plug-in/plug-in-message.c (plug_in_handle_temp_proc_return):
call plug_in_proc_frame_pop() immediately after
plug_in_main_loop_quit() so the proc_frame goes away from the
stack and can't be used accidentially if the core is too busy to
return to the main loop before the next command arrives on the
wire. Really fixes bug #161114 this time.
2004-09-22 Michael Natterer <mitch@gimp.org>
* app/plug-in/plug-in-proc-frame.[ch] (plug_in_proc_frame_init):
removed assertion about proc_rec != NULL because that happens
when query()ing and init()int plug-ins.
Replaced "context" by "main_context" plus "context_stack".
* app/plug-in/plug-in-context.c: implement plug_in_context_push()
and plug_in_context_pop().
* app/plug-in/plug-in-message.c
* app/plug-in/plug-in-progress.c: changed accordingly.
* tools/pdbgen/pdb/context.pdb: use the return values of
plug_in_context_push() and _pop().
* app/pdb/context_cmds.c: regenerated.
* plug-ins/script-fu/scripts/test-sphere.scm: use
gimp-context-push and gimp-context-pop instead of remembering the
old values for FG, BG etc.
2004-09-22 Michael Natterer <mitch@gimp.org>
* app/plug-in/Makefile.am
* app/plug-in/plug-in-proc-frame.[ch]: new files containing
utility functions for initializing/freeing PlugInProcFrames.
Added the progress stuff to the proc_frame.
* app/plug-in/plug-in.[ch]: removed the progress stuff from the
PlugIn struct and use the new proc_frame utility functions.
* app/plug-in/plug-in-message.c
* app/plug-in/plug-in-progress.c
* app/plug-in/plug-in-run.c: changed accordingly.