app/plug-in/Makefile.am removed... ...and added with a new name.

2004-09-22  Michael Natterer  <mitch@gimp.org>

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

	* app/plug-in/plug-in-def.[ch]
	* app/plug-in/plug-in-message.[ch]
	* app/plug-in/plug-in-progress.[ch]
	* app/plug-in/plug-in-rc.[ch]
	* app/plug-in/plug-in-run.[ch]
	* app/plug-in/plug-in.[ch]
	* app/plug-in/plug-ins.[ch]
	* app/actions/plug-in-actions.c
	* app/actions/plug-in-commands.c
	* app/file/file-open.[ch]
	* app/file/file-save.[ch]
	* app/file/file-utils.[ch]
	* app/gui/gui-vtable.c
	* app/menus/plug-in-menus.c
	* app/widgets/gimpfiledialog.c
	* app/widgets/gimpfileprocview.c
	* app/widgets/gimppluginaction.c
	* app/xcf/xcf.c
	* tools/pdbgen/pdb/fileops.pdb
	* tools/pdbgen/pdb/plug_in.pdb: changed accordingly plus some
	minor cosmetic cleanups.

	* app/pdb/fileops_cmds.c
	* app/pdb/plug_in_cmds.c: regenerated.
This commit is contained in:
Michael Natterer 2004-09-22 15:12:24 +00:00 committed by Michael Natterer
parent 10d80dac75
commit 9ffc00be80
54 changed files with 147 additions and 394 deletions

View File

@ -1,3 +1,34 @@
2004-09-22 Michael Natterer <mitch@gimp.org>
* app/plug-in/Makefile.am
* app/plug-in/plug-in-proc.[ch]: removed...
* app/plug-in/plug-in-proc-def.[ch]: ...and added with a new name.
* app/plug-in/plug-in-def.[ch]
* app/plug-in/plug-in-message.[ch]
* app/plug-in/plug-in-progress.[ch]
* app/plug-in/plug-in-rc.[ch]
* app/plug-in/plug-in-run.[ch]
* app/plug-in/plug-in.[ch]
* app/plug-in/plug-ins.[ch]
* app/actions/plug-in-actions.c
* app/actions/plug-in-commands.c
* app/file/file-open.[ch]
* app/file/file-save.[ch]
* app/file/file-utils.[ch]
* app/gui/gui-vtable.c
* app/menus/plug-in-menus.c
* app/widgets/gimpfiledialog.c
* app/widgets/gimpfileprocview.c
* app/widgets/gimppluginaction.c
* app/xcf/xcf.c
* tools/pdbgen/pdb/fileops.pdb
* tools/pdbgen/pdb/plug_in.pdb: changed accordingly plus some
minor cosmetic cleanups.
* app/pdb/fileops_cmds.c
* app/pdb/plug_in_cmds.c: regenerated.
2004-09-22 Michael Natterer <mitch@gimp.org>
* app/widgets/gimplayertreeview.c

View File

@ -32,7 +32,7 @@
#include "core/gimpimage.h"
#include "plug-in/plug-ins.h"
#include "plug-in/plug-in-proc.h"
#include "plug-in/plug-in-proc-def.h"
#include "widgets/gimpactiongroup.h"
#include "widgets/gimphelp-ids.h"

View File

@ -33,7 +33,7 @@
#include "pdb/procedural_db.h"
#include "plug-in/plug-in-run.h"
#include "plug-in/plug-in-proc.h"
#include "plug-in/plug-in-proc-def.h"
#include "widgets/gimphelp-ids.h"

View File

@ -2,6 +2,8 @@
* Copyright (C) 1995, 1996, 1997 Spencer Kimball and Peter Mattis
* Copyright (C) 1997 Josh MacDonald
*
* file-open.c
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@ -53,7 +55,7 @@
#include "pdb/procedural_db.h"
#include "plug-in/plug-in.h"
#include "plug-in/plug-in-proc.h"
#include "plug-in/plug-in-proc-def.h"
#include "file-open.h"
#include "file-utils.h"

View File

@ -1,6 +1,8 @@
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* file-open.h
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or

View File

@ -2,6 +2,8 @@
* Copyright (C) 1995, 1996, 1997 Spencer Kimball and Peter Mattis
* Copyright (C) 1997 Josh MacDonald
*
* file-save.c
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@ -53,7 +55,7 @@
#include "pdb/procedural_db.h"
#include "plug-in/plug-in.h"
#include "plug-in/plug-in-proc.h"
#include "plug-in/plug-in-proc-def.h"
#include "file-save.h"
#include "file-utils.h"

View File

@ -1,6 +1,8 @@
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* file-save.h
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or

View File

@ -2,6 +2,8 @@
* Copyright (C) 1995, 1996, 1997 Spencer Kimball and Peter Mattis
* Copyright (C) 1997 Josh MacDonald
*
* file-utils.c
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@ -45,7 +47,7 @@
#include "pdb/procedural_db.h"
#include "plug-in/plug-in.h"
#include "plug-in/plug-in-proc.h"
#include "plug-in/plug-in-proc-def.h"
#include "file-utils.h"

View File

@ -1,6 +1,8 @@
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* file-utils.h
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or

View File

@ -42,7 +42,7 @@
#include "text/gimpfont.h"
#include "plug-in/plug-ins.h"
#include "plug-in/plug-in-proc.h"
#include "plug-in/plug-in-proc-def.h"
#include "widgets/gimpactiongroup.h"
#include "widgets/gimpbrushselect.h"

View File

@ -30,7 +30,7 @@
#include "plug-in/plug-ins.h"
#include "plug-in/plug-in-def.h"
#include "plug-in/plug-in-proc.h"
#include "plug-in/plug-in-proc-def.h"
#include "widgets/gimpuimanager.h"

View File

@ -50,7 +50,7 @@
#include "core/gimpimage.h"
#include "core/gimpimagefile.h"
#include "file/file-utils.h"
#include "plug-in/plug-in-proc.h"
#include "plug-in/plug-in-proc-def.h"
#include "plug-in/plug-in.h"
#include "plug-in/plug-ins.h"

View File

@ -1,6 +1,8 @@
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* plug-in-proc-def.c
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@ -31,7 +33,7 @@
#include "plug-in.h"
#include "plug-ins.h"
#include "plug-in-proc.h"
#include "plug-in-proc-def.h"
#include "gimp-intl.h"

View File

@ -1,6 +1,8 @@
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* plug-in-proc-def.h
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@ -16,8 +18,8 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __PLUG_IN_PROC_H__
#define __PLUG_IN_PROC_H__
#ifndef __PLUG_IN_PROC_DEF_H__
#define __PLUG_IN_PROC_DEF_H__
#include <time.h> /* time_t */
@ -67,4 +69,4 @@ gboolean plug_in_proc_def_get_sensitive (const PlugInProcDef *proc_def,
GimpImageType image_type);
#endif /* __PLUG_IN_PROC_H__ */
#endif /* __PLUG_IN_PROC_DEF_H__ */

View File

@ -34,7 +34,7 @@
#include "core/gimp.h"
#include "plug-in/plug-in-def.h"
#include "plug-in/plug-in-params.h"
#include "plug-in/plug-in-proc.h"
#include "plug-in/plug-in-proc-def.h"
#include "plug-in/plug-in.h"
#include "plug-in/plug-ins.h"

View File

@ -27,8 +27,8 @@ libappplug_in_a_SOURCES = \
plug-in-message.h \
plug-in-params.c \
plug-in-params.h \
plug-in-proc.c \
plug-in-proc.h \
plug-in-proc-def.c \
plug-in-proc-def.h \
plug-in-proc-frame.c \
plug-in-proc-frame.h \
plug-in-progress.c \

View File

@ -1,6 +1,8 @@
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* plug-in-message.c
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@ -38,7 +40,7 @@
#include "plug-ins.h"
#include "plug-in-def.h"
#include "plug-in-params.h"
#include "plug-in-proc.h"
#include "plug-in-proc-def.h"
#include "plug-in-shm.h"

View File

@ -1,6 +1,8 @@
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* plug-in-message.h
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or

View File

@ -1,6 +1,8 @@
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* plug-in-progress.c
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or

View File

@ -1,6 +1,8 @@
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* plug-in-progress.h
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or

View File

@ -1,6 +1,8 @@
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* plug-in.c
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@ -79,7 +81,7 @@
#include "plug-in-def.h"
#include "plug-in-message.h"
#include "plug-in-params.h"
#include "plug-in-proc.h"
#include "plug-in-proc-def.h"
#include "plug-in-progress.h"
#include "plug-in-shm.h"

View File

@ -1,6 +1,8 @@
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* plug-in.h
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or

View File

@ -1,6 +1,8 @@
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* plug-in-run.c
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@ -40,7 +42,7 @@
#include "plug-in.h"
#include "plug-in-params.h"
#include "plug-in-proc.h"
#include "plug-in-proc-def.h"
#include "plug-in-run.h"
#include "plug-in-shm.h"

View File

@ -1,6 +1,8 @@
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* plug-in-run.h
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or

View File

@ -1,6 +1,8 @@
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* plug-in-run.c
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@ -40,7 +42,7 @@
#include "plug-in.h"
#include "plug-in-params.h"
#include "plug-in-proc.h"
#include "plug-in-proc-def.h"
#include "plug-in-run.h"
#include "plug-in-shm.h"

View File

@ -1,6 +1,8 @@
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* plug-in-run.h
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or

View File

@ -1,6 +1,8 @@
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* plug-ins.c
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@ -41,7 +43,7 @@
#include "plug-ins.h"
#include "plug-in-def.h"
#include "plug-in-params.h"
#include "plug-in-proc.h"
#include "plug-in-proc-def.h"
#include "plug-in-progress.h"
#include "plug-in-rc.h"
#include "plug-in-run.h"

View File

@ -1,6 +1,8 @@
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* plug-ins.h
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or

View File

@ -1,6 +1,8 @@
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* plug-in-proc-def.c
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@ -31,7 +33,7 @@
#include "plug-in.h"
#include "plug-ins.h"
#include "plug-in-proc.h"
#include "plug-in-proc-def.h"
#include "gimp-intl.h"

View File

@ -1,6 +1,8 @@
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* plug-in-proc-def.h
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@ -16,8 +18,8 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __PLUG_IN_PROC_H__
#define __PLUG_IN_PROC_H__
#ifndef __PLUG_IN_PROC_DEF_H__
#define __PLUG_IN_PROC_DEF_H__
#include <time.h> /* time_t */
@ -67,4 +69,4 @@ gboolean plug_in_proc_def_get_sensitive (const PlugInProcDef *proc_def,
GimpImageType image_type);
#endif /* __PLUG_IN_PROC_H__ */
#endif /* __PLUG_IN_PROC_DEF_H__ */

View File

@ -1,6 +1,8 @@
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* plug-in-def.c
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@ -24,7 +26,7 @@
#include "plug-in.h"
#include "plug-in-def.h"
#include "plug-in-proc.h"
#include "plug-in-proc-def.h"
PlugInDef *

View File

