diff --git a/ChangeLog b/ChangeLog index cb55bac5d3..32c8b936e4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,31 @@ +2001-07-09 Michael Natterer + + * app/Makefile.am + * app/datafiles.[ch] + * app/gimpparasite.[ch] + * app/parasitelist.[ch]: removed... + + * app/core/Makefile.am + * app/core/gimpdatafiles.[ch] + * app/core/gimpparasite.[ch] + * app/core/gimpparasitelist.[ch]: ...and added here. + + * app/gimprc.c + * app/module_db.c + * app/plug_in.c + * app/undo.c + * app/core/gimp.c + * app/core/gimpchannel.c + * app/core/gimpdatafactory.c + * app/core/gimpdrawable.c + * app/core/gimpimage-duplicate.c + * app/core/gimpimage.c + * app/core/gimplayer.c + * app/xcf/xcf-load.c + * app/xcf/xcf-save.c + * tools/pdbgen/pdb/parasite.pdb + * app/pdb/parasite_cmds.c: changed #include's accordingly. + 2001-07-09 Dave Neary * app/plug_in.c: One-line fix which is needed, but never showed diff --git a/app/Makefile.am b/app/Makefile.am index a520bf8746..d82909dc97 100644 --- a/app/Makefile.am +++ b/app/Makefile.am @@ -79,15 +79,9 @@ gimp_SOURCES = @STRIP_BEGIN@ \ ## ## stuff for core/ ## - datafiles.c \ - datafiles.h \ floating_sel.c \ floating_sel.h \ - gimpparasite.c \ - gimpparasite.h \ gimpunit.c \ - parasitelist.c \ - parasitelist.h \ unitrc.h \ ## ## config stuff diff --git a/app/actions/plug-in-commands.c b/app/actions/plug-in-commands.c index f5d62ff006..1a8d11c5d0 100644 --- a/app/actions/plug-in-commands.c +++ b/app/actions/plug-in-commands.c @@ -90,6 +90,7 @@ #include "base/tile-manager.h" #include "core/gimpcoreconfig.h" +#include "core/gimpdatafiles.h" #include "core/gimpdrawable.h" #include "core/gimpimage.h" @@ -101,7 +102,6 @@ #include "app_procs.h" #include "appenv.h" -#include "datafiles.h" #include "errors.h" #include "gimpprogress.h" #include "gimprc.h" diff --git a/app/core/Makefile.am b/app/core/Makefile.am index b330b82c30..84aac98620 100644 --- a/app/core/Makefile.am +++ b/app/core/Makefile.am @@ -27,6 +27,8 @@ libappcore_a_SOURCES = @STRIP_BEGIN@ \ gimpdata.h \ gimpdatafactory.c \ gimpdatafactory.h \ + gimpdatafiles.c \ + gimpdatafiles.h \ gimpdatalist.c \ gimpdatalist.h \ gimpdrawable.c \ @@ -81,6 +83,10 @@ libappcore_a_SOURCES = @STRIP_BEGIN@ \ gimppalette.h \ gimppalette-import.c \ gimppalette-import.h \ + gimpparasite.c \ + gimpparasite.h \ + gimpparasitelist.c \ + gimpparasitelist.h \ gimppreviewcache.c \ gimppreviewcache.h \ gimpscanconvert.c \ diff --git a/app/core/gimp-parasites.c b/app/core/gimp-parasites.c index 0c84c4f93b..53dfe78ba2 100644 --- a/app/core/gimp-parasites.c +++ b/app/core/gimp-parasites.c @@ -26,13 +26,12 @@ #include "libgimpbase/gimpbase.h" -#include "core/core-types.h" +#include "core-types.h" -#include "core/gimp.h" - -#include "app_procs.h" -#include "parasitelist.h" +#include "gimp.h" #include "gimpparasite.h" +#include "gimpparasitelist.h" + #include "gimprc.h" diff --git a/app/core/gimp.c b/app/core/gimp.c index 278810d52c..b24e43c69f 100644 --- a/app/core/gimp.c +++ b/app/core/gimp.c @@ -42,11 +42,11 @@ #include "gimplist.h" #include "gimppalette.h" #include "gimppattern.h" +#include "gimpparasite.h" #include "gimptoolinfo.h" #include "appenv.h" #include "app_procs.h" -#include "gimpparasite.h" #include "libgimp/gimpintl.h" diff --git a/app/core/gimpchannel-combine.c b/app/core/gimpchannel-combine.c index 78ffe94e95..a50d79e507 100644 --- a/app/core/gimpchannel-combine.c +++ b/app/core/gimpchannel-combine.c @@ -43,8 +43,8 @@ #include "gimpimage-mask.h" #include "gimpchannel.h" #include "gimplayer.h" +#include "gimpparasitelist.h" -#include "parasitelist.h" #include "undo.h" #include "libgimp/gimpintl.h" diff --git a/app/core/gimpchannel.c b/app/core/gimpchannel.c index 78ffe94e95..a50d79e507 100644 --- a/app/core/gimpchannel.c +++ b/app/core/gimpchannel.c @@ -43,8 +43,8 @@ #include "gimpimage-mask.h" #include "gimpchannel.h" #include "gimplayer.h" +#include "gimpparasitelist.h" -#include "parasitelist.h" #include "undo.h" #include "libgimp/gimpintl.h" diff --git a/app/core/gimpdatafactory.c b/app/core/gimpdatafactory.c index e08c49e650..0efc57624b 100644 --- a/app/core/gimpdatafactory.c +++ b/app/core/gimpdatafactory.c @@ -25,14 +25,13 @@ #include "core-types.h" -#include "gimpdata.h" -#include "gimpdatalist.h" -#include "gimpdatafactory.h" #include "gimpcontext.h" +#include "gimpdata.h" +#include "gimpdatafactory.h" +#include "gimpdatafiles.h" +#include "gimpdatalist.h" #include "gimpmarshal.h" -#include "datafiles.h" - #include "libgimp/gimpintl.h" diff --git a/app/core/gimpdatafiles.c b/app/core/gimpdatafiles.c index f2f515491e..e513dbf176 100644 --- a/app/core/gimpdatafiles.c +++ b/app/core/gimpdatafiles.c @@ -47,9 +47,9 @@ #include "libgimpbase/gimpbase.h" -#include "core/core-types.h" +#include "core-types.h" -#include "datafiles.h" +#include "gimpdatafiles.h" static gboolean filestat_valid = FALSE; diff --git a/app/core/gimpdrawable.c b/app/core/gimpdrawable.c index aa0a939e6b..2d92adad7f 100644 --- a/app/core/gimpdrawable.c +++ b/app/core/gimpdrawable.c @@ -44,10 +44,10 @@ #include "gimpimage-mask.h" #include "gimplayer.h" #include "gimplist.h" +#include "gimpparasite.h" +#include "gimpparasitelist.h" #include "gimppreviewcache.h" -#include "gimpparasite.h" -#include "parasitelist.h" #include "undo.h" #include "libgimp/gimpintl.h" diff --git a/app/core/gimpimage-duplicate.c b/app/core/gimpimage-duplicate.c index 466ea47144..1a7879883e 100644 --- a/app/core/gimpimage-duplicate.c +++ b/app/core/gimpimage-duplicate.c @@ -42,11 +42,11 @@ #include "gimpimage-new.h" #include "gimplayer.h" #include "gimplist.h" +#include "gimpparasitelist.h" #include "app_procs.h" #include "floating_sel.h" #include "gdisplay.h" -#include "parasitelist.h" #include "path.h" #include "libgimp/gimpintl.h" diff --git a/app/core/gimpimage-guides.c b/app/core/gimpimage-guides.c index 08528bbb76..43e02b06fe 100644 --- a/app/core/gimpimage-guides.c +++ b/app/core/gimpimage-guides.c @@ -50,12 +50,12 @@ #include "gimplist.h" #include "gimpmarshal.h" #include "gimpparasite.h" +#include "gimpparasitelist.h" #include "gimpundostack.h" #include "app_procs.h" #include "floating_sel.h" #include "gdisplay.h" -#include "parasitelist.h" #include "path.h" #include "undo.h" diff --git a/app/core/gimpimage-merge.c b/app/core/gimpimage-merge.c index 08528bbb76..43e02b06fe 100644 --- a/app/core/gimpimage-merge.c +++ b/app/core/gimpimage-merge.c @@ -50,12 +50,12 @@ #include "gimplist.h" #include "gimpmarshal.h" #include "gimpparasite.h" +#include "gimpparasitelist.h" #include "gimpundostack.h" #include "app_procs.h" #include "floating_sel.h" #include "gdisplay.h" -#include "parasitelist.h" #include "path.h" #include "undo.h" diff --git a/app/core/gimpimage-projection.c b/app/core/gimpimage-projection.c index 08528bbb76..43e02b06fe 100644 --- a/app/core/gimpimage-projection.c +++ b/app/core/gimpimage-projection.c @@ -50,12 +50,12 @@ #include "gimplist.h" #include "gimpmarshal.h" #include "gimpparasite.h" +#include "gimpparasitelist.h" #include "gimpundostack.h" #include "app_procs.h" #include "floating_sel.h" #include "gdisplay.h" -#include "parasitelist.h" #include "path.h" #include "undo.h" diff --git a/app/core/gimpimage-resize.c b/app/core/gimpimage-resize.c index 08528bbb76..43e02b06fe 100644 --- a/app/core/gimpimage-resize.c +++ b/app/core/gimpimage-resize.c @@ -50,12 +50,12 @@ #include "gimplist.h" #include "gimpmarshal.h" #include "gimpparasite.h" +#include "gimpparasitelist.h" #include "gimpundostack.h" #include "app_procs.h" #include "floating_sel.h" #include "gdisplay.h" -#include "parasitelist.h" #include "path.h" #include "undo.h" diff --git a/app/core/gimpimage-scale.c b/app/core/gimpimage-scale.c index 08528bbb76..43e02b06fe 100644 --- a/app/core/gimpimage-scale.c +++ b/app/core/gimpimage-scale.c @@ -50,12 +50,12 @@ #include "gimplist.h" #include "gimpmarshal.h" #include "gimpparasite.h" +#include "gimpparasitelist.h" #include "gimpundostack.h" #include "app_procs.h" #include "floating_sel.h" #include "gdisplay.h" -#include "parasitelist.h" #include "path.h" #include "undo.h" diff --git a/app/core/gimpimage-undo-push.c b/app/core/gimpimage-undo-push.c index 6a10e72d6b..d4c28bdc0e 100644 --- a/app/core/gimpimage-undo-push.c +++ b/app/core/gimpimage-undo-push.c @@ -41,6 +41,8 @@ #include "core/gimpimage-mask.h" #include "core/gimplayer.h" #include "core/gimplayermask.h" +#include "core/gimpparasite.h" +#include "core/gimpparasitelist.h" #include "tools/gimpbycolorselecttool.h" #include "tools/gimptool.h" @@ -53,8 +55,6 @@ #include "floating_sel.h" #include "gdisplay.h" #include "gdisplay_ops.h" -#include "gimpparasite.h" -#include "parasitelist.h" #include "path_transform.h" #include "undo.h" diff --git a/app/core/gimpimage.c b/app/core/gimpimage.c index 08528bbb76..43e02b06fe 100644 --- a/app/core/gimpimage.c +++ b/app/core/gimpimage.c @@ -50,12 +50,12 @@ #include "gimplist.h" #include "gimpmarshal.h" #include "gimpparasite.h" +#include "gimpparasitelist.h" #include "gimpundostack.h" #include "app_procs.h" #include "floating_sel.h" #include "gdisplay.h" -#include "parasitelist.h" #include "path.h" #include "undo.h" diff --git a/app/core/gimplayer.c b/app/core/gimplayer.c index eb20efec8d..c17a4f9d48 100644 --- a/app/core/gimplayer.c +++ b/app/core/gimplayer.c @@ -36,13 +36,14 @@ #include "paint-funcs/paint-funcs.h" -#include "floating_sel.h" -#include "gdisplay.h" #include "gimpdrawable-invert.h" #include "gimpimage.h" #include "gimplayer.h" #include "gimplayermask.h" -#include "parasitelist.h" +#include "gimpparasitelist.h" + +#include "floating_sel.h" +#include "gdisplay.h" #include "undo.h" #include "libgimp/gimpintl.h" diff --git a/app/core/gimpparasite.c b/app/core/gimpparasite.c index 0c84c4f93b..53dfe78ba2 100644 --- a/app/core/gimpparasite.c +++ b/app/core/gimpparasite.c @@ -26,13 +26,12 @@ #include "libgimpbase/gimpbase.h" -#include "core/core-types.h" +#include "core-types.h" -#include "core/gimp.h" - -#include "app_procs.h" -#include "parasitelist.h" +#include "gimp.h" #include "gimpparasite.h" +#include "gimpparasitelist.h" + #include "gimprc.h" diff --git a/app/core/gimpparasitelist.c b/app/core/gimpparasitelist.c index 1f3122f0be..0c233129c2 100644 --- a/app/core/gimpparasitelist.c +++ b/app/core/gimpparasitelist.c @@ -23,9 +23,9 @@ #include "libgimpbase/gimpbase.h" -#include "core/core-types.h" +#include "core-types.h" -#include "parasitelist.h" +#include "gimpparasitelist.h" enum diff --git a/app/core/gimpprojection-construct.c b/app/core/gimpprojection-construct.c index 08528bbb76..43e02b06fe 100644 --- a/app/core/gimpprojection-construct.c +++ b/app/core/gimpprojection-construct.c @@ -50,12 +50,12 @@ #include "gimplist.h" #include "gimpmarshal.h" #include "gimpparasite.h" +#include "gimpparasitelist.h" #include "gimpundostack.h" #include "app_procs.h" #include "floating_sel.h" #include "gdisplay.h" -#include "parasitelist.h" #include "path.h" #include "undo.h" diff --git a/app/datafiles.c b/app/datafiles.c deleted file mode 100644 index f2f515491e..0000000000 --- a/app/datafiles.c +++ /dev/null @@ -1,222 +0,0 @@ -/* The GIMP -- an image manipulation program - * Copyright (C) 1995 Spencer Kimball and Peter Mattis - * - * Datafiles module copyight (C) 1996 Federico Mena Quintero - * federico@nuclecu.unam.mx - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#include "config.h" - -#include - -#include -#include -#include -#include -#include -#ifdef HAVE_UNISTD_H -#include -#endif -#ifdef HAVE_DIRENT_H -#include -#endif - -#ifdef G_OS_WIN32 -#ifndef S_ISDIR -#define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR) -#define S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG) -#endif -#ifndef S_IXUSR -#define S_IXUSR _S_IEXEC -#endif -#endif /* G_OS_WIN32 */ - -#include "libgimpbase/gimpbase.h" - -#include "core/core-types.h" - -#include "datafiles.h" - - -static gboolean filestat_valid = FALSE; -static struct stat filestat; - - -#ifdef G_OS_WIN32 -/* - * On Windows there is no concept like the Unix executable flag. - * There is a weak emulation provided by the MS C Runtime using file - * extensions (com, exe, cmd, bat). This needs to be extended to treat - * scripts (Python, Perl, ...) as executables, too. We use the PATHEXT - * variable, which is also used by cmd.exe. - */ -static gboolean -is_script (const gchar *filename) -{ - const gchar *ext = strrchr (filename, '.'); - gchar *pathext; - static gchar **exts = NULL; - gint i; - - if (exts == NULL) - { - pathext = g_getenv ("PATHEXT"); - if (pathext != NULL) - { - exts = g_strsplit (pathext, G_SEARCHPATH_SEPARATOR_S, 100); - } - else - { - exts = g_new (gchar *, 1); - exts[0] = NULL; - } - } - - i = 0; - while (exts[i] != NULL) - { - if (g_strcasecmp (ext, exts[i]) == 0) - return TRUE; - i++; - } - - return FALSE; -} -#else /* !G_OS_WIN32 */ -#define is_script(filename) FALSE -#endif - -gboolean -gimp_datafiles_check_extension (const gchar *filename, - const gchar *extension) -{ - gint name_len; - gint ext_len; - - g_return_val_if_fail (filename != NULL, FALSE); - g_return_val_if_fail (extension != NULL, FALSE); - - name_len = strlen (filename); - ext_len = strlen (extension); - - if (! (name_len && ext_len && (name_len > ext_len))) - return FALSE; - - return (strcmp (&filename[name_len - ext_len], extension) == 0); -} - -void -gimp_datafiles_read_directories (const gchar *path_str, - GimpDataFileFlags flags, - GimpDataFileLoaderFunc loader_func, - gpointer loader_data) -{ - gchar *local_path; - GList *path; - GList *list; - gchar *filename; - gint err; - DIR *dir; - struct dirent *dir_ent; - - g_return_if_fail (path_str != NULL); - g_return_if_fail (loader_func != NULL); - - local_path = g_strdup (path_str); - -#ifdef __EMX__ - /* - * Change drive so opendir works. - */ - if (local_path[1] == ':') - { - _chdrive (local_path[0]); - } -#endif - - path = gimp_path_parse (local_path, 16, TRUE, NULL); - - for (list = path; list; list = g_list_next (list)) - { - /* Open directory */ - dir = opendir ((gchar *) list->data); - - if (!dir) - { - g_message ("error reading datafiles directory \"%s\"", - (gchar *) list->data); - } - else - { - while ((dir_ent = readdir (dir))) - { - filename = g_strdup_printf ("%s%s", - (gchar *) list->data, - dir_ent->d_name); - - /* Check the file and see that it is not a sub-directory */ - err = stat (filename, &filestat); - - if (!err && S_ISREG (filestat.st_mode) && - (!(flags & MODE_EXECUTABLE) || - (filestat.st_mode & S_IXUSR) || - is_script (filename))) - { - filestat_valid = TRUE; - - (* loader_func) (filename, loader_data); - - filestat_valid = FALSE; - } - - g_free (filename); - } - - closedir (dir); - } - } - - gimp_path_free (path); - g_free (local_path); -} - -time_t -gimp_datafile_atime (void) -{ - if (filestat_valid) - return filestat.st_atime; - - return 0; -} - -time_t -gimp_datafile_mtime (void) -{ - if (filestat_valid) - return filestat.st_mtime; - - return 0; -} - -time_t -gimp_datafile_ctime (void) -{ - if (filestat_valid) - return filestat.st_ctime; - - return 0; -} diff --git a/app/datafiles.h b/app/datafiles.h deleted file mode 100644 index a05f6ed197..0000000000 --- a/app/datafiles.h +++ /dev/null @@ -1,53 +0,0 @@ -/* The GIMP -- an image manipulation program - * Copyright (C) 1995 Spencer Kimball and Peter Mattis - * - * Datafiles module copyight (C) 1996 Federico Mena Quintero - * federico@nuclecu.unam.mx - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#ifndef __GIMP_DATAFILES_H__ -#define __GIMP_DATAFILES_H__ - -#include - - -typedef enum -{ - INCLUDE_TEMP_DIR = 1 << 0, - MODE_EXECUTABLE = 1 << 1 -} GimpDataFileFlags; - - -gboolean gimp_datafiles_check_extension (const gchar *filename, - const gchar *extension); - -void gimp_datafiles_read_directories (const gchar *path_str, - GimpDataFileFlags flags, - GimpDataFileLoaderFunc loader_func, - gpointer loader_data); - -/* Return the current datafiles access, modification - * or change time. The current datafile is the one for - * which the "DataFileLoaderFunc" function has been called - * on. - */ -time_t gimp_datafile_atime (void); -time_t gimp_datafile_mtime (void); -time_t gimp_datafile_ctime (void); - - -#endif /* __GIMP_DATAFILES_H__ */ diff --git a/app/dialogs/module-dialog.c b/app/dialogs/module-dialog.c index fc8ee3106f..4bff4cc337 100644 --- a/app/dialogs/module-dialog.c +++ b/app/dialogs/module-dialog.c @@ -39,11 +39,11 @@ #include "core/core-types.h" #include "core/gimpcoreconfig.h" +#include "core/gimpdatafiles.h" #include "core/gimplist.h" #include "appenv.h" #include "module_db.h" -#include "datafiles.h" #include "gimprc.h" #include "libgimp/gimpmodule.h" diff --git a/app/gimpparasite.c b/app/gimpparasite.c deleted file mode 100644 index 0c84c4f93b..0000000000 --- a/app/gimpparasite.c +++ /dev/null @@ -1,202 +0,0 @@ -/* gimpparasite.c: Copyright 1998 Jay Cox - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#include "config.h" - -#include - -#include -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "libgimpbase/gimpbase.h" - -#include "core/core-types.h" - -#include "core/gimp.h" - -#include "app_procs.h" -#include "parasitelist.h" -#include "gimpparasite.h" -#include "gimprc.h" - - -void -gimp_parasites_init (Gimp *gimp) -{ - g_return_if_fail (gimp->parasites == NULL); - - gimp->parasites = gimp_parasite_list_new (); - - gtk_object_ref (GTK_OBJECT (gimp->parasites)); - gtk_object_sink (GTK_OBJECT (gimp->parasites)); -} - -void -gimp_parasites_exit (Gimp *gimp) -{ - if (gimp->parasites) - { - gtk_object_unref (GTK_OBJECT (gimp->parasites)); - gimp->parasites = NULL; - } -} - -void -gimp_parasite_attach (Gimp *gimp, - GimpParasite *parasite) -{ - gimp_parasite_list_add (gimp->parasites, parasite); -} - -void -gimp_parasite_detach (Gimp *gimp, - const gchar *name) -{ - gimp_parasite_list_remove (gimp->parasites, name); -} - -GimpParasite * -gimp_parasite_find (Gimp *gimp, - const gchar *name) -{ - return gimp_parasite_list_find (gimp->parasites, name); -} - -static void -list_func (gchar *key, - GimpParasite *p, - gchar ***cur) -{ - *(*cur)++ = (char *) g_strdup (key); -} - -gchar ** -gimp_parasite_list (Gimp *gimp, - gint *count) -{ - gchar **list; - gchar **cur; - - *count = gimp_parasite_list_length (gimp->parasites); - cur = list = g_new (gchar *, *count); - - gimp_parasite_list_foreach (gimp->parasites, (GHFunc) list_func, &cur); - - return list; -} - -static void -save_func (gchar *key, - GimpParasite *parasite, - FILE *fp) -{ - if (gimp_parasite_is_persistent (parasite)) - { - gchar *s; - guint32 l; - - fprintf (fp, "(parasite \"%s\" %lu \"", - gimp_parasite_name (parasite), - gimp_parasite_flags (parasite)); - - /* - * the current methodology is: never move the parasiterc from one - * system to another. If you want to do this you should probably - * write out parasites which contain any non-alphanumeric(+some) - * characters as \xHH sequences altogether. - */ - - for (s = (gchar *) gimp_parasite_data (parasite), - l = gimp_parasite_data_size (parasite); - l; - l--, s++) - { - switch (*s) - { - case '\\': fputs ("\\\\", fp); break; - case '\0': fputs ("\\0", fp); break; - case '"' : fputs ("\\\"", fp); break; - /* disabled, not portable! */ -/* case '\n': fputs ("\\n", fp); break;*/ -/* case '\r': fputs ("\\r", fp); break;*/ - case 26 : fputs ("\\z", fp); break; - default : fputc (*s, fp); break; - } - } - - fputs ("\")\n\n", fp); - } -} - -void -gimp_parasiterc_load (Gimp *gimp) -{ - gchar *filename; - - filename = gimp_personal_rc_file ("parasiterc"); - parse_gimprc_file (filename); - g_free (filename); -} - -void -gimp_parasiterc_save (Gimp *gimp) -{ - gchar *tmp_filename = NULL; - gchar *bak_filename = NULL; - gchar *rc_filename = NULL; - FILE *fp; - - tmp_filename = gimp_personal_rc_file ("#parasiterc.tmp~"); - bak_filename = gimp_personal_rc_file ("parasiterc.bak"); - rc_filename = gimp_personal_rc_file ("parasiterc"); - - fp = fopen (tmp_filename, "w"); - - if (!fp) - goto cleanup; - - fprintf (fp, - "# GIMP parasiterc\n" - "# This file will be entirely rewritten every time you " - "quit the gimp.\n\n"); - - gimp_parasite_list_foreach (gimp->parasites, (GHFunc) save_func, fp); - - fclose (fp); - -#if defined(G_OS_WIN32) || defined(__EMX__) - /* First rename the old parasiterc out of the way */ - unlink (bak_filename); - rename (rc_filename, bak_filename); -#endif - - if (rename (tmp_filename, rc_filename) != 0) - { -#if defined(G_OS_WIN32) || defined(__EMX__) - /* Rename the old parasiterc back */ - rename (bak_filename, rc_filename); -#endif - unlink (tmp_filename); - } - - cleanup: - g_free (tmp_filename); - g_free (bak_filename); - g_free (rc_filename); -} diff --git a/app/gimpparasite.h b/app/gimpparasite.h deleted file mode 100644 index fd4257b7be..0000000000 --- a/app/gimpparasite.h +++ /dev/null @@ -1,39 +0,0 @@ -/* gimpparasite.h: Copyright 1998 Jay Cox - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#ifndef __APP_GIMP_PARASITE_H__ -#define __APP_GIMP_PARASITE_H__ - - -void gimp_parasites_init (Gimp *gimp); -void gimp_parasites_exit (Gimp *gimp); - -void gimp_parasite_attach (Gimp *gimp, - GimpParasite *parasite); -void gimp_parasite_detach (Gimp *gimp, - const gchar *name); - -GimpParasite * gimp_parasite_find (Gimp *gimp, - const gchar *name); -gchar ** gimp_parasite_list (Gimp *gimp, - gint *count); - -void gimp_parasiterc_load (Gimp *gimp); -void gimp_parasiterc_save (Gimp *gimp); - - -#endif /* __APP_GIMP_PARASITE_H__ */ diff --git a/app/gimprc.c b/app/gimprc.c index 213f8fe3c6..083b034ad9 100644 --- a/app/gimprc.c +++ b/app/gimprc.c @@ -44,6 +44,7 @@ #include "base/base-config.c" #include "core/gimpcoreconfig.h" +#include "core/gimpparasite.h" #include "core/gimptoolinfo.h" #include "tools/gimptool.h" @@ -59,7 +60,6 @@ #include "errors.h" #include "general.h" #include "gimphelp.h" -#include "gimpparasite.h" #include "gimprc.h" #include "plug_in.h" diff --git a/app/gui/module-browser.c b/app/gui/module-browser.c index fc8ee3106f..4bff4cc337 100644 --- a/app/gui/module-browser.c +++ b/app/gui/module-browser.c @@ -39,11 +39,11 @@ #include "core/core-types.h" #include "core/gimpcoreconfig.h" +#include "core/gimpdatafiles.h" #include "core/gimplist.h" #include "appenv.h" #include "module_db.h" -#include "datafiles.h" #include "gimprc.h" #include "libgimp/gimpmodule.h" diff --git a/app/gui/plug-in-commands.c b/app/gui/plug-in-commands.c index f5d62ff006..1a8d11c5d0 100644 --- a/app/gui/plug-in-commands.c +++ b/app/gui/plug-in-commands.c @@ -90,6 +90,7 @@ #include "base/tile-manager.h" #include "core/gimpcoreconfig.h" +#include "core/gimpdatafiles.h" #include "core/gimpdrawable.h" #include "core/gimpimage.h" @@ -101,7 +102,6 @@ #include "app_procs.h" #include "appenv.h" -#include "datafiles.h" #include "errors.h" #include "gimpprogress.h" #include "gimprc.h" diff --git a/app/gui/plug-in-menus.c b/app/gui/plug-in-menus.c index f5d62ff006..1a8d11c5d0 100644 --- a/app/gui/plug-in-menus.c +++ b/app/gui/plug-in-menus.c @@ -90,6 +90,7 @@ #include "base/tile-manager.h" #include "core/gimpcoreconfig.h" +#include "core/gimpdatafiles.h" #include "core/gimpdrawable.h" #include "core/gimpimage.h" @@ -101,7 +102,6 @@ #include "app_procs.h" #include "appenv.h" -#include "datafiles.h" #include "errors.h" #include "gimpprogress.h" #include "gimprc.h" diff --git a/app/menus/plug-in-menus.c b/app/menus/plug-in-menus.c index f5d62ff006..1a8d11c5d0 100644 --- a/app/menus/plug-in-menus.c +++ b/app/menus/plug-in-menus.c @@ -90,6 +90,7 @@ #include "base/tile-manager.h" #include "core/gimpcoreconfig.h" +#include "core/gimpdatafiles.h" #include "core/gimpdrawable.h" #include "core/gimpimage.h" @@ -101,7 +102,6 @@ #include "app_procs.h" #include "appenv.h" -#include "datafiles.h" #include "errors.h" #include "gimpprogress.h" #include "gimprc.h" diff --git a/app/module_db.c b/app/module_db.c index fc8ee3106f..4bff4cc337 100644 --- a/app/module_db.c +++ b/app/module_db.c @@ -39,11 +39,11 @@ #include "core/core-types.h" #include "core/gimpcoreconfig.h" +#include "core/gimpdatafiles.h" #include "core/gimplist.h" #include "appenv.h" #include "module_db.h" -#include "datafiles.h" #include "gimprc.h" #include "libgimp/gimpmodule.h" diff --git a/app/parasitelist.c b/app/parasitelist.c deleted file mode 100644 index 1f3122f0be..0000000000 --- a/app/parasitelist.c +++ /dev/null @@ -1,288 +0,0 @@ -/* parasitelist.c: Copyright 1998 Jay Cox - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#include "config.h" - -#include - -#include - -#include "libgimpbase/gimpbase.h" - -#include "core/core-types.h" - -#include "parasitelist.h" - - -enum -{ - ADD, - REMOVE, - LAST_SIGNAL -}; - - -static void gimp_parasite_list_class_init (GimpParasiteListClass *klass); -static void gimp_parasite_list_init (GimpParasiteList *list); -static void gimp_parasite_list_destroy (GtkObject *list); - -static gint free_a_parasite (gpointer key, - gpointer parasite, - gpointer unused); - - -static guint parasite_list_signals[LAST_SIGNAL] = { 0 }; - - -static void -gimp_parasite_list_class_init (GimpParasiteListClass *klass) -{ - GtkObjectClass *object_class; - - object_class = (GtkObjectClass *) klass; - - parasite_list_signals[ADD] = - gtk_signal_new ("add", - GTK_RUN_FIRST, - object_class->type, - GTK_SIGNAL_OFFSET (GimpParasiteListClass, - add), - gtk_marshal_NONE__POINTER, - GTK_TYPE_NONE, 1, - GTK_TYPE_POINTER); - - parasite_list_signals[REMOVE] = - gtk_signal_new ("remove", - GTK_RUN_FIRST, - object_class->type, - GTK_SIGNAL_OFFSET (GimpParasiteListClass, - remove), - gtk_marshal_NONE__POINTER, - GTK_TYPE_NONE, 1, - GTK_TYPE_POINTER); - - gtk_object_class_add_signals (object_class, parasite_list_signals, - LAST_SIGNAL); - - object_class->destroy = gimp_parasite_list_destroy; - - klass->add = NULL; - klass->remove = NULL; -} - -static void -gimp_parasite_list_init (GimpParasiteList *list) -{ - list->table = NULL; -} - -GtkType -gimp_parasite_list_get_type (void) -{ - static GtkType type = 0; - - if (! type) - { - GtkTypeInfo info = - { - "GimpParasiteList", - sizeof (GimpParasiteList), - sizeof (GimpParasiteListClass), - (GtkClassInitFunc) gimp_parasite_list_class_init, - (GtkObjectInitFunc) gimp_parasite_list_init, - NULL, - NULL, - (GtkClassInitFunc) NULL - }; - - type = gtk_type_unique (GIMP_TYPE_OBJECT, &info); - } - - return type; -} - -GimpParasiteList * -gimp_parasite_list_new (void) -{ - GimpParasiteList *list = gtk_type_new (GIMP_TYPE_PARASITE_LIST); - - list = gtk_type_new (GIMP_TYPE_PARASITE_LIST); - - return list; -} - -static gint -free_a_parasite (void *key, - void *parasite, - void *unused) -{ - gimp_parasite_free ((GimpParasite *) parasite); - - return TRUE; -} - -static void -gimp_parasite_list_destroy (GtkObject *object) -{ - GimpParasiteList *list; - - g_return_if_fail (object != NULL); - g_return_if_fail (GIMP_IS_PARASITE_LIST (object)); - - list = GIMP_PARASITE_LIST (object); - - if (list->table) - { - g_hash_table_foreach_remove (list->table, free_a_parasite, NULL); - g_hash_table_destroy (list->table); - } -} - -static void -parasite_copy_one (void *key, - void *p, - void *data) -{ - GimpParasiteList *list = (GimpParasiteList *) data; - GimpParasite *parasite = (GimpParasite *) p; - - gimp_parasite_list_add (list, parasite); -} - -GimpParasiteList * -gimp_parasite_list_copy (const GimpParasiteList *list) -{ - GimpParasiteList *newlist; - - newlist = gimp_parasite_list_new (); - if (list->table) - g_hash_table_foreach (list->table, parasite_copy_one, newlist); - - return newlist; -} - -void -gimp_parasite_list_add (GimpParasiteList *list, - GimpParasite *parasite) -{ - g_return_if_fail (list != NULL); - - if (list->table == NULL) - list->table = g_hash_table_new (g_str_hash, g_str_equal); - - g_return_if_fail (parasite != NULL); - g_return_if_fail (parasite->name != NULL); - - gimp_parasite_list_remove (list, parasite->name); - parasite = gimp_parasite_copy (parasite); - g_hash_table_insert (list->table, parasite->name, parasite); - - gtk_signal_emit (GTK_OBJECT (list), parasite_list_signals[ADD], parasite); -} - -void -gimp_parasite_list_remove (GimpParasiteList *list, - const gchar *name) -{ - GimpParasite *parasite; - - g_return_if_fail (list != NULL); - - if (list->table) - { - parasite = gimp_parasite_list_find (list, name); - - if (parasite) - { - g_hash_table_remove (list->table, name); - - gtk_signal_emit (GTK_OBJECT (list), parasite_list_signals[REMOVE], - parasite); - - gimp_parasite_free (parasite); - } - } -} - -gint -gimp_parasite_list_length (GimpParasiteList *list) -{ - g_return_val_if_fail (list != NULL, 0); - - if (!list->table) - return 0; - - return g_hash_table_size (list->table); -} - -static void -ppcount_func (gchar *key, - GimpParasite *p, - gint *count) -{ - if (gimp_parasite_is_persistent (p)) - *count = *count + 1; -} - -gint -gimp_parasite_list_persistent_length (GimpParasiteList *list) -{ - gint ppcount = 0; - - g_return_val_if_fail (list != NULL, 0); - - if (!list->table) - return 0; - - gimp_parasite_list_foreach (list, (GHFunc) ppcount_func, &ppcount); - - return ppcount; -} - -void -gimp_parasite_list_foreach (GimpParasiteList *list, - GHFunc function, - gpointer user_data) -{ - g_return_if_fail (list != NULL); - - if (!list->table) - return; - - g_hash_table_foreach (list->table, function, user_data); -} - -GimpParasite * -gimp_parasite_list_find (GimpParasiteList *list, - const gchar *name) -{ - g_return_val_if_fail (list != NULL, NULL); - - if (list->table) - return (GimpParasite *) g_hash_table_lookup (list->table, name); - else - return NULL; -} - -void -gimp_parasite_shift_parent (GimpParasite *parasite) -{ - if (parasite == NULL) - return; - - parasite->flags = (parasite->flags >> 8); -} diff --git a/app/parasitelist.h b/app/parasitelist.h deleted file mode 100644 index 698e3cbb5e..0000000000 --- a/app/parasitelist.h +++ /dev/null @@ -1,70 +0,0 @@ -/* parasitelist.h: Copyright 1998 Jay Cox - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#ifndef __GIMP_PARASITE_LIST_H__ -#define __GIMP_PARASITE_LIST_H__ - - -#include "core/gimpobject.h" - - -#define GIMP_TYPE_PARASITE_LIST (gimp_parasite_list_get_type ()) -#define GIMP_PARASITE_LIST(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_PARASITE_LIST, GimpParasiteList)) -#define GIMP_IS_PARASITE_LIST(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_PARASITE_LIST)) -#define PARASITE_LIST_CLASS(class) GIMP_CHECK_CLASS_CAST (class, GIMP_TYPE_PARASITE_LIST, GimpParasiteListClass) - - -typedef struct _GimpParasiteListClass GimpParasiteListClass; - -struct _GimpParasiteList -{ - GimpObject object; - - GHashTable *table; -}; - -struct _GimpParasiteListClass -{ - GimpObjectClass parent_class; - - void (* add) (GimpParasiteList *list, - GimpParasite *parasite); - void (* remove) (GimpParasiteList *list, - GimpParasite *parasite); -}; - - -GtkType gimp_parasite_list_get_type (void); - -GimpParasiteList * gimp_parasite_list_new (void); -GimpParasiteList * gimp_parasite_list_copy (const GimpParasiteList *list); -void gimp_parasite_list_add (GimpParasiteList *list, - GimpParasite *parasite); -void gimp_parasite_list_remove (GimpParasiteList *list, - const gchar *name); -gint gimp_parasite_list_length (GimpParasiteList *list); -gint gimp_parasite_list_persistent_length (GimpParasiteList *list); -void gimp_parasite_list_foreach (GimpParasiteList *list, - GHFunc function, - gpointer user_data); -GimpParasite * gimp_parasite_list_find (GimpParasiteList *list, - const gchar *name); - -void gimp_parasite_shift_parent (GimpParasite *parasite); - - -#endif /* __GIMP_PARASITE_LIST_H__ */ diff --git a/app/pdb/parasite_cmds.c b/app/pdb/parasite_cmds.c index c01661f772..98bc9c7488 100644 --- a/app/pdb/parasite_cmds.c +++ b/app/pdb/parasite_cmds.c @@ -30,7 +30,7 @@ #include "core/gimpdrawable.h" #include "core/gimpimage.h" -#include "gimpparasite.h" +#include "core/gimpparasite.h" #include "libgimpbase/gimpparasite.h" diff --git a/app/plug-in/gimpplugin-message.c b/app/plug-in/gimpplugin-message.c index f5d62ff006..1a8d11c5d0 100644 --- a/app/plug-in/gimpplugin-message.c +++ b/app/plug-in/gimpplugin-message.c @@ -90,6 +90,7 @@ #include "base/tile-manager.h" #include "core/gimpcoreconfig.h" +#include "core/gimpdatafiles.h" #include "core/gimpdrawable.h" #include "core/gimpimage.h" @@ -101,7 +102,6 @@ #include "app_procs.h" #include "appenv.h" -#include "datafiles.h" #include "errors.h" #include "gimpprogress.h" #include "gimprc.h" diff --git a/app/plug-in/gimpplugin-progress.c b/app/plug-in/gimpplugin-progress.c index f5d62ff006..1a8d11c5d0 100644 --- a/app/plug-in/gimpplugin-progress.c +++ b/app/plug-in/gimpplugin-progress.c @@ -90,6 +90,7 @@ #include "base/tile-manager.h" #include "core/gimpcoreconfig.h" +#include "core/gimpdatafiles.h" #include "core/gimpdrawable.h" #include "core/gimpimage.h" @@ -101,7 +102,6 @@ #include "app_procs.h" #include "appenv.h" -#include "datafiles.h" #include "errors.h" #include "gimpprogress.h" #include "gimprc.h" diff --git a/app/plug-in/gimpplugin.c b/app/plug-in/gimpplugin.c index f5d62ff006..1a8d11c5d0 100644 --- a/app/plug-in/gimpplugin.c +++ b/app/plug-in/gimpplugin.c @@ -90,6 +90,7 @@ #include "base/tile-manager.h" #include "core/gimpcoreconfig.h" +#include "core/gimpdatafiles.h" #include "core/gimpdrawable.h" #include "core/gimpimage.h" @@ -101,7 +102,6 @@ #include "app_procs.h" #include "appenv.h" -#include "datafiles.h" #include "errors.h" #include "gimpprogress.h" #include "gimprc.h" diff --git a/app/plug-in/gimppluginmanager-call.c b/app/plug-in/gimppluginmanager-call.c index f5d62ff006..1a8d11c5d0 100644 --- a/app/plug-in/gimppluginmanager-call.c +++ b/app/plug-in/gimppluginmanager-call.c @@ -90,6 +90,7 @@ #include "base/tile-manager.h" #include "core/gimpcoreconfig.h" +#include "core/gimpdatafiles.h" #include "core/gimpdrawable.h" #include "core/gimpimage.h" @@ -101,7 +102,6 @@ #include "app_procs.h" #include "appenv.h" -#include "datafiles.h" #include "errors.h" #include "gimpprogress.h" #include "gimprc.h" diff --git a/app/plug-in/gimppluginmanager-run.c b/app/plug-in/gimppluginmanager-run.c index f5d62ff006..1a8d11c5d0 100644 --- a/app/plug-in/gimppluginmanager-run.c +++ b/app/plug-in/gimppluginmanager-run.c @@ -90,6 +90,7 @@ #include "base/tile-manager.h" #include "core/gimpcoreconfig.h" +#include "core/gimpdatafiles.h" #include "core/gimpdrawable.h" #include "core/gimpimage.h" @@ -101,7 +102,6 @@ #include "app_procs.h" #include "appenv.h" -#include "datafiles.h" #include "errors.h" #include "gimpprogress.h" #include "gimprc.h" diff --git a/app/plug-in/gimppluginmanager.c b/app/plug-in/gimppluginmanager.c index f5d62ff006..1a8d11c5d0 100644 --- a/app/plug-in/gimppluginmanager.c +++ b/app/plug-in/gimppluginmanager.c @@ -90,6 +90,7 @@ #include "base/tile-manager.h" #include "core/gimpcoreconfig.h" +#include "core/gimpdatafiles.h" #include "core/gimpdrawable.h" #include "core/gimpimage.h" @@ -101,7 +102,6 @@ #include "app_procs.h" #include "appenv.h" -#include "datafiles.h" #include "errors.h" #include "gimpprogress.h" #include "gimprc.h" diff --git a/app/plug-in/gimppluginshm.c b/app/plug-in/gimppluginshm.c index f5d62ff006..1a8d11c5d0 100644 --- a/app/plug-in/gimppluginshm.c +++ b/app/plug-in/gimppluginshm.c @@ -90,6 +90,7 @@ #include "base/tile-manager.h" #include "core/gimpcoreconfig.h" +#include "core/gimpdatafiles.h" #include "core/gimpdrawable.h" #include "core/gimpimage.h" @@ -101,7 +102,6 @@ #include "app_procs.h" #include "appenv.h" -#include "datafiles.h" #include "errors.h" #include "gimpprogress.h" #include "gimprc.h" diff --git a/app/plug-in/plug-in-def.c b/app/plug-in/plug-in-def.c index f5d62ff006..1a8d11c5d0 100644 --- a/app/plug-in/plug-in-def.c +++ b/app/plug-in/plug-in-def.c @@ -90,6 +90,7 @@ #include "base/tile-manager.h" #include "core/gimpcoreconfig.h" +#include "core/gimpdatafiles.h" #include "core/gimpdrawable.h" #include "core/gimpimage.h" @@ -101,7 +102,6 @@ #include "app_procs.h" #include "appenv.h" -#include "datafiles.h" #include "errors.h" #include "gimpprogress.h" #include "gimprc.h" diff --git a/app/plug-in/plug-in-message.c b/app/plug-in/plug-in-message.c index f5d62ff006..1a8d11c5d0 100644 --- a/app/plug-in/plug-in-message.c +++ b/app/plug-in/plug-in-message.c @@ -90,6 +90,7 @@ #include "base/tile-manager.h" #include "core/gimpcoreconfig.h" +#include "core/gimpdatafiles.h" #include "core/gimpdrawable.h" #include "core/gimpimage.h" @@ -101,7 +102,6 @@ #include "app_procs.h" #include "appenv.h" -#include "datafiles.h" #include "errors.h" #include "gimpprogress.h" #include "gimprc.h" diff --git a/app/plug-in/plug-in-params.c b/app/plug-in/plug-in-params.c index f5d62ff006..1a8d11c5d0 100644 --- a/app/plug-in/plug-in-params.c +++ b/app/plug-in/plug-in-params.c @@ -90,6 +90,7 @@ #include "base/tile-manager.h" #include "core/gimpcoreconfig.h" +#include "core/gimpdatafiles.h" #include "core/gimpdrawable.h" #include "core/gimpimage.h" @@ -101,7 +102,6 @@ #include "app_procs.h" #include "appenv.h" -#include "datafiles.h" #include "errors.h" #include "gimpprogress.h" #include "gimprc.h" diff --git a/app/plug-in/plug-in-progress.c b/app/plug-in/plug-in-progress.c index f5d62ff006..1a8d11c5d0 100644 --- a/app/plug-in/plug-in-progress.c +++ b/app/plug-in/plug-in-progress.c @@ -90,6 +90,7 @@ #include "base/tile-manager.h" #include "core/gimpcoreconfig.h" +#include "core/gimpdatafiles.h" #include "core/gimpdrawable.h" #include "core/gimpimage.h" @@ -101,7 +102,6 @@ #include "app_procs.h" #include "appenv.h" -#include "datafiles.h" #include "errors.h" #include "gimpprogress.h" #include "gimprc.h" diff --git a/app/plug-in/plug-in-run.c b/app/plug-in/plug-in-run.c index f5d62ff006..1a8d11c5d0 100644 --- a/app/plug-in/plug-in-run.c +++ b/app/plug-in/plug-in-run.c @@ -90,6 +90,7 @@ #include "base/tile-manager.h" #include "core/gimpcoreconfig.h" +#include "core/gimpdatafiles.h" #include "core/gimpdrawable.h" #include "core/gimpimage.h" @@ -101,7 +102,6 @@ #include "app_procs.h" #include "appenv.h" -#include "datafiles.h" #include "errors.h" #include "gimpprogress.h" #include "gimprc.h" diff --git a/app/plug-in/plug-in-shm.c b/app/plug-in/plug-in-shm.c index f5d62ff006..1a8d11c5d0 100644 --- a/app/plug-in/plug-in-shm.c +++ b/app/plug-in/plug-in-shm.c @@ -90,6 +90,7 @@ #include "base/tile-manager.h" #include "core/gimpcoreconfig.h" +#include "core/gimpdatafiles.h" #include "core/gimpdrawable.h" #include "core/gimpimage.h" @@ -101,7 +102,6 @@ #include "app_procs.h" #include "appenv.h" -#include "datafiles.h" #include "errors.h" #include "gimpprogress.h" #include "gimprc.h" diff --git a/app/plug-in/plug-in.c b/app/plug-in/plug-in.c index f5d62ff006..1a8d11c5d0 100644 --- a/app/plug-in/plug-in.c +++ b/app/plug-in/plug-in.c @@ -90,6 +90,7 @@ #include "base/tile-manager.h" #include "core/gimpcoreconfig.h" +#include "core/gimpdatafiles.h" #include "core/gimpdrawable.h" #include "core/gimpimage.h" @@ -101,7 +102,6 @@ #include "app_procs.h" #include "appenv.h" -#include "datafiles.h" #include "errors.h" #include "gimpprogress.h" #include "gimprc.h" diff --git a/app/plug-in/plug-ins.c b/app/plug-in/plug-ins.c index f5d62ff006..1a8d11c5d0 100644 --- a/app/plug-in/plug-ins.c +++ b/app/plug-in/plug-ins.c @@ -90,6 +90,7 @@ #include "base/tile-manager.h" #include "core/gimpcoreconfig.h" +#include "core/gimpdatafiles.h" #include "core/gimpdrawable.h" #include "core/gimpimage.h" @@ -101,7 +102,6 @@ #include "app_procs.h" #include "appenv.h" -#include "datafiles.h" #include "errors.h" #include "gimpprogress.h" #include "gimprc.h" diff --git a/app/plug_in.c b/app/plug_in.c index f5d62ff006..1a8d11c5d0 100644 --- a/app/plug_in.c +++ b/app/plug_in.c @@ -90,6 +90,7 @@ #include "base/tile-manager.h" #include "core/gimpcoreconfig.h" +#include "core/gimpdatafiles.h" #include "core/gimpdrawable.h" #include "core/gimpimage.h" @@ -101,7 +102,6 @@ #include "app_procs.h" #include "appenv.h" -#include "datafiles.h" #include "errors.h" #include "gimpprogress.h" #include "gimprc.h" diff --git a/app/undo.c b/app/undo.c index 6a10e72d6b..d4c28bdc0e 100644 --- a/app/undo.c +++ b/app/undo.c @@ -41,6 +41,8 @@ #include "core/gimpimage-mask.h" #include "core/gimplayer.h" #include "core/gimplayermask.h" +#include "core/gimpparasite.h" +#include "core/gimpparasitelist.h" #include "tools/gimpbycolorselecttool.h" #include "tools/gimptool.h" @@ -53,8 +55,6 @@ #include "floating_sel.h" #include "gdisplay.h" #include "gdisplay_ops.h" -#include "gimpparasite.h" -#include "parasitelist.h" #include "path_transform.h" #include "undo.h" diff --git a/app/xcf/xcf-load.c b/app/xcf/xcf-load.c index aadf73b860..a55009dd75 100644 --- a/app/xcf/xcf-load.c +++ b/app/xcf/xcf-load.c @@ -40,6 +40,7 @@ #include "core/gimpimage.h" #include "core/gimplayer.h" #include "core/gimplayermask.h" +#include "core/gimpparasitelist.h" #include "xcf-private.h" #include "xcf-load.h" @@ -47,7 +48,6 @@ #include "xcf-seek.h" #include "floating_sel.h" -#include "parasitelist.h" #include "path.h" #include "pathP.h" diff --git a/app/xcf/xcf-save.c b/app/xcf/xcf-save.c index 91c56907d5..d93154c093 100644 --- a/app/xcf/xcf-save.c +++ b/app/xcf/xcf-save.c @@ -39,6 +39,7 @@ #include "core/gimplayer.h" #include "core/gimplayermask.h" #include "core/gimplist.h" +#include "core/gimpparasitelist.h" #include "xcf-private.h" #include "xcf-read.h" @@ -46,7 +47,6 @@ #include "xcf-write.h" #include "floating_sel.h" -#include "parasitelist.h" #include "path.h" #include "pathP.h" diff --git a/libgimpbase/gimpdatafiles.c b/libgimpbase/gimpdatafiles.c index f2f515491e..e513dbf176 100644 --- a/libgimpbase/gimpdatafiles.c +++ b/libgimpbase/gimpdatafiles.c @@ -47,9 +47,9 @@ #include "libgimpbase/gimpbase.h" -#include "core/core-types.h" +#include "core-types.h" -#include "datafiles.h" +#include "gimpdatafiles.h" static gboolean filestat_valid = FALSE; diff --git a/tools/pdbgen/pdb/parasite.pdb b/tools/pdbgen/pdb/parasite.pdb index 6fc667be9d..a613fd23c0 100644 --- a/tools/pdbgen/pdb/parasite.pdb +++ b/tools/pdbgen/pdb/parasite.pdb @@ -137,7 +137,7 @@ sub parasite_list { %invoke = ( code => 'parasites = gimp_parasite_list (gimp, &num_parasites);' ); } -@headers = qw("gimpparasite.h" "core/gimpdrawable.h"); +@headers = qw("core/gimpparasite.h" "core/gimpdrawable.h"); @procs = qw(parasite_find parasite_attach parasite_detach parasite_list);