Commit Graph

64 Commits

Author SHA1 Message Date
Michael Natterer 5f60f5422b app: remove some procedure code duplication
Move the mnemonic and ellipsis removal code to
gimp_procedure_real_get_label() and cache the generated label in
GimpProcedure. Remove the same code from GimpPlugInProcedure and
GimpGeglProcedure.
2019-09-09 00:05:13 +02:00
Michael Natterer 1716666bd1 app: keep the help_id in GimpProcedure not GimpPlugInProcedure 2019-09-08 22:25:26 +02:00
Michael Natterer 453b4f4aa2 pdb: add gimp_pdb_set_proc_menu_label()
and all the needed code in libgimp/ and app/ to set a plug-in
procedure's menu label using the new API. Remove the menu label from
GPProcInstall.
2019-09-08 17:30:54 +02:00
Michael Natterer 303ccbedad pdb: move gimp_plugin_icon_register_invoker() from "plugin" to "pdb"
and call it gimp_pdb_set_proc_icon(). Change icon registration code in
libgimp/ and app/ so it's now possible to register icons for temporary
procedures.
2019-09-08 16:22:32 +02:00
Michael Natterer de121374ef Change the "handles uri" flag of file procedures to "handle remote"
And always pass URIs to all file procedures, the ones what didn't
register as "handles remove" will only ever get local file:// URIs.

Change all file plug-ins (also legacy ones) to expect URIs instead
of filenames, and convert to local paths in the plug-in.

The wire protocol should now be almost 100% clean of non-UTF-8 strings.
2019-08-19 12:05:12 +02:00
Michael Natterer d156028c8a libgimp*, app: add the help-id to the wire protocol
Pass the help-id specified by the procedure to the core, and use it in
the core if set instead of always using the procedure's name (which
was probably good enough for all eternity, but it's still more
consistent this way).
2019-08-08 09:57:56 +02:00
Jehan 5c9114aedf app: allow core file procedure which don't return an image.
This is useful to be able to support file formats other than image
formats. In particular I will use this in the next commit to support a
"GIMP extension" format. When GIMP will open such file, it will
install an extension (not open an image on canvas).

This is an internal flag only, i.e. only usable from core GIMP. File
formats which a plug-in can register are still only image file formats.
2019-04-12 18:42:03 +02:00
Ell b4ac956859 app, pdb: add gimp-register-file-handler-priority procedure
Add a gimp-register-file-handler-priority procedure, which can be
used to set the priority of a file-handler procedure.  When more
than one file-handler procedure matches a file, the procedure with
the lowest priority is used; if more than one procedure has the
lowest priority, it is unspecified which one of them is used.  The
default priority of file-handler procedures is 0.

Add the necessary plumbing (plus some fixes) to the plug-in manager
to handle file-handler priorities.  In particular, use two
different lists for each type of file-handler procedures: one meant
for searching, and is sorted according to priority, and one meant
for display, and is sorted alphabetically.
2018-07-17 02:56:18 -04:00
Michael Natterer 5f700549e7 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
Michael Natterer 63817485c0 app: when a plug-in procedure is not sensitive, show the reason in the tooltip
Return an optional tooltip from gimp_procedure_get_sensitive(), in
GimpPlugInProcedure, build that tooltip from the image types the
procedure works on.
2018-06-22 13:29:52 +02:00
Michael Natterer 7f33edea1b app, libgimp: allow to register more than one MIME type per procedure
GIMP will always use the first one from the list, but at least now
there is a way to register variants.
2017-05-04 23:22:37 +02:00
Michael Natterer 560340e8d6 app, pdb, libgimp: make the raw image importer configurable
Add "import-raw-plug-in" to gimprc, and a new procedure
gimp_register_file_handler_raw(). On startup, remove all load
procedures that are marked as "handles raw" but are not implemented by
the configured plug-in. Add the list of available plug-ins to prefs ->
import/export. Register all file-darktable procedures as handling raw.
2017-05-04 20:38:58 +02:00
Michael Natterer 28e1a379e6 app: remove const qualifiers from all object parameters
They are unreliable because every type checking cast discards them,
they are useless anyway, visual clutter, added inconsistently, and
generally suck. Wanted to do this a long time ago, it was a bad idea
in the first place.
2016-05-19 23:54:14 +02:00
Michael Natterer 7c0d7c6311 app: add new virtual function GimpProcedure::get_help_id()
Implement the new function in GimpPlugInProcedure and remove
gimp_plug_in_procedure_get_help_id().
2016-01-17 17:15:27 +01:00
Michael Natterer 926dd1dffb app: add GimpProcedure::get_sensntive()
to replace gimp_plug_in_procedure_get_seisitive().
2016-01-01 23:24:53 +01:00
Michael Natterer 1d3bf65934 app: turn get_label() and get_blurb() into virtual functions of GimpProcedure 2016-01-01 20:52:45 +01:00
Michael Natterer d5255dc133 app: derive GimpProcedure from GimpViewable
and remove redundant icon managing code from GimpPlugInProcedure
2016-01-01 20:05:32 +01:00
Michael Natterer c3573c3c45 app: keep the plug-in executable path around as GFile 2014-07-08 21:09:35 +02:00
Michael Natterer 23037b5230 app: convert all stock IDs kept around by the core by icon names
Particularly GimpViewable's stock_id. Make sure old config files
containing stock IDs are still properly parsed.
2014-05-07 01:01:56 +02:00
Michael Natterer 697572ccc0 app,libgimp*: fix includes to follow our include policy
- don't include <gdk-pixbuf/gdk-pixbuf.h> in headers in app/
- instead, include it in many .c files instead of <glib-object.h>,
  finally acknowledging the fact that app/ depends on gdk-pixbuf almost
  globally
- fix up includes as if libgimpbase depended in GIO, which it soon will
2013-10-15 01:58:39 +02:00
Michael Natterer 4ab02ea2dd app: store plug-in mtime as gint64 instead of time_t
This was an attempt to fix bug 703113 but didn't change anything,
however an explicit always-64 bit type is cleaner regardless, so here
it is.
2013-07-12 14:43:27 +02:00
Michael Natterer 07f77e5ec8 pdb: allow file procedures to register themselves for handling URIs
and store the flag in pluginrc. There are no URIs passed to procedures
yet and no procedure registers as such, this is just preparation.
2012-11-17 16:01:52 +01:00
Michael Natterer 7610e299ae Use GimpValueArray and GimpParamSpecValueArray
instead of the deprecated stuff from GLib.
2012-05-04 00:51:50 +02:00
Michael Natterer b141bcdb60 Minor plug-in sensitivity refactoring
* app/plug-in/gimppluginprocedure.[ch]
  (gimp_plug_in_procedure_get_sensitive): change GimpImageType
  parameter to GimpDrawable and do the type check internally.

* app/actions/plug-in-actions.c (plug_in_actions_update): pass the
  active drawable instead of its type.
2009-08-22 11:03:05 +02:00
Michael Natterer d9b5207aa2 Change licence to GPLv3 (and to LGPLv3 for libgimp).
2009-01-17  Michael Natterer  <mitch@gimp.org>

	* all files with a GPL header and all COPYING files:

	Change licence to GPLv3 (and to LGPLv3 for libgimp).

	Cleaned up some copyright headers and regenerated the parsers in
	the ImageMap plugin.


svn path=/trunk/; revision=27913
2009-01-17 22:28:01 +00:00
Sven Neumann 2b1bf9b77a app/plug-in/gimppluginprocedure.[ch] moved error handling for asynchronous
2008-08-21  Sven Neumann  <sven@gimp.org>

	* app/plug-in/gimppluginprocedure.[ch]
	* app/plug-in/gimptemporaryprocedure.c: moved error handling for
	asynchronous procedure calls to a central place. Use the plug-in
	label instead of the procedure name for the error message.


svn path=/trunk/; revision=26703
2008-08-21 18:09:41 +00:00
Sven Neumann 5313214382 use GQuark for locale and help domains to avoid duplicating the same
2007-04-24  Sven Neumann  <sven@gimp.org>

	* app/plug-in/gimppluginprocedure.[ch]: use GQuark for locale and
	help domains to avoid duplicating the same strings many times.

	* app/plug-in/gimppluginmanager-restore.c: removed FIXME.


