gimp/libgimp/gimpplugin_pdb.c

294 lines
9.1 KiB
C
Raw Normal View History

Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> Episode IV... * app/Makefile.am * app/message_cmds.c: new name * app/interface_cmds.c: removed * app/help_cmds.c: new name * app/gimphelp_cmds.c: removed * app/internal_procs.c * app/gimphelp_cmds.c * app/plug_in_cmds.c: moved gimp_plugin_help_register to plug_in_cmds.c, s/gimp_plugin_domain_add/gimp_plugin_domain_register/ * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimpfileops_pdb.[ch] * libgimp/gimpguides_pdb.[ch] * libgimp/gimpmessage_pdb.[ch] * libgimp/gimpprocedural_db_pdb.[ch] * libgimp/gimpplugin_pdb.[ch]: new files containing PDB wrappers moved out of libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdisplay_pdb.[ch] * libgimp/gimpdrawable_pdb.[ch] * libgimp/gimphelp_pdb.[ch] * libgimp/gimpimage_pdb.[ch] * libgimp/gimplayer_pdb.c * libgimp/gimpparasite_pdb.c * libgimp/gimpselection_pdb.c: various changes. * libgimp/gimpunit.c: new file * libgimp/gimpunit_pdb.[ch]: contains only PDB wrappers prefixed with "_" which are called from libgimp/gimpunit.c only. * libgimp/gimpunit.h: minor stuff * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_query_database gimp_query_images * libgimp/gimp.[ch]: removed all PDB wrappers. * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: changed * tools/pdbgen/lib.pl: tried to fix libgimp autogeneration and fixed just a few comments. * tools/pdbgen/pdb/interface.pdb * tools/pdbgen/pdb/gimphelp.pdb: removed * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb: new names * plug-ins/script-fu/script-fu.c * plug-ins/perl/Gimp/Lib.xs: s/gimp_plugin_domain_add/gimp_plugin_domain_register/ 2000-05-31 Michael Natterer <mitch@gimp.org> * POTFILES.in: s/gimpunit_pdb/gimpunit/
2000-05-31 21:24:14 +08:00
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-2003 Peter Mattis and Spencer Kimball
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> Episode IV... * app/Makefile.am * app/message_cmds.c: new name * app/interface_cmds.c: removed * app/help_cmds.c: new name * app/gimphelp_cmds.c: removed * app/internal_procs.c * app/gimphelp_cmds.c * app/plug_in_cmds.c: moved gimp_plugin_help_register to plug_in_cmds.c, s/gimp_plugin_domain_add/gimp_plugin_domain_register/ * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimpfileops_pdb.[ch] * libgimp/gimpguides_pdb.[ch] * libgimp/gimpmessage_pdb.[ch] * libgimp/gimpprocedural_db_pdb.[ch] * libgimp/gimpplugin_pdb.[ch]: new files containing PDB wrappers moved out of libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdisplay_pdb.[ch] * libgimp/gimpdrawable_pdb.[ch] * libgimp/gimphelp_pdb.[ch] * libgimp/gimpimage_pdb.[ch] * libgimp/gimplayer_pdb.c * libgimp/gimpparasite_pdb.c * libgimp/gimpselection_pdb.c: various changes. * libgimp/gimpunit.c: new file * libgimp/gimpunit_pdb.[ch]: contains only PDB wrappers prefixed with "_" which are called from libgimp/gimpunit.c only. * libgimp/gimpunit.h: minor stuff * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_query_database gimp_query_images * libgimp/gimp.[ch]: removed all PDB wrappers. * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: changed * tools/pdbgen/lib.pl: tried to fix libgimp autogeneration and fixed just a few comments. * tools/pdbgen/pdb/interface.pdb * tools/pdbgen/pdb/gimphelp.pdb: removed * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb: new names * plug-ins/script-fu/script-fu.c * plug-ins/perl/Gimp/Lib.xs: s/gimp_plugin_domain_add/gimp_plugin_domain_register/ 2000-05-31 Michael Natterer <mitch@gimp.org> * POTFILES.in: s/gimpunit_pdb/gimpunit/
2000-05-31 21:24:14 +08:00
*
* gimpplugin_pdb.c
*
* This library is free software: you can redistribute it and/or
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> Episode IV... * app/Makefile.am * app/message_cmds.c: new name * app/interface_cmds.c: removed * app/help_cmds.c: new name * app/gimphelp_cmds.c: removed * app/internal_procs.c * app/gimphelp_cmds.c * app/plug_in_cmds.c: moved gimp_plugin_help_register to plug_in_cmds.c, s/gimp_plugin_domain_add/gimp_plugin_domain_register/ * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimpfileops_pdb.[ch] * libgimp/gimpguides_pdb.[ch] * libgimp/gimpmessage_pdb.[ch] * libgimp/gimpprocedural_db_pdb.[ch] * libgimp/gimpplugin_pdb.[ch]: new files containing PDB wrappers moved out of libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdisplay_pdb.[ch] * libgimp/gimpdrawable_pdb.[ch] * libgimp/gimphelp_pdb.[ch] * libgimp/gimpimage_pdb.[ch] * libgimp/gimplayer_pdb.c * libgimp/gimpparasite_pdb.c * libgimp/gimpselection_pdb.c: various changes. * libgimp/gimpunit.c: new file * libgimp/gimpunit_pdb.[ch]: contains only PDB wrappers prefixed with "_" which are called from libgimp/gimpunit.c only. * libgimp/gimpunit.h: minor stuff * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_query_database gimp_query_images * libgimp/gimp.[ch]: removed all PDB wrappers. * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: changed * tools/pdbgen/lib.pl: tried to fix libgimp autogeneration and fixed just a few comments. * tools/pdbgen/pdb/interface.pdb * tools/pdbgen/pdb/gimphelp.pdb: removed * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb: new names * plug-ins/script-fu/script-fu.c * plug-ins/perl/Gimp/Lib.xs: s/gimp_plugin_domain_add/gimp_plugin_domain_register/ 2000-05-31 Michael Natterer <mitch@gimp.org> * POTFILES.in: s/gimpunit_pdb/gimpunit/
2000-05-31 21:24:14 +08:00
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> Episode IV... * app/Makefile.am * app/message_cmds.c: new name * app/interface_cmds.c: removed * app/help_cmds.c: new name * app/gimphelp_cmds.c: removed * app/internal_procs.c * app/gimphelp_cmds.c * app/plug_in_cmds.c: moved gimp_plugin_help_register to plug_in_cmds.c, s/gimp_plugin_domain_add/gimp_plugin_domain_register/ * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimpfileops_pdb.[ch] * libgimp/gimpguides_pdb.[ch] * libgimp/gimpmessage_pdb.[ch] * libgimp/gimpprocedural_db_pdb.[ch] * libgimp/gimpplugin_pdb.[ch]: new files containing PDB wrappers moved out of libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdisplay_pdb.[ch] * libgimp/gimpdrawable_pdb.[ch] * libgimp/gimphelp_pdb.[ch] * libgimp/gimpimage_pdb.[ch] * libgimp/gimplayer_pdb.c * libgimp/gimpparasite_pdb.c * libgimp/gimpselection_pdb.c: various changes. * libgimp/gimpunit.c: new file * libgimp/gimpunit_pdb.[ch]: contains only PDB wrappers prefixed with "_" which are called from libgimp/gimpunit.c only. * libgimp/gimpunit.h: minor stuff * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_query_database gimp_query_images * libgimp/gimp.[ch]: removed all PDB wrappers. * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: changed * tools/pdbgen/lib.pl: tried to fix libgimp autogeneration and fixed just a few comments. * tools/pdbgen/pdb/interface.pdb * tools/pdbgen/pdb/gimphelp.pdb: removed * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb: new names * plug-ins/script-fu/script-fu.c * plug-ins/perl/Gimp/Lib.xs: s/gimp_plugin_domain_add/gimp_plugin_domain_register/ 2000-05-31 Michael Natterer <mitch@gimp.org> * POTFILES.in: s/gimpunit_pdb/gimpunit/
2000-05-31 21:24:14 +08:00
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> Episode IV... * app/Makefile.am * app/message_cmds.c: new name * app/interface_cmds.c: removed * app/help_cmds.c: new name * app/gimphelp_cmds.c: removed * app/internal_procs.c * app/gimphelp_cmds.c * app/plug_in_cmds.c: moved gimp_plugin_help_register to plug_in_cmds.c, s/gimp_plugin_domain_add/gimp_plugin_domain_register/ * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimpfileops_pdb.[ch] * libgimp/gimpguides_pdb.[ch] * libgimp/gimpmessage_pdb.[ch] * libgimp/gimpprocedural_db_pdb.[ch] * libgimp/gimpplugin_pdb.[ch]: new files containing PDB wrappers moved out of libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdisplay_pdb.[ch] * libgimp/gimpdrawable_pdb.[ch] * libgimp/gimphelp_pdb.[ch] * libgimp/gimpimage_pdb.[ch] * libgimp/gimplayer_pdb.c * libgimp/gimpparasite_pdb.c * libgimp/gimpselection_pdb.c: various changes. * libgimp/gimpunit.c: new file * libgimp/gimpunit_pdb.[ch]: contains only PDB wrappers prefixed with "_" which are called from libgimp/gimpunit.c only. * libgimp/gimpunit.h: minor stuff * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_query_database gimp_query_images * libgimp/gimp.[ch]: removed all PDB wrappers. * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: changed * tools/pdbgen/lib.pl: tried to fix libgimp autogeneration and fixed just a few comments. * tools/pdbgen/pdb/interface.pdb * tools/pdbgen/pdb/gimphelp.pdb: removed * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb: new names * plug-ins/script-fu/script-fu.c * plug-ins/perl/Gimp/Lib.xs: s/gimp_plugin_domain_add/gimp_plugin_domain_register/ 2000-05-31 Michael Natterer <mitch@gimp.org> * POTFILES.in: s/gimpunit_pdb/gimpunit/
2000-05-31 21:24:14 +08:00
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see
* <http://www.gnu.org/licenses/>.
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> Episode IV... * app/Makefile.am * app/message_cmds.c: new name * app/interface_cmds.c: removed * app/help_cmds.c: new name * app/gimphelp_cmds.c: removed * app/internal_procs.c * app/gimphelp_cmds.c * app/plug_in_cmds.c: moved gimp_plugin_help_register to plug_in_cmds.c, s/gimp_plugin_domain_add/gimp_plugin_domain_register/ * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimpfileops_pdb.[ch] * libgimp/gimpguides_pdb.[ch] * libgimp/gimpmessage_pdb.[ch] * libgimp/gimpprocedural_db_pdb.[ch] * libgimp/gimpplugin_pdb.[ch]: new files containing PDB wrappers moved out of libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdisplay_pdb.[ch] * libgimp/gimpdrawable_pdb.[ch] * libgimp/gimphelp_pdb.[ch] * libgimp/gimpimage_pdb.[ch] * libgimp/gimplayer_pdb.c * libgimp/gimpparasite_pdb.c * libgimp/gimpselection_pdb.c: various changes. * libgimp/gimpunit.c: new file * libgimp/gimpunit_pdb.[ch]: contains only PDB wrappers prefixed with "_" which are called from libgimp/gimpunit.c only. * libgimp/gimpunit.h: minor stuff * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_query_database gimp_query_images * libgimp/gimp.[ch]: removed all PDB wrappers. * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: changed * tools/pdbgen/lib.pl: tried to fix libgimp autogeneration and fixed just a few comments. * tools/pdbgen/pdb/interface.pdb * tools/pdbgen/pdb/gimphelp.pdb: removed * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb: new names * plug-ins/script-fu/script-fu.c * plug-ins/perl/Gimp/Lib.xs: s/gimp_plugin_domain_add/gimp_plugin_domain_register/ 2000-05-31 Michael Natterer <mitch@gimp.org> * POTFILES.in: s/gimpunit_pdb/gimpunit/
2000-05-31 21:24:14 +08:00
*/
/* NOTE: This file is auto-generated by pdbgen.pl */
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> Episode IV... * app/Makefile.am * app/message_cmds.c: new name * app/interface_cmds.c: removed * app/help_cmds.c: new name * app/gimphelp_cmds.c: removed * app/internal_procs.c * app/gimphelp_cmds.c * app/plug_in_cmds.c: moved gimp_plugin_help_register to plug_in_cmds.c, s/gimp_plugin_domain_add/gimp_plugin_domain_register/ * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimpfileops_pdb.[ch] * libgimp/gimpguides_pdb.[ch] * libgimp/gimpmessage_pdb.[ch] * libgimp/gimpprocedural_db_pdb.[ch] * libgimp/gimpplugin_pdb.[ch]: new files containing PDB wrappers moved out of libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdisplay_pdb.[ch] * libgimp/gimpdrawable_pdb.[ch] * libgimp/gimphelp_pdb.[ch] * libgimp/gimpimage_pdb.[ch] * libgimp/gimplayer_pdb.c * libgimp/gimpparasite_pdb.c * libgimp/gimpselection_pdb.c: various changes. * libgimp/gimpunit.c: new file * libgimp/gimpunit_pdb.[ch]: contains only PDB wrappers prefixed with "_" which are called from libgimp/gimpunit.c only. * libgimp/gimpunit.h: minor stuff * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_query_database gimp_query_images * libgimp/gimp.[ch]: removed all PDB wrappers. * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: changed * tools/pdbgen/lib.pl: tried to fix libgimp autogeneration and fixed just a few comments. * tools/pdbgen/pdb/interface.pdb * tools/pdbgen/pdb/gimphelp.pdb: removed * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb: new names * plug-ins/script-fu/script-fu.c * plug-ins/perl/Gimp/Lib.xs: s/gimp_plugin_domain_add/gimp_plugin_domain_register/ 2000-05-31 Michael Natterer <mitch@gimp.org> * POTFILES.in: s/gimpunit_pdb/gimpunit/
2000-05-31 21:24:14 +08:00
#include "config.h"
#include "gimp.h"
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> Episode IV... * app/Makefile.am * app/message_cmds.c: new name * app/interface_cmds.c: removed * app/help_cmds.c: new name * app/gimphelp_cmds.c: removed * app/internal_procs.c * app/gimphelp_cmds.c * app/plug_in_cmds.c: moved gimp_plugin_help_register to plug_in_cmds.c, s/gimp_plugin_domain_add/gimp_plugin_domain_register/ * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimpfileops_pdb.[ch] * libgimp/gimpguides_pdb.[ch] * libgimp/gimpmessage_pdb.[ch] * libgimp/gimpprocedural_db_pdb.[ch] * libgimp/gimpplugin_pdb.[ch]: new files containing PDB wrappers moved out of libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdisplay_pdb.[ch] * libgimp/gimpdrawable_pdb.[ch] * libgimp/gimphelp_pdb.[ch] * libgimp/gimpimage_pdb.[ch] * libgimp/gimplayer_pdb.c * libgimp/gimpparasite_pdb.c * libgimp/gimpselection_pdb.c: various changes. * libgimp/gimpunit.c: new file * libgimp/gimpunit_pdb.[ch]: contains only PDB wrappers prefixed with "_" which are called from libgimp/gimpunit.c only. * libgimp/gimpunit.h: minor stuff * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_query_database gimp_query_images * libgimp/gimp.[ch]: removed all PDB wrappers. * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: changed * tools/pdbgen/lib.pl: tried to fix libgimp autogeneration and fixed just a few comments. * tools/pdbgen/pdb/interface.pdb * tools/pdbgen/pdb/gimphelp.pdb: removed * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb: new names * plug-ins/script-fu/script-fu.c * plug-ins/perl/Gimp/Lib.xs: s/gimp_plugin_domain_add/gimp_plugin_domain_register/ 2000-05-31 Michael Natterer <mitch@gimp.org> * POTFILES.in: s/gimpunit_pdb/gimpunit/
2000-05-31 21:24:14 +08:00
/**
* SECTION: gimpplugin
* @title: gimpplugin
* @short_description: Functions useful for plugins, e.g. registration and progress indicators.
*
* Functions useful for plugins, e.g. registration and progress
* indicators.
**/
/**
* gimp_plugin_domain_register:
* @domain_name: The name of the textdomain (must be unique).
* @domain_path: The absolute path to the compiled message catalog (may be NULL).
*
* Registers a textdomain for localisation.
*
* This procedure adds a textdomain to the list of domains Gimp
* searches for strings when translating its menu entries. There is no
* need to call this function for plug-ins that have their strings
* included in the 'gimp-std-plugins' domain as that is used by
* default. If the compiled message catalog is not in the standard
* location, you may specify an absolute path to another location. This
* procedure can only be called in the query function of a plug-in and
* it has to be called before any procedure is installed.
*
* Returns: TRUE on success.
**/
gboolean
gimp_plugin_domain_register (const gchar *domain_name,
const gchar *domain_path)
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> Episode IV... * app/Makefile.am * app/message_cmds.c: new name * app/interface_cmds.c: removed * app/help_cmds.c: new name * app/gimphelp_cmds.c: removed * app/internal_procs.c * app/gimphelp_cmds.c * app/plug_in_cmds.c: moved gimp_plugin_help_register to plug_in_cmds.c, s/gimp_plugin_domain_add/gimp_plugin_domain_register/ * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimpfileops_pdb.[ch] * libgimp/gimpguides_pdb.[ch] * libgimp/gimpmessage_pdb.[ch] * libgimp/gimpprocedural_db_pdb.[ch] * libgimp/gimpplugin_pdb.[ch]: new files containing PDB wrappers moved out of libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdisplay_pdb.[ch] * libgimp/gimpdrawable_pdb.[ch] * libgimp/gimphelp_pdb.[ch] * libgimp/gimpimage_pdb.[ch] * libgimp/gimplayer_pdb.c * libgimp/gimpparasite_pdb.c * libgimp/gimpselection_pdb.c: various changes. * libgimp/gimpunit.c: new file * libgimp/gimpunit_pdb.[ch]: contains only PDB wrappers prefixed with "_" which are called from libgimp/gimpunit.c only. * libgimp/gimpunit.h: minor stuff * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_query_database gimp_query_images * libgimp/gimp.[ch]: removed all PDB wrappers. * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: changed * tools/pdbgen/lib.pl: tried to fix libgimp autogeneration and fixed just a few comments. * tools/pdbgen/pdb/interface.pdb * tools/pdbgen/pdb/gimphelp.pdb: removed * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb: new names * plug-ins/script-fu/script-fu.c * plug-ins/perl/Gimp/Lib.xs: s/gimp_plugin_domain_add/gimp_plugin_domain_register/ 2000-05-31 Michael Natterer <mitch@gimp.org> * POTFILES.in: s/gimpunit_pdb/gimpunit/
2000-05-31 21:24:14 +08:00
{
GimpParam *return_vals;
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> Episode IV... * app/Makefile.am * app/message_cmds.c: new name * app/interface_cmds.c: removed * app/help_cmds.c: new name * app/gimphelp_cmds.c: removed * app/internal_procs.c * app/gimphelp_cmds.c * app/plug_in_cmds.c: moved gimp_plugin_help_register to plug_in_cmds.c, s/gimp_plugin_domain_add/gimp_plugin_domain_register/ * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimpfileops_pdb.[ch] * libgimp/gimpguides_pdb.[ch] * libgimp/gimpmessage_pdb.[ch] * libgimp/gimpprocedural_db_pdb.[ch] * libgimp/gimpplugin_pdb.[ch]: new files containing PDB wrappers moved out of libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdisplay_pdb.[ch] * libgimp/gimpdrawable_pdb.[ch] * libgimp/gimphelp_pdb.[ch] * libgimp/gimpimage_pdb.[ch] * libgimp/gimplayer_pdb.c * libgimp/gimpparasite_pdb.c * libgimp/gimpselection_pdb.c: various changes. * libgimp/gimpunit.c: new file * libgimp/gimpunit_pdb.[ch]: contains only PDB wrappers prefixed with "_" which are called from libgimp/gimpunit.c only. * libgimp/gimpunit.h: minor stuff * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_query_database gimp_query_images * libgimp/gimp.[ch]: removed all PDB wrappers. * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: changed * tools/pdbgen/lib.pl: tried to fix libgimp autogeneration and fixed just a few comments. * tools/pdbgen/pdb/interface.pdb * tools/pdbgen/pdb/gimphelp.pdb: removed * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb: new names * plug-ins/script-fu/script-fu.c * plug-ins/perl/Gimp/Lib.xs: s/gimp_plugin_domain_add/gimp_plugin_domain_register/ 2000-05-31 Michael Natterer <mitch@gimp.org> * POTFILES.in: s/gimpunit_pdb/gimpunit/
2000-05-31 21:24:14 +08:00
gint nreturn_vals;
gboolean success = TRUE;
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> Episode IV... * app/Makefile.am * app/message_cmds.c: new name * app/interface_cmds.c: removed * app/help_cmds.c: new name * app/gimphelp_cmds.c: removed * app/internal_procs.c * app/gimphelp_cmds.c * app/plug_in_cmds.c: moved gimp_plugin_help_register to plug_in_cmds.c, s/gimp_plugin_domain_add/gimp_plugin_domain_register/ * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimpfileops_pdb.[ch] * libgimp/gimpguides_pdb.[ch] * libgimp/gimpmessage_pdb.[ch] * libgimp/gimpprocedural_db_pdb.[ch] * libgimp/gimpplugin_pdb.[ch]: new files containing PDB wrappers moved out of libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdisplay_pdb.[ch] * libgimp/gimpdrawable_pdb.[ch] * libgimp/gimphelp_pdb.[ch] * libgimp/gimpimage_pdb.[ch] * libgimp/gimplayer_pdb.c * libgimp/gimpparasite_pdb.c * libgimp/gimpselection_pdb.c: various changes. * libgimp/gimpunit.c: new file * libgimp/gimpunit_pdb.[ch]: contains only PDB wrappers prefixed with "_" which are called from libgimp/gimpunit.c only. * libgimp/gimpunit.h: minor stuff * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_query_database gimp_query_images * libgimp/gimp.[ch]: removed all PDB wrappers. * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: changed * tools/pdbgen/lib.pl: tried to fix libgimp autogeneration and fixed just a few comments. * tools/pdbgen/pdb/interface.pdb * tools/pdbgen/pdb/gimphelp.pdb: removed * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb: new names * plug-ins/script-fu/script-fu.c * plug-ins/perl/Gimp/Lib.xs: s/gimp_plugin_domain_add/gimp_plugin_domain_register/ 2000-05-31 Michael Natterer <mitch@gimp.org> * POTFILES.in: s/gimpunit_pdb/gimpunit/
2000-05-31 21:24:14 +08:00
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-03 06:52:23 +08:00
return_vals = gimp_run_procedure ("gimp-plugin-domain-register",
&nreturn_vals,
GIMP_PDB_STRING, domain_name,
GIMP_PDB_STRING, domain_path,
GIMP_PDB_END);
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> Episode IV... * app/Makefile.am * app/message_cmds.c: new name * app/interface_cmds.c: removed * app/help_cmds.c: new name * app/gimphelp_cmds.c: removed * app/internal_procs.c * app/gimphelp_cmds.c * app/plug_in_cmds.c: moved gimp_plugin_help_register to plug_in_cmds.c, s/gimp_plugin_domain_add/gimp_plugin_domain_register/ * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimpfileops_pdb.[ch] * libgimp/gimpguides_pdb.[ch] * libgimp/gimpmessage_pdb.[ch] * libgimp/gimpprocedural_db_pdb.[ch] * libgimp/gimpplugin_pdb.[ch]: new files containing PDB wrappers moved out of libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdisplay_pdb.[ch] * libgimp/gimpdrawable_pdb.[ch] * libgimp/gimphelp_pdb.[ch] * libgimp/gimpimage_pdb.[ch] * libgimp/gimplayer_pdb.c * libgimp/gimpparasite_pdb.c * libgimp/gimpselection_pdb.c: various changes. * libgimp/gimpunit.c: new file * libgimp/gimpunit_pdb.[ch]: contains only PDB wrappers prefixed with "_" which are called from libgimp/gimpunit.c only. * libgimp/gimpunit.h: minor stuff * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_query_database gimp_query_images * libgimp/gimp.[ch]: removed all PDB wrappers. * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: changed * tools/pdbgen/lib.pl: tried to fix libgimp autogeneration and fixed just a few comments. * tools/pdbgen/pdb/interface.pdb * tools/pdbgen/pdb/gimphelp.pdb: removed * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb: new names * plug-ins/script-fu/script-fu.c * plug-ins/perl/Gimp/Lib.xs: s/gimp_plugin_domain_add/gimp_plugin_domain_register/ 2000-05-31 Michael Natterer <mitch@gimp.org> * POTFILES.in: s/gimpunit_pdb/gimpunit/
2000-05-31 21:24:14 +08:00
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> Episode IV... * app/Makefile.am * app/message_cmds.c: new name * app/interface_cmds.c: removed * app/help_cmds.c: new name * app/gimphelp_cmds.c: removed * app/internal_procs.c * app/gimphelp_cmds.c * app/plug_in_cmds.c: moved gimp_plugin_help_register to plug_in_cmds.c, s/gimp_plugin_domain_add/gimp_plugin_domain_register/ * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimpfileops_pdb.[ch] * libgimp/gimpguides_pdb.[ch] * libgimp/gimpmessage_pdb.[ch] * libgimp/gimpprocedural_db_pdb.[ch] * libgimp/gimpplugin_pdb.[ch]: new files containing PDB wrappers moved out of libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdisplay_pdb.[ch] * libgimp/gimpdrawable_pdb.[ch] * libgimp/gimphelp_pdb.[ch] * libgimp/gimpimage_pdb.[ch] * libgimp/gimplayer_pdb.c * libgimp/gimpparasite_pdb.c * libgimp/gimpselection_pdb.c: various changes. * libgimp/gimpunit.c: new file * libgimp/gimpunit_pdb.[ch]: contains only PDB wrappers prefixed with "_" which are called from libgimp/gimpunit.c only. * libgimp/gimpunit.h: minor stuff * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_query_database gimp_query_images * libgimp/gimp.[ch]: removed all PDB wrappers. * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: changed * tools/pdbgen/lib.pl: tried to fix libgimp autogeneration and fixed just a few comments. * tools/pdbgen/pdb/interface.pdb * tools/pdbgen/pdb/gimphelp.pdb: removed * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb: new names * plug-ins/script-fu/script-fu.c * plug-ins/perl/Gimp/Lib.xs: s/gimp_plugin_domain_add/gimp_plugin_domain_register/ 2000-05-31 Michael Natterer <mitch@gimp.org> * POTFILES.in: s/gimpunit_pdb/gimpunit/
2000-05-31 21:24:14 +08:00
gimp_destroy_params (return_vals, nreturn_vals);
return success;
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> Episode IV... * app/Makefile.am * app/message_cmds.c: new name * app/interface_cmds.c: removed * app/help_cmds.c: new name * app/gimphelp_cmds.c: removed * app/internal_procs.c * app/gimphelp_cmds.c * app/plug_in_cmds.c: moved gimp_plugin_help_register to plug_in_cmds.c, s/gimp_plugin_domain_add/gimp_plugin_domain_register/ * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimpfileops_pdb.[ch] * libgimp/gimpguides_pdb.[ch] * libgimp/gimpmessage_pdb.[ch] * libgimp/gimpprocedural_db_pdb.[ch] * libgimp/gimpplugin_pdb.[ch]: new files containing PDB wrappers moved out of libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdisplay_pdb.[ch] * libgimp/gimpdrawable_pdb.[ch] * libgimp/gimphelp_pdb.[ch] * libgimp/gimpimage_pdb.[ch] * libgimp/gimplayer_pdb.c * libgimp/gimpparasite_pdb.c * libgimp/gimpselection_pdb.c: various changes. * libgimp/gimpunit.c: new file * libgimp/gimpunit_pdb.[ch]: contains only PDB wrappers prefixed with "_" which are called from libgimp/gimpunit.c only. * libgimp/gimpunit.h: minor stuff * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_query_database gimp_query_images * libgimp/gimp.[ch]: removed all PDB wrappers. * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: changed * tools/pdbgen/lib.pl: tried to fix libgimp autogeneration and fixed just a few comments. * tools/pdbgen/pdb/interface.pdb * tools/pdbgen/pdb/gimphelp.pdb: removed * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb: new names * plug-ins/script-fu/script-fu.c * plug-ins/perl/Gimp/Lib.xs: s/gimp_plugin_domain_add/gimp_plugin_domain_register/ 2000-05-31 Michael Natterer <mitch@gimp.org> * POTFILES.in: s/gimpunit_pdb/gimpunit/
2000-05-31 21:24:14 +08:00
}
/**
* gimp_plugin_help_register:
Completed the new help infrastructure. Needs some polishing but basically 2003-08-28 Michael Natterer <mitch@gimp.org> Completed the new help infrastructure. Needs some polishing but basically works as proposed: * tools/pdbgen/pdb/plug_in.pdb: changed gimp_plugin_help_register() to take a "domain_name" (which is the XML namespace) and a "domain_uri" (which is the root of the plug-in's help pages). * tools/pdbgen/pdb/help.pdb: changed gimp_help() to take help_id instead of a non-UTF-8 help_path. * app/plug-in/plug-in-def.[ch] * app/plug-in/plug-in-proc.[ch] * app/plug-in/plug-in-rc.c * app/plug-in/plug-ins.[ch]: remember the plug-ins' help_domain and help_uri instead of just help_path. Changed all plug-in APIs to reflect this change. * app/widgets/gimphelp.[ch]: on helpbrowser startup, pass it the whole list of help domains. The actual help request is now made using the browser's temporary procedure. * app/core/gimp.h * app/gui/file-open-menu.c * app/gui/file-save-menu.c * app/gui/plug-in-menus.[ch] * app/widgets/gimpitemfactory.c: changed accordingly. * app/pdb/help_cmds.c * app/pdb/plug_in_cmds.c * libgimp/gimphelp_pdb.[ch] * libgimp/gimpplugin_pdb.[ch]: regenerated. Changed the help broser to load the pages according to the new system: - moved the browser window stuff to dialog.[ch] - moved help domain handling to domain.[ch] - added gimp-help.xml parsing to domain.c - tons of cleanup * plug-ins/helpbrowser/Makefile.am * plug-ins/helpbrowser/dialog.[ch] * plug-ins/helpbrowser/domain.[ch]: new files. * plug-ins/helpbrowser/helpbrowser.c: chopped.
2003-08-29 02:49:11 +08:00
* @domain_name: The XML namespace of the plug-in's help pages.
* @domain_uri: The root URI of the plug-in's help pages.
*
* Register a help path for a plug-in.
*
* This procedure registers user documentation for the calling plug-in
* with the GIMP help system. The domain_uri parameter points to the
* root directory where the plug-in help is installed. For each
* supported language there should be a file called 'gimp-help.xml'
* that maps the help IDs to the actual help files.
*
* Returns: TRUE on success.
**/
gboolean
Completed the new help infrastructure. Needs some polishing but basically 2003-08-28 Michael Natterer <mitch@gimp.org> Completed the new help infrastructure. Needs some polishing but basically works as proposed: * tools/pdbgen/pdb/plug_in.pdb: changed gimp_plugin_help_register() to take a "domain_name" (which is the XML namespace) and a "domain_uri" (which is the root of the plug-in's help pages). * tools/pdbgen/pdb/help.pdb: changed gimp_help() to take help_id instead of a non-UTF-8 help_path. * app/plug-in/plug-in-def.[ch] * app/plug-in/plug-in-proc.[ch] * app/plug-in/plug-in-rc.c * app/plug-in/plug-ins.[ch]: remember the plug-ins' help_domain and help_uri instead of just help_path. Changed all plug-in APIs to reflect this change. * app/widgets/gimphelp.[ch]: on helpbrowser startup, pass it the whole list of help domains. The actual help request is now made using the browser's temporary procedure. * app/core/gimp.h * app/gui/file-open-menu.c * app/gui/file-save-menu.c * app/gui/plug-in-menus.[ch] * app/widgets/gimpitemfactory.c: changed accordingly. * app/pdb/help_cmds.c * app/pdb/plug_in_cmds.c * libgimp/gimphelp_pdb.[ch] * libgimp/gimpplugin_pdb.[ch]: regenerated. Changed the help broser to load the pages according to the new system: - moved the browser window stuff to dialog.[ch] - moved help domain handling to domain.[ch] - added gimp-help.xml parsing to domain.c - tons of cleanup * plug-ins/helpbrowser/Makefile.am * plug-ins/helpbrowser/dialog.[ch] * plug-ins/helpbrowser/domain.[ch]: new files. * plug-ins/helpbrowser/helpbrowser.c: chopped.
2003-08-29 02:49:11 +08:00
gimp_plugin_help_register (const gchar *domain_name,
const gchar *domain_uri)
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> Episode IV... * app/Makefile.am * app/message_cmds.c: new name * app/interface_cmds.c: removed * app/help_cmds.c: new name * app/gimphelp_cmds.c: removed * app/internal_procs.c * app/gimphelp_cmds.c * app/plug_in_cmds.c: moved gimp_plugin_help_register to plug_in_cmds.c, s/gimp_plugin_domain_add/gimp_plugin_domain_register/ * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimpfileops_pdb.[ch] * libgimp/gimpguides_pdb.[ch] * libgimp/gimpmessage_pdb.[ch] * libgimp/gimpprocedural_db_pdb.[ch] * libgimp/gimpplugin_pdb.[ch]: new files containing PDB wrappers moved out of libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdisplay_pdb.[ch] * libgimp/gimpdrawable_pdb.[ch] * libgimp/gimphelp_pdb.[ch] * libgimp/gimpimage_pdb.[ch] * libgimp/gimplayer_pdb.c * libgimp/gimpparasite_pdb.c * libgimp/gimpselection_pdb.c: various changes. * libgimp/gimpunit.c: new file * libgimp/gimpunit_pdb.[ch]: contains only PDB wrappers prefixed with "_" which are called from libgimp/gimpunit.c only. * libgimp/gimpunit.h: minor stuff * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_query_database gimp_query_images * libgimp/gimp.[ch]: removed all PDB wrappers. * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: changed * tools/pdbgen/lib.pl: tried to fix libgimp autogeneration and fixed just a few comments. * tools/pdbgen/pdb/interface.pdb * tools/pdbgen/pdb/gimphelp.pdb: removed * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb: new names * plug-ins/script-fu/script-fu.c * plug-ins/perl/Gimp/Lib.xs: s/gimp_plugin_domain_add/gimp_plugin_domain_register/ 2000-05-31 Michael Natterer <mitch@gimp.org> * POTFILES.in: s/gimpunit_pdb/gimpunit/
2000-05-31 21:24:14 +08:00
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> Episode IV... * app/Makefile.am * app/message_cmds.c: new name * app/interface_cmds.c: removed * app/help_cmds.c: new name * app/gimphelp_cmds.c: removed * app/internal_procs.c * app/gimphelp_cmds.c * app/plug_in_cmds.c: moved gimp_plugin_help_register to plug_in_cmds.c, s/gimp_plugin_domain_add/gimp_plugin_domain_register/ * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimpfileops_pdb.[ch] * libgimp/gimpguides_pdb.[ch] * libgimp/gimpmessage_pdb.[ch] * libgimp/gimpprocedural_db_pdb.[ch] * libgimp/gimpplugin_pdb.[ch]: new files containing PDB wrappers moved out of libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdisplay_pdb.[ch] * libgimp/gimpdrawable_pdb.[ch] * libgimp/gimphelp_pdb.[ch] * libgimp/gimpimage_pdb.[ch] * libgimp/gimplayer_pdb.c * libgimp/gimpparasite_pdb.c * libgimp/gimpselection_pdb.c: various changes. * libgimp/gimpunit.c: new file * libgimp/gimpunit_pdb.[ch]: contains only PDB wrappers prefixed with "_" which are called from libgimp/gimpunit.c only. * libgimp/gimpunit.h: minor stuff * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_query_database gimp_query_images * libgimp/gimp.[ch]: removed all PDB wrappers. * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: changed * tools/pdbgen/lib.pl: tried to fix libgimp autogeneration and fixed just a few comments. * tools/pdbgen/pdb/interface.pdb * tools/pdbgen/pdb/gimphelp.pdb: removed * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb: new names * plug-ins/script-fu/script-fu.c * plug-ins/perl/Gimp/Lib.xs: s/gimp_plugin_domain_add/gimp_plugin_domain_register/ 2000-05-31 Michael Natterer <mitch@gimp.org> * POTFILES.in: s/gimpunit_pdb/gimpunit/
2000-05-31 21:24:14 +08:00
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-03 06:52:23 +08:00
return_vals = gimp_run_procedure ("gimp-plugin-help-register",
&nreturn_vals,
GIMP_PDB_STRING, domain_name,
GIMP_PDB_STRING, domain_uri,
GIMP_PDB_END);
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> Episode IV... * app/Makefile.am * app/message_cmds.c: new name * app/interface_cmds.c: removed * app/help_cmds.c: new name * app/gimphelp_cmds.c: removed * app/internal_procs.c * app/gimphelp_cmds.c * app/plug_in_cmds.c: moved gimp_plugin_help_register to plug_in_cmds.c, s/gimp_plugin_domain_add/gimp_plugin_domain_register/ * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimpfileops_pdb.[ch] * libgimp/gimpguides_pdb.[ch] * libgimp/gimpmessage_pdb.[ch] * libgimp/gimpprocedural_db_pdb.[ch] * libgimp/gimpplugin_pdb.[ch]: new files containing PDB wrappers moved out of libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdisplay_pdb.[ch] * libgimp/gimpdrawable_pdb.[ch] * libgimp/gimphelp_pdb.[ch] * libgimp/gimpimage_pdb.[ch] * libgimp/gimplayer_pdb.c * libgimp/gimpparasite_pdb.c * libgimp/gimpselection_pdb.c: various changes. * libgimp/gimpunit.c: new file * libgimp/gimpunit_pdb.[ch]: contains only PDB wrappers prefixed with "_" which are called from libgimp/gimpunit.c only. * libgimp/gimpunit.h: minor stuff * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_query_database gimp_query_images * libgimp/gimp.[ch]: removed all PDB wrappers. * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: changed * tools/pdbgen/lib.pl: tried to fix libgimp autogeneration and fixed just a few comments. * tools/pdbgen/pdb/interface.pdb * tools/pdbgen/pdb/gimphelp.pdb: removed * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb: new names * plug-ins/script-fu/script-fu.c * plug-ins/perl/Gimp/Lib.xs: s/gimp_plugin_domain_add/gimp_plugin_domain_register/ 2000-05-31 Michael Natterer <mitch@gimp.org> * POTFILES.in: s/gimpunit_pdb/gimpunit/
2000-05-31 21:24:14 +08:00
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> Episode IV... * app/Makefile.am * app/message_cmds.c: new name * app/interface_cmds.c: removed * app/help_cmds.c: new name * app/gimphelp_cmds.c: removed * app/internal_procs.c * app/gimphelp_cmds.c * app/plug_in_cmds.c: moved gimp_plugin_help_register to plug_in_cmds.c, s/gimp_plugin_domain_add/gimp_plugin_domain_register/ * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimpfileops_pdb.[ch] * libgimp/gimpguides_pdb.[ch] * libgimp/gimpmessage_pdb.[ch] * libgimp/gimpprocedural_db_pdb.[ch] * libgimp/gimpplugin_pdb.[ch]: new files containing PDB wrappers moved out of libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdisplay_pdb.[ch] * libgimp/gimpdrawable_pdb.[ch] * libgimp/gimphelp_pdb.[ch] * libgimp/gimpimage_pdb.[ch] * libgimp/gimplayer_pdb.c * libgimp/gimpparasite_pdb.c * libgimp/gimpselection_pdb.c: various changes. * libgimp/gimpunit.c: new file * libgimp/gimpunit_pdb.[ch]: contains only PDB wrappers prefixed with "_" which are called from libgimp/gimpunit.c only. * libgimp/gimpunit.h: minor stuff * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_query_database gimp_query_images * libgimp/gimp.[ch]: removed all PDB wrappers. * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: changed * tools/pdbgen/lib.pl: tried to fix libgimp autogeneration and fixed just a few comments. * tools/pdbgen/pdb/interface.pdb * tools/pdbgen/pdb/gimphelp.pdb: removed * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb: new names * plug-ins/script-fu/script-fu.c * plug-ins/perl/Gimp/Lib.xs: s/gimp_plugin_domain_add/gimp_plugin_domain_register/ 2000-05-31 Michael Natterer <mitch@gimp.org> * POTFILES.in: s/gimpunit_pdb/gimpunit/
2000-05-31 21:24:14 +08:00
gimp_destroy_params (return_vals, nreturn_vals);
return success;
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> Episode IV... * app/Makefile.am * app/message_cmds.c: new name * app/interface_cmds.c: removed * app/help_cmds.c: new name * app/gimphelp_cmds.c: removed * app/internal_procs.c * app/gimphelp_cmds.c * app/plug_in_cmds.c: moved gimp_plugin_help_register to plug_in_cmds.c, s/gimp_plugin_domain_add/gimp_plugin_domain_register/ * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimpfileops_pdb.[ch] * libgimp/gimpguides_pdb.[ch] * libgimp/gimpmessage_pdb.[ch] * libgimp/gimpprocedural_db_pdb.[ch] * libgimp/gimpplugin_pdb.[ch]: new files containing PDB wrappers moved out of libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdisplay_pdb.[ch] * libgimp/gimpdrawable_pdb.[ch] * libgimp/gimphelp_pdb.[ch] * libgimp/gimpimage_pdb.[ch] * libgimp/gimplayer_pdb.c * libgimp/gimpparasite_pdb.c * libgimp/gimpselection_pdb.c: various changes. * libgimp/gimpunit.c: new file * libgimp/gimpunit_pdb.[ch]: contains only PDB wrappers prefixed with "_" which are called from libgimp/gimpunit.c only. * libgimp/gimpunit.h: minor stuff * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_query_database gimp_query_images * libgimp/gimp.[ch]: removed all PDB wrappers. * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: changed * tools/pdbgen/lib.pl: tried to fix libgimp autogeneration and fixed just a few comments. * tools/pdbgen/pdb/interface.pdb * tools/pdbgen/pdb/gimphelp.pdb: removed * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb: new names * plug-ins/script-fu/script-fu.c * plug-ins/perl/Gimp/Lib.xs: s/gimp_plugin_domain_add/gimp_plugin_domain_register/ 2000-05-31 Michael Natterer <mitch@gimp.org> * POTFILES.in: s/gimpunit_pdb/gimpunit/
2000-05-31 21:24:14 +08:00
}
Enabled multiple menu entries per plug-in procedure: 2004-05-06 Michael Natterer <mitch@gimp.org> Enabled multiple menu entries per plug-in procedure: * app/plug-in/plug-in-proc.[ch]: changed "gchar *menu_path" to "GList *menu_paths". * app/plug-in/plug-in-message.c * app/plug-in/plug-in-rc.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/menus/menus.c * app/widgets/gimpfiledialog.c * app/xcf/xcf.c: changed accordingly. * app/actions/file-dialog-actions.c * app/actions/plug-in-actions.c: create an action for the first element of proc_def->menu_paths. * app/gui/gui-vtable.c * app/menus/plug-in-menus.[ch]: create proxy widgets for each element of proc_def->menu_paths. * tools/pdbgen/pdb/plug_in.pdb: added new function gimp_plugin_menu_add() which can be called during query() and adds a menu path to a procedure registered by the calling plugin. * app/pdb/internal_procs.c * app/pdb/plug_in_cmds.c * libgimp/gimpplugin_pdb.[ch]: regenerated. * menus/image-menu.xml.in * menus/toolbox-menu.xml.in: added lots of <placeholder>s for logical groups (like Image/Resize, Image/Scale, Image/Crop etc.). Added empty placeholder File/Send for stuff like print and mail. Added an "Acquire" menu under <Image>/File * plug-ins/common/mail.c * plug-ins/print/print.c * plug-ins/common/winprint.c: register under File/Send. * plug-ins/common/screenshot.c * plug-ins/winsnap/winsnap.c: also register under <Image>/File/Acquire. * plug-ins/common/autocrop.c * plug-ins/common/ccanalyze.c * plug-ins/common/colortoalpha.c * plug-ins/common/threshold_alpha.c * plug-ins/common/zealouscrop.c: register additional menu entries under placeholders in the "Image" and "Layer" menus. This is not meant to be final but just a hint to keep in mind when reorganizing the plug-in menus.
2004-05-06 21:51:56 +08:00
/**
* gimp_plugin_menu_register:
Enabled multiple menu entries per plug-in procedure: 2004-05-06 Michael Natterer <mitch@gimp.org> Enabled multiple menu entries per plug-in procedure: * app/plug-in/plug-in-proc.[ch]: changed "gchar *menu_path" to "GList *menu_paths". * app/plug-in/plug-in-message.c * app/plug-in/plug-in-rc.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/menus/menus.c * app/widgets/gimpfiledialog.c * app/xcf/xcf.c: changed accordingly. * app/actions/file-dialog-actions.c * app/actions/plug-in-actions.c: create an action for the first element of proc_def->menu_paths. * app/gui/gui-vtable.c * app/menus/plug-in-menus.[ch]: create proxy widgets for each element of proc_def->menu_paths. * tools/pdbgen/pdb/plug_in.pdb: added new function gimp_plugin_menu_add() which can be called during query() and adds a menu path to a procedure registered by the calling plugin. * app/pdb/internal_procs.c * app/pdb/plug_in_cmds.c * libgimp/gimpplugin_pdb.[ch]: regenerated. * menus/image-menu.xml.in * menus/toolbox-menu.xml.in: added lots of <placeholder>s for logical groups (like Image/Resize, Image/Scale, Image/Crop etc.). Added empty placeholder File/Send for stuff like print and mail. Added an "Acquire" menu under <Image>/File * plug-ins/common/mail.c * plug-ins/print/print.c * plug-ins/common/winprint.c: register under File/Send. * plug-ins/common/screenshot.c * plug-ins/winsnap/winsnap.c: also register under <Image>/File/Acquire. * plug-ins/common/autocrop.c * plug-ins/common/ccanalyze.c * plug-ins/common/colortoalpha.c * plug-ins/common/threshold_alpha.c * plug-ins/common/zealouscrop.c: register additional menu entries under placeholders in the "Image" and "Layer" menus. This is not meant to be final but just a hint to keep in mind when reorganizing the plug-in menus.
2004-05-06 21:51:56 +08:00
* @procedure_name: The procedure for which to install the menu path.
* @menu_path: The procedure's additional menu path.
*
* Register an additional menu path for a plug-in procedure.
*
* This procedure installs an additional menu entry for the given
* procedure.
*
* Returns: TRUE on success.
*
* Since: GIMP 2.2
**/
Enabled multiple menu entries per plug-in procedure: 2004-05-06 Michael Natterer <mitch@gimp.org> Enabled multiple menu entries per plug-in procedure: * app/plug-in/plug-in-proc.[ch]: changed "gchar *menu_path" to "GList *menu_paths". * app/plug-in/plug-in-message.c * app/plug-in/plug-in-rc.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/menus/menus.c * app/widgets/gimpfiledialog.c * app/xcf/xcf.c: changed accordingly. * app/actions/file-dialog-actions.c * app/actions/plug-in-actions.c: create an action for the first element of proc_def->menu_paths. * app/gui/gui-vtable.c * app/menus/plug-in-menus.[ch]: create proxy widgets for each element of proc_def->menu_paths. * tools/pdbgen/pdb/plug_in.pdb: added new function gimp_plugin_menu_add() which can be called during query() and adds a menu path to a procedure registered by the calling plugin. * app/pdb/internal_procs.c * app/pdb/plug_in_cmds.c * libgimp/gimpplugin_pdb.[ch]: regenerated. * menus/image-menu.xml.in * menus/toolbox-menu.xml.in: added lots of <placeholder>s for logical groups (like Image/Resize, Image/Scale, Image/Crop etc.). Added empty placeholder File/Send for stuff like print and mail. Added an "Acquire" menu under <Image>/File * plug-ins/common/mail.c * plug-ins/print/print.c * plug-ins/common/winprint.c: register under File/Send. * plug-ins/common/screenshot.c * plug-ins/winsnap/winsnap.c: also register under <Image>/File/Acquire. * plug-ins/common/autocrop.c * plug-ins/common/ccanalyze.c * plug-ins/common/colortoalpha.c * plug-ins/common/threshold_alpha.c * plug-ins/common/zealouscrop.c: register additional menu entries under placeholders in the "Image" and "Layer" menus. This is not meant to be final but just a hint to keep in mind when reorganizing the plug-in menus.
2004-05-06 21:51:56 +08:00
gboolean
gimp_plugin_menu_register (const gchar *procedure_name,
const gchar *menu_path)
Enabled multiple menu entries per plug-in procedure: 2004-05-06 Michael Natterer <mitch@gimp.org> Enabled multiple menu entries per plug-in procedure: * app/plug-in/plug-in-proc.[ch]: changed "gchar *menu_path" to "GList *menu_paths". * app/plug-in/plug-in-message.c * app/plug-in/plug-in-rc.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/menus/menus.c * app/widgets/gimpfiledialog.c * app/xcf/xcf.c: changed accordingly. * app/actions/file-dialog-actions.c * app/actions/plug-in-actions.c: create an action for the first element of proc_def->menu_paths. * app/gui/gui-vtable.c * app/menus/plug-in-menus.[ch]: create proxy widgets for each element of proc_def->menu_paths. * tools/pdbgen/pdb/plug_in.pdb: added new function gimp_plugin_menu_add() which can be called during query() and adds a menu path to a procedure registered by the calling plugin. * app/pdb/internal_procs.c * app/pdb/plug_in_cmds.c * libgimp/gimpplugin_pdb.[ch]: regenerated. * menus/image-menu.xml.in * menus/toolbox-menu.xml.in: added lots of <placeholder>s for logical groups (like Image/Resize, Image/Scale, Image/Crop etc.). Added empty placeholder File/Send for stuff like print and mail. Added an "Acquire" menu under <Image>/File * plug-ins/common/mail.c * plug-ins/print/print.c * plug-ins/common/winprint.c: register under File/Send. * plug-ins/common/screenshot.c * plug-ins/winsnap/winsnap.c: also register under <Image>/File/Acquire. * plug-ins/common/autocrop.c * plug-ins/common/ccanalyze.c * plug-ins/common/colortoalpha.c * plug-ins/common/threshold_alpha.c * plug-ins/common/zealouscrop.c: register additional menu entries under placeholders in the "Image" and "Layer" menus. This is not meant to be final but just a hint to keep in mind when reorganizing the plug-in menus.
2004-05-06 21:51:56 +08:00
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
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-03 06:52:23 +08:00
return_vals = gimp_run_procedure ("gimp-plugin-menu-register",
&nreturn_vals,
GIMP_PDB_STRING, procedure_name,
GIMP_PDB_STRING, menu_path,
GIMP_PDB_END);
Enabled multiple menu entries per plug-in procedure: 2004-05-06 Michael Natterer <mitch@gimp.org> Enabled multiple menu entries per plug-in procedure: * app/plug-in/plug-in-proc.[ch]: changed "gchar *menu_path" to "GList *menu_paths". * app/plug-in/plug-in-message.c * app/plug-in/plug-in-rc.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/menus/menus.c * app/widgets/gimpfiledialog.c * app/xcf/xcf.c: changed accordingly. * app/actions/file-dialog-actions.c * app/actions/plug-in-actions.c: create an action for the first element of proc_def->menu_paths. * app/gui/gui-vtable.c * app/menus/plug-in-menus.[ch]: create proxy widgets for each element of proc_def->menu_paths. * tools/pdbgen/pdb/plug_in.pdb: added new function gimp_plugin_menu_add() which can be called during query() and adds a menu path to a procedure registered by the calling plugin. * app/pdb/internal_procs.c * app/pdb/plug_in_cmds.c * libgimp/gimpplugin_pdb.[ch]: regenerated. * menus/image-menu.xml.in * menus/toolbox-menu.xml.in: added lots of <placeholder>s for logical groups (like Image/Resize, Image/Scale, Image/Crop etc.). Added empty placeholder File/Send for stuff like print and mail. Added an "Acquire" menu under <Image>/File * plug-ins/common/mail.c * plug-ins/print/print.c * plug-ins/common/winprint.c: register under File/Send. * plug-ins/common/screenshot.c * plug-ins/winsnap/winsnap.c: also register under <Image>/File/Acquire. * plug-ins/common/autocrop.c * plug-ins/common/ccanalyze.c * plug-ins/common/colortoalpha.c * plug-ins/common/threshold_alpha.c * plug-ins/common/zealouscrop.c: register additional menu entries under placeholders in the "Image" and "Layer" menus. This is not meant to be final but just a hint to keep in mind when reorganizing the plug-in menus.
2004-05-06 21:51:56 +08:00
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
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-19 05:19:43 +08:00
Added API to explicitly register dynamic menu items hierarchies. Fixes bug 2005-03-24 Michael Natterer <mitch@gimp.org> Added API to explicitly register dynamic menu items hierarchies. Fixes bug #170623. * app/core/gimp.h: added "GSList *plug_in_menu_branches". * app/plug-in/plug-in-types.h * app/plug-in/plug-ins.[ch]: added API to register plug-in menu branches, just as for locale and help domans. Cleaned up handling of locale and help domains. (plug_ins_exit): free the registered menu branches. * app/actions/plug-in-actions.[ch] (plug_in_actions_add_branch): new function to explicitly add a menu branch action. (plug_in_actions_setup): add the registered menu branches to each new action group. (plug_in_actions_build_path): always strip the untranslated menu path from underlines before using it as hash table key or action name. * app/menus/plug-in-menus.c (plug_in_menus_add_proc): changed accordingly: strip underlines from untranslated menu paths before passing them to plug_in_menus_build_path(). * app/core/gimp-gui.[ch]: added gimp_menus_create_branch() plus vtable entry to access the new stuff from the core. Renamed the functions desling with items from gimp_foo_entry() to gimp_foo_item(). * app/gui/gui-vtable.c: implement create_branch() and add the branch action to all existing "plug-in" action groups. Note that we don't need to create any menus because that happens implicitly when adding menu items. * tools/pdbgen/pdb/plug_in.pdb (plugin_menu_branch_register): new PDB wrapper to access branch registering from plug-ins. * app/pdb/internal_procs.c * app/pdb/plug_in_cmds.c * libgimp/gimpplugin_pdb.[ch]: regenerated. * libgimp/gimp.def: changed accordingly. * plug-ins/script-fu/script-fu-scripts.c (script_fu_find_scripts): register the menu branches for all included scripts.
2005-03-25 00:08:04 +08:00
/**
* gimp_plugin_menu_branch_register:
* @menu_path: The sub-menu's menu path.
* @menu_name: The name of the sub-menu.
*
* Register a sub-menu.
*
* This procedure installs a sub-menu which does not belong to any
* procedure. The menu-name should be the untranslated menu label. GIMP
* will look up the translation in the textdomain registered for the
* plug-in.
Added API to explicitly register dynamic menu items hierarchies. Fixes bug 2005-03-24 Michael Natterer <mitch@gimp.org> Added API to explicitly register dynamic menu items hierarchies. Fixes bug #170623. * app/core/gimp.h: added "GSList *plug_in_menu_branches". * app/plug-in/plug-in-types.h * app/plug-in/plug-ins.[ch]: added API to register plug-in menu branches, just as for locale and help domans. Cleaned up handling of locale and help domains. (plug_ins_exit): free the registered menu branches. * app/actions/plug-in-actions.[ch] (plug_in_actions_add_branch): new function to explicitly add a menu branch action. (plug_in_actions_setup): add the registered menu branches to each new action group. (plug_in_actions_build_path): always strip the untranslated menu path from underlines before using it as hash table key or action name. * app/menus/plug-in-menus.c (plug_in_menus_add_proc): changed accordingly: strip underlines from untranslated menu paths before passing them to plug_in_menus_build_path(). * app/core/gimp-gui.[ch]: added gimp_menus_create_branch() plus vtable entry to access the new stuff from the core. Renamed the functions desling with items from gimp_foo_entry() to gimp_foo_item(). * app/gui/gui-vtable.c: implement create_branch() and add the branch action to all existing "plug-in" action groups. Note that we don't need to create any menus because that happens implicitly when adding menu items. * tools/pdbgen/pdb/plug_in.pdb (plugin_menu_branch_register): new PDB wrapper to access branch registering from plug-ins. * app/pdb/internal_procs.c * app/pdb/plug_in_cmds.c * libgimp/gimpplugin_pdb.[ch]: regenerated. * libgimp/gimp.def: changed accordingly. * plug-ins/script-fu/script-fu-scripts.c (script_fu_find_scripts): register the menu branches for all included scripts.
2005-03-25 00:08:04 +08:00
*
* Returns: TRUE on success.
*
* Since: GIMP 2.4
**/
Added API to explicitly register dynamic menu items hierarchies. Fixes bug 2005-03-24 Michael Natterer <mitch@gimp.org> Added API to explicitly register dynamic menu items hierarchies. Fixes bug #170623. * app/core/gimp.h: added "GSList *plug_in_menu_branches". * app/plug-in/plug-in-types.h * app/plug-in/plug-ins.[ch]: added API to register plug-in menu branches, just as for locale and help domans. Cleaned up handling of locale and help domains. (plug_ins_exit): free the registered menu branches. * app/actions/plug-in-actions.[ch] (plug_in_actions_add_branch): new function to explicitly add a menu branch action. (plug_in_actions_setup): add the registered menu branches to each new action group. (plug_in_actions_build_path): always strip the untranslated menu path from underlines before using it as hash table key or action name. * app/menus/plug-in-menus.c (plug_in_menus_add_proc): changed accordingly: strip underlines from untranslated menu paths before passing them to plug_in_menus_build_path(). * app/core/gimp-gui.[ch]: added gimp_menus_create_branch() plus vtable entry to access the new stuff from the core. Renamed the functions desling with items from gimp_foo_entry() to gimp_foo_item(). * app/gui/gui-vtable.c: implement create_branch() and add the branch action to all existing "plug-in" action groups. Note that we don't need to create any menus because that happens implicitly when adding menu items. * tools/pdbgen/pdb/plug_in.pdb (plugin_menu_branch_register): new PDB wrapper to access branch registering from plug-ins. * app/pdb/internal_procs.c * app/pdb/plug_in_cmds.c * libgimp/gimpplugin_pdb.[ch]: regenerated. * libgimp/gimp.def: changed accordingly. * plug-ins/script-fu/script-fu-scripts.c (script_fu_find_scripts): register the menu branches for all included scripts.
2005-03-25 00:08:04 +08:00
gboolean
gimp_plugin_menu_branch_register (const gchar *menu_path,
const gchar *menu_name)
Added API to explicitly register dynamic menu items hierarchies. Fixes bug 2005-03-24 Michael Natterer <mitch@gimp.org> Added API to explicitly register dynamic menu items hierarchies. Fixes bug #170623. * app/core/gimp.h: added "GSList *plug_in_menu_branches". * app/plug-in/plug-in-types.h * app/plug-in/plug-ins.[ch]: added API to register plug-in menu branches, just as for locale and help domans. Cleaned up handling of locale and help domains. (plug_ins_exit): free the registered menu branches. * app/actions/plug-in-actions.[ch] (plug_in_actions_add_branch): new function to explicitly add a menu branch action. (plug_in_actions_setup): add the registered menu branches to each new action group. (plug_in_actions_build_path): always strip the untranslated menu path from underlines before using it as hash table key or action name. * app/menus/plug-in-menus.c (plug_in_menus_add_proc): changed accordingly: strip underlines from untranslated menu paths before passing them to plug_in_menus_build_path(). * app/core/gimp-gui.[ch]: added gimp_menus_create_branch() plus vtable entry to access the new stuff from the core. Renamed the functions desling with items from gimp_foo_entry() to gimp_foo_item(). * app/gui/gui-vtable.c: implement create_branch() and add the branch action to all existing "plug-in" action groups. Note that we don't need to create any menus because that happens implicitly when adding menu items. * tools/pdbgen/pdb/plug_in.pdb (plugin_menu_branch_register): new PDB wrapper to access branch registering from plug-ins. * app/pdb/internal_procs.c * app/pdb/plug_in_cmds.c * libgimp/gimpplugin_pdb.[ch]: regenerated. * libgimp/gimp.def: changed accordingly. * plug-ins/script-fu/script-fu-scripts.c (script_fu_find_scripts): register the menu branches for all included scripts.
2005-03-25 00:08:04 +08:00
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
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-03 06:52:23 +08:00
return_vals = gimp_run_procedure ("gimp-plugin-menu-branch-register",
&nreturn_vals,
GIMP_PDB_STRING, menu_path,
GIMP_PDB_STRING, menu_name,
GIMP_PDB_END);
Added API to explicitly register dynamic menu items hierarchies. Fixes bug 2005-03-24 Michael Natterer <mitch@gimp.org> Added API to explicitly register dynamic menu items hierarchies. Fixes bug #170623. * app/core/gimp.h: added "GSList *plug_in_menu_branches". * app/plug-in/plug-in-types.h * app/plug-in/plug-ins.[ch]: added API to register plug-in menu branches, just as for locale and help domans. Cleaned up handling of locale and help domains. (plug_ins_exit): free the registered menu branches. * app/actions/plug-in-actions.[ch] (plug_in_actions_add_branch): new function to explicitly add a menu branch action. (plug_in_actions_setup): add the registered menu branches to each new action group. (plug_in_actions_build_path): always strip the untranslated menu path from underlines before using it as hash table key or action name. * app/menus/plug-in-menus.c (plug_in_menus_add_proc): changed accordingly: strip underlines from untranslated menu paths before passing them to plug_in_menus_build_path(). * app/core/gimp-gui.[ch]: added gimp_menus_create_branch() plus vtable entry to access the new stuff from the core. Renamed the functions desling with items from gimp_foo_entry() to gimp_foo_item(). * app/gui/gui-vtable.c: implement create_branch() and add the branch action to all existing "plug-in" action groups. Note that we don't need to create any menus because that happens implicitly when adding menu items. * tools/pdbgen/pdb/plug_in.pdb (plugin_menu_branch_register): new PDB wrapper to access branch registering from plug-ins. * app/pdb/internal_procs.c * app/pdb/plug_in_cmds.c * libgimp/gimpplugin_pdb.[ch]: regenerated. * libgimp/gimp.def: changed accordingly. * plug-ins/script-fu/script-fu-scripts.c (script_fu_find_scripts): register the menu branches for all included scripts.
2005-03-25 00:08:04 +08:00
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
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-19 05:19:43 +08:00
/**
* _gimp_plugin_icon_register:
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-19 05:19:43 +08:00
* @procedure_name: The procedure for which to install the icon.
* @icon_type: The type of the icon.
* @icon_data_length: The length of 'icon-data'.
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-19 05:19:43 +08:00
* @icon_data: The procedure's icon. The format depends on the 'icon_type' parameter.
*
* Register an icon for a plug-in procedure.
*
* This procedure installs an icon for the given procedure.
*
* Returns: TRUE on success.
*
* Since: GIMP 2.2
**/
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-19 05:19:43 +08:00
gboolean
_gimp_plugin_icon_register (const gchar *procedure_name,
GimpIconType icon_type,
gint icon_data_length,
const guint8 *icon_data)
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-19 05:19:43 +08:00
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
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-03 06:52:23 +08:00
return_vals = gimp_run_procedure ("gimp-plugin-icon-register",
&nreturn_vals,
GIMP_PDB_STRING, procedure_name,
GIMP_PDB_INT32, icon_type,
GIMP_PDB_INT32, icon_data_length,
GIMP_PDB_INT8ARRAY, icon_data,
GIMP_PDB_END);
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-19 05:19:43 +08:00
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
/**
* gimp_plugin_set_pdb_error_handler:
* @handler: Who is responsible for handling procedure call errors.
*
* Sets an error handler for procedure calls.
*
* This procedure changes the way that errors in procedure calls are
* handled. By default GIMP will raise an error dialog if a procedure
* call made by a plug-in fails. Using this procedure the plug-in can
* change this behavior. If the error handler is set to
* %GIMP_PDB_ERROR_HANDLER_PLUGIN, then the plug-in is responsible for
* calling gimp_get_pdb_error() and handling the error whenever one if
* its procedure calls fails. It can do this by displaying the error
* message or by forwarding it in its own return values.
*
* Returns: TRUE on success.
*
* Since: GIMP 2.6
**/
gboolean
gimp_plugin_set_pdb_error_handler (GimpPDBErrorHandler handler)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp-plugin-set-pdb-error-handler",
&nreturn_vals,
GIMP_PDB_INT32, handler,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
/**
* gimp_plugin_get_pdb_error_handler:
*
* Retrieves the active error handler for procedure calls.
*
* This procedure retrieves the currently active error handler for
* procedure calls made by the calling plug-in. See
* gimp_plugin_set_pdb_error_handler() for details.
*
* Returns: Who is responsible for handling procedure call errors.
*
* Since: GIMP 2.6
**/
GimpPDBErrorHandler
gimp_plugin_get_pdb_error_handler (void)
{
GimpParam *return_vals;
gint nreturn_vals;
GimpPDBErrorHandler handler = 0;
return_vals = gimp_run_procedure ("gimp-plugin-get-pdb-error-handler",
&nreturn_vals,
GIMP_PDB_END);
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
handler = return_vals[1].data.d_int32;
gimp_destroy_params (return_vals, nreturn_vals);
return handler;
}