Commit 83a936b8 authored by Michael Natterer's avatar Michael Natterer 😴

pdb: rename all functions in the "plug_in" group

from gimp_plugin_foo() to gimp_plug_in_foo() for consistency.
parent 6de4af4a
Pipeline #114163 passed with stages
in 12 minutes and 43 seconds
......@@ -48,12 +48,12 @@
static GimpValueArray *
plugins_query_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
plug_ins_query_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
GimpValueArray *return_vals;
const gchar *search_string;
......@@ -93,12 +93,12 @@ plugins_query_invoker (GimpProcedure *procedure,
}
static GimpValueArray *
plugin_domain_register_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
plug_in_domain_register_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
const gchar *domain_name;
......@@ -129,12 +129,12 @@ plugin_domain_register_invoker (GimpProcedure *procedure,
}
static GimpValueArray *
plugin_help_register_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
plug_in_help_register_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
const gchar *domain_name;
......@@ -165,12 +165,12 @@ plugin_help_register_invoker (GimpProcedure *procedure,
}
static GimpValueArray *
plugin_menu_branch_register_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
plug_in_menu_branch_register_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
const gchar *menu_path;
......@@ -197,12 +197,12 @@ plugin_menu_branch_register_invoker (GimpProcedure *procedure,
}
static GimpValueArray *
plugin_set_pdb_error_handler_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
plug_in_set_pdb_error_handler_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
gint handler;
......@@ -226,12 +226,12 @@ plugin_set_pdb_error_handler_invoker (GimpProcedure *procedure,
}
static GimpValueArray *
plugin_get_pdb_error_handler_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
plug_in_get_pdb_error_handler_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpValueArray *return_vals;
......@@ -261,11 +261,11 @@ register_plug_in_procs (GimpPDB *pdb)
GimpProcedure *procedure;
/*
* gimp-plugins-query
* gimp-plug-ins-query
*/
procedure = gimp_procedure_new (plugins_query_invoker);
procedure = gimp_procedure_new (plug_ins_query_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-plugins-query");
"gimp-plug-ins-query");
gimp_procedure_set_static_help (procedure,
"Queries the plug-in database for its contents.",
"This procedure queries the contents of the plug-in database.",
......@@ -329,11 +329,11 @@ register_plug_in_procs (GimpPDB *pdb)
g_object_unref (procedure);
/*
* gimp-plugin-domain-register
* gimp-plug-in-domain-register
*/
procedure = gimp_procedure_new (plugin_domain_register_invoker);
procedure = gimp_procedure_new (plug_in_domain_register_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-plugin-domain-register");
"gimp-plug-in-domain-register");
gimp_procedure_set_static_help (procedure,
"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.",
......@@ -359,11 +359,11 @@ register_plug_in_procs (GimpPDB *pdb)
g_object_unref (procedure);
/*
* gimp-plugin-help-register
* gimp-plug-in-help-register
*/
procedure = gimp_procedure_new (plugin_help_register_invoker);
procedure = gimp_procedure_new (plug_in_help_register_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-plugin-help-register");
"gimp-plug-in-help-register");
gimp_procedure_set_static_help (procedure,
"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.",
......@@ -389,11 +389,11 @@ register_plug_in_procs (GimpPDB *pdb)
g_object_unref (procedure);
/*
* gimp-plugin-menu-branch-register
* gimp-plug-in-menu-branch-register
*/
procedure = gimp_procedure_new (plugin_menu_branch_register_invoker);
procedure = gimp_procedure_new (plug_in_menu_branch_register_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-plugin-menu-branch-register");
"gimp-plug-in-menu-branch-register");
gimp_procedure_set_static_help (procedure,
"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.",
......@@ -420,11 +420,11 @@ register_plug_in_procs (GimpPDB *pdb)
g_object_unref (procedure);
/*
* gimp-plugin-set-pdb-error-handler
* gimp-plug-in-set-pdb-error-handler
*/
procedure = gimp_procedure_new (plugin_set_pdb_error_handler_invoker);
procedure = gimp_procedure_new (plug_in_set_pdb_error_handler_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-plugin-set-pdb-error-handler");
"gimp-plug-in-set-pdb-error-handler");
gimp_procedure_set_static_help (procedure,
"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.",
......@@ -444,11 +444,11 @@ register_plug_in_procs (GimpPDB *pdb)
g_object_unref (procedure);
/*
* gimp-plugin-get-pdb-error-handler
* gimp-plug-in-get-pdb-error-handler
*/
procedure = gimp_procedure_new (plugin_get_pdb_error_handler_invoker);
procedure = gimp_procedure_new (plug_in_get_pdb_error_handler_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-plugin-get-pdb-error-handler");
"gimp-plug-in-get-pdb-error-handler");
gimp_procedure_set_static_help (procedure,
"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.",
......
......@@ -747,7 +747,7 @@ gimp_plug_in_set_pdb_error_handler (GimpPlugIn *plug_in,
{
g_return_if_fail (GIMP_IS_PLUG_IN (plug_in));
_gimp_plugin_set_pdb_error_handler (handler);
_gimp_plug_in_set_pdb_error_handler (handler);
}
/**
......@@ -770,7 +770,7 @@ gimp_plug_in_get_pdb_error_handler (GimpPlugIn *plug_in)
g_return_val_if_fail (GIMP_IS_PLUG_IN (plug_in),
GIMP_PDB_ERROR_HANDLER_INTERNAL);
return _gimp_plugin_get_pdb_error_handler ();
return _gimp_plug_in_get_pdb_error_handler ();
}
......@@ -921,22 +921,22 @@ gimp_plug_in_register (GimpPlugIn *plug_in,
if (plug_in->priv->translation_domain_name)
{
_gimp_plugin_domain_register (plug_in->priv->translation_domain_name,
plug_in->priv->translation_domain_path);
_gimp_plug_in_domain_register (plug_in->priv->translation_domain_name,
plug_in->priv->translation_domain_path);
}
if (plug_in->priv->help_domain_name)
{
_gimp_plugin_help_register (plug_in->priv->help_domain_name,
plug_in->priv->help_domain_uri);
_gimp_plug_in_help_register (plug_in->priv->help_domain_name,
plug_in->priv->help_domain_uri);
}
for (list = plug_in->priv->menu_branches; list; list = g_list_next (list))
{
GimpPlugInMenuBranch *branch = list->data;
_gimp_plugin_menu_branch_register (branch->menu_path,
branch->menu_label);
_gimp_plug_in_menu_branch_register (branch->menu_path,
branch->menu_label);
}
}
......
......@@ -26,7 +26,7 @@
#include "gimpplugin_pdb.h"
/**
* _gimp_plugin_domain_register:
* _gimp_plug_in_domain_register:
* @domain_name: The name of the textdomain (must be unique).
* @domain_file: The path to the locally installed compiled message catalog (may be NULL).
*
......@@ -44,8 +44,8 @@
* Returns: TRUE on success.
**/
gboolean
_gimp_plugin_domain_register (const gchar *domain_name,
GFile *domain_file)
_gimp_plug_in_domain_register (const gchar *domain_name,
GFile *domain_file)
{
GimpValueArray *args;
GimpValueArray *return_vals;
......@@ -57,7 +57,7 @@ _gimp_plugin_domain_register (const gchar *domain_name,
G_TYPE_NONE);
return_vals = gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-plugin-domain-register",
"gimp-plug-in-domain-register",
args);
gimp_value_array_unref (args);
......@@ -69,7 +69,7 @@ _gimp_plugin_domain_register (const gchar *domain_name,
}
/**
* _gimp_plugin_help_register:
* _gimp_plug_in_help_register:
* @domain_name: The XML namespace of the plug-in's help pages.
* @domain_file: The root URI of the plug-in's help pages.
*
......@@ -84,8 +84,8 @@ _gimp_plugin_domain_register (const gchar *domain_name,
* Returns: TRUE on success.
**/
gboolean
_gimp_plugin_help_register (const gchar *domain_name,
GFile *domain_file)
_gimp_plug_in_help_register (const gchar *domain_name,
GFile *domain_file)
{
GimpValueArray *args;
GimpValueArray *return_vals;
......@@ -97,7 +97,7 @@ _gimp_plugin_help_register (const gchar *domain_name,
G_TYPE_NONE);
return_vals = gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-plugin-help-register",
"gimp-plug-in-help-register",
args);
gimp_value_array_unref (args);
......@@ -109,7 +109,7 @@ _gimp_plugin_help_register (const gchar *domain_name,
}
/**
* _gimp_plugin_menu_branch_register:
* _gimp_plug_in_menu_branch_register:
* @menu_path: The sub-menu's menu path.
* @menu_name: The name of the sub-menu.
*
......@@ -125,8 +125,8 @@ _gimp_plugin_help_register (const gchar *domain_name,
* Since: 2.4
**/
gboolean
_gimp_plugin_menu_branch_register (const gchar *menu_path,
const gchar *menu_name)
_gimp_plug_in_menu_branch_register (const gchar *menu_path,
const gchar *menu_name)
{
GimpValueArray *args;
GimpValueArray *return_vals;
......@@ -138,7 +138,7 @@ _gimp_plugin_menu_branch_register (const gchar *menu_path,
G_TYPE_NONE);
return_vals = gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-plugin-menu-branch-register",
"gimp-plug-in-menu-branch-register",
args);
gimp_value_array_unref (args);
......@@ -150,7 +150,7 @@ _gimp_plugin_menu_branch_register (const gchar *menu_path,
}
/**
* _gimp_plugin_set_pdb_error_handler:
* _gimp_plug_in_set_pdb_error_handler:
* @handler: Who is responsible for handling procedure call errors.
*
* Sets an error handler for procedure calls.
......@@ -169,7 +169,7 @@ _gimp_plugin_menu_branch_register (const gchar *menu_path,
* Since: 2.6
**/
gboolean
_gimp_plugin_set_pdb_error_handler (GimpPDBErrorHandler handler)
_gimp_plug_in_set_pdb_error_handler (GimpPDBErrorHandler handler)
{
GimpValueArray *args;
GimpValueArray *return_vals;
......@@ -180,7 +180,7 @@ _gimp_plugin_set_pdb_error_handler (GimpPDBErrorHandler handler)
G_TYPE_NONE);
return_vals = gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-plugin-set-pdb-error-handler",
"gimp-plug-in-set-pdb-error-handler",
args);
gimp_value_array_unref (args);
......@@ -192,7 +192,7 @@ _gimp_plugin_set_pdb_error_handler (GimpPDBErrorHandler handler)
}
/**
* _gimp_plugin_get_pdb_error_handler:
* _gimp_plug_in_get_pdb_error_handler:
*
* Retrieves the active error handler for procedure calls.
*
......@@ -205,7 +205,7 @@ _gimp_plugin_set_pdb_error_handler (GimpPDBErrorHandler handler)
* Since: 2.6
**/
GimpPDBErrorHandler
_gimp_plugin_get_pdb_error_handler (void)
_gimp_plug_in_get_pdb_error_handler (void)
{
GimpValueArray *args;
GimpValueArray *return_vals;
......@@ -215,7 +215,7 @@ _gimp_plugin_get_pdb_error_handler (void)
G_TYPE_NONE);
return_vals = gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-plugin-get-pdb-error-handler",
"gimp-plug-in-get-pdb-error-handler",
args);
gimp_value_array_unref (args);
......
......@@ -32,14 +32,14 @@ G_BEGIN_DECLS
/* For information look into the C source or the html documentation */
G_GNUC_INTERNAL gboolean _gimp_plugin_domain_register (const gchar *domain_name,
GFile *domain_file);
G_GNUC_INTERNAL gboolean _gimp_plugin_help_register (const gchar *domain_name,
GFile *domain_file);
G_GNUC_INTERNAL gboolean _gimp_plugin_menu_branch_register (const gchar *menu_path,
const gchar *menu_name);
G_GNUC_INTERNAL gboolean _gimp_plugin_set_pdb_error_handler (GimpPDBErrorHandler handler);
G_GNUC_INTERNAL GimpPDBErrorHandler _gimp_plugin_get_pdb_error_handler (void);
G_GNUC_INTERNAL gboolean _gimp_plug_in_domain_register (const gchar *domain_name,
GFile *domain_file);
G_GNUC_INTERNAL gboolean _gimp_plug_in_help_register (const gchar *domain_name,
GFile *domain_file);
G_GNUC_INTERNAL gboolean _gimp_plug_in_menu_branch_register (const gchar *menu_path,
const gchar *menu_name);
G_GNUC_INTERNAL gboolean _gimp_plug_in_set_pdb_error_handler (GimpPDBErrorHandler handler);
G_GNUC_INTERNAL GimpPDBErrorHandler _gimp_plug_in_get_pdb_error_handler (void);
G_END_DECLS
......
......@@ -16,7 +16,7 @@
# "Perlized" from C source by Manish Singh <yosh@gimp.org>
sub plugins_query {
sub plug_ins_query {
$blurb = 'Queries the plug-in database for its contents.';
$help = 'This procedure queries the contents of the plug-in database.';
......@@ -66,7 +66,7 @@ CODE
);
}
sub plugin_domain_register {
sub plug_in_domain_register {
$blurb = 'Registers a textdomain for localisation.';
$help = <<'HELP';
......@@ -112,7 +112,7 @@ CODE
);
}
sub plugin_help_register {
sub plug_in_help_register {
$blurb = "Register a help path for a plug-in.";
$help = <<HELP;
......@@ -156,7 +156,7 @@ CODE
);
}
sub plugin_menu_branch_register {
sub plug_in_menu_branch_register {
$blurb = "Register a sub-menu.";
$help = <<HELP;
......@@ -193,7 +193,7 @@ CODE
);
}
sub plugin_set_pdb_error_handler {
sub plug_in_set_pdb_error_handler {
$blurb = "Sets an error handler for procedure calls.";
$help = <<HELP;
......@@ -232,7 +232,7 @@ CODE
);
}
sub plugin_get_pdb_error_handler {
sub plug_in_get_pdb_error_handler {
$blurb = "Retrieves the active error handler for procedure calls.";
$help = <<HELP;
......@@ -278,12 +278,12 @@ CODE
"plug-in/gimppluginprocedure.h"
"gimppdb-utils.h");
@procs = qw(plugins_query
plugin_domain_register
plugin_help_register
plugin_menu_branch_register
plugin_set_pdb_error_handler
plugin_get_pdb_error_handler);
@procs = qw(plug_ins_query
plug_in_domain_register
plug_in_help_register
plug_in_menu_branch_register
plug_in_set_pdb_error_handler
plug_in_get_pdb_error_handler);
%exports = (app => [@procs], lib => [@procs[1,2,3,4,5]]);
......
......@@ -371,7 +371,7 @@ browser_search (GimpBrowser *gimp_browser,
_("Searching by name"));
return_vals = gimp_pdb_run_procedure (gimp_get_pdb (),
"gimp-plugins-query",
"gimp-plug-ins-query",
G_TYPE_STRING, search_text,
G_TYPE_NONE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment