1
/* GIMP - The GNU Image Manipulation Program
2
* Copyright (C) 1995-2003 Spencer Kimball and Peter Mattis
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation; either version 2 of the License, or
7
* (at your option) any later version.
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19
/* NOTE: This file is auto-generated by pdbgen.pl. */
23
#include <glib-object.h>
25
#include "pdb-types.h"
27
#include "core/gimp.h"
28
#include "core/gimpparamspecs.h"
29
#include "plug-in/gimpplugin.h"
30
#include "plug-in/gimppluginmanager-help-domain.h"
31
#include "plug-in/gimppluginmanager.h"
34
#include "gimpprocedure.h"
35
#include "internal-procs.h"
39
help_invoker (GimpProcedure *procedure,
42
GimpProgress *progress,
43
const GValueArray *args,
46
gboolean success = TRUE;
47
const gchar *help_domain;
50
help_domain = g_value_get_string (&args->values[0]);
51
help_id = g_value_get_string (&args->values[1]);
55
GimpPlugInManager *manager = gimp->plug_in_manager;
57
if (! help_domain && manager->current_plug_in)
58
help_domain = (gchar *)
59
gimp_plug_in_manager_get_help_domain (manager,
60
manager->current_plug_in->prog,
63
gimp_help (gimp, progress, help_domain, help_id);
66
return gimp_procedure_get_return_values (procedure, success,
67
error ? *error : NULL);
71
register_help_procs (GimpPDB *pdb)
73
GimpProcedure *procedure;
78
procedure = gimp_procedure_new (help_invoker);
79
gimp_object_set_static_name (GIMP_OBJECT (procedure),
81
gimp_procedure_set_static_strings (procedure,
84
"This procedure loads the specified help page into the helpbrowser or what ever is configured as help viewer. The help page is identified by its domain and ID: if help_domain is NULL, we use the help_domain which was registered using the 'gimp-plugin-help-register' procedure. If help_domain is NULL and no help domain was registered, the help domain of the main GIMP installation is used.",
85
"Michael Natterer <mitch@gimp.org>",
89
gimp_procedure_add_argument (procedure,
90
gimp_param_spec_string ("help-domain",
92
"The help domain in which help_id is registered",
95
GIMP_PARAM_READWRITE));
96
gimp_procedure_add_argument (procedure,
97
gimp_param_spec_string ("help-id",
102
GIMP_PARAM_READWRITE));
103
gimp_pdb_register_procedure (pdb, procedure);
104
g_object_unref (procedure);