svn path=/trunk/; revision=22304
2007-04-24 10:28:28 +00:00
Sven Neumann 8fd67e0e95 cache the result of gimp_plug_in_procedure_get_label() and made the return
2007-03-10  Sven Neumann  <sven@gimp.org>

	* app/plug-in/gimppluginprocedure.[ch]: cache the result of
	gimp_plug_in_procedure_get_label() and made the return value 
const.


	* app/actions/plug-in-actions.c
	* app/plug-in/gimpplugin-cleanup.c
	* app/plug-in/gimppluginmanager.c
	* app/widgets/gimpfiledialog.c
	* app/widgets/gimpfileprocview.c
	* app/widgets/gimpimagepropview.c: changed accordingly.

	* app/file/file-open.c
	* app/file/file-save.c: include the plug-in name (or actually 
the
	label) in the error messages.


svn path=/trunk/; revision=22095
2007-03-10 21:22:22 +00:00
Michael Natterer 36a955a5ef add "locale_domain" and "help_domain" members and APIs to get/set them.
2007-02-18  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/gimppluginprocedure.[ch]: add "locale_domain" and
	"help_domain" members and APIs to get/set them. Removed locale and
	help domain parameters from all other functions.

	* app/plug-in/gimpplugin.c (gimp_plug_in_add_temp_proc)
	* app/plug-in/plug-in-def.c (plug_in_def_add_procedure)
	(plug_in_def_set_locale_domain_name)
	(plug_in_def_set_help_domain_name): make sure all plug-in procedures
	have locale and help domains.

	* app/plug-in/gimppluginmanager.[ch]: removed function
	gimp_plug_in_manager_get_label().

	* app/plug-in/gimppluginmanager.c
	* app/plug-in/gimpplugin-cleanup.c
	* app/actions/plug-in-actions.c
	* app/widgets/gimpfiledialog.c
	* app/widgets/gimpfileprocview.c
	* app/widgets/gimpimagepropview.c: changed (simplified) accordingly.


svn path=/trunk/; revision=21937
2007-02-18 14:25:34 +00:00
Sven Neumann ccafc8d3bd app/actions/plug-in-actions.c added utility function to retrieve the
2007-02-14  Sven Neumann  <sven@gimp.org>

	* app/actions/plug-in-actions.c
	* app/plug-in/gimppluginprocedure.[ch]: added utility function to
	retrieve the translated blurb of a plug-in procedure. Make sure
	that gettext isn't called with the empty string.


svn path=/trunk/; revision=21917
2007-02-14 13:38:09 +00:00
Sven Neumann 41237259c9 In all files, changed the standard copyright notice to say "GIMP - The GNU
2006-12-09  Sven Neumann  <sven@gimp.org>

        * In all files, changed the standard copyright notice to say
        "GIMP - The GNU Image Manipulation Program".
2006-12-09 21:33:38 +00:00
Michael Natterer 0005f0ff5d app/pdb/Makefile.am app/pdb/gimppluginprocedure.[ch] removed these
2006-08-05  Michael Natterer  <mitch@gimp.org>

	* app/pdb/Makefile.am
	* app/pdb/gimppluginprocedure.[ch]
	* app/pdb/gimptemporaryprocedure.[ch]: removed these files...

	* app/plug-in/Makefile.am
	* app/plug-in/gimppluginprocedure.[ch]
	* app/plug-in/gimptemporaryprocedure.[ch]: ...and added them here.

	* app/Makefile.am
	* app/config/Makefile.am: reordered stuff to make it link again.

	* app/pdb/gimppdb.c: removed gimp_pdb_eek() hack.

	* app/actions/plug-in-actions.c
	* app/dialogs/file-save-dialog.c
	* app/file/file-open.c
	* app/file/file-save.c
	* app/file/file-utils.c
	* app/menus/plug-in-menus.c
	* app/plug-in/gimpplugin-message.c
	* app/plug-in/gimpplugin-progress.c
	* app/plug-in/gimpplugin.c
	* app/plug-in/gimppluginmanager-call.c
	* app/plug-in/gimppluginmanager-file.c
	* app/plug-in/gimppluginmanager-query.c
	* app/plug-in/gimppluginmanager.c
	* app/plug-in/gimppluginprocframe.c
	* app/plug-in/plug-in-def.c
	* app/plug-in/plug-in-rc.c
	* app/widgets/gimpfiledialog.c
	* app/widgets/gimpfileprocview.c
	* app/widgets/gimppluginaction.c
	* app/xcf/xcf.c
	* tools/pdbgen/pdb/plug_in.pdb: changed includes accordingly.

	* app/pdb/plug_in_cmds.c: regenerated.
