gimp/libgimpmodule/gimpmoduledb.c

452 lines
12 KiB
C
Raw Normal View History

/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* This library is free software: you can redistribute it and/or
* 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.
*
* 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.
*
* 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/>.
*/
#include "config.h"
#include <string.h>
#include <glib-object.h>
#include "libgimpbase/gimpbase.h"
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
#include "gimpmoduletypes.h"
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
#include "gimpmodule.h"
#include "gimpmoduledb.h"
/**
* SECTION: gimpmoduledb
* @title: GimpModuleDB
* @short_description: Keeps a list of #GimpModule's found in a given
* searchpath.
*
* Keeps a list of #GimpModule's found in a given searchpath.
**/
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
enum
{
ADD,
REMOVE,
MODULE_MODIFIED,
LAST_SIGNAL
};
/* #define DUMP_DB 1 */
Ported module loading to GTypeModule, getting rid of all own module 2002-10-20 Michael Natterer <mitch@gimp.org> Ported module loading to GTypeModule, getting rid of all own module registering/bookkeeping stuff for color selectors and display filters. The modules now simply register GimpColorSelector and GimpColorDisplay subclasses, the list of registered subclasses can then be obtained calling g_type_children() on the abstract base classes. This is work in progress and just the first working state after I started breaking everything... * app/gui/color-select.[ch] * libgimp/gimpcolordisplay.h * libgimp/gimpcolorselector.h: removed. * app/gui/Makefile.am * libgimp/Makefile.am: changed accordingly. * libgimp/gimpmodule.h: massively simplified. All voodoo is gone. * libgimpwidgets/gimpcolordisplay.[ch] * libgimpwidgets/gimpcolorselector.[ch]: new abstract base classes which need to be subclassed by modules. * libgimpwidgets/gimpcolorselect.[ch]: the built-in color selector from app/gui/color-select.* ported to be a GimpColorSelector subclass. * libgimpwidgets/Makefile.am * libgimpwidgets/gimpwidgets.h * libgimpwidgets/gimpwidgetsmarshal.list * libgimpwidgets/gimpwidgetstypes.h: changed accordingly. * app/core/gimpmoduleinfo.[ch]: made it a GTypeModule subclass * app/core/gimpmodules.c: changed accordingly. * app/core/gimpcontainer.c * app/core/gimplist.c: HACKED around to allow GimpLists of GObjects (not GimpObjects). This is EEKy, so I will either make gimp->modules a simple GList and revert this bit of change, or allow GObjects all over the place in GimpContainer land... * app/display/gimpdisplayshell-filter.[ch] * app/gui/color-notebook.c: removed all module stuff and use g_type_children() to get the list of available color_selectors and display_filters. * app/display/gimpdisplayshell-filter-dialog.c * app/display/gimpdisplayshell-render.c * app/gui/module-browser.c: changed accordingly. * app/gui/gui.c: ref the built-in color selector's class before the modules are queried so it appears first in the list of GimpColorSelector's children. * modules/Makefile.am: build the water color selector again. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: ported them all to the new API. * modules/gimpmodregister.[ch]: removed the old EMX module hack.
2002-10-20 18:14:17 +08:00
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
static void gimp_module_db_finalize (GObject *object);
static void gimp_module_db_module_initialize (const GimpDatafileData *file_data,
gpointer user_data);
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
static GimpModule * gimp_module_db_module_find_by_path (GimpModuleDB *db,
const char *fullpath);
#ifdef DUMP_DB
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
static void gimp_module_db_dump_module (gpointer data,
gpointer user_data);
#endif
static void gimp_module_db_module_on_disk_func (gpointer data,
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
gpointer user_data);
static void gimp_module_db_module_remove_func (gpointer data,
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
gpointer user_data);
static void gimp_module_db_module_modified (GimpModule *module,
GimpModuleDB *db);
G_DEFINE_TYPE (GimpModuleDB, gimp_module_db, G_TYPE_OBJECT)
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
#define parent_class gimp_module_db_parent_class
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
static guint db_signals[LAST_SIGNAL] = { 0 };
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
static void
gimp_module_db_class_init (GimpModuleDBClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
db_signals[ADD] =
g_signal_new ("add",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GimpModuleDBClass, add),
NULL, NULL,
g_cclosure_marshal_VOID__OBJECT,
G_TYPE_NONE, 1,
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
GIMP_TYPE_MODULE);
db_signals[REMOVE] =
g_signal_new ("remove",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GimpModuleDBClass, remove),
NULL, NULL,
g_cclosure_marshal_VOID__OBJECT,
G_TYPE_NONE, 1,
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
GIMP_TYPE_MODULE);
db_signals[MODULE_MODIFIED] =
g_signal_new ("module-modified",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GimpModuleDBClass, module_modified),
NULL, NULL,
g_cclosure_marshal_VOID__OBJECT,
G_TYPE_NONE, 1,
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
GIMP_TYPE_MODULE);
object_class->finalize = gimp_module_db_finalize;
klass->add = NULL;
klass->remove = NULL;
}
static void
gimp_module_db_init (GimpModuleDB *db)
{
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
db->modules = NULL;
db->load_inhibit = NULL;
db->verbose = FALSE;
}
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
static void
gimp_module_db_finalize (GObject *object)
{
GimpModuleDB *db = GIMP_MODULE_DB (object);
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
if (db->modules)
{
g_list_free (db->modules);
db->modules = NULL;
}
if (db->load_inhibit)
{
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
g_free (db->load_inhibit);
db->load_inhibit = NULL;
}
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
G_OBJECT_CLASS (parent_class)->finalize (object);
}
/**
* gimp_module_db_new:
* @verbose: Pass %TRUE to enable debugging output.
*
* Creates a new #GimpModuleDB instance. The @verbose parameter will be
* passed to the created #GimpModule instances using gimp_module_new().
*
* Return value: The new #GimpModuleDB instance.
**/
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
GimpModuleDB *
gimp_module_db_new (gboolean verbose)
{
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
GimpModuleDB *db;
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
db = g_object_new (GIMP_TYPE_MODULE_DB, NULL);
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
db->verbose = verbose ? TRUE : FALSE;
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
return db;
}
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
static gboolean
is_in_inhibit_list (const gchar *filename,
const gchar *inhibit_list)
{
gchar *p;
gint pathlen;
const gchar *start;
const gchar *end;
if (! inhibit_list || ! strlen (inhibit_list))
return FALSE;
p = strstr (inhibit_list, filename);
if (!p)
return FALSE;
/* we have a substring, but check for colons either side */
start = p;
while (start != inhibit_list && *start != G_SEARCHPATH_SEPARATOR)
start--;
if (*start == G_SEARCHPATH_SEPARATOR)
start++;
end = strchr (p, G_SEARCHPATH_SEPARATOR);
if (! end)
end = inhibit_list + strlen (inhibit_list);
pathlen = strlen (filename);
if ((end - start) == pathlen)
return TRUE;
return FALSE;
}
/**
* gimp_module_db_set_load_inhibit:
* @db: A #GimpModuleDB.
* @load_inhibit: A #G_SEARCHPATH_SEPARATOR delimited list of module
* filenames to exclude from auto-loading.
*
* Sets the @load_inhibit flag for all #GimpModule's which are kept
* by @db (using gimp_module_set_load_inhibit()).
**/
void
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
gimp_module_db_set_load_inhibit (GimpModuleDB *db,
const gchar *load_inhibit)
{
GList *list;
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
g_return_if_fail (GIMP_IS_MODULE_DB (db));
if (db->load_inhibit)
g_free (db->load_inhibit);
db->load_inhibit = g_strdup (load_inhibit);
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
for (list = db->modules; list; list = g_list_next (list))
{
GimpModule *module = list->data;
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
gimp_module_set_load_inhibit (module,
is_in_inhibit_list (module->filename,
load_inhibit));
}
}
/**
* gimp_module_db_get_load_inhibit:
* @db: A #GimpModuleDB.
*
* Return the #G_SEARCHPATH_SEPARATOR selimited list of module filenames
* which are excluded from auto-loading.
*
* Return value: the @db's @load_inhibit string.
**/
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
const gchar *
gimp_module_db_get_load_inhibit (GimpModuleDB *db)
{
g_return_val_if_fail (GIMP_IS_MODULE_DB (db), NULL);
return db->load_inhibit;
}
/**
* gimp_module_db_load:
* @db: A #GimpModuleDB.
* @module_path: A #G_SEARCHPATH_SEPARATOR delimited list of directories
* to load modules from.
*
* Scans the directories contained in @module_path using
* gimp_datafiles_read_directories() and creates a #GimpModule
* instance for every loadable module contained in the directories.
**/
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
void
gimp_module_db_load (GimpModuleDB *db,
const gchar *module_path)
{
g_return_if_fail (GIMP_IS_MODULE_DB (db));
g_return_if_fail (module_path != NULL);
if (g_module_supported ())
gimp_datafiles_read_directories (module_path,
G_FILE_TEST_EXISTS,
gimp_module_db_module_initialize,
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
db);
#ifdef DUMP_DB
g_list_foreach (db->modules, gimp_module_db_dump_module, NULL);
#endif
}
/**
* gimp_module_db_refresh:
* @db: A #GimpModuleDB.
* @module_path: A #G_SEARCHPATH_SEPARATOR delimited list of directories
* to load modules from.
*
* Does the same as gimp_module_db_load(), plus removes all #GimpModule
* instances whose modules have been deleted from disk.
*
* Note that the #GimpModule's will just be removed from the internal
* list and not freed as this is not possible with #GTypeModule
* instances which actually implement types.
**/
void
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
gimp_module_db_refresh (GimpModuleDB *db,
const gchar *module_path)
{
GList *kill_list = NULL;
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
g_return_if_fail (GIMP_IS_MODULE_DB (db));
g_return_if_fail (module_path != NULL);
/* remove modules we don't have on disk anymore */
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
g_list_foreach (db->modules,
gimp_module_db_module_on_disk_func,
&kill_list);
g_list_foreach (kill_list,
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
gimp_module_db_module_remove_func,
db);
g_list_free (kill_list);
/* walk filesystem and add new things we find */
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
gimp_datafiles_read_directories (module_path,
G_FILE_TEST_EXISTS,
gimp_module_db_module_initialize,
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
db);
}
static void
gimp_module_db_module_initialize (const GimpDatafileData *file_data,
gpointer user_data)
{
GimpModuleDB *db = GIMP_MODULE_DB (user_data);
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
GimpModule *module;
gboolean load_inhibit;
if (! gimp_datafiles_check_extension (file_data->filename,
"." G_MODULE_SUFFIX))
return;
/* don't load if we already know about it */
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
if (gimp_module_db_module_find_by_path (db, file_data->filename))
return;
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
load_inhibit = is_in_inhibit_list (file_data->filename,
db->load_inhibit);
module = gimp_module_new (file_data->filename,
load_inhibit,
db->verbose);
g_signal_connect (module, "modified",
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
G_CALLBACK (gimp_module_db_module_modified),
db);
db->modules = g_list_append (db->modules, module);
g_signal_emit (db, db_signals[ADD], 0, module);
}
Makefile.am libgimpmodule/.cvsignore libgimpmodule/Makefile.am 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/gimpmodule.[ch] * libgimpmodule/gimpmodule.def * libgimpmodule/gimpmoduletypes.h * libgimpmodule/makefile.msc: new library for module loading. * configure.in: generate Makefiles for libgimpmodule and its devel-docs. Added GMODULE_CFLAGS and GMODULE_LIBS. * app/Makefile.am: link the app against it. * libgimp/gimpmodule.h * app/core/gimpmoduleinfo.[ch]: removed. * libgimp/Makefile.am * app/core/Makefile.am * app/core/core-types.h * app/core/gimpmodules.c * app/gui/module-browser.c: changed accordingly. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: #include "libgimpmodule/gimpmodule.h" 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/libgimpmodule.types * libgimpmodule/tmpl/.cvsignore * libgimpmodule/tmpl/gimpmodule.sgml * libgimpmodule/tmpl/gimpmoduletypes.sgml: added API docs for the new module loading lib. * libgimp/tmpl/gimpmodule.sgml: removed. * libgimp/libgimp-docs.sgml * libgimp/libgimp-sections.txt: changed accordingly. * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpcolorselect.sgml * libgimpwidgets/tmpl/gimpcolorselector.sgml: updated. 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: removed app/core/gimpmoduleinfo.c 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: added libgimpmodule/gimpmodule.c
2002-10-21 22:15:02 +08:00
static GimpModule *
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
gimp_module_db_module_find_by_path (GimpModuleDB *db,
const char *fullpath)
{
GList *list;
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
for (list = db->modules; list; list = g_list_next (list))
Ported module loading to GTypeModule, getting rid of all own module 2002-10-20 Michael Natterer <mitch@gimp.org> Ported module loading to GTypeModule, getting rid of all own module registering/bookkeeping stuff for color selectors and display filters. The modules now simply register GimpColorSelector and GimpColorDisplay subclasses, the list of registered subclasses can then be obtained calling g_type_children() on the abstract base classes. This is work in progress and just the first working state after I started breaking everything... * app/gui/color-select.[ch] * libgimp/gimpcolordisplay.h * libgimp/gimpcolorselector.h: removed. * app/gui/Makefile.am * libgimp/Makefile.am: changed accordingly. * libgimp/gimpmodule.h: massively simplified. All voodoo is gone. * libgimpwidgets/gimpcolordisplay.[ch] * libgimpwidgets/gimpcolorselector.[ch]: new abstract base classes which need to be subclassed by modules. * libgimpwidgets/gimpcolorselect.[ch]: the built-in color selector from app/gui/color-select.* ported to be a GimpColorSelector subclass. * libgimpwidgets/Makefile.am * libgimpwidgets/gimpwidgets.h * libgimpwidgets/gimpwidgetsmarshal.list * libgimpwidgets/gimpwidgetstypes.h: changed accordingly. * app/core/gimpmoduleinfo.[ch]: made it a GTypeModule subclass * app/core/gimpmodules.c: changed accordingly. * app/core/gimpcontainer.c * app/core/gimplist.c: HACKED around to allow GimpLists of GObjects (not GimpObjects). This is EEKy, so I will either make gimp->modules a simple GList and revert this bit of change, or allow GObjects all over the place in GimpContainer land... * app/display/gimpdisplayshell-filter.[ch] * app/gui/color-notebook.c: removed all module stuff and use g_type_children() to get the list of available color_selectors and display_filters. * app/display/gimpdisplayshell-filter-dialog.c * app/display/gimpdisplayshell-render.c * app/gui/module-browser.c: changed accordingly. * app/gui/gui.c: ref the built-in color selector's class before the modules are queried so it appears first in the list of GimpColorSelector's children. * modules/Makefile.am: build the water color selector again. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: ported them all to the new API. * modules/gimpmodregister.[ch]: removed the old EMX module hack.
2002-10-20 18:14:17 +08:00
{
GimpModule *module = list->data;
Makefile.am libgimpmodule/.cvsignore libgimpmodule/Makefile.am 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/gimpmodule.[ch] * libgimpmodule/gimpmodule.def * libgimpmodule/gimpmoduletypes.h * libgimpmodule/makefile.msc: new library for module loading. * configure.in: generate Makefiles for libgimpmodule and its devel-docs. Added GMODULE_CFLAGS and GMODULE_LIBS. * app/Makefile.am: link the app against it. * libgimp/gimpmodule.h * app/core/gimpmoduleinfo.[ch]: removed. * libgimp/Makefile.am * app/core/Makefile.am * app/core/core-types.h * app/core/gimpmodules.c * app/gui/module-browser.c: changed accordingly. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: #include "libgimpmodule/gimpmodule.h" 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/libgimpmodule.types * libgimpmodule/tmpl/.cvsignore * libgimpmodule/tmpl/gimpmodule.sgml * libgimpmodule/tmpl/gimpmoduletypes.sgml: added API docs for the new module loading lib. * libgimp/tmpl/gimpmodule.sgml: removed. * libgimp/libgimp-docs.sgml * libgimp/libgimp-sections.txt: changed accordingly. * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpcolorselect.sgml * libgimpwidgets/tmpl/gimpcolorselector.sgml: updated. 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: removed app/core/gimpmoduleinfo.c 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: added libgimpmodule/gimpmodule.c
2002-10-21 22:15:02 +08:00
if (! strcmp (module->filename, fullpath))
return module;
Ported module loading to GTypeModule, getting rid of all own module 2002-10-20 Michael Natterer <mitch@gimp.org> Ported module loading to GTypeModule, getting rid of all own module registering/bookkeeping stuff for color selectors and display filters. The modules now simply register GimpColorSelector and GimpColorDisplay subclasses, the list of registered subclasses can then be obtained calling g_type_children() on the abstract base classes. This is work in progress and just the first working state after I started breaking everything... * app/gui/color-select.[ch] * libgimp/gimpcolordisplay.h * libgimp/gimpcolorselector.h: removed. * app/gui/Makefile.am * libgimp/Makefile.am: changed accordingly. * libgimp/gimpmodule.h: massively simplified. All voodoo is gone. * libgimpwidgets/gimpcolordisplay.[ch] * libgimpwidgets/gimpcolorselector.[ch]: new abstract base classes which need to be subclassed by modules. * libgimpwidgets/gimpcolorselect.[ch]: the built-in color selector from app/gui/color-select.* ported to be a GimpColorSelector subclass. * libgimpwidgets/Makefile.am * libgimpwidgets/gimpwidgets.h * libgimpwidgets/gimpwidgetsmarshal.list * libgimpwidgets/gimpwidgetstypes.h: changed accordingly. * app/core/gimpmoduleinfo.[ch]: made it a GTypeModule subclass * app/core/gimpmodules.c: changed accordingly. * app/core/gimpcontainer.c * app/core/gimplist.c: HACKED around to allow GimpLists of GObjects (not GimpObjects). This is EEKy, so I will either make gimp->modules a simple GList and revert this bit of change, or allow GObjects all over the place in GimpContainer land... * app/display/gimpdisplayshell-filter.[ch] * app/gui/color-notebook.c: removed all module stuff and use g_type_children() to get the list of available color_selectors and display_filters. * app/display/gimpdisplayshell-filter-dialog.c * app/display/gimpdisplayshell-render.c * app/gui/module-browser.c: changed accordingly. * app/gui/gui.c: ref the built-in color selector's class before the modules are queried so it appears first in the list of GimpColorSelector's children. * modules/Makefile.am: build the water color selector again. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: ported them all to the new API. * modules/gimpmodregister.[ch]: removed the old EMX module hack.
2002-10-20 18:14:17 +08:00
}
Ported module loading to GTypeModule, getting rid of all own module 2002-10-20 Michael Natterer <mitch@gimp.org> Ported module loading to GTypeModule, getting rid of all own module registering/bookkeeping stuff for color selectors and display filters. The modules now simply register GimpColorSelector and GimpColorDisplay subclasses, the list of registered subclasses can then be obtained calling g_type_children() on the abstract base classes. This is work in progress and just the first working state after I started breaking everything... * app/gui/color-select.[ch] * libgimp/gimpcolordisplay.h * libgimp/gimpcolorselector.h: removed. * app/gui/Makefile.am * libgimp/Makefile.am: changed accordingly. * libgimp/gimpmodule.h: massively simplified. All voodoo is gone. * libgimpwidgets/gimpcolordisplay.[ch] * libgimpwidgets/gimpcolorselector.[ch]: new abstract base classes which need to be subclassed by modules. * libgimpwidgets/gimpcolorselect.[ch]: the built-in color selector from app/gui/color-select.* ported to be a GimpColorSelector subclass. * libgimpwidgets/Makefile.am * libgimpwidgets/gimpwidgets.h * libgimpwidgets/gimpwidgetsmarshal.list * libgimpwidgets/gimpwidgetstypes.h: changed accordingly. * app/core/gimpmoduleinfo.[ch]: made it a GTypeModule subclass * app/core/gimpmodules.c: changed accordingly. * app/core/gimpcontainer.c * app/core/gimplist.c: HACKED around to allow GimpLists of GObjects (not GimpObjects). This is EEKy, so I will either make gimp->modules a simple GList and revert this bit of change, or allow GObjects all over the place in GimpContainer land... * app/display/gimpdisplayshell-filter.[ch] * app/gui/color-notebook.c: removed all module stuff and use g_type_children() to get the list of available color_selectors and display_filters. * app/display/gimpdisplayshell-filter-dialog.c * app/display/gimpdisplayshell-render.c * app/gui/module-browser.c: changed accordingly. * app/gui/gui.c: ref the built-in color selector's class before the modules are queried so it appears first in the list of GimpColorSelector's children. * modules/Makefile.am: build the water color selector again. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: ported them all to the new API. * modules/gimpmodregister.[ch]: removed the old EMX module hack.
2002-10-20 18:14:17 +08:00
return NULL;
}
#ifdef DUMP_DB
static void
gimp_module_db_dump_module (gpointer data,
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
gpointer user_data)
{
GimpModule *module = data;
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
g_print ("\n%s: %s\n",
gimp_filename_to_utf8 (module->filename),
gimp_module_state_name (module->state));
g_print (" module: %p lasterr: %s query: %p register: %p\n",
module->module,
module->last_module_error ? module->last_module_error : "NONE",
module->query_module,
module->register_module);
Makefile.am libgimpmodule/.cvsignore libgimpmodule/Makefile.am 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/gimpmodule.[ch] * libgimpmodule/gimpmodule.def * libgimpmodule/gimpmoduletypes.h * libgimpmodule/makefile.msc: new library for module loading. * configure.in: generate Makefiles for libgimpmodule and its devel-docs. Added GMODULE_CFLAGS and GMODULE_LIBS. * app/Makefile.am: link the app against it. * libgimp/gimpmodule.h * app/core/gimpmoduleinfo.[ch]: removed. * libgimp/Makefile.am * app/core/Makefile.am * app/core/core-types.h * app/core/gimpmodules.c * app/gui/module-browser.c: changed accordingly. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: #include "libgimpmodule/gimpmodule.h" 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/libgimpmodule.types * libgimpmodule/tmpl/.cvsignore * libgimpmodule/tmpl/gimpmodule.sgml * libgimpmodule/tmpl/gimpmoduletypes.sgml: added API docs for the new module loading lib. * libgimp/tmpl/gimpmodule.sgml: removed. * libgimp/libgimp-docs.sgml * libgimp/libgimp-sections.txt: changed accordingly. * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpcolorselect.sgml * libgimpwidgets/tmpl/gimpcolorselector.sgml: updated. 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: removed app/core/gimpmoduleinfo.c 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: added libgimpmodule/gimpmodule.c
2002-10-21 22:15:02 +08:00
if (i->info)
{
g_print (" purpose: %s\n"
" author: %s\n"
" version: %s\n"
" copyright: %s\n"
" date: %s\n",
module->info->purpose ? module->info->purpose : "NONE",
module->info->author ? module->info->author : "NONE",
module->info->version ? module->info->version : "NONE",
module->info->copyright ? module->info->copyright : "NONE",
module->info->date ? module->info->date : "NONE");
Makefile.am libgimpmodule/.cvsignore libgimpmodule/Makefile.am 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/gimpmodule.[ch] * libgimpmodule/gimpmodule.def * libgimpmodule/gimpmoduletypes.h * libgimpmodule/makefile.msc: new library for module loading. * configure.in: generate Makefiles for libgimpmodule and its devel-docs. Added GMODULE_CFLAGS and GMODULE_LIBS. * app/Makefile.am: link the app against it. * libgimp/gimpmodule.h * app/core/gimpmoduleinfo.[ch]: removed. * libgimp/Makefile.am * app/core/Makefile.am * app/core/core-types.h * app/core/gimpmodules.c * app/gui/module-browser.c: changed accordingly. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: #include "libgimpmodule/gimpmodule.h" 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/libgimpmodule.types * libgimpmodule/tmpl/.cvsignore * libgimpmodule/tmpl/gimpmodule.sgml * libgimpmodule/tmpl/gimpmoduletypes.sgml: added API docs for the new module loading lib. * libgimp/tmpl/gimpmodule.sgml: removed. * libgimp/libgimp-docs.sgml * libgimp/libgimp-sections.txt: changed accordingly. * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpcolorselect.sgml * libgimpwidgets/tmpl/gimpcolorselector.sgml: updated. 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: removed app/core/gimpmoduleinfo.c 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: added libgimpmodule/gimpmodule.c
2002-10-21 22:15:02 +08:00
}
}
#endif
static void
gimp_module_db_module_on_disk_func (gpointer data,
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
gpointer user_data)
{
GimpModule *module = data;
GList **kill_list = user_data;
gboolean old_on_disk;
Makefile.am libgimpmodule/.cvsignore libgimpmodule/Makefile.am 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/gimpmodule.[ch] * libgimpmodule/gimpmodule.def * libgimpmodule/gimpmoduletypes.h * libgimpmodule/makefile.msc: new library for module loading. * configure.in: generate Makefiles for libgimpmodule and its devel-docs. Added GMODULE_CFLAGS and GMODULE_LIBS. * app/Makefile.am: link the app against it. * libgimp/gimpmodule.h * app/core/gimpmoduleinfo.[ch]: removed. * libgimp/Makefile.am * app/core/Makefile.am * app/core/core-types.h * app/core/gimpmodules.c * app/gui/module-browser.c: changed accordingly. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: #include "libgimpmodule/gimpmodule.h" 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/libgimpmodule.types * libgimpmodule/tmpl/.cvsignore * libgimpmodule/tmpl/gimpmodule.sgml * libgimpmodule/tmpl/gimpmoduletypes.sgml: added API docs for the new module loading lib. * libgimp/tmpl/gimpmodule.sgml: removed. * libgimp/libgimp-docs.sgml * libgimp/libgimp-sections.txt: changed accordingly. * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpcolorselect.sgml * libgimpwidgets/tmpl/gimpcolorselector.sgml: updated. 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: removed app/core/gimpmoduleinfo.c 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: added libgimpmodule/gimpmodule.c
2002-10-21 22:15:02 +08:00
old_on_disk = module->on_disk;
Makefile.am libgimpmodule/.cvsignore libgimpmodule/Makefile.am 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/gimpmodule.[ch] * libgimpmodule/gimpmodule.def * libgimpmodule/gimpmoduletypes.h * libgimpmodule/makefile.msc: new library for module loading. * configure.in: generate Makefiles for libgimpmodule and its devel-docs. Added GMODULE_CFLAGS and GMODULE_LIBS. * app/Makefile.am: link the app against it. * libgimp/gimpmodule.h * app/core/gimpmoduleinfo.[ch]: removed. * libgimp/Makefile.am * app/core/Makefile.am * app/core/core-types.h * app/core/gimpmodules.c * app/gui/module-browser.c: changed accordingly. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: #include "libgimpmodule/gimpmodule.h" 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/libgimpmodule.types * libgimpmodule/tmpl/.cvsignore * libgimpmodule/tmpl/gimpmodule.sgml * libgimpmodule/tmpl/gimpmoduletypes.sgml: added API docs for the new module loading lib. * libgimp/tmpl/gimpmodule.sgml: removed. * libgimp/libgimp-docs.sgml * libgimp/libgimp-sections.txt: changed accordingly. * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpcolorselect.sgml * libgimpwidgets/tmpl/gimpcolorselector.sgml: updated. 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: removed app/core/gimpmoduleinfo.c 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: added libgimpmodule/gimpmodule.c
2002-10-21 22:15:02 +08:00
module->on_disk = g_file_test (module->filename, G_FILE_TEST_IS_REGULAR);
/* if it's not on the disk, and it isn't in memory, mark it to be
* removed later.
*/
Makefile.am libgimpmodule/.cvsignore libgimpmodule/Makefile.am 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/gimpmodule.[ch] * libgimpmodule/gimpmodule.def * libgimpmodule/gimpmoduletypes.h * libgimpmodule/makefile.msc: new library for module loading. * configure.in: generate Makefiles for libgimpmodule and its devel-docs. Added GMODULE_CFLAGS and GMODULE_LIBS. * app/Makefile.am: link the app against it. * libgimp/gimpmodule.h * app/core/gimpmoduleinfo.[ch]: removed. * libgimp/Makefile.am * app/core/Makefile.am * app/core/core-types.h * app/core/gimpmodules.c * app/gui/module-browser.c: changed accordingly. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: #include "libgimpmodule/gimpmodule.h" 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/libgimpmodule.types * libgimpmodule/tmpl/.cvsignore * libgimpmodule/tmpl/gimpmodule.sgml * libgimpmodule/tmpl/gimpmoduletypes.sgml: added API docs for the new module loading lib. * libgimp/tmpl/gimpmodule.sgml: removed. * libgimp/libgimp-docs.sgml * libgimp/libgimp-sections.txt: changed accordingly. * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpcolorselect.sgml * libgimpwidgets/tmpl/gimpcolorselector.sgml: updated. 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: removed app/core/gimpmoduleinfo.c 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: added libgimpmodule/gimpmodule.c
2002-10-21 22:15:02 +08:00
if (! module->on_disk && ! module->module)
{
Makefile.am libgimpmodule/.cvsignore libgimpmodule/Makefile.am 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/gimpmodule.[ch] * libgimpmodule/gimpmodule.def * libgimpmodule/gimpmoduletypes.h * libgimpmodule/makefile.msc: new library for module loading. * configure.in: generate Makefiles for libgimpmodule and its devel-docs. Added GMODULE_CFLAGS and GMODULE_LIBS. * app/Makefile.am: link the app against it. * libgimp/gimpmodule.h * app/core/gimpmoduleinfo.[ch]: removed. * libgimp/Makefile.am * app/core/Makefile.am * app/core/core-types.h * app/core/gimpmodules.c * app/gui/module-browser.c: changed accordingly. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: #include "libgimpmodule/gimpmodule.h" 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/libgimpmodule.types * libgimpmodule/tmpl/.cvsignore * libgimpmodule/tmpl/gimpmodule.sgml * libgimpmodule/tmpl/gimpmoduletypes.sgml: added API docs for the new module loading lib. * libgimp/tmpl/gimpmodule.sgml: removed. * libgimp/libgimp-docs.sgml * libgimp/libgimp-sections.txt: changed accordingly. * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpcolorselect.sgml * libgimpwidgets/tmpl/gimpcolorselector.sgml: updated. 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: removed app/core/gimpmoduleinfo.c 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: added libgimpmodule/gimpmodule.c
2002-10-21 22:15:02 +08:00
*kill_list = g_list_append (*kill_list, module);
module = NULL;
}
Makefile.am libgimpmodule/.cvsignore libgimpmodule/Makefile.am 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/gimpmodule.[ch] * libgimpmodule/gimpmodule.def * libgimpmodule/gimpmoduletypes.h * libgimpmodule/makefile.msc: new library for module loading. * configure.in: generate Makefiles for libgimpmodule and its devel-docs. Added GMODULE_CFLAGS and GMODULE_LIBS. * app/Makefile.am: link the app against it. * libgimp/gimpmodule.h * app/core/gimpmoduleinfo.[ch]: removed. * libgimp/Makefile.am * app/core/Makefile.am * app/core/core-types.h * app/core/gimpmodules.c * app/gui/module-browser.c: changed accordingly. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: #include "libgimpmodule/gimpmodule.h" 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/libgimpmodule.types * libgimpmodule/tmpl/.cvsignore * libgimpmodule/tmpl/gimpmodule.sgml * libgimpmodule/tmpl/gimpmoduletypes.sgml: added API docs for the new module loading lib. * libgimp/tmpl/gimpmodule.sgml: removed. * libgimp/libgimp-docs.sgml * libgimp/libgimp-sections.txt: changed accordingly. * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpcolorselect.sgml * libgimpwidgets/tmpl/gimpcolorselector.sgml: updated. 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: removed app/core/gimpmoduleinfo.c 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: added libgimpmodule/gimpmodule.c
2002-10-21 22:15:02 +08:00
if (module && module->on_disk != old_on_disk)
gimp_module_modified (module);
}
static void
gimp_module_db_module_remove_func (gpointer data,
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
gpointer user_data)
{
GimpModule *module = data;
GimpModuleDB *db = user_data;
g_signal_handlers_disconnect_by_func (module,
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
gimp_module_db_module_modified,
db);
db->modules = g_list_remove (db->modules, module);
g_signal_emit (db, db_signals[REMOVE], 0, module);
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
}
static void
gimp_module_db_module_modified (GimpModule *module,
GimpModuleDB *db)
{
g_signal_emit (db, db_signals[MODULE_MODIFIED], 0, module);
}