2006-06-01 Sven Neumann <sven@gimp.org>
Added basic framework for plug-ins to access the use_cpu_accel
configuration (bug #342860):
* app/composite/gimp-composite.[ch]: added new function
gimp_composite_use_cpu_accel().
* libgimpbase/gimpprotocol.[ch]: added use_cpu_accel to the config
message.
* app/plug-in/gimppluginmanager-call.c: pass the return value of
gimp_composite_use_cpu_accel() for config.use_cpu_accel.
* libgimp/gimp.[ch]: make the config value accessible by means of
a new function gimp_use_cpu_accel().
* libgimp/gimp.def: updated.
2006-05-16 Sven Neumann <sven@gimp.org>
* app/app_procs.c (app_run): indentation.
* app/core/gimp.c (gimp_real_initialize)
* app/plug-in/gimppluginmanager.c (gimp_plug_in_manager_restore):
moved a call to status_callback() to the plug-in manager.
2006-05-13 Hans Breuer <hans@breuer.org>
* **/makefile.msc app/gimpcore.def : updated
* app/core/gimp-util.c : dont include "config/gimpbaseconfig.c", it
gives an redefinition error with msvc. Instead include
config/gimpbaseconfig.h and libgimpconfig/gimpconfig-path.h
* plug-ins/common/psd_save.c : fix c99isms (declarations only at the
start of a block)
2006-05-05 Michael Natterer <mitch@gimp.org>
* app/plug-in/gimppluginmanager.[ch]: added signals
"plug-in-opened" and "plug-in-closed". Added functions
gimp_plug_in_manager_add_open_plug_in() and _remove_open_plugin()
which maintain the list of open plug-ins and emit the signals.
* app/plug-in/gimpplugin.c (gimp_plug_in_open)
(gimp_plug_in_close): don't touch manager->open_plug_ins and don't
ref/unref the plug-in. Call above new functions instead. Don't
call gimp_pdb_dialogs_check().
* app/core/gimp-gui.[ch]
* app/gui/gui-vtable.c: removed gimp_pdb_dialogs_check().
* app/widgets/gimppdbdialog.[ch]: removed
gimp_pdb_dialogs_check_callback() and connect to the
plug-in-manager's "plug-in-closed" signal instead.
2006-05-04 Michael Natterer <mitch@gimp.org>
* app/plug-in/gimppluginshm.c: cleaned up a bit.
(gimp_plug_in_shm_new): return NULL if anything goes wrong,
instead of a GimpPlugInShm structure that contains no shm (we
don't need multiple cases of "there is no shm"),
* app/plug-in/gimppluginmanager.[ch]
(gimp_plug_in_manager_get_shm_ID)
(gimp_plug_in_manager_get_shm_addr): removed these functions.
* app/plug-in/gimppluginmanager-call.c (gimp_plug_in_manager_call_run)
* app/plug-in/gimpplugin-message.c (gimp_plug_in_handle_tile_req):
get the shm ID and addr directly from manager->shm if it exists,
use -1 and NULL otherwise.
Unrelated:
* app/plug-in/gimppluginmanager.c: move most stuff from
gimp_plug_in_manager_exit() to gimp_plug_in_manager_finalize().
Simplify plug-in killing in _exit().
2006-05-04 Michael Natterer <mitch@gimp.org>
* app/plug-in/gimpplugin.[ch] (struct GimpPlugIn): remove member
"name" and unused cruft "ref_count". Reordered other members a bit.
(gimp_plug_in_new): set GimpObject's name to
g_filename_display_basename(path) instead.
Use GimpObject's name instead of plug_in->name for error messages
and pass the full path to gimp_plug_in_debug_argv()
* app/plug-in/gimpplugindebug.c (gimp_plug_in_debug_argv): extract
the path's basename ourselves.
* app/plug-in/gimpplugin-message.c: GimpObject's name for
error messages.
2006-05-04 Michael Natterer <mitch@gimp.org>
* app/core/gimpparamspecs.c (gimp_string_array_new)
(gimp_param_string_array_validate): restore the strict checks
on string arrays.
* app/plug-in/gimppluginmanager-help-domain.c
(gimp_plug_in_manager_get_help_domains): return NULL string arrays
when there are 0 help domains to fix the inconsistency at its root.
2006-05-04 Michael Natterer <mitch@gimp.org>
* app/plug-in/gimpplugin.c
* app/plug-in/gimppluginmanager-call.c: use the right procedure
types in calls to gimp_plug_in_proc_frame_foo().
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-29 Michael Natterer <mitch@gimp.org>
* app/plug-in/plug-in.[ch]: removed plug_in_push() and
plug_in_pop()...
* app/plug-in/gimppluginmanager.[ch]: ...and added them here as
gimp_plug_in_manager_plug_in_push() and _pop()
* app/plug-in/plug-in-message.c (plug_in_handle_proc_run): changed
accordingly.
* app/plug-in/plug-in.c (plug_in_close): removed an unused
variable, moved another one to a local scope.
* app/plug-in/plug-in.h: indentation.
2006-04-29 Michael Natterer <mitch@gimp.org>
* app/plug-in/gimppluginmanager-locale-domain.c
(gimp_plug_in_manager_get_locale_domains): NULL-terminate string
arrays here too, so they can be freed with g_strfreev() (even
though they currently aren't).
* app/widgets/gimphelp.c: set the plug-in arguments
correctly. Fixes warnings and makes help work again.
2006-04-29 Tor Lillqvist <tml@novell.com>
* app/plug-in/gimppluginmanager-locale-domain.c
(gimp_plug_in_manager_get_locale_domains): NULL-terminate the
locale_domains and locale_paths string vectors, as they are freed
with g_strfreev() in gimp_plug_in_manager_restore().
2006-04-29 Tor Lillqvist <tml@novell.com>
* app/plug-in/plug-in.c (plug_in_close): Make it compile again on
Win32. Use g_usleep() instead of select()/Sleep() Unix/Windows
ifdef.
2006-04-27 Michael Natterer <mitch@gimp.org>
* app/plug-in/plug-in-locale-domain.[ch] (plug_in_locale_domains):
new function which returns string arrays of all registered locale
domains and paths.
(plug_in_standard_locale_domain): removed this function. The
standard plug-in domain is included in the domains returned by
plug_in_locale_domains().
* app/plug-in/plug-ins.c (plug_ins_init): simply bind the text
domains here instead of calling gimp_menus_init(). Destroy
gimp->plug_in_defs much earlier.
* app/core/gimp-gui.[ch]
* app/gui/gui-vtable.c: removed gimp_menus_init().
* app/menus/plug-in-menus.[ch]: removed plug_in_menus_init(),
binding text domains is completely done in the core now.
2006-04-27 Michael Natterer <mitch@gimp.org>
Added some signals inspired by Rockwalrus' libpdb:
* app/pdb/gimppdb.[ch]: added signals "register-procedure" and
"unregister-procedure".
* app/pdb/gimppluginprocedure.[ch]: added signal "menu-path-added".
* app/actions/plug-in-actions.[ch]
* app/menus/plug-in-menus.[ch]: connect to the new signals and
create/destroy plug-in actions and menus accordingly. Made all
needed functions private and merged some of them with the newly
added signal callbacks.
* app/core/gimp-gui.[ch]
* app/gui/gui-vtable.c: removed gimp_menus_create_item() and
gimp_menus_delete_item() and all related stuff.
* app/plug-in/plug-in.c
* app/plug-in/plug-ins.c: removed calls to the removed functions.
* app/plug-in/plug-ins.c (plug_ins_init): add the plug-in
procedures to the PDB *after* calling gimp_menus_init() so their
locale domains are properly initialized when the menus are
created.
2006-04-26 Michael Natterer <mitch@gimp.org>
* app/pdb/Makefile.am
* app/pdb/pdb-types.h
* app/pdb/gimppdb.[ch]: new object GimpPDB which keeps all
procedures and functions to register and run them. Renamed all
functions and did some cleanups.
* app/pdb/gimp-pdb.[ch]
* app/core/gimp.[ch]: removed the same stuff here.
* app/pdb/gimp-pdb-query.[ch]: removed these files...
* app/pdb/gimppdb-query.[ch]: ...added here as members of GimpPDB.
* app/pdb/gimp-pdb-compat.h: fix include guard.
* app/batch.c
* app/actions/vectors-commands.c
* app/dialogs/about-dialog.c
* app/file/file-open.c
* app/file/file-save.c
* app/plug-in/plug-in-message.c
* app/plug-in/plug-ins.c
* app/widgets/gimpfiledialog.c
* app/widgets/gimphelp.c
* app/xcf/xcf.c
* tools/pdbgen/pdb/brush_select.pdb
* tools/pdbgen/pdb/fileops.pdb
* tools/pdbgen/pdb/font_select.pdb
* tools/pdbgen/pdb/gradient_select.pdb
* tools/pdbgen/pdb/palette_select.pdb
* tools/pdbgen/pdb/pattern_select.pdb
* tools/pdbgen/pdb/procedural_db.pdb: changed includes and function
calls accordingly.
* tools/pdbgen/app.pl: pass around GimpPDB instead of Gimp
pointers to register the internal procedures with. Changed some
newlines in the generated code.
* app/pdb/*_cmds.c
* app/pdb/internal_procs.[ch]: regenerated.
* app/core/gimppdbprogress.[ch]
* app/widgets/gimppdbdialog.[ch]: added "pdb" CONSTRUCT_ONLY
properties.
* app/plug-in/plug-in-progress.c
* app/gui/gui-vtable.c: pass gimp->pdb when creating them.
* app/widgets/gimpbrushselect.c
* app/widgets/gimpfontselect.c
* app/widgets/gimpgradientselect.c
* app/widgets/gimppaletteselect.c
* app/widgets/gimppatternselect.c: use the new local pdb pointers
instead of some foo->bar->gimp->pdb overkill.
2006-04-15 Michael Natterer <mitch@gimp.org>
* app/core/gimp-utils.[ch]: added
gimp_g_type_instance_get_memsize() and
gimp_g_param_spec_get_memsize().
Changed gimp_g_object_get_memsize() to use
gimp_g_type_instance_get_memsize().
Handle more boxed types in gimp_g_value_get_memsize().
* app/core/gimp.c (gimp_get_memsize): add the memsize of some
members that are new or were forgotten.
* app/pdb/gimpprocedure.c
* app/pdb/gimppluginprocedure.c: implement GimpObject::get_memsize().
2006-04-14 Manish Singh <yosh@gimp.org>
* app/plug-in/plug-in.h: Some compilers don't handle "'" in #error
directives well. Reword to not use a contraction.
2006-04-10 Michael Natterer <mitch@gimp.org>
* app/plug-in/plug-ins.c (plug_ins_add_to_db): don't iterate the
list of plug-in procedures here, take a GimpPlugInProcedure
argument instead.
(plug_ins_init): iterate the list here, just as all other lists
too. Renamed local "filename" variable to "pluginrc". Moved
"basename" to local scopes.
* tools/pdbgen/pdb/procedural_db.pdb: minor cleanup.
* app/pdb/procedural_db_cmds.c: regenerated.
2006-04-10 Michael Natterer <mitch@gimp.org>
* app/plug-in/plug-in-file.c: some cleanup.
(plug_in_file_register_load_handler)
(plug_in_file_register_save_handler): first check if we have the
procedure, then check its arguments, not the other way around
(using an additional lookup). Old weird code was needed because
these functions were split between app/plug-in and app/pdb.
* app/plug-in/plug-in-file.h: whitespace.
2006-04-10 Michael Natterer <mitch@gimp.org>
* app/plug-in/plug-ins.[ch]: removed the plug_ins_file_foo()
functions.
* tools/pdbgen/pdb/fileops.pdb: removed lots of load and save
handler register code.
* app/plug-in/Makefile.am
* app/plug-in/plug-in-file.[ch]: added everything in these new
files. Load and save handlers are installed with
plug_in_file_register_load_handler() and _save_handler() which
also check the passed file procedure's parameters.
* app/pdb/fileops_cmds.c: regenerated.
2006-04-09 Michael Natterer <mitch@gimp.org>
* app/plug-in/plug-ins.[ch]: remove plug_ins_add_internal() and
made plug_ins_procedure_insert() public as plug_ins_procedure_add().
There's no reason internal plug-ins should be treated differently.
* app/xcf/xcf.c: use plug_ins_procedure_add().
* app/plug-in/plug-ins-help.c: fix comment.
2006-04-09 Michael Natterer <mitch@gimp.org>
* app/plug-in/plug-in-params.[ch] (plug_in_params_destroy):
removed this function. We only have shallow GPParam arrays in the
core that can be freed with g_free(), and gp_params_destroy()
could always be used for freeing deep copies.
* app/plug-in/plug-in-message.c
* app/plug-in/plug-in-run.c: simply g_free() the GPParam arrays.
2006-04-09 Michael Natterer <mitch@gimp.org>
* app/plug-in/plug-in-params.[ch]: removed function
plug_in_proc_args_check().
* app/pdb/gimppluginprocedure.[ch]: added new function
gimp_plug_in_procedure_add_menu_path() which performs all menu
path checks that were in the function above and adds the new
menu_path to the procedure's list of menu_paths.
* app/plug-in/plug-in-message.c (plug_in_handle_proc_install)
* app/plug-in/plug-in.c (plug_in_menu_register): use the new
function and removed manual adding of the menu path to
proc->menu_paths.
2006-04-09 Michael Natterer <mitch@gimp.org>
* app/plug-in/plug-in-rc.[ch] (plug_in_rc_parse): return a GSList*
of PlugInDefs instead of a boolean. Don't return anything if any
parse error occurs (before, we trusted PlugInDefs from partially
broken files). Don't call plug_ins_def_add_from_rc() and don't
#include "plug-ins.h".
* app/plug-in/plug-ins.[ch]: made plug_ins_def_add_from_rc()
private and call it on all PlugInDefs returned by plug_in_rc_parse().
Renamed plug_ins_init_file() to plug_ins_add_from_file()
(plug_ins_init): remove code that checks for duplicate plug-in
procedures...
(plug_ins_procedure_insert): ... and add it where it belongs.
2006-04-09 Michael Natterer <mitch@gimp.org>
* app/xcf/xcf.c (xcf_init): don't register the XCF procedures
with the PDB here...
* app/plug-in/plug-ins.c (plug_ins_add_to_db): ... instead, don't
special case internal procedures here so they get registered along
with all other plug-in procedures.
2006-04-09 Michael Natterer <mitch@gimp.org>
* app/plug-in/plug-in-def.c (plug_in_def_set_mtime): set the mtime
of all the plug_in_def's procedures too.
* app/plug-in/plug-in-params.c: don't include "plug-in.h"
* app/plug-in/plug-in-rc.c: minor cleanup. Fixed one error
return value.
* app/plug-in/plug-in.c (plug_in_push): simply use g_slist_rmove(),
fiddling with list nodes manually is a questionable "optimization"
for removing the first list element.
* app/plug-in/plug-ins.c (plug_ins_init): some cleanup.
2006-04-07 Michael Natterer <mitch@gimp.org>
* app/plug-in/plug-in-message.c (plug_in_handle_proc_run)
(plug_in_handle_proc_return_priv): removed PlugInBlocked cruft,
it was probably unused since ages.
(plug_in_handle_proc_return_priv): removed...
(plug_in_handle_proc_return)
(plug_in_handle_temp_proc_return): ...and added its only remaining
function call here.
(plug_in_handle_tile_req): check if the requested drawable ID
is really a drawable (not a vectors or...)
(plug_in_handle_proc_install): cleanup.
2006-04-07 Michael Natterer <mitch@gimp.org>
* app/plug-in/plug-in-run.[ch]: made plug_in_run_temp() public and
changed its parameters to match the ones of plug_in_run().
* app/pdb/gimpprocedure.[ch]: added GimpProcedure::execute_async()
which takes an additional display_ID parameter and returns nothing.
* app/pdb/gimppluginprocedure.c
* app/pdb/gimptemporaryprocedure.c: implement it, using
plug_in_run() and plug_in_run_temp().
* app/core/gimp-utils.[ch]: added gimp_value_array_truncate()
which takes a GValueArray and the number of values to truncate the
array to.
* app/actions/plug-in-commands.c
* app/actions/vectors-commands.c
* app/pdb/gimp-pdb.c
* app/plug-in/plug-ins.c
* app/widgets/gimphelp.c: use gimp_procedure_execute_async()
instead of plug_in_run() and don't #include "plug-in-run.h".
Truncate GValueArray passed to plug-ins again, and don't just pass
some default values to the noninteractive args.
Unrelated:
* tools/pdbgen/pdb/plug_in.pdb: don't call
gimp_menus_create_branch() here.
* app/plug-in/plug-ins.c (plug_ins_menu_branch_add): call it here
instead.
* app/pdb/plug_in_cmds.c: regenerated.
2006-04-07 Sven Neumann <sven@gimp.org>
* app/core/gimpdrawable.[ch]: renamed gimp_drawable_data() to
gimp_drawable_get_tiles().
[lots of files]: changed accordingly.
2006-04-07 Michael Natterer <mitch@gimp.org>
* app/pdb/gimp-pdb.c (gimp_pdb_register)
(gimp_pdb_unregister): ref all registered procedures.
* app/xcf/xcf.c
* tools/pdbgen/app.pl: unref newly created procedures after
registering them.
* app/core/gimp.[ch]: renamed member "plug_in_proc_defs" to
"plug_in_procedures". Renamed "proc_def" variables to "procedure".
* app/actions/plug-in-actions.c
* app/menus/plug-in-menus.c: changed accordingly.
* app/plug-in/plug-ins.[ch]: keep a reference to all procs which
are in gimp->plug_in_procedures.
(plug_ins_exit): unref them all and free the list. Apparently we
were leaking them before on exit.
* app/plug-in/plug-in-def.[ch]: s/proc_defs/procedures/. Ref
procedures added with plug_in_def_add_procedure(). Added
plug_in_def_remove_procedure() which unrefs them again. Removed
"free_proc_defs" parameter from plug_in_def_free() and always
unref the procedures.
* app/plug-in/plug-in.[ch]: added plug_in_add_temp_proc() and
plug_in_remove_temp() proc. Ref the added procedures.
* app/plug-in/plug-in-message.c: use the new APIs instead of
adding/removing procs and temp procs from their lists manually.
Unref the newly created procedure after adding then to the
plug_in_def or plug_in.
* app/plug-in/plug-in-rc.[ch]
* app/plug-in/plug-ins-query.c
* tools/pdbgen/pdb/plug_in.pdb: changed accordingly.
* app/pdb/*_cmds.c: regenerated.
2006-04-06 Michael Natterer <mitch@gimp.org>
* app/plug-in/plug-in-run.[ch]: removed plug_in_repeat()...
* app/actions/plug-in-commands.c: ...and merged it into
plug_in_repeat_cmd_callback(). It's essentially the same code as
plug_in_run_cmd_callback() and there's no reason (except
historical ones) to keep its implementation separate.
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.
2006-04-05 Michael Natterer <mitch@gimp.org>
* app/plug-in/plug-in-message.c (plug_in_handle_proc_install):
don't canonicalize names of GParamSpecs, they do this themselves.
2006-04-05 Michael Natterer <mitch@gimp.org>
* app/plug-in/plug-in-types.h
* app/plug-in/plug-in-proc-def.[ch]: renamed to GimpPlugInProcedure
and made a GObject derived from GimpProcedure (instead of having
a pointer to a GimpProcedure). Added image_types and file_magic
utility functions taken from plug-ins.[ch]. Still lives in the
same crappy files because I am undecided where to put it...
* app/pdb/gimpprocedure.c (gimp_procedure_real_execute): removed
switch() statement and always call the internal marshaller because
GimpProcedure::execute() is properly overridden by
GimpPlugInProcedure now.
* app/plug-in/plug-ins.[ch]: removed the mime_type and file_magic
utilities added to GimpPlugInProcedure.
* app/actions/file-commands.c
* app/actions/plug-in-actions.[ch]
* app/actions/plug-in-commands.[ch]
* app/core/gimp-gui.[ch]
* app/core/gimp.[ch]
* app/core/gimpimage.[ch]
* app/dialogs/file-open-dialog.c
* app/dialogs/file-save-dialog.c
* app/dialogs/print-size-dialog.c
* app/file/file-open.[ch]
* app/file/file-save.[ch]
* app/file/file-utils.[ch]
* app/gui/gui-vtable.c
* app/menus/plug-in-menus.[ch]
* app/plug-in/plug-in-def.[ch]
* app/plug-in/plug-in-message.c
* app/plug-in/plug-in-rc.c
* app/plug-in/plug-in-run.c
* app/plug-in/plug-in.c
* app/plug-in/plug-ins-query.c
* app/widgets/gimpactiongroup.[ch]
* app/widgets/gimpdnd-xds.c
* app/widgets/gimpfiledialog.[ch]
* app/widgets/gimpfileprocview.[ch]
* app/widgets/gimppluginaction.[ch]
* app/xcf/xcf.c
* tools/pdbgen/pdb/fileops.pdb
* tools/pdbgen/pdb/plug_in.pdb: changed addordingly.
* app/pdb/fileops_cmds.c
* app/pdb/plug_in_cmds.c: regenerated.