2006-08-05 21:21:01 +00:00
Michael Natterer cfe5e9b137 changed enum PlugInImageType to GimpPlugInImageType.
2006-05-08  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/plug-in-enums.[ch]: changed enum PlugInImageType
	to GimpPlugInImageType.

	* app/pdb/gimppluginprocedure.[ch]: changed accordingly.
2006-05-08 13:18:02 +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
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 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 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 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 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 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 4f2e5afc38 new function which finds a proc_def in a GSList by its procedure name.
2005-05-04  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/plug-in-proc-def.[ch] (plug_in_proc_def_find): new
	function which finds a proc_def in a GSList by its procedure name.

	* app/plug-in/plug-in-message.c
	* app/plug-in/plug-ins.c
	* tools/pdbgen/pdb/plug_in.pdb: use it instead of iterating and
	comparing manually.

	* app/pdb/plug_in_cmds.c: regenerated.

	* app/plug-in/plug-in-def.c: minor cleanups.
2005-05-04 18:53:58 +00:00
Michael Natterer e103a8802d new function.
2005-05-04  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/plug-in-proc-def.[ch] (plug_in_proc_def_set_icon):
	new function.

	* tools/pdbgen/pdb/plug_in.pdb: removed the same code here and use
	the new function.

	* app/pdb/plug_in_cmds.c: regenerated.
2005-05-03 23:47:35 +00:00
Sven Neumann 380b1703df added a boolean flag to the ProcDef struct to identify file procedures.
2005-04-25  Sven Neumann  <sven@gimp.org>

	* app/plug-in/plug-in-proc-def.h: added a boolean flag to the
	ProcDef struct to identify file procedures.

	* app/xcf/xcf.c: changed accordingly.

	* app/plug-in/plug-ins.c: look at the new flag instead of checking
	extensions, prefixes and magics being non-NULL. A file plug-in
	doesn't necessarily have any of these fields set.

	* app/plug-in/plug-in-rc.c: changed pluginrc format to contain an
	extra section for file procedures. Moved all file related info there.
2005-04-25 12:42:26 +00:00
Sven Neumann b62ca985aa app/plug-in/plug-in-proc-def.[ch] app/plug-in/plug-in-rc.c allow to
2004-11-13  Sven Neumann  <sven@gimp.org>

	* app/plug-in/plug-in-proc-def.[ch]
	* app/plug-in/plug-in-rc.c
	* app/plug-in/plug-ins.[ch]: allow to associate a procedure for
	thumbnail loading with any file load procedure.

	* tools/pdbgen/pdb/fileops.pdb: export this functionality to the
	PDB as gimp_register_thumbnail_loader().

	* app/pdb/fileops_cmds.c
	* app/pdb/internal_procs.c
	* libgimp/gimpfileops_pdb.[ch]: regenerated.

	* app/core/gimpimagefile.c
	* app/file/file-open.[ch]: when creating a thumbnail for an image
	file, use a thumbnail load procedure if available.

	* plug-ins/common/svg.c: added "file_svg_load_thumb", a procedure
	that allows to load a small preview of the SVG image.