@ -1,6 +1,8 @@
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* plug-in-def.h
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@ -36,7 +38,7 @@ struct _PlugInDef
PlugInDef * plug_in_def_new (const gchar *prog);
void plug_in_def_free (PlugInDef *plug_in_def,
void plug_in_def_free (PlugInDef *plug_in_def,
gboolean free_proc_defs);
void plug_in_def_add_proc_def (PlugInDef *plug_in_def,

View File

@ -1,6 +1,8 @@
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* plug-in-message.c
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@ -38,7 +40,7 @@
#include "plug-ins.h"
#include "plug-in-def.h"
#include "plug-in-params.h"
#include "plug-in-proc.h"
#include "plug-in-proc-def.h"
#include "plug-in-shm.h"

View File

@ -1,6 +1,8 @@
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* plug-in-message.h
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or

View File

@ -1,6 +1,8 @@
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* plug-in-proc-def.c
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@ -31,7 +33,7 @@
#include "plug-in.h"
#include "plug-ins.h"
#include "plug-in-proc.h"
#include "plug-in-proc-def.h"
#include "gimp-intl.h"

View File

@ -1,6 +1,8 @@
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* plug-in-proc-def.h
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@ -16,8 +18,8 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __PLUG_IN_PROC_H__
#define __PLUG_IN_PROC_H__
#ifndef __PLUG_IN_PROC_DEF_H__
#define __PLUG_IN_PROC_DEF_H__
#include <time.h> /* time_t */
@ -67,4 +69,4 @@ gboolean plug_in_proc_def_get_sensitive (const PlugInProcDef *proc_def,
GimpImageType image_type);
#endif /* __PLUG_IN_PROC_H__ */
#endif /* __PLUG_IN_PROC_DEF_H__ */

View File

@ -1,281 +0,0 @@
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "config.h"
#include <string.h>
#include <glib-object.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include "libgimpbase/gimpbase.h"
#include "plug-in-types.h"
#include "core/gimp.h"
#include "plug-in.h"
#include "plug-ins.h"
#include "plug-in-proc.h"
#include "gimp-intl.h"
PlugInProcDef *
plug_in_proc_def_new (void)
{
PlugInProcDef *proc_def = g_new0 (PlugInProcDef, 1);
proc_def->icon_data_length = -1;
return proc_def;
}
void
plug_in_proc_def_free (PlugInProcDef *proc_def)
{
gint i;
g_return_if_fail (proc_def != NULL);
g_free (proc_def->db_info.name);
g_free (proc_def->db_info.blurb);
g_free (proc_def->db_info.help);
g_free (proc_def->db_info.author);
g_free (proc_def->db_info.copyright);
g_free (proc_def->db_info.date);
for (i = 0; i < proc_def->db_info.num_args; i++)
{
g_free (proc_def->db_info.args[i].name);
g_free (proc_def->db_info.args[i].description);
}
for (i = 0; i < proc_def->db_info.num_values; i++)
{
g_free (proc_def->db_info.values[i].name);
g_free (proc_def->db_info.values[i].description);
}
g_free (proc_def->db_info.args);
g_free (proc_def->db_info.values);
g_free (proc_def->prog);
g_free (proc_def->menu_label);
g_list_foreach (proc_def->menu_paths, (GFunc) g_free, NULL);
g_list_free (proc_def->menu_paths);
g_free (proc_def->icon_data);
g_free (proc_def->image_types);
g_free (proc_def->extensions);
g_free (proc_def->prefixes);
g_free (proc_def->magics);
g_free (proc_def->mime_type);
g_slist_foreach (proc_def->extensions_list, (GFunc) g_free, NULL);
g_slist_free (proc_def->extensions_list);
g_slist_foreach (proc_def->prefixes_list, (GFunc) g_free, NULL);
g_slist_free (proc_def->prefixes_list);
g_slist_foreach (proc_def->magics_list, (GFunc) g_free, NULL);
g_slist_free (proc_def->magics_list);
g_free (proc_def);
}
const ProcRecord *
plug_in_proc_def_get_proc (const PlugInProcDef *proc_def)
{
g_return_val_if_fail (proc_def != NULL, NULL);
return &proc_def->db_info;
}
const gchar *
plug_in_proc_def_get_progname (const PlugInProcDef *proc_def)
{
g_return_val_if_fail (proc_def != NULL, NULL);
switch (proc_def->db_info.proc_type)
{
case GIMP_PLUGIN:
case GIMP_EXTENSION:
return proc_def->prog;
case GIMP_TEMPORARY:
return ((PlugIn *) proc_def->db_info.exec_method.temporary.plug_in)->prog;
default:
break;
}
return NULL;
}
gchar *
plug_in_proc_def_get_label (const PlugInProcDef *proc_def,
const gchar *locale_domain)
{
const gchar *path;
gchar *stripped;
gchar *ellipses;
gchar *label;
g_return_val_if_fail (proc_def != NULL, NULL);
if (proc_def->menu_label)
path = dgettext (locale_domain, proc_def->menu_label);
else if (proc_def->menu_paths)
path = dgettext (locale_domain, proc_def->menu_paths->data);
else
return NULL;
stripped = gimp_strip_uline (path);
if (proc_def->menu_label)
label = g_strdup (stripped);
else
label = g_path_get_basename (stripped);
g_free (stripped);
ellipses = strstr (label, "...");
if (ellipses && ellipses == (label + strlen (label) - 3))
*ellipses = '\0';
return label;
}
const gchar *
plug_in_proc_def_get_stock_id (const PlugInProcDef *proc_def)
{
g_return_val_if_fail (proc_def != NULL, NULL);
switch (proc_def->icon_type)
{
case GIMP_ICON_TYPE_STOCK_ID:
return proc_def->icon_data;
default:
return NULL;
}
}
GdkPixbuf *
plug_in_proc_def_get_pixbuf (const PlugInProcDef *proc_def)
{
GdkPixbuf *pixbuf = NULL;
GError *error = NULL;
g_return_val_if_fail (proc_def != NULL, NULL);
switch (proc_def->icon_type)
{
case GIMP_ICON_TYPE_INLINE_PIXBUF:
pixbuf = gdk_pixbuf_new_from_inline (proc_def->icon_data_length,
proc_def->icon_data, TRUE, &error);
if (! pixbuf)
{
g_printerr (error->message);
g_clear_error (&error);
}
break;
case GIMP_ICON_TYPE_IMAGE_FILE:
pixbuf = gdk_pixbuf_new_from_file (proc_def->icon_data, &error);
if (! pixbuf)
{
g_printerr (error->message);
g_clear_error (&error);
}
break;
default:
break;
}
return pixbuf;
}
gchar *
plug_in_proc_def_get_help_id (const PlugInProcDef *proc_def,
const gchar *help_domain)
{
gchar *help_id;
gchar *p;
g_return_val_if_fail (proc_def != NULL, NULL);
help_id = g_strdup (proc_def->db_info.name);
for (p = help_id; p && *p; p++)
if (*p == '_')
*p = '-';
if (help_domain)
{
gchar *domain_and_id;
domain_and_id = g_strconcat (help_domain, "?", help_id, NULL);
g_free (help_id);
return domain_and_id;
}
return help_id;
}
gboolean
plug_in_proc_def_get_sensitive (const PlugInProcDef *proc_def,
GimpImageType image_type)
{
gboolean sensitive;
g_return_val_if_fail (proc_def != NULL, FALSE);
switch (image_type)
{
case GIMP_RGB_IMAGE:
sensitive = proc_def->image_types_val & PLUG_IN_RGB_IMAGE;
break;
case GIMP_RGBA_IMAGE:
sensitive = proc_def->image_types_val & PLUG_IN_RGBA_IMAGE;
break;
case GIMP_GRAY_IMAGE:
sensitive = proc_def->image_types_val & PLUG_IN_GRAY_IMAGE;
break;
case GIMP_GRAYA_IMAGE:
sensitive = proc_def->image_types_val & PLUG_IN_GRAYA_IMAGE;
break;
case GIMP_INDEXED_IMAGE:
sensitive = proc_def->image_types_val & PLUG_IN_INDEXED_IMAGE;
break;
case GIMP_INDEXEDA_IMAGE:
sensitive = proc_def->image_types_val & PLUG_IN_INDEXEDA_IMAGE;
break;
default:
sensitive = FALSE;
break;
}
return sensitive ? TRUE : FALSE;
}

View File

@ -1,70 +0,0 @@
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __PLUG_IN_PROC_H__
#define __PLUG_IN_PROC_H__
#include <time.h> /* time_t */
#include <gdk-pixbuf/gdk-pixbuf.h>
#include "pdb/procedural_db.h" /* ProcRecord */
struct _PlugInProcDef
{
/* common members */
gchar *prog;
gchar *menu_label;
GList *menu_paths;
GimpIconType icon_type;
gint icon_data_length;
gchar *icon_data;
gchar *image_types;
PlugInImageType image_types_val;
time_t mtime;
gboolean installed_during_init;
ProcRecord db_info;
/* file proc specific members */
gchar *extensions;
gchar *prefixes;
gchar *magics;
gchar *mime_type;
GSList *extensions_list;
GSList *prefixes_list;
GSList *magics_list;
};
PlugInProcDef * plug_in_proc_def_new (void);
void plug_in_proc_def_free (PlugInProcDef *proc_def);
const ProcRecord * plug_in_proc_def_get_proc (const PlugInProcDef *proc_def);
const gchar * plug_in_proc_def_get_progname (const PlugInProcDef *proc_def);
gchar * plug_in_proc_def_get_label (const PlugInProcDef *proc_def,
const gchar *locale_domain);
const gchar * plug_in_proc_def_get_stock_id (const PlugInProcDef *proc_def);
GdkPixbuf * plug_in_proc_def_get_pixbuf (const PlugInProcDef *proc_def);
gchar * plug_in_proc_def_get_help_id (const PlugInProcDef *proc_def,
const gchar *help_domain);
gboolean plug_in_proc_def_get_sensitive (const PlugInProcDef *proc_def,
GimpImageType image_type);
#endif /* __PLUG_IN_PROC_H__ */

View File

@ -1,6 +1,8 @@
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* plug-in-progress.c
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or

View File

@ -1,6 +1,8 @@
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* plug-in-progress.h
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or

View File

@ -1,7 +1,7 @@
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* PlugInRc
* plug-in-rc.c
* Copyright (C) 2001 Sven Neumann <sven@gimp.org>
*
* This program is free software; you can redistribute it and/or modify
@ -36,7 +36,7 @@
#include "plug-ins.h"
#include "plug-in-def.h"
#include "plug-in-proc.h"
#include "plug-in-proc-def.h"
#include "plug-in-rc.h"
#include "gimp-intl.h"

View File

@ -1,7 +1,7 @@
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* PlugInRc
* plug-in-rc.h
* Copyright (C) 2001 Sven Neumann <sven@gimp.org>
*
* This program is free software; you can redistribute it and/or modify

View File

@ -1,6 +1,8 @@
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* plug-in-run.c
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@ -40,7 +42,7 @@
#include "plug-in.h"
#include "plug-in-params.h"
#include "plug-in-proc.h"
#include "plug-in-proc-def.h"
#include "plug-in-run.h"
#include "plug-in-shm.h"

View File

@ -1,6 +1,8 @@
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* plug-in-run.h
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or

View File

@ -1,6 +1,8 @@
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* plug-in.c
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@ -79,7 +81,7 @@
#include "plug-in-def.h"
#include "plug-in-message.h"
#include "plug-in-params.h"
#include "plug-in-proc.h"
#include "plug-in-proc-def.h"
#include "plug-in-progress.h"
#include "plug-in-shm.h"

View File

@ -1,6 +1,8 @@
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* plug-in.h
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or

View File

@ -1,6 +1,8 @@
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* plug-ins.c
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@ -41,7 +43,7 @@
#include "plug-ins.h"
#include "plug-in-def.h"
#include "plug-in-params.h"
#include "plug-in-proc.h"
#include "plug-in-proc-def.h"
#include "plug-in-progress.h"
#include "plug-in-rc.h"
#include "plug-in-run.h"

View File

@ -1,6 +1,8 @@
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* plug-ins.h
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or

View File

@ -37,7 +37,7 @@
#include "file/file-utils.h"
#include "plug-in/plug-in-proc.h"
#include "plug-in/plug-in-proc-def.h"
#include "plug-in/plug-ins.h"
#include "gimpfiledialog.h"

View File

@ -30,7 +30,7 @@
#include "core/gimp.h"
#include "core/gimpmarshal.h"
#include "plug-in/plug-in-proc.h"
#include "plug-in/plug-in-proc-def.h"
#include "plug-in/plug-ins.h"
#include "gimpfileprocview.h"

View File

@ -27,7 +27,7 @@
#include "core/gimpmarshal.h"
#include "plug-in/plug-in-proc.h"
#include "plug-in/plug-in-proc-def.h"
#include "gimppluginaction.h"

View File

@ -35,7 +35,7 @@
#include "pdb/procedural_db.h"
#include "plug-in/plug-ins.h"
#include "plug-in/plug-in-proc.h"
#include "plug-in/plug-in-proc-def.h"
#include "xcf.h"
#include "xcf-private.h"

View File

@ -534,7 +534,8 @@ CODE
@headers = qw(<sys/types.h> <unistd.h> <gdk-pixbuf/gdk-pixbuf.h>
"libgimpthumb/gimpthumb.h" "base/temp-buf.h"
"core/gimp.h" "core/gimpimagefile.h"
"plug-in/plug-in.h" "plug-in/plug-ins.h" "plug-in/plug-in-proc.h"
"plug-in/plug-in.h" "plug-in/plug-ins.h"
"plug-in/plug-in-proc-def.h"
"file/file-utils.h");
@procs = qw(file_load file_save file_load_thumbnail file_save_thumbnail

View File

@ -416,7 +416,7 @@ CODE
"libgimpbase/gimpprotocol.h" "core/gimp.h"
"plug-in/plug-in.h" "plug-in/plug-ins.h"
"plug-in/plug-in-def.h" "plug-in/plug-in-params.h"
"plug-in/plug-in-proc.h");
"plug-in/plug-in-proc-def.h");
@procs = qw(plugins_query
plugin_domain_register plugin_help_register