Commit Graph

505 Commits

Author SHA1 Message Date
Michael Natterer 808b65cd31 added signals "plug-in-opened" and "plug-in-closed". Added functions
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 22:51:21 +00:00
Michael Natterer d033ddda1b cleaned up a bit.
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 21:49:04 +00:00
Michael Natterer 2329ed9615 remove member "name" and unused cruft "ref_count". Reordered other members
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 11:58:10 +00:00
Michael Natterer 40012d8853 restore the strict checks on string arrays.
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 10:03:53 +00:00
Michael Natterer 1fcd4c36a9 app/plug-in/gimpplugin.c use the right procedure types in calls to
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-04 08:23:20 +00:00
Michael Natterer 4b917ea28b Made an object out of the plug-in struct. Also change refcounting
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-05-03 18:05:06 +00:00
Michael Natterer 927cde4121 added enum GimpPlugInCallMode which can be one of { NONE, QUERY, INIT, RUN
2006-05-02  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/plug-in-enums.[ch]: added enum GimpPlugInCallMode
	which can be one of { NONE, QUERY, INIT, RUN }.

	* app/plug-in/Makefile.am
	* app/plug-in/gimppluginmanager-run.[ch]: removed again...

	* app/plug-in/gimppluginmanager-call.[ch]: ...and added
	here. Added gimp_plug_in_manager_call_init() and
	gimp_plug_in_manager_call_query().

	* app/plug-in/plug-in.[ch]: removed plug_in_call_query() and
	plug_in_call_init().

	(struct PlugIn): removed members "init", "query" and "synchronous".

	(plug_in_open): added parameters "call_mode" and "synchronous".

	* app/plug-in/gimppluginmanager.c
	* app/plug-in/plug-in-message.c
	* app/pdb/gimppluginprocedure.c
	* app/pdb/gimptemporaryprocedure.c
	* tools/pdbgen/pdb/plug_in.pdb: changed accordingly.

	* app/pdb/plug_in_cmds.c: regenerated.
2006-05-02 18:27:31 +00:00
Michael Natterer 38406b7202 removed plug_in_push() and plug_in_pop()...
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 19:03:44 +00:00
Michael Natterer 74a27a001a NULL-terminate string arrays here too, so they can be freed with
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 17:55:42 +00:00
Tor Lillqvist f117a6252c NULL-terminate the locale_domains and locale_paths string vectors, as they
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-28 23:45:51 +00:00
Tor Lillqvist 0530314017 Make it compile again on Win32. Use g_usleep() instead of select()/Sleep()
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-28 23:23:19 +00:00
Michael Natterer b05baea60a app/plug-in/Makefile.am removed...
2006-04-29  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/Makefile.am
	* app/plug-in/plug-in-run.[ch]: removed...

	* app/plug-in/gimppluginmanager-run.[ch]: ...and added as methods
	of GimpPlugInManager.

	* app/pdb/gimppluginprocedure.c
	* app/pdb/gimptemporaryprocedure.c: changed accordingly.
2006-04-28 23:13:23 +00:00
Michael Natterer f1c3e79a4b app/plug-in/Makefile.am app/plug-in/plug-in-types.h new object which keeps
2006-04-29  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/Makefile.am
	* app/plug-in/plug-in-types.h
	* app/plug-in/gimppluginmanager.[ch]: new object which keeps all
	plug-in related stuff that was kept in the Gimp instance. Has
	"menu-branch-added" and "last-plug-in-changed" signals.

	* app/plug-in/plug-ins.[ch]: removed, all its functions are in
	GimpPlugInManager now.

	* app/core/gimpmarshal.list: new marshaller for the new object.

	* app/core/gimp.[ch]: removed all plug-in related stuff and keep a
	GimpPlugInManager around.

	* app/plug-in/plug-in-data.[ch]
	* app/plug-in/plug-in-file.[ch]
	* app/plug-in/plug-in-help-domain.[ch]
	* app/plug-in/plug-in-locale-domain.[ch]
	* app/plug-in/plug-in-menu-branch.[ch]
	* app/plug-in/plug-ins-query.[ch]: removed...

	* app/plug-in/gimppluginmanager-data.[ch]
	* app/plug-in/gimppluginmanager-file.[ch]
	* app/plug-in/gimppluginmanager-help-domain.[ch]
	* app/plug-in/gimppluginmanager-locale-domain.[ch]
	* app/plug-in/gimppluginmanager-menu-branch.[ch]
	* app/plug-in/gimppluginmanager-query.[ch]: ...and added as
	methods of GimpPlugInManager.

	* app/plug-in/plug-in-debug.[ch]
	* app/plug-in/plug-in-shm.[ch]: removed...

	* app/plug-in/gimpplugindebug.[ch]
	* app/plug-in/gimppluginshm.[ch]: ...and added as properly
	namespeced structs with constructors and destructors.

	* app/core/Makefile.am
	* app/core/gimpenvirontable.[ch]
	* app/core/gimpinterpreterdb.[ch]: removed...

	* app/plug-in/gimpenvirontable.[ch]
	* app/plug-in/gimpinterpreterdb.[ch]: ...and added here unchanged.

	* app/core/gimp-gui.[ch]
	* app/gui/gui-vtable.c: remove gimp_menus_create_branch() and all
	related stuff.

	* app/actions/plug-in-actions.[ch]: connect to the
	plug-in-manager's "menu-path-added" signal and create menu branch
	actions accordingly.

	* app/plug-in/plug-in-context.c
	* app/plug-in/plug-in-message.c
	* app/plug-in/plug-in-progress.c
	* app/plug-in/plug-in-run.[ch]
	* app/plug-in/plug-in.[ch]
	* app/app_procs.c
	* app/actions/file-commands.c
	* app/actions/plug-in-commands.c
	* app/core/gimpimage.c
	* app/dialogs/file-open-location-dialog.c
	* app/dialogs/file-save-dialog.c
	* app/file/file-open.c
	* app/gui/gui.c
	* app/menus/plug-in-menus.c
	* app/pdb/gimppluginprocedure.c
	* app/pdb/gimptemporaryprocedure.c
	* app/widgets/gimpdnd-xds.c
	* app/widgets/gimpfiledialog.c
	* app/widgets/gimpfileprocview.c
	* app/widgets/gimphelp.c
	* app/widgets/gimpthumbbox.c
	* app/xcf/xcf.c
	* tools/pdbgen/pdb/context.pdb
	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/fileops.pdb
	* tools/pdbgen/pdb/help.pdb
	* tools/pdbgen/pdb/message.pdb
	* tools/pdbgen/pdb/plug_in.pdb
	* tools/pdbgen/pdb/procedural_db.pdb
	* tools/pdbgen/pdb/progress.pdb
	* tools/pdbgen/pdb/undo.pdb: follow above refactoring.

	* app/pdb/context_cmds.c
	* app/pdb/drawable_cmds.c
	* app/pdb/fileops_cmds.c
	* app/pdb/help_cmds.c
	* app/pdb/message_cmds.c
	* app/pdb/plug_in_cmds.c
	* app/pdb/procedural_db_cmds.c
	* app/pdb/progress_cmds.c
	* app/pdb/undo_cmds.c: regenerated.
2006-04-28 22:26:51 +00:00
Michael Natterer 305ada6354 new function which returns string arrays of all registered locale domains
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 21:53:33 +00:00
Michael Natterer ee66f2f31d Added some signals inspired by Rockwalrus' libpdb:
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-27 19:36:13 +00:00
Michael Natterer f65bd53e58 app/pdb/Makefile.am app/pdb/pdb-types.h new object GimpPDB which keeps all
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-26 09:13:47 +00:00
Michael Natterer 0855c2e12b added gimp_g_type_instance_get_memsize() and
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-15 15:15:33 +00:00
Manish Singh 3fb71be183 Some compilers don't handle "'" in #error directives well. Reword to not
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-14 09:44:34 +00:00
Sven Neumann 049872b361 app/*.[ch] converted tabs to spaces.
2006-04-12  Sven Neumann  <sven@gimp.org>

	* app/*.[ch]
	* app/*/*.[ch]: converted tabs to spaces.
2006-04-12 12:49:29 +00:00
Michael Natterer 1dd6a8f01f don't iterate the list of plug-in procedures here, take a
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 19:47:58 +00:00
Michael Natterer 755ac43a4b some cleanup.
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 11:12:06 +00:00
Michael Natterer 03eebd5358 removed the plug_ins_file_foo() functions.
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 23:40:45 +00:00
Michael Natterer 1f8c1ae34e app/plug-in/Makefile.am app/plug-in/plug-ins-help.[ch] remove these files
2006-04-09  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/Makefile.am
	* app/plug-in/plug-ins-help.[ch]
	* app/plug-in/plug-ins-locale.[ch]: remove these files again...

	* app/plug-in/plug-in-help-domain.[ch]
	* app/plug-in/plug-in-locale-domain.[ch]: ... and add them here
	with changed namespace.

	* app/plug-in/plug-in-menu-branch.[ch]: new files keeping menu
	branches registered by plug-ins.

	* app/plug-in/plug-ins.[ch]: removed the menu branch stuff here.

	* app/actions/plug-in-actions.c
	* app/menus/plug-in-menus.c
	* app/plug-in/plug-in.c
	* app/widgets/gimpfiledialog.c
	* app/widgets/gimpfileprocview.c
	* app/widgets/gimphelp.c
	* tools/pdbgen/pdb/help.pdb
	* tools/pdbgen/pdb/plug_in.pdb: changed accordingly.

	* app/pdb/help_cmds.c
	* app/pdb/plug_in_cmds.c: regenerated.
2006-04-09 21:04:37 +00:00
Michael Natterer 47d60f4803 remove plug_ins_add_internal() and made plug_ins_procedure_insert() public
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 20:35:15 +00:00
Michael Natterer d411d1c0dd removed this function. We only have shallow GPParam arrays in the core
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 17:19:58 +00:00
Michael Natterer 73a9abd337 removed function plug_in_proc_args_check().
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 17:08:56 +00:00
Michael Natterer 5cf5b8ca1c app/plug-in/Makefile.am app/plug-in/plug-ins-help.[ch] new files managing
2006-04-09  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/Makefile.am
	* app/plug-in/plug-ins-help.[ch]
	* app/plug-in/plug-ins-locale.[ch]: new files managing plug-in
	help domains and locale domains.

	* app/plug-in/plug-ins.[ch]: removed the functions here. Minor
	unrelated cleanups.

	* app/plug-in/plug-in.c
	* app/actions/plug-in-actions.c
	* app/menus/plug-in-menus.c
	* app/widgets/gimpfiledialog.c
	* app/widgets/gimpfileprocview.c
	* app/widgets/gimphelp.c
	* tools/pdbgen/pdb/help.pdb
	* tools/pdbgen/pdb/plug_in.pdb: changed includes accordingly.

	* app/pdb/help_cmds.c
	* app/pdb/plug_in_cmds.c: regenerated.
2006-04-09 16:25:47 +00:00
Michael Natterer 84a9e5ecf8 return a GSList* of PlugInDefs instead of a boolean. Don't return anything
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 12:33:32 +00:00
Michael Natterer 6a63d89809 don't register the XCF procedures with the PDB here...
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 10:24:05 +00:00
Michael Natterer 56ef76c444 set the mtime of all the plug_in_def's procedures too.
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-08 23:12:06 +00:00
Michael Natterer 55fbabc14a removed PlugInBlocked cruft, it was probably unused since ages.
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 21:54:55 +00:00
Michael Natterer b2f2b7148d made plug_in_run_temp() public and changed its parameters to match the
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 18:23:20 +00:00
Michael Natterer c03c336ccf added flag "guint static_name : 1" and new APIs
2006-04-07  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpobject.[ch]: added flag "guint static_name : 1" and
	new APIs gimp_object_set_static_name() and _take_name().

	* app/pdb/gimpprocedure.[ch]: removed member "name". Use
	GimpObject's name instead.

	* app/actions/plug-in-actions.c
	* app/file/file-open.c
	* app/file/file-save.c
	* app/menus/plug-in-menus.c
	* app/pdb/gimp-pdb-query.c
	* app/pdb/gimp-pdb.c
	* app/pdb/gimppluginprocedure.c
	* app/plug-in/plug-in-message.c
	* app/plug-in/plug-in-rc.c
	* app/plug-in/plug-ins-query.c
	* app/plug-in/plug-ins.c
	* app/xcf/xcf.c
	* tools/pdbgen/app.pl
	* tools/pdbgen/pdb/fileops.pdb: use GimpObject API to set/get
	a procedure's name.

	* app/pdb/*_cmds.c: regenerated.
2006-04-07 10:04:27 +00:00
Sven Neumann cfd7233bc2 renamed gimp_drawable_shadow() to gimp_drawable_get_shadow_tiles().
2006-04-07  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdrawable.[ch]: renamed gimp_drawable_shadow() to
	gimp_drawable_get_shadow_tiles().

	* app/core/gimpimage.[ch]: renamed gimp_image_shadow() to
	gimp_image_get_shadow_tiles() and gimp_image_free_shadow() to
	gimp_image_free_shadow_tiles().

	* app/core/gimpdrawable-desaturate.c
	* app/core/gimpdrawable-equalize.c
	* app/core/gimpdrawable-invert.c
	* app/core/gimpdrawable-levels.c
	* app/core/gimpimagemap.c
	* app/plug-in/plug-in-message.c
	* tools/pdbgen/pdb/color.pdb
	* tools/pdbgen/pdb/image.pdb: changed accordingly.

	* app/pdb/color_cmds.c
	* app/pdb/image_cmds.c: regenerated.
2006-04-07 09:50:23 +00:00
Sven Neumann cef9db57fe renamed gimp_drawable_data() to gimp_drawable_get_tiles().
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 09:21:18 +00:00
Michael Natterer 5f211479ac ref all registered procedures.
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-07 08:16:26 +00:00
Sven Neumann 95f9330dbb app/plug-in/plug-in-enums.h moved GimpRunMode enum to libgimpbase.
2006-04-06  Sven Neumann  <sven@gimp.org>

	* app/plug-in/plug-in-enums.h
	* libgimpbase/gimpbaseenums.h: moved GimpRunMode enum to libgimpbase.

	* app/plug-in/plug-in-enums.c
	* libgimp/gimpenums.h
	* libgimpbase/gimpbaseenums.c
	* tools/pdbgen/enums.pl: regenerated.

	* libgimpbase/gimpbase.def: updated.
2006-04-06 10:16:39 +00:00
Michael Natterer 7e258dfa27 app/plug-in/Makefile.am app/plug-in/plug-in-types.h removed...
2006-04-06  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/Makefile.am
	* app/plug-in/plug-in-types.h
	* app/plug-in/plug-in-proc-def.[ch]: removed...

	* app/pdb/Makefile.am
	* app/pdb/pdb-types.h
	* app/pdb/gimppluginprocedure.[ch]: ...and added here. Virtualized
	get_progname().

	* app/pdb/gimptemporaryprocedure.[ch]: new class derived from
	GimpPlugInProcedure.

	* app/pdb/gimpprocedure.[ch] (struct GimpProcedure): remove union
	exec_method and all the structs it needed. Procedure execution is
	properly virtualized now. Removed gimp_procedure_initialize() and
	grow the args and values arrays dynamically in
	gimp_procedure_add_argument()/return_value(). Added marshal_func
	parameter to gimp_procedure_new().

	* app/actions/plug-in-actions.c
	* app/actions/plug-in-commands.c
	* app/core/gimp-gui.c
	* app/dialogs/file-save-dialog.c
	* app/file/file-open.c
	* app/file/file-save.c
	* app/file/file-utils.c
	* app/gui/gui-vtable.c
	* app/menus/plug-in-menus.c
	* app/plug-in/plug-in-def.c
	* app/plug-in/plug-in-message.c
	* app/plug-in/plug-in-progress.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/plug-in/plug-ins.c
	* app/widgets/gimpfiledialog.c
	* app/widgets/gimpfileprocview.c
	* app/widgets/gimppluginaction.c
	* app/xcf/xcf.c
	* tools/pdbgen/pdb/fileops.pdb
	* tools/pdbgen/pdb/plug_in.pdb
	* tools/pdbgen/app.pl: changed accordingly.

	* app/pdb/*_cmds.c: regenerated.

	* app/pdb/gimp-pdb.c: added uglyness to make the app link again.
2006-04-06 10:01:30 +00:00
Michael Natterer b78b596d41 removed plug_in_repeat()...
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-06 08:19:01 +00:00
Michael Natterer acdcf8254f added plug_in_proc_frame_get_return_vals().
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 13:23:21 +00:00
Michael Natterer 9ab9ad7651 don't canonicalize names of GParamSpecs, they do this themselves.
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 10:40:39 +00:00
Michael Natterer 086d0b6371 app/plug-in/plug-in-types.h renamed to GimpPlugInProcedure and made a
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.
2006-04-05 08:38:33 +00:00
Michael Natterer ee0ebc0915 made it a GObject. Removed member "static_proc". Renamed
2006-04-04  Michael Natterer  <mitch@gimp.org>

	* app/pdb/gimpprocedure.[ch]: made it a GObject. Removed member
	"static_proc". Renamed gimp_procedure_init() to
	gimp_procedure_initialize().

	* app/pdb/gimp-pdb.c
	* app/plug-in/plug-in-message.c
	* app/plug-in/plug-in-proc-def.c
	* app/plug-in/plug-in-rc.c
	* app/xcf/xcf.c: changed accordingly.

	* tools/pdbgen/app.pl: register all internal procs
	dynamically. The static proc structs are gone.

	* tools/pdbgen/pdb/fileops.pdb: cosmetic change.

	* app/pdb/*_cmds.c: regenerated.
2006-04-04 21:11:45 +00:00
Michael Natterer a184c9090b app/pdb/Makefile.am app/pdb/procedural_db.[ch] removed...
2006-04-04  Michael Natterer  <mitch@gimp.org>

	* app/pdb/Makefile.am
	* app/pdb/procedural_db.[ch]
	* app/pdb/procedural-db-query.[ch]: removed...

	* app/pdb/gimp-pdb.[ch]
	* app/pdb/gimp-pdb-query.[ch]: ...and added namespacefied.

	* app/batch.c
	* app/actions/vectors-commands.c
	* app/core/gimp.c
	* app/core/gimppdbprogress.c
	* app/dialogs/about-dialog.c
	* app/file/file-open.c
	* app/file/file-save.c
	* app/file/file-utils.c
	* app/plug-in/plug-in-message.c
	* app/plug-in/plug-in-params.c
	* app/plug-in/plug-in-proc-def.c
	* app/plug-in/plug-in-progress.c
	* app/plug-in/plug-ins-query.c
	* app/plug-in/plug-ins.c
	* app/widgets/gimpbrushselect.c
	* app/widgets/gimpfiledialog.c
	* app/widgets/gimpfontselect.c
	* app/widgets/gimpgradientselect.c
	* app/widgets/gimphelp.c
	* app/widgets/gimppaletteselect.c
	* app/widgets/gimppatternselect.c
	* app/widgets/gimppdbdialog.c
	* app/xcf/xcf.c
	* tools/pdbgen/app.pl
	* 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 accordingly.

	* app/pdb/*_cmds.c: regenerated.
2006-04-04 17:47:22 +00:00
Michael Natterer c7943a28ab app/pdb/Makefile.am removed...
2006-04-04  Michael Natterer  <mitch@gimp.org>

	* app/pdb/Makefile.am
	* app/pdb/gimpargument.[ch]: removed...

	* app/pdb/gimp-pdb-compat.[ch]: ...and added with renamed functions.
	Added gimp_pdb_compat_param_spec().

	* app/pdb/gimpprocedure.[ch]: removed gimp_procedure_add_compat_arg()
	and _add_compat_value(). Use gimp_pdb_compat_param_spec() plus
	gimp_procedure_add_argument()/return_value() instead.

	* app/pdb/procedural-db-query.c
	* app/pdb/procedural_db.c
	* app/plug-in/plug-in-message.c
	* app/plug-in/plug-in-params.c
	* app/plug-in/plug-in-rc.c
	* tools/pdbgen/pdb/procedural_db.pdb: changed accordingly.

	* app/xcf/xcf.c: no need to use compat functions here.

	* app/pdb/procedural_db_cmds.c: regnerated.
2006-04-04 15:54:51 +00:00
Michael Natterer 17aada110c app/pdb/pdb-types.h removed struct GimpArgument, struct GimpArgumentSpec,
2006-04-04  Michael Natterer  <mitch@gimp.org>

	* app/pdb/pdb-types.h
	* app/pdb/gimpargument.[ch]: removed struct GimpArgument, struct
	GimpArgumentSpec, gimp_argument_init() and
	gimp_arguments_destroy().

	* app/pdb/gimpprocedure.h (struct GimpProcedure): use arrays of
	GParamSpec* for kepping proc inargs/outargs.

	* app/pdb/gimpprocedure.[ch]
	* app/pdb/procedural_db.[ch]
	* app/plug-in/plug-in-params.[ch]
	* app/plug-in/plug-in-proc-frame.[ch]
	* app/plug-in/plug-in-run.[ch]: use GValueArrays for procedure
	arguments and return values. Removed all n_args and n_return_vals
	parameters because GValueArrays know their length.

	* app/batch.c
	* app/actions/plug-in-commands.c
	* app/actions/vectors-commands.c
	* app/core/gimppdbprogress.c
	* app/dialogs/about-dialog.c
	* app/file/file-open.c
	* app/file/file-save.c
	* app/pdb/procedural-db-query.c
	* app/plug-in/plug-in-message.c
	* app/plug-in/plug-in-progress.c
	* app/plug-in/plug-in-rc.c
	* app/plug-in/plug-ins.c
	* app/widgets/gimpbrushselect.c
	* app/widgets/gimpfontselect.c
	* app/widgets/gimpgradientselect.c
	* app/widgets/gimphelp.c
	* app/widgets/gimppaletteselect.c
	* app/widgets/gimppatternselect.c
	* app/widgets/gimppdbdialog.[ch]
	* app/xcf/xcf.c
	* tools/pdbgen/app.pl
	* tools/pdbgen/pdb/fileops.pdb
	* tools/pdbgen/pdb/procedural_db.pdb: changed accordingly. Also
	removed #include "gimpargument.h" from most files.

	* app/pdb/*_cmds.c: regenerated.
2006-04-04 10:30:58 +00:00
Michael Natterer bde662b2f3 don't compare GType with GimpPDBArgType (never "clean up" before
2006-04-04  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/plug-in-params.c (plug_in_params_to_args): don't
	compare GType with GimpPDBArgType (never "clean up" before
	committing ;)
2006-04-03 22:30:31 +00:00
Michael Natterer 070a3625ad added a shitload of new GTypes and corresponding GParamSpecs to use them
2006-04-03  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpparamspecs.[ch]: added a shitload of new GTypes and
	corresponding GParamSpecs to use them as PDB arguments.
	Each GimpPDBArgType has one or more corresponding GTypes in the
	core now.

	* app/pdb/gimpargument.[ch] (struct GimpArgument)
	(struct GimpArgumentSpec): removed "value" member because the
	GValue's/GParamSpec's GType carries just as much information now.

	(gimp_argument_type_to_pdb_arg_type): new function which maps
	GTypes to GimpPDBArgType.

	(gimp_pdb_arg_type_to_string): formerly known as
	procedural_db_type_name().

	* app/pdb/gimpprocedure.[ch]
	* app/pdb/procedural_db.[ch]: completely switch to GValue. Use the
	new GParamSpecs for procedure arguments. GimpPDBArgType is only
	used for adding compat args/values of plug-in procedures.

	(procedural_db_run_proc): the va_list expects a sequence of
	(GType, value, GType, value, ..., G_TYPE_NONE) now.

	* app/plug-in/plug-in-params.[ch]: changed accordingly.

	(plug_in_param_defs_check): removed this function.

	* app/plug-in/plug-in-message.c (plug_in_handle_proc_install): use
	plug_in_proc_args_check() instead and initialize the GimpProcedure
	before doing so.

	* tools/pdbgen/app.pl
	* tools/pdbgen/pdb.pl: use the new param spec types and their
	utility functions. Changed argument/value registration
	accordingly.

	* app/pdb/procedural-db-query.c
	* app/actions/plug-in-commands.c
	* app/actions/vectors-commands.c
	* app/core/gimppdbprogress.c
	* app/dialogs/about-dialog.c
	* app/file/file-open.c
	* app/file/file-save.c
	* app/plug-in/plug-in-progress.c
	* app/plug-in/plug-in-rc.c
	* app/plug-in/plug-ins.c
	* app/widgets/gimpbrushselect.c
	* app/widgets/gimpfontselect.c
	* app/widgets/gimpgradientselect.c
	* app/widgets/gimphelp.c
	* app/widgets/gimppaletteselect.c
	* app/widgets/gimppatternselect.c
	* tools/pdbgen/pdb/fileops.pdb
	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/procedural_db.pdb: changed accordingly.

	* app/pdb/*_cmds.c: regenerated.
2006-04-03 20:54:55 +00:00
Michael Natterer 51bea46e8e handle storage of GIMP_PDB_INT32 plug-in params in GValues of type
2006-04-02  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/plug-in-params.c: handle storage of GIMP_PDB_INT32
	plug-in params in GValues of type G_TYPE_UINT, they are used for
	guides and tattoos.

	* tools/pdbgen/pdb/guides.pdb (image_find_next_guide): don't
	validate the "guide" parameter, because 0 is an allowed value
	here.

	* app/pdb/guides_cmds.c: regenerated.
2006-04-02 21:18:50 +00:00
Michael Natterer d05d512d9c added struct GimpArray which can keep static or allocated data. Added
2006-04-01  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpparamspecs.[ch]: added struct GimpArray which can
	keep static or allocated data. Added boxed types GIMP_TYPE_ARRAY
	and GIMP_TYPE_STRING_ARRAY. Added GParamSpecs for PDB int32,
	int16, int8, float and string arrays. Added functions to get, dup,
	set and set_static the various arrays from/to GValues.

	* app/pdb/gimpprocedure.c
	* app/pdb/procedural_db.c
	* app/plug-in/plug-in-params.c
	* tools/pdbgen/app.pl
	* tools/pdbgen/pdb.pl: use the new param pspecs and gimp_value
	functions to keep arrays in GimpArguments.

	* app/pdb/gimpargument.[ch] (gimp_arguments_destroy): removed
	parameter "gboolean full_destroy". It's not needed any longer
	because the GValues fully memory-manage all their data now.

	* app/batch.c
	* app/actions/plug-in-commands.c
	* app/actions/vectors-commands.c
	* app/core/gimppdbprogress.c
	* app/dialogs/about-dialog.c
	* app/dialogs/print-size-dialog.c
	* app/dialogs/resize-dialog.c
	* app/display/gimpdisplayshell-handlers.c
	* app/file/file-open.c
	* app/file/file-save.c
	* app/plug-in/plug-in-message.c
	* app/plug-in/plug-in-run.c
	* app/plug-in/plug-ins.c
	* app/widgets/gimphelp.c
	* app/widgets/gimppdbdialog.c
	* tools/pdbgen/pdb/fileops.pdb: changed accordingly.

	* app/pdb/brush_cmds.c
	* app/pdb/brushes_cmds.c
	* app/pdb/buffer_cmds.c
	* app/pdb/color_cmds.c
	* app/pdb/drawable_cmds.c
	* app/pdb/fileops_cmds.c
	* app/pdb/fonts_cmds.c
	* app/pdb/gimpargument.c
	* app/pdb/gimpargument.h
	* app/pdb/gimpprocedure.c
	* app/pdb/gradient_cmds.c
	* app/pdb/gradients_cmds.c
	* app/pdb/image_cmds.c
	* app/pdb/paint_tools_cmds.c
	* app/pdb/palettes_cmds.c
	* app/pdb/parasite_cmds.c
	* app/pdb/paths_cmds.c
	* app/pdb/pattern_cmds.c
	* app/pdb/patterns_cmds.c
	* app/pdb/plug_in_cmds.c
	* app/pdb/procedural_db.c
	* app/pdb/procedural_db_cmds.c
	* app/pdb/selection_tools_cmds.c
	* app/pdb/vectors_cmds.c: regenerated.

	... and ported everything to perl btw...
2006-04-01 01:33:28 +00:00
Michael Natterer 03c28ec7fc app/pdb/pdb-types.h renamed struct Argument to GimpArgument and struct
2006-03-31  Michael Natterer  <mitch@gimp.org>

	* app/pdb/pdb-types.h
	* app/pdb/gimpargument.h: renamed struct Argument to GimpArgument
	and struct ProcArg to GimpArgumentSpec.

	* app/batch.c
	* app/actions/plug-in-commands.c
	* app/actions/vectors-commands.c
	* app/core/gimppdbprogress.c
	* app/dialogs/about-dialog.c
	* app/file/file-open.c
	* app/file/file-save.c
	* app/pdb/gimpargument.c
	* app/pdb/gimpprocedure.[ch]
	* app/pdb/procedural-db-query.c
	* app/pdb/procedural_db.[ch]
	* app/plug-in/plug-in-message.c
	* app/plug-in/plug-in-params.[ch]
	* app/plug-in/plug-in-proc-frame.h
	* app/plug-in/plug-in-progress.c
	* app/plug-in/plug-in-rc.c
	* app/plug-in/plug-in-run.[ch]
	* app/plug-in/plug-ins.c
	* app/widgets/gimpbrushselect.c
	* app/widgets/gimpfontselect.c
	* app/widgets/gimpgradientselect.c
	* app/widgets/gimphelp.c
	* app/widgets/gimppaletteselect.c
	* app/widgets/gimppatternselect.c
	* app/widgets/gimppdbdialog.[ch]
	* app/xcf/xcf.c
	* tools/pdbgen/app.pl
	* tools/pdbgen/pdb/fileops.pdb
	* tools/pdbgen/pdb/procedural_db.pdb: changed accordingly.

	* app/pdb/*_cmds.c: regenerated.
2006-03-31 20:16:22 +00:00
Michael Natterer fe90ae768b app/pdb/pdb-types.h renamed struct ProcRecord to GimpProcedure. Added
2006-03-31  Michael Natterer  <mitch@gimp.org>

	* app/pdb/pdb-types.h
	* app/pdb/gimpprocedure.h: renamed struct ProcRecord to
	GimpProcedure. Added GIMP_IS_PROCEDURE() which checks for != NULL.

	* app/pdb/gimpprocedure.c
	* app/pdb/procedural-db-query.c
	* app/pdb/procedural_db.[ch]
	* app/batch.c
	* app/actions/plug-in-commands.c
	* app/actions/vectors-commands.c
	* app/file/file-open.c
	* app/plug-in/plug-in-message.c
	* app/plug-in/plug-in-proc-def.h
	* app/plug-in/plug-in-proc-frame.[ch]
	* app/plug-in/plug-in-progress.c
	* app/plug-in/plug-in-rc.c
	* app/plug-in/plug-in-run.[ch]
	* app/plug-in/plug-in.[ch]
	* app/plug-in/plug-ins-query.c
	* app/plug-in/plug-ins.[ch]
	* app/widgets/gimphelp.c
	* app/xcf/xcf.c
	* tools/pdbgen/pdb/fileops.pdb
	* tools/pdbgen/app.pl: changed accordingly. Renamed 'proc_rec' and
	similarily named variables and parameters to 'procedure'.

	* tools/pdbgen/pdb/procedural_db.pdb: changed 'procedure'
	parameters to 'procedure_name'.

	* app/pdb/*_cmds.c
	* libgimp/gimpproceduraldb_pdb.[ch]: regenerated.
2006-03-31 17:42:13 +00:00
Michael Natterer 3cb830519c added new member "gboolean static_strings", so the ProcRecord struct and
2006-03-31  Michael Natterer  <mitch@gimp.org>

	* app/pdb/gimpprocedure.h (struct ProcRecord): added new member
	"gboolean static_strings", so the ProcRecord struct and its
	strings can be marked as static separately.

	* app/pdb/gimpprocedure.[ch] (gimp_procedure_dispose): removed.

	(gimp_procedure_free): don't free the struct if it's static.

	(gimp_procedure_set_strings)
	(gimp_procedure_set_static_strings)
	(gimp_procedure_take_strings): new functions to set a procedure's
	strings.

	* app/pdb/procedural_db.c (procedural_db_free_entry): simply call
	gimp_procedure_free() on all procedures, the memory-manage
	themselves now.

	* app/plug-in/plug-in-message.c (plug_in_handle_proc_install): use
	gimp_procedure_set_strings() instead of setting them manually.

	* app/xcf/xcf.c: register gimp-xcf-load and gimp-xcf-save
	dynamically so further ProcRecord struct changes don't affect this
	file.

	* tools/pdbgen/app.pl: set "static_proc" to TRUE for static procs.

	* app/pdb/*_cmds.c: regenerated.
2006-03-31 16:17:07 +00:00
Michael Natterer c1475c4adb changed "icon_data" from gchar* to guint8*.
2006-03-31  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/plug-in-proc-def.h (struct PlugInProcDef)
	(plug_in_proc_def_set_icon): changed "icon_data" from gchar* to
	guint8*.

	* app/plug-in/plug-in-proc-def.c
	* app/plug-in/plug-in-rc.c
	* app/xcf/xcf.c: cast a bit to the fix resulting warnings. There
	are less casts needed than before.
2006-03-31 14:34:02 +00:00
Michael Natterer 8cffac44d5 added new member "gboolean static_proc" which indicates whether a
2006-03-31  Michael Natterer  <mitch@gimp.org>

	* app/pdb/gimpprocedure.[ch] (struct ProcRecord): added new member
	"gboolean static_proc" which indicates whether a ProcRecord struct
	and its strings are static.

	(gimp_procedure_dispose): new function which frees the procedure's
	args and values, and its strings if it is not static.

	* app/xcf/xcf.c
	* tools/pdbgen/app.pl: set "static_proc" to TRUE for static procs.

	* app/pdb/procedural_db.c (procedural_db_free): call
	gimp_procedure_free() or gimp_procedure_dispose(), depending on
	procedure->static_proc.

	* app/pdb/procedural_db.h: removed #if 0'ed cruft.

	* app/plug-in/plug-in-proc-def.[ch]: removed
	plug_in_proc_def_get_proc().

	* app/file/file-open.c
	* app/file/file-save.c
	* tools/pdbgen/pdb/fileops.pdb: access proc_def->procedure directly.

	* app/pdb/*_cmds.c: regenerated.
2006-03-31 14:00:50 +00:00
Michael Natterer 49da8cb2d1 added gimp_procedure_new() and gimp_procedure_free() functions.
2006-03-31  Michael Natterer  <mitch@gimp.org>

	* app/pdb/gimpprocedure.[ch]: added gimp_procedure_new() and
	gimp_procedure_free() functions.

	* app/plug-in/plug-in-proc-def.h (struct PlugInProcDef): use a
	ProcRecord pointer instead of including the entire struct.

	* app/plug-in/plug-in-proc-def.c: use the new() and free()
	functions above to allocate/free the ProcRecord.

	* app/actions/plug-in-actions.c
	* app/actions/plug-in-commands.c
	* app/menus/plug-in-menus.c
	* 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/plug-in/plug-ins.c
	* app/xcf/xcf.c: changed accordingly.

	Unrelated:

	* app/pdb/gimpprocedure.c (gimp_procedure_execute): be more verbose
	when warning about out-of-bounds parameter values.

	* tools/pdbgen/pdb/fileops.pdb: allow GIMP_RUN_WITH_LAST_VALS for
	file_save because indirect saving (e.g. remote or compressed)
	needs it.

	* app/pdb/fileops_cmds.c: regenerated.
2006-03-31 11:49:22 +00:00
Michael Natterer 1dac27836d app/pdb/Makefile.am new files containing the functions operating on *one*
2006-03-31  Michael Natterer  <mitch@gimp.org>

	* app/pdb/Makefile.am
	* app/pdb/gimpprocedure.[ch]: new files containing the functions
	operating on *one* procedure. Factored out of procedural_db.[ch]
	and renamed to gimp_procedure_foo().

	* app/pdb/procedural_db.[ch]: removed them here.

	* app/pdb/procedural-db-query.c
	* app/batch.c
	* app/actions/plug-in-commands.c
	* app/actions/vectors-commands.c
	* app/core/gimppdbprogress.c
	* app/file/file-open.c
	* app/file/file-save.c
	* app/plug-in/plug-in-message.c
	* app/plug-in/plug-in-proc-def.[ch]
	* app/plug-in/plug-in-progress.c
	* app/plug-in/plug-in-rc.c
	* app/plug-in/plug-in-run.c
	* app/plug-in/plug-ins.c
	* app/widgets/gimpfiledialog.c
	* app/widgets/gimphelp.c
	* app/widgets/gimppdbdialog.c
	* app/xcf/xcf.c
	* tools/pdbgen/pdb/fileops.pdb
	* tools/pdbgen/app.pl: changed #includes and function calls
	accordingly. No logic changed.

	* app/pdb/*_cmds.c: regenerated.
2006-03-31 09:15:08 +00:00
Michael Natterer 55578d0d3e renamed member "arg_type" to "type".
2006-03-30  Michael Natterer  <mitch@gimp.org>

	* app/pdb/procedural_db.h (structs Argument and ProcArg): renamed
	member "arg_type" to "type".

	* app/pdb/procedural_db.c
	* app/pdb/procedural-db-query.c
	* app/actions/plug-in-commands.c
	* app/core/gimppdbprogress.c
	* app/plug-in/plug-in-params.c
	* app/plug-in/plug-in-progress.c
	* app/plug-in/plug-in-rc.c
	* tools/pdbgen/pdb/fileops.pdb
	* tools/pdbgen/pdb/procedural_db.pdb: changed accordingly.

	* app/pdb/fileops_cmds.c
	* app/pdb/procedural_db_cmds.c: regenerated.
2006-03-30 10:06:54 +00:00
Michael Natterer afd88f0bf4 replace the value union by a GValue.
2006-03-30  Michael Natterer  <mitch@gimp.org>

	* app/pdb/procedural_db.[ch] (struct Argument): replace the value
	union by a GValue.

	(procedural_db_argument_init)
	(procedural_db_compat_arg_init): new functions to initialize
	an Argument. They call g_value_init() on the Argument's value.

	(procedural_db_arguments)
	(procedural_db_return_values): initialize the returned Argument
	arrays so their GValues are ready to use. Allow to get the
	(unsuccessful) return values of a NULL ProcRecord.

	(procedural_db_destroy_args): g_value_unset() the values. Added a
	"gboolean full_destroy" parameter. Its only effect is to destroy
	PDB arrays, everything else is nicely memory managed by GValue.

	(procedural_db_execute)
	(procedural_db_run_proc): do GValue stuff. Added n_args and
	n_return_vals parameters to execute().

	(procedural_db_execute_proc): private function to execute a
	procedure. Validates the passed in arguments using the registered
	GParamSpecs before passing them to the resp. exec method.

	* app/plug-in/plug-in-params.[ch] (plug_in_params_to_args): needs
	an array of ProcArgs now in order to initialize the Arguments'
	GValues correctly. Passing NULL ProcArgs uses
	procedural_db_compat_arg_init(), so procedures (plug-ins)
	returning more values than expected work.

	(plug_in_args_to_params): do GValue stuff here too.

	(plug_in_args_destroy): removed this function,
	procedural_db_destroy_args() does the same now.

	* app/plug-in/plug-in-message.c (plug_in_handle_proc_run):
	simplified quite a bit because everything returns n_return_values
	now. Call plug_in_params_to_args() only of the procedure was found.

	(plug_in_handle_proc_return_priv): pass ProcRecs to
	plug_in_params_to_args().

	* app/batch.c
	* app/actions/plug-in-commands.c
	* app/actions/vectors-commands.c
	* app/core/gimppdbprogress.c
	* app/dialogs/about-dialog.c
	* app/file/file-open.c
	* app/file/file-save.c
	* app/plug-in/plug-ins.c
	* app/plug-in/plug-in-progress.c
	* app/plug-in/plug-in-run.[ch]
	* app/widgets/gimphelp.c
	* app/widgets/gimppdbdialog.c
	* app/xcf/xcf.c
	* tools/pdbgen/pdb/fileops.pdb: changed accordingly: don't
	g_new/g_free Argument arrays, always use procedural_db_foo()
	functions. Use GValue functions to get/set Arguments.

	* tools/pdbgen/pdb.pl: added get_value_func and set_value_func to
	all PDB types. Removed id_func, id_ret_func and check_func. Added
	flags which indicated that a type is an ID. Removed unused utility
	functions.

	* tools/pdbgen/lib.pl: use the flag instead of looking at
	functions and value types.

	* tools/pdbgen/app.pl: use the get_value_func and set_value_func
	to marshal inargs and outargs. Removed all checks performed on
	inargs because that's done by GParamSpec validation now. Added the
	missing bits to register excluded values with GimpParamSpecEnum.

	* app/pdb/*_cmds.c: regenerated.
2006-03-29 23:56:07 +00:00
Michael Natterer d69e93ceb1 can't just cast the GPParamDefs to ProcArgs any more, their struct layouts
2006-03-30  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/plug-in-params.c (plug_in_param_defs_check): can't
	just cast the GPParamDefs to ProcArgs any more, their struct
	layouts are different now. Convert them into temporary ProcArgs
	before calling plug_in_proc_args_check()
2006-03-29 22:11:59 +00:00
Sven Neumann 25f5647eee app/plug-in/plug-in-message.c app/plug-in/plug-in-params.c string review.
2006-03-29  Sven Neumann  <sven@gimp.org>

	* app/plug-in/plug-in-message.c
	* app/plug-in/plug-in-params.c
	* app/plug-in/plug-in.c: string review.
2006-03-29 10:45:18 +00:00
Michael Natterer 7d180818c8 replace "name" and "description" by a GParamSpec.
2006-03-28  Michael Natterer  <mitch@gimp.org>

	* app/pdb/procedural_db.[ch] (struct ProcArg): replace "name"
	and "description" by a GParamSpec.

	(procedural_db_init_proc)
	(procedural_db_add_argument)
	(procedural_db_add_return_value)
	(procedural_db_add_compat_arg)
	(procedural_db_add_compat_val): new functions which dynamically
	allocate and register arguments and return value arrays based on
	GParamSpecs.

	* app/pdb/procedural-db-query.c
	* app/plug-in/plug-in-message.c
	* app/plug-in/plug-in-proc-def.c
	* app/plug-in/plug-in-rc.c
	* app/xcf/xcf.c
	* tools/pdbgen/pdb/procedural_db.pdb: changed accordingly.

	* tools/pdbgen/app.pl: get rid of all ProcArg arrays and generate
	code that registers args and values with the procedures.

	* app/pdb/*_cmds.c: regenerated.
2006-03-28 19:58:00 +00:00
Sven Neumann 86fd6f9ccd did a global gdisp -> display substitution.
2006-03-28  Sven Neumann  <sven@gimp.org>

        * app/*: did a global gdisp -> display substitution.
2006-03-28 17:59:18 +00:00
Sven Neumann 5439aa4995 did a global gdisp -> display substitution.
2006-03-28  Sven Neumann  <sven@gimp.org>

	* app/*: did a global gdisp -> display substitution.
2006-03-28 17:55:52 +00:00
Michael Natterer 169faefb18 renamed procedural_db_return_args() to procedural_db_return_values() and
2006-03-27  Michael Natterer  <mitch@gimp.org>

	* app/pdb/procedural_db.[ch]: renamed procedural_db_return_args()
	to procedural_db_return_values() and added
	procedural_db_arguments(), which returns a newly allocated,
	initialized array of the procedure's arguments.

	* app/actions/plug-in-commands.c
	* app/actions/vectors-commands.c
	* app/plug-in/plug-in-run.c
	* app/widgets/gimphelp.c
	* app/xcf/xcf.c
	* tools/pdbgen/app.pl
	* tools/pdbgen/pdb/fileops.pdb: changed accordingly, some cleanup.

	* app/pdb/*_cmds.c: regenerated.
2006-03-27 21:09:32 +00:00
Michael Natterer 2a227a1aee app/base/base-enums.h app/core/core-enums.h register some more enums.
2006-03-27  Michael Natterer  <mitch@gimp.org>

	* app/base/base-enums.h
	* app/core/core-enums.h
	* app/plug-in/plug-in-enums.h: register some more enums.

	* app/plug-in/Makefile.am: added rules to generate plug-in-enums.c

	* app/base/base-enums.c
	* app/core/core-enums.c
	* app/plug-in/plug-in-enums.c: (re)generated.
2006-03-27 13:49:19 +00:00
Michael Natterer f313c6b577 app/file/file-open.c app/file/file-save.c use procedural_db_run_proc()
2006-03-27  Michael Natterer  <mitch@gimp.org>

	* app/file/file-open.c
	* app/file/file-save.c
	* app/plug-in/plug-ins.c: use procedural_db_run_proc() instead of
	procedural_db_execute(). execute() should be avoided for anything
	but PDB-internal calls.
2006-03-27 11:40:00 +00:00
Michael Natterer acdae9b354 app/core/gimp-gui.[ch] app/gui/gui-vtable.c pass displays around as
2006-03-23  Michael Natterer  <mitch@gimp.org>

	* app/core/gimp-gui.[ch]
	* app/gui/gui-vtable.c
	* app/plug-in/plug-in-progress.[ch]: pass displays around as
	GimpObject, not as integer IDs.

	* tools/pdbgen/pdb/progress.pdb: changed accordingly.

	* app/pdb/progress_cmds.c
	* libgimp/gimpprogress_pdb.c: regenerated.
2006-03-23 21:56:13 +00:00
Sven Neumann 1db02d245b added a const qualifier to the GimpWireIOFunc signature.
2006-03-11  Sven Neumann  <sven@gimp.org>

	* libgimpbase/gimpwire.h: added a const qualifier to the
	GimpWireIOFunc signature.

	* libgimp/gimp.c (gimp_write)
	* app/plug-in/plug-in.c (plug_in_write): changed accordingly.
2006-03-11 17:33:36 +00:00
Sven Neumann 872d9506e5 factored out some code to a utility function.
2006-03-10  Sven Neumann  <ven@gimp.org>

	* app/widgets/gimpaction.c: factored out some code to a utility
	function.

	* app/config/gimpguiconfig.[ch]
	* app/config/gimprc-blurbs.h
	* app/dialogs/preferences-dialog.c
	* app/gui/gui.c
	* app/plug-in/plug-in-run.c
	* libgimp/gimp.c
	* libgimpbase/gimpprotocol.[ch]: renamed tool_tips to tooltips in
	variables and in the gimprc.

	* app/config/gimpbaseconfig.[ch]: removed stingy_memory_use from
	the GimpBaseConfig struct.
2006-03-10 16:40:09 +00:00
Hans Breuer 50b0105822 updated
2005-06-26  Hans Breuer  <hans@breuer.org>

	* **/makefile.msc app/gimpcore.def : updated
2006-02-26 19:00:33 +00:00
Michael Natterer 4d5abb4323 app/plug-in/Makefile.am new files which keep the plug-in data list.
2006-02-21  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/Makefile.am
	* app/plug-in/plug-in-data.[ch]: new files which keep the
	plug-in data list.

	* app/pdb/procedural_db.[ch]: removed here, it only cluttered the
	file with unrelated functionality.

	* app/core/gimp.[ch]
	* app/actions/plug-in-commands.c
	* tools/pdbgen/pdb/procedural_db.pdb: changed accordingly.

	* app/pdb/procedural_db_cmds.c: regenerated.
2006-02-21 11:05:43 +00:00
Sven Neumann d833630ad8 app/config/gimpcoreconfig.[ch] app/config/gimprc-blurbs.h keep a history
2006-02-20  Sven Neumann  <sven@gimp.org>

	* app/config/gimpcoreconfig.[ch]
	* app/config/gimprc-blurbs.h
	* app/core/gimp.[ch]: keep a history of recently used plug-ins.

	* app/plug-in/plug-in-run.[ch] (plug_in_repeat): pass an index
	into the plug-in history.

	* app/actions/plug-in-actions.c
	* app/actions/plug-in-commands.c
	* app/menus/plug-in-menus.c
	* menus/image-menu.xml.in: added a submenu with recently used
	plug-ins to the Filters menu. Fixes bug #148855.
2006-02-20 16:38:09 +00:00
Raphael Quinet 7d8998a99c automatically removed trailing whitespace from 3460 lines.
2006-01-17  Raphael Quinet  <raphael@gimp.org>

	* (about 130 *.[ch] files): automatically removed trailing
	whitespace from 3460 lines.
2006-01-17 12:43:50 +00:00
Sven Neumann fdcae9fc0a app/plug-in/plug-in.[ch] moved code from the PDB wrapper to a utility
2006-01-11  Sven Neumann  <sven@gimp.org>

	* app/plug-in/plug-in.[ch]
	* tools/pdbgen/pdb/plug_in.pdb: moved code from the PDB wrapper to
	a utility function in the core.

	* app/pdb/plug_in_cmds.c: regenerated.
2006-01-11 19:41:25 +00:00
Michael Natterer a0d231b33c renamed GIMP_PDB_PATH to GIMP_PDB_VECTORS and add the former as an alias
2005-12-29  Michael Natterer  <mitch@gimp.org>

	* libgimpbase/gimpbaseenums.[ch] (enum GimpPDBArgType): renamed
	GIMP_PDB_PATH to GIMP_PDB_VECTORS and add the former as an alias
	for the latter.

	* libgimp/gimp.h (union _GimpParamData): added back d_path member
	to maintian source compatibility.

	* tools/pdbgen/pdb.pl
	* libgimp/gimp.c
	* app/pdb/procedural_db.c
	* app/plug-in/plug-in-params.c
	* libgimpbase/gimpprotocol.[ch]
	* plug-ins/pygimp/pygimp-pdb.c
	* plug-ins/script-fu/siod-wrapper.c: s/GIMP_PDB_PATH/GIMP_PDB_VECTORS/

	* app/pdb/image_cmds.c
	* app/pdb/procedural_db_cmds.c
	* app/pdb/vectors_cmds.c
	* libgimp/gimpimage_pdb.c
	* libgimp/gimpvectors_pdb.c
	* tools/pdbgen/enums.pl: regenerated.
2005-12-29 01:07:02 +00:00
Sven Neumann 8e9b20e55c HACKING document the changed dependencies.
2005-12-28  Sven Neumann  <sven@gimp.org>

	* HACKING
	* INSTALL: document the changed dependencies.

	* configure.in
	* app/sanity.c: check for glib >= 2.8.2 at compile and run-time.

	* app/plug-in/plug-in.c: removed workaround for glib < 2.8.2.
2005-12-28 21:36:03 +00:00
Sven Neumann 4467e1cd4b let the private wire methods live in the GIMP namespace. Declare internal
2005-12-13  Sven Neumann  <sven@gimp.org>

        * libgimpbase/gimpwire.[ch]: let the private wire methods live in
        the GIMP namespace. Declare internal functions as such and prefix
        them with an underscore.

        * libgimp/gimp.c
        * libgimp/gimptile.c
        * libgimpbase/gimpbase.def
        * libgimpbase/gimpprotocol.c
        * app/plug-in/plug-in-message.[ch]
        * app/plug-in/plug-in-run.c
        * app/plug-in/plug-in.c: changed accordingly.
2005-12-13 14:11:56 +00:00
Michael Natterer 0d4a10fee4 app/config/*.c app/core/*.c app/display/*.c app/text/*.c port to
2005-12-10  Michael Natterer  <mitch@gimp.org>

	* app/config/*.c
	* app/core/*.c
	* app/display/*.c
	* app/text/*.c
	* app/vectors/*.c: port to G_DEFINE_TYPE() and friends. Some related
	core reordering and cleanup.
2005-12-10 19:24:36 +00:00
Michael Natterer aa80506d6d app/core/gimp-contexts.c app/core/gimp-documents.c
2005-11-06  Michael Natterer  <mitch@gimp.org>

	* app/core/gimp-contexts.c
	* app/core/gimp-documents.c
	* app/core/gimp-parasites.c
	* app/core/gimp-templates.c
	* app/core/gimp-units.c
	* app/core/gimpdatafactory.c
	* app/core/gimptooloptions.c
	* app/gui/color-history.[ch]
	* app/gui/gui.c
	* app/gui/session.c
	* app/plug-in/plug-ins.c
	* app/text/gimp-fonts.c
	* app/tools/gimp-tools.c
	* app/widgets/gimpcontrollers.c
	* app/widgets/gimpdevices.c: when running --verbose, print the
	name of each config file parsed or written.
2005-11-06 22:01:25 +00:00
Sven Neumann 334b900bd3 removed unused variable scriptdata.
2005-11-05  Sven Neumann  <sven@gimp.org>

	* app/Makefile.am: removed unused variable scriptdata.

	* app/plug-in/plug-ins.c (plug_ins_init): Fixed progress value for
	plug-in query and initialization.

	* plug-ins/common/uniteditor.c (new_unit_dialog): use a
	GtkMessageDialog instead of g_message(). Some string changes.
2005-11-05 21:56:33 +00:00
Sven Neumann 6b2c01cc80 fine-tuning.
2005-11-05  Sven Neumann  <sven@gimp.org>

	* app/plug-in/plug-ins.c (plug_ins_init): fine-tuning.
2005-11-05 15:00:35 +00:00
Sven Neumann 20a653a542 added some commented-out debug output that can be used to get an idea of
2005-11-05  Sven Neumann  <sven@gimp.org>

	* app/gui/splash.c: added some commented-out debug output that can
	be used to get an idea of where the startup time is being spent.

	* app/core/gimp.c
	* app/pdb/internal_procs.c
	* app/pdb/procedural_db.c
	* app/plug-in/plug-ins.c
	* tools/pdbgen/app.pl: cosmetic changes.
2005-11-05 12:18:56 +00:00
Manish Singh 919a0e9f5b remove now unused "expanded" variable.
2005-11-04  Manish Singh  <yosh@gimp.org>

        * app/core/gimpenvirontable.c (gimp_environ_table_load_env_file):
        remove now unused "expanded" variable.
2005-11-04 23:59:56 +00:00
Sven Neumann a241bbc2b9 gimp_config_path_expand() only ever returns NULL if called with a NULL
2005-11-04  Sven Neumann  <sven@gimp.org>

	* app/core/gimpenvirontable.c (gimp_environ_table_load_env_file):
	gimp_config_path_expand() only ever returns NULL if called with a
	NULL path argument.
2005-11-04 15:51:15 +00:00
Sven Neumann c4e37430e2 formatting.
2005-11-01  Sven Neumann  <sven@gimp.org>

	* app/plug-in/plug-ins.c: formatting.
2005-11-01 10:20:38 +00:00
Sven Neumann c052ef9998 only call the status callback for plug-ins that are actually queried or
2005-10-31  Sven Neumann  <sven@gimp.org>

	* app/plug-in/plug-ins.c (plug_ins_init): only call the status
	callback for plug-ins that are actually queried or initialized.
2005-10-31 14:30:29 +00:00
Michael Natterer 48cdc65327 Allow plug-ins to register menu entries in the <Brushes>, <Gradients>,
2005-09-26  Michael Natterer  <mitch@gimp.org>

	Allow plug-ins to register menu entries in the <Brushes>,
	<Gradients>, <Palettes>, <Patterns> and <Fonts> menus:

	* app/actions/actions.c (action_data_get_gimp): return a Gimp
	also if "data" is a GimpContainerView or GimpContainerEditor.

	* app/gui/gui-vtable.c (gui_menus_add_proc)
	* app/plug-in/plug-in-params.c (plug_in_proc_args_check): support
	the new plug-in menu locations.

	* app/menus/menus.c (menus_init): add the "plug-in" action group
	to the resp. UI managers.

	* menus/brushes-menu.xml
	* menus/buffers-menu.xml
	* menus/fonts-menu.xml
	* menus/gradients-menu.xml
	* menus/palettes-menu.xml
	* menus/patterns-menu.xml: added separators at the end of the menus.

	* plug-ins/script-fu/scripts/font-map.scm: -> <Fonts>
	* plug-ins/script-fu/scripts/gradient-example.scm: -> <Gradients>
	* plug-ins/script-fu/scripts/mkbrush.scm: -> <Brushes>

	* plug-ins/script-fu/script-fu.c (script_fu_extension_init): don't
	register the "Make Brush" menu branch.
2005-09-26 10:36:07 +00:00
Michael Natterer 0c2d06f738 drop the restriction that plug-ins registered in <Image> must have
2005-09-26  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/plug-in-params.c (plug_in_proc_args_check): drop the
	restriction that plug-ins registered in <Image> must have
	RUN-MODE, IMAGE, DRAWABLE parameters because everything but
	RUN-MODE is actually treated as optional be the rest of the code.

	* plug-ins/script-fu/scripts/paste-as-brush.scm
	* plug-ins/script-fu/scripts/paste-as-pattern.scm: removed IMAGE
	and DRAWABLE parameters.

	* plug-ins/common/screenshot.c
	* plug-ins/twain/twain.c
	* plug-ins/winsnap/winsnap.c: register menu entries in
	<Image>/File/Acquire
2005-09-26 00:25:49 +00:00
Michael Natterer b10adabb5e Added parent window API to the GimpProgress interface and to the libgimp
2005-09-09  Michael Natterer  <mitch@gimp.org>

	Added parent window API to the GimpProgress interface and to
	the libgimp progress stuff. Might look strange, but does
	the right thing in almost all cases (image window, file dialog,
	script-fu dialog etc). Fixes bug #62988.

	* app/core/gimpprogress.[ch]: added GimpProgress::get_window()
	which should return a toplevel window ID if the progress is in a
	window that wants to be the transient parent of plug-in dialogs.

	* app/widgets/gimpwidgets-utils.[ch] (gimp_window_get_native): new
	function which returns the window handle of a GtkWindow's GdkWindow.

	* app/widgets/gimpfiledialog.c: implement ::get_window().

	* app/display/gimpdisplay.[ch]: ditto. Removed window handle API.

	* app/gui/gui-vtable.c: changed accordingly.

	* libgimpbase/gimpbaseenums.[ch] (enum GimpProgressCommand):
	added GIMP_PROGRESS_COMMAND_GET_WINDOW.

	* app/plug-in/plug-in-progress.[ch] (plug_in_progress_get_window):
	new function. Also renamed some functions to match the
	GimpProgress interface, and not the legacy PDB procedure names.

	* tools/pdbgen/pdb/progress.pdb
	* app/core/gimppdbprogress.c: implement get_window() on both
	sides of the wire, keeping backward compatibility (hopefully).

	* libgimp/gimpprogress.[ch]: deprecated gimp_progress_install()
	and added gimp_progress_install_vtable() which takes a vtable with
	padding to be extensible. Added get_window() vtable entry and
	dispatch it accordingly. Also added pulse() which was implemented
	in a hackish way before. Everything is of course backward
	compatible.

	* libgimp/gimpprogressbar.c: inmplement the get_window() stuff
	so a plug-in dialog containing a progress can be the transient
	parent of another dialog in another plug-in.

	* libgimp/gimpui.[ch] (gimp_ui_get_progress_window): new function
	which returns a foreign GdkWindow of this plug-ins progress
	window.

	Renamed gimp_window_set_transient_for_default_display() to
	gimp_window_set_transient() and make it use the progress' window
	handle instead of the display's (which is the right thing to do in
	almost all cases).

	* libgimp/gimp.def
	* libgimp/gimpui.def: add the new functions.

	* tools/pdbgen/enums.pl
	* app/pdb/internal_procs.c
	* app/pdb/progress_cmds.c
	* libgimp/gimpprogress_pdb.[ch]: regenerated.

	* libgimp/gimpexport.c
	* plug-ins/*/*.c: follow API change.
2005-09-09 18:07:31 +00:00
Tor Lillqvist b19dc9af8b Instead of passing a child_setup function whose body is ifdeffed out on
2005-08-26  Tor Lillqvist  <tml@novell.com>

	* app/plug-in/plug-in.c (plug_in_prep_for_exec, plug_in_open):
	Instead of passing a child_setup function whose body is ifdeffed
	out on Win32 to g_spawn_async(), pass NULL for child_setup on
	Win32. Newer g_spawn_async() implementations on Win32 warn if
	child_setup functions are attempted to be used, as they don't make
	sense because without any fork(), they are called in the parent
	process.
2005-08-26 12:03:24 +00:00
Tor Lillqvist 1e295cb070 Make GIMP work on Win32 even if installed in a path containing random
2005-08-24  Tor Lillqvist  <tml@novell.com>

	Make GIMP work on Win32 even if installed in a path containing
	random non-ASCII characters.

	* libgimpbase/gimpenv.c (gimp_toplevel_directory): [Win32] Use
	wide-char API on NT-based Windowses. Keep the toplevel directory
	name in UTF-8. The rest of GIMP assumes it is UTF-8 anyway, and
	for instance passes file names constructed from it to g_open().

	* app/plug-in/plug-in.c (plug_in_open): On Win32, if compiled
	against GLib < 2.8.2, convert the pathname arguments passed to
	g_spawn_async() to locale charset (system codepage). The
	g_spawn*() functions in GLib < 2.8.2 take system codepage
	arguments and not UTF-8.
2005-08-24 22:02:02 +00:00
Michael Natterer 7ed8c44389 removed s/_/-/, proc names are already canonicalized.
2005-08-12  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/plug-in-proc-def.c (plug_in_proc_def_get_help_id):
	removed s/_/-/, proc names are already canonicalized.
2005-08-12 00:51:43 +00:00
Michael Natterer 264fed156c canonicalize proc args registered by plug-ins.
2005-08-05  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/plug-in-message.c (plug_in_handle_proc_install):
	canonicalize proc args registered by plug-ins.

	* plug-ins/script-fu/siod-wrapper.c: removed s/_/-/ for proc args.
2005-08-05 20:23:37 +00:00
Michael Natterer 853f04d5a6 Changed naming scheme for PDB procedure names from
2005-08-03  Michael Natterer  <mitch@gimp.org>

	Changed naming scheme for PDB procedure names from
	random_crap_that_traditionally_has_underscores to
	enforced-canonical-identifiers. I'm pretty sure some things are
	broken after this commit. More changes to come...

	* libgimpbase/gimpbase.def
	* libgimpbase/gimputils.[ch]: added gimp_canonicalize_identifier().

	* app/pdb/procedural_db.[ch] (struct ProcRecord): added
	"gchar *original_name" to keep a procedure's original name as
	reigstered by plug-ins (compat cruft).

	(procedural_db_init_procs): canonicalized list of deprecated
	procedures.

	* app/plug-in/plug-in-proc-def.c (plug_in_proc_def_free): free
	original_name.

	* app/plug-in/plug-in-message.c: canonicalize procedure names
	which are received over the wire.

	* app/plug-in/plug-in-rc.c: serialize the original_name and create
	the canonicalized name on-the-fly when deserializing.

	* app/plug-in/plug-in-run.c: pass the original_name to plug-ins
	when running them because they strcmp() the passed procedure name.

	* app/plug-in/plug-ins.c (plug_ins_add_to_db): pass
	canonical procedure names to procedural_db_execute().

	(plug_ins_file_proc_compare): special-case "gimp-xcf", not "gimp_xcf".

	* app/xcf/xcf.c: changed static XCF procedures accordingly.

	* tools/pdbgen/app.pl
	* tools/pdbgen/lib.pl: do some trivial substitutions to generate
	canonicalized names in app/, and C identifiers with underscores in
	libgimp/.

	* tools/pdbgen/pdb/brushes.pdb
	* tools/pdbgen/pdb/fileops.pdb
	* tools/pdbgen/pdb/gradients.pdb
	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/palettes.pdb
	* tools/pdbgen/pdb/patterns.pdb
	* tools/pdbgen/pdb/plug_in.pdb
	* tools/pdbgen/pdb/procedural_db.pdb
	* tools/pdbgen/pdb/text_tool.pdb
	* tools/pdbgen/pdb/transform_tools.pdb: canonicaloized procedure
	names in calls to std_pdb_deprecated() and in procedure names in
	generated C code.

	* app/pdb/*_cmds.c
	* libgimp/*_pdb.c: regenerated.
2005-08-02 22:52:23 +00:00
Sven Neumann c5dd18497d reverted previous change, it was bogus.
2005-07-06  Sven Neumann  <sven@gimp.org>

	* app/plug-in/plug-ins-query.c (match_strings): reverted previous
	change, it was bogus.

	* app/pdb/procedural-db-query.c: case-insensitive search for
	procedures.
2005-07-06 01:29:14 +00:00
Sven Neumann a19a3ac4aa match case-insensitive.
2005-07-06  Sven Neumann  <sven@gimp.org>

	* app/plug-in/plug-ins-query.c (match_strings): match
	case-insensitive.

	* libgimpwidgets/gimpbrowser.c: unset "focus-on-click" on the
	filter combo-box.

	* plug-ins/dbbrowser/plugin-browser.c: moved "Insertation Date"
	column all the way to the right and renamed to "Installation Date".

	* plug-ins/common/gauss.c: tweaked dialog packing.
2005-07-06 00:31:59 +00:00
Manish Singh 02edf14eec feed environment values through gimp_config_path_expand, so ${gimp..}
2005-06-26  Manish Singh  <yosh@gimp.org>

        * app/core/gimpenvirontable.c: feed environment values through
        gimp_config_path_expand, so ${gimp..} variables can be used.

        * plug-ins/pygimp/Makefile.am: define PYTHONPATH in terms of
        ${gimp_plug_in_dir}. Use ; as a path separator on windows.

        With this final changes, pygimp should work out of the box on
        Win32 now. Thanks to Michael Schumacher and lode leroy for
        figuring out the high level details and testing.
2005-06-26 23:20:21 +00:00
Manish Singh 31dfc85fe9 eat CRs too, since they might be there on Win32 systems.
2005-06-25  Manish Singh  <yosh@gimp.org>

        * app/core/gimpinterpreterdb.c: eat CRs too, since they might be
        there on Win32 systems.
2005-06-25 23:34:25 +00:00
Michael Natterer 9c16c2fc40 don't crash on invalid regular expressions.
2005-05-13  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/plug-ins-query.c (plug_ins_query): don't crash on
	invalid regular expressions.
2005-05-13 08:40:10 +00:00