2004-11-13 17:06:06 +00:00
Michael Natterer 9ffc00be80 app/plug-in/Makefile.am removed... ...and added with a new name.
2004-09-22  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/Makefile.am
	* app/plug-in/plug-in-proc.[ch]: removed...
	* app/plug-in/plug-in-proc-def.[ch]: ...and added with a new name.

	* app/plug-in/plug-in-def.[ch]
	* app/plug-in/plug-in-message.[ch]
	* app/plug-in/plug-in-progress.[ch]
	* app/plug-in/plug-in-rc.[ch]
	* app/plug-in/plug-in-run.[ch]
	* app/plug-in/plug-in.[ch]
	* app/plug-in/plug-ins.[ch]
	* app/actions/plug-in-actions.c
	* app/actions/plug-in-commands.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.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: changed accordingly plus some
	minor cosmetic cleanups.

	* app/pdb/fileops_cmds.c
	* app/pdb/plug_in_cmds.c: regenerated.
2004-09-22 15:12:24 +00:00
Michael Natterer ea8198e401 new function which checks a GimpImageType against the
2004-08-08  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/plug-in-proc.[ch] (plug_in_proc_def_get_sensitive):
	new function which checks a GimpImageType against the
	proc_def->image_types_val mask.

	* app/actions/plug-in-actions.c: use the new function here. Also
	separated setting the "Repeat last" and "Reshow last" actions'
	labels from setting their sensitivity and made them use the same
	sensitivity logic as all other plug-in actions. Fixes bug #149567.
2004-08-08 10:53:19 +00:00
Michael Natterer 3fb934b2a4 Allow plug-ins to register menu icons. Fixes bug #120500.
2004-05-18  Michael Natterer  <mitch@gimp.org>

	Allow plug-ins to register menu icons. Fixes bug #120500.

	* app/core/core-enums.[ch]: added enum GimpIconType which can
	be one of { STOCK_ID, IMAGE_FILE, INLINE_PIXBUF }.

	* app/config/gimpconfigwriter.[ch] (gimp_config_writer_data)
	* app/config/gimpscanner.[ch] (gimp_scanner_parse_data): new
	functions which write/parse raw binary data. Needed for storing
	inline pixbufs in pluginrc.

	* app/config/gimpconfigwriter.[ch] (gimp_config_writer_identifier):
	new function which writes out an unquoted and unescaped string.

	* app/plug-in/plug-in-proc.[ch] (struct PlugInProcDef): added
	new members "icon_type", "icon_data_length" and "icon_data".
	Reordered members so file_proc specific stuff is at the end.

	(plug_in_proc_def_get_stock_id)
	(plug_in_proc_def_get_pixbuf): new functions to access the
	procedure's icon.

	* app/plug-in/plug-in-rc.c: save/restore the registered icons.

	* app/actions/file-dialog-actions.c
	* app/actions/plug-in-actions.c: set the action's stock ID from
	the procedure's stock ID.

	* app/widgets/gimppluginaction.c
	(gimp_plug_in_action_connect_proxy): if the procedure provides a
	pixbuf, set it as icon for the menu item.

	* app/menus/file-dialog-menu.[ch]
	* app/menus/file-open-menu.c
	* app/menus/file-save-menu.c
	* app/xcf/xcf.c: changed accordingly.

	* tools/pdbgen/pdb/plug_in.pdb (plugin_icon_register): new PDB
	function which can be called during query().

	* tools/pdbgen/enums.pl
	* app/pdb/internal_procs.c
	* app/pdb/plug_in_cmds.c
	* libgimp/gimpenums.h
	* libgimp/gimpplugin_pdb.c
	* libgimp/gimpplugin_pdb.h
	* plug-ins/pygimp/gimpenums.py
	* plug-ins/script-fu/script-fu-constants.c: regenerated.

	* plug-ins/common/plugindetails.c
	* plug-ins/common/uniteditor.c
	* plug-ins/print/print.c: register stock_id icons.

	* plug-ins/common/screenshot.c: register an inline_pixbuf icon for
	testing purposes (used emblem-camera.png from gnome-icon-theme).

	* app/actions/dialogs-actions.c
	* app/actions/file-actions.c: unrelated: added some more icons
	to menu items.
2004-05-18 21:19:43 +00:00