gimp/app/core/gimpdata.c

374 lines
8.2 KiB
C
Raw Normal View History

/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
cleanup. 2001-04-22 Michael Natterer <mitch@gimp.org> * app/Makefile.am: cleanup. * app/interface.c: #include "gimpui.h" * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c * app/gui/menus.c * app/gui/test-commands.[ch]: changes for the image menu below. * app/apptypes.h * app/widgets/Makefile.am * app/widgets/gimpcontainermenu.[ch] * app/widgets/gimpcontainermenuimpl.[ch]: new widgets. The actual implemtation lives in a separate file because gimpcontainermenu.c's code is identical to gimpcontainerview.c's except for the base class. This will become an interface with Gtk 2.0. * app/widgets/gimpimagedock.[ch]: a dock with an image menu. The pages still don't follow the context correctly. * app/widgets/gimpmenuitem.[ch]: a menu item with a preview. * app/widgets/gimpdialogfactory.[ch]: pass a dock constructor to the constructor and provide a method to create a new dock within this factory's context. * app/widgets/gimpdock.[ch]: removed the constructor because we create only image docks now. Put the vbox into a main_vbox (which also contains the image menu). * app/widgets/gimpdockbook.[ch]: create new docks with the dialog factory. * app/gimpcontainer.[ch] * app/gimpdata.[ch] * app/gimpdatafactory.[ch] * app/gimpdatalist.[ch] * app/gimplist.[ch] * app/gimpviewable.[ch] * app/widgets/gimpbrushpreview.[ch] * app/widgets/gimpcontainergridview.[ch] * app/widgets/gimpcontainerlistview.[ch] * app/widgets/gimpcontainerview.[ch] * app/widgets/gimpdatafactoryview.[ch] * app/widgets/gimpdockable.[ch] * app/widgets/gimpdrawablelistitem.[ch] * app/widgets/gimpdrawablelistview.[ch] * app/widgets/gimpdrawablepreview.[ch] * app/widgets/gimplayerlistitem.[ch] * app/widgets/gimplayerlistview.[ch] * app/widgets/gimplistitem.[ch] * app/widgets/gimppalettepreview.[ch] * app/widgets/gimppatternpreview.[ch] * app/widgets/gimppreview.[ch]: ass-sign some copyrights.
2001-04-22 08:38:56 +08:00
* gimpdata.c
* Copyright (C) 2001 Michael Natterer <mitch@gimp.org>
*
* 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 <errno.h>
#include <stdio.h>
#include <string.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
an evil temp_hack which lets GimpContext managing the active display 2001-08-14 Michael Natterer <mitch@gimp.org> * app/gdisplay.h: an evil temp_hack which lets GimpContext managing the active display withoug including "gdisplay.h". Will go away as soon ad context properties are registered dynamically. * app/module_db.c: cleaned up the object code in preparation of moving it to core/. * app/path.c: connect to GimpImage's * app/core/gimpobject.[ch]: derive it from GObject, not from GtkObject any more (yeah :-) * app/core/*.c: #include <glib-object.h> instead of <gtk/gtk.h>, removed some remaining GtkObject-isms. (left in a few #include <gtk/gtk.h> where bigger changes are needed to get rid of the UI dependency). * app/core/core-types.h: #include <gdk-pixbuf/gdk-pixbuf.h> here temporarily. * app/core/gimp.c (gimp_create_display): unref the image after creating it's first display. * app/core/gimpbrush.[ch]: disabled the parts of the code which depend on GimpPaintTool. * app/core/gimpbrushgenerated.c * app/core/gimpbrushpipe.c: changed accordingly. * app/core/gimpcontext.[ch]: evil hack (see above) to manage the active display without including "gdisplay.h" * app/core/gimpimage-mask.[ch]: pass a context to gimage_mask_stroke() and get the current tool's PDB string from there. * app/core/gimpedit.c: changed accordingly. * app/core/gimpimage.c: use gimp_image_update() instead of gdisplays_update_full(). * app/gui/color-area.c * app/gui/colormap-dialog.c * app/gui/dialogs-constructors.c * app/gui/edit-commands.c * app/gui/image-commands.c * app/gui/toolbox.c: changed accordingly (don't use Gtk methods on GObjects). * app/gui/menus.c: fix some const warnings by explicit casting. * app/tools/*.[ch]: ported all tools to GObject, some minor cleanup while i was on it. * app/widgets/gimpdialogfactory.[ch]: ported to GObject. * app/widgets/gimplayerlistview.h: added FOO_GET_CLASS() macro. * tools/pdbgen/app.pl: added a "widgets_eek" hack like "tools_eek" which inserts #include "widgets/widgets-types.h" before ordinary includes. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/edit.pdb * app/pdb/brush_select_cmds.c * app/pdb/edit_cmds.c: changed according to the stuff above.
2001-08-14 22:53:55 +08:00
#include <glib-object.h>
#ifdef G_OS_WIN32
#include <io.h>
#define F_OK 0
#define W_OK 2
#define R_OK 4
#define X_OK 0 /* not really */
#define access(f,p) _access(f,p)
#endif
#include "libgimpbase/gimpbase.h"
#include "core-types.h"
#include "gimpdata.h"
gimprc.in user_install user_install.bat app/gimprc.[ch] removed the 2001-02-13 Michael Natterer <mitch@gimp.org> * gimprc.in * user_install * user_install.bat * app/gimprc.[ch] * app/preferences_dialog.c: removed the "brush_vbr_path" variable, because all data types will be editable and saveable soon. * app/Makefile.am * app/apptypes.h * app/gimpdatafactory.[ch]: new object which holds a data list and knows how to create, edit, duplicate etc. the items in it. Will completely replace the brushes.[ch], patterns.[ch], ... files soon. * po/POTFILES.in * app/gimpdatacontainerview.[ch]: removed. * app/gimpdatafactoryview.[ch]: added. A view on the GimpDataFactory with a GUI for creating, editing, deleting etc. items (mostly unimplemented). * app/context_manager.[ch]: replaced the global data lists by global data factories. * app/brush_select.c * app/brushes.[ch] * app/commands.c * app/convert.c * app/devices.c * app/gimpbrush.[ch] * app/gimpbrushgenerated.c * app/gimpcontext.c * app/gimpdata.[ch] * app/gimpdatalist.[ch] * app/gimpdnd.c * app/gimpgradient.[ch] * app/gimppalette.[ch] * app/gimppattern.[ch] * app/gradient_editor.c * app/gradient_select.c * app/gradients.[ch] * app/indicator_area.c * app/palette.c * app/palette_import.c * app/palette_select.c * app/palettes.[ch] * app/pattern_select.c * app/patterns.[ch] * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/convert_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/convert.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: changed accordingly.
2001-02-14 03:53:07 +08:00
#include "gimpmarshal.h"
#include "gimp-intl.h"
enum
{
DIRTY,
LAST_SIGNAL
};
static void gimp_data_class_init (GimpDataClass *klass);
static void gimp_data_init (GimpData *data);
static void gimp_data_finalize (GObject *object);
static void gimp_data_name_changed (GimpObject *object);
static gint64 gimp_data_get_memsize (GimpObject *object,
gint64 *gui_size);
static void gimp_data_real_dirty (GimpData *data);
static guint data_signals[LAST_SIGNAL] = { 0 };
static GimpViewableClass *parent_class = NULL;
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning) 2001-07-24 Michael Natterer <mitch@gimp.org> Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning) * configure.in: require glib/gtk+ >= 1.3.7, commented out the gtkxmhtml stuff. From now on, you will need glib, pango, atk and gtk+ HEAD from CVS to hack or use GIMP HEAD. Beware, it crashes randomly :) * app/core/Makefile.am * app/core/gimpmarshal.list: new file plus rules to generate gimpmarshal.[ch] from it. * app/core/* * app/tools/* * app/widgets/* * libgimpwidgets/*: started to use the glib object system. All core/ objects are still gtk objects however. All signals are created using g_signal_new(). There are many gtk+ artefacts left. Finally, we will _not_ use the gtk_signal_foo() wrappers and friends any more. * app/colormaps.c * app/devices.[ch] * app/disp_callbacks.c * app/errorconsole.c * app/file-save.[ch] * app/interface.c * app/module_db.c * app/nav_window.c * app/ops_buttons.c * app/scroll.c * app/user_install.c * app/gui/about-dialog.c * app/gui/brush-editor.c * app/gui/brushes-commands.c * app/gui/color-notebook.c * app/gui/colormap-dialog.c * app/gui/dialogs-commands.c * app/gui/dialogs-constructors.c * app/gui/file-commands.c * app/gui/file-dialog-utils.c * app/gui/file-new-dialog.c * app/gui/file-open-dialog.[ch] * app/gui/file-save-dialog.c * app/gui/gradient-editor.c * app/gui/gradients-commands.c * app/gui/image-commands.c * app/gui/info-dialog.[ch] * app/gui/layer-select.c * app/gui/layers-commands.c * app/gui/menus.c * app/gui/offset-dialog.c * app/gui/palette-editor.c * app/gui/palettes-commands.c * app/gui/patterns-commands.c * app/gui/preferences-dialog.c * app/gui/resize-dialog.[ch] * app/gui/splash.c * app/gui/tips-dialog.c * app/gui/tool-options-dialog.c * app/gui/toolbox.c * app/gui/tools-commands.c * libgimp/gimpbrushmenu.c * libgimp/gimpmenu.c * libgimp/gimppatternmenu.c * libgimp/gimpui.c * libgimpbase/gimpenv.c: tons and tons of changes like "const gchar*", switch from GdkDeviceInfo to GdkDevice (very incomplete and currently disables), lots of s/gtk_signal/g_signal/, removal/replacement of deprecated stuff, s/GtkSignalFunc/GCallback/ and lots of small changes and fixes while I was on it, zillions of warnings left... * modules/Makefile.am: disabled the water color selector temporarily (XInput issues). * plug-ins/Makefile.am * plug-ins/common/.cvsignore * plug-ins/common/Makefile.am * plug-ins/common/plugin-defs.pl: simply excluded all plug-ins which did not build (including Script-Fu). They are trivial to fix.
2001-07-25 05:27:11 +08:00
GType
gimp_data_get_type (void)
{
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning) 2001-07-24 Michael Natterer <mitch@gimp.org> Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning) * configure.in: require glib/gtk+ >= 1.3.7, commented out the gtkxmhtml stuff. From now on, you will need glib, pango, atk and gtk+ HEAD from CVS to hack or use GIMP HEAD. Beware, it crashes randomly :) * app/core/Makefile.am * app/core/gimpmarshal.list: new file plus rules to generate gimpmarshal.[ch] from it. * app/core/* * app/tools/* * app/widgets/* * libgimpwidgets/*: started to use the glib object system. All core/ objects are still gtk objects however. All signals are created using g_signal_new(). There are many gtk+ artefacts left. Finally, we will _not_ use the gtk_signal_foo() wrappers and friends any more. * app/colormaps.c * app/devices.[ch] * app/disp_callbacks.c * app/errorconsole.c * app/file-save.[ch] * app/interface.c * app/module_db.c * app/nav_window.c * app/ops_buttons.c * app/scroll.c * app/user_install.c * app/gui/about-dialog.c * app/gui/brush-editor.c * app/gui/brushes-commands.c * app/gui/color-notebook.c * app/gui/colormap-dialog.c * app/gui/dialogs-commands.c * app/gui/dialogs-constructors.c * app/gui/file-commands.c * app/gui/file-dialog-utils.c * app/gui/file-new-dialog.c * app/gui/file-open-dialog.[ch] * app/gui/file-save-dialog.c * app/gui/gradient-editor.c * app/gui/gradients-commands.c * app/gui/image-commands.c * app/gui/info-dialog.[ch] * app/gui/layer-select.c * app/gui/layers-commands.c * app/gui/menus.c * app/gui/offset-dialog.c * app/gui/palette-editor.c * app/gui/palettes-commands.c * app/gui/patterns-commands.c * app/gui/preferences-dialog.c * app/gui/resize-dialog.[ch] * app/gui/splash.c * app/gui/tips-dialog.c * app/gui/tool-options-dialog.c * app/gui/toolbox.c * app/gui/tools-commands.c * libgimp/gimpbrushmenu.c * libgimp/gimpmenu.c * libgimp/gimppatternmenu.c * libgimp/gimpui.c * libgimpbase/gimpenv.c: tons and tons of changes like "const gchar*", switch from GdkDeviceInfo to GdkDevice (very incomplete and currently disables), lots of s/gtk_signal/g_signal/, removal/replacement of deprecated stuff, s/GtkSignalFunc/GCallback/ and lots of small changes and fixes while I was on it, zillions of warnings left... * modules/Makefile.am: disabled the water color selector temporarily (XInput issues). * plug-ins/Makefile.am * plug-ins/common/.cvsignore * plug-ins/common/Makefile.am * plug-ins/common/plugin-defs.pl: simply excluded all plug-ins which did not build (including Script-Fu). They are trivial to fix.
2001-07-25 05:27:11 +08:00
static GType data_type = 0;
if (! data_type)
{
static const GTypeInfo data_info =
{
sizeof (GimpDataClass),
(GBaseInitFunc) NULL,
(GBaseFinalizeFunc) NULL,
(GClassInitFunc) gimp_data_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (GimpData),
0, /* n_preallocs */
(GInstanceInitFunc) gimp_data_init,
};
data_type = g_type_register_static (GIMP_TYPE_VIEWABLE,
"GimpData",
&data_info, 0);
}
return data_type;
}
static void
gimp_data_class_init (GimpDataClass *klass)
{
GObjectClass *object_class;
took gimpcontextpreview.[ch] out of the build but still left the sources 2001-02-12 Michael Natterer <mitch@gimp.org> * app/Makefile.am: took gimpcontextpreview.[ch] out of the build but still left the sources there as reference. * app/app_procs.c: initialize the render stuff before creating the toolbox (needed for the previews). * app/devices.c * app/indicator_area.c: use GimpPreviews instead of GimpContextPreviews. * app/context_manager.[ch]: create the global data lists here because they now must exist before any context is created. * app/brushes.[ch] * app/gradients.[ch] * app/palettes.[ch] * app/patterns.[ch]: removed them here. * app/gimpcontainer.[ch]: added a "freeze_count" and emit the "freeze" and "thaw" signals accordingly. * app/gimpcontext.[ch]: greatly simplified the way how the contexts connect to the data lists (simply keep them connected all the time). Also removed all those ugly explicit update functions because "thaw" callbacks do this job now. * app/gimpdata.c: a GimpData object now becomes dirty on "name_changed"; "dirty" now triggers "invalidate_preview" because the context does not dispatch these signals any more soon. * app/brush_select.c * app/convert.c * app/gimpdnd.c * app/gradient_editor.c * app/gradient_select.c * app/pattern_select.c * app/gradient_editor.c * app/gradient_select.c * app/gradients.[ch] * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/convert_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/convert.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: changed accordingly.
2001-02-12 11:27:28 +08:00
GimpObjectClass *gimp_object_class;
object_class = G_OBJECT_CLASS (klass);
gimp_object_class = GIMP_OBJECT_CLASS (klass);
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning) 2001-07-24 Michael Natterer <mitch@gimp.org> Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning) * configure.in: require glib/gtk+ >= 1.3.7, commented out the gtkxmhtml stuff. From now on, you will need glib, pango, atk and gtk+ HEAD from CVS to hack or use GIMP HEAD. Beware, it crashes randomly :) * app/core/Makefile.am * app/core/gimpmarshal.list: new file plus rules to generate gimpmarshal.[ch] from it. * app/core/* * app/tools/* * app/widgets/* * libgimpwidgets/*: started to use the glib object system. All core/ objects are still gtk objects however. All signals are created using g_signal_new(). There are many gtk+ artefacts left. Finally, we will _not_ use the gtk_signal_foo() wrappers and friends any more. * app/colormaps.c * app/devices.[ch] * app/disp_callbacks.c * app/errorconsole.c * app/file-save.[ch] * app/interface.c * app/module_db.c * app/nav_window.c * app/ops_buttons.c * app/scroll.c * app/user_install.c * app/gui/about-dialog.c * app/gui/brush-editor.c * app/gui/brushes-commands.c * app/gui/color-notebook.c * app/gui/colormap-dialog.c * app/gui/dialogs-commands.c * app/gui/dialogs-constructors.c * app/gui/file-commands.c * app/gui/file-dialog-utils.c * app/gui/file-new-dialog.c * app/gui/file-open-dialog.[ch] * app/gui/file-save-dialog.c * app/gui/gradient-editor.c * app/gui/gradients-commands.c * app/gui/image-commands.c * app/gui/info-dialog.[ch] * app/gui/layer-select.c * app/gui/layers-commands.c * app/gui/menus.c * app/gui/offset-dialog.c * app/gui/palette-editor.c * app/gui/palettes-commands.c * app/gui/patterns-commands.c * app/gui/preferences-dialog.c * app/gui/resize-dialog.[ch] * app/gui/splash.c * app/gui/tips-dialog.c * app/gui/tool-options-dialog.c * app/gui/toolbox.c * app/gui/tools-commands.c * libgimp/gimpbrushmenu.c * libgimp/gimpmenu.c * libgimp/gimppatternmenu.c * libgimp/gimpui.c * libgimpbase/gimpenv.c: tons and tons of changes like "const gchar*", switch from GdkDeviceInfo to GdkDevice (very incomplete and currently disables), lots of s/gtk_signal/g_signal/, removal/replacement of deprecated stuff, s/GtkSignalFunc/GCallback/ and lots of small changes and fixes while I was on it, zillions of warnings left... * modules/Makefile.am: disabled the water color selector temporarily (XInput issues). * plug-ins/Makefile.am * plug-ins/common/.cvsignore * plug-ins/common/Makefile.am * plug-ins/common/plugin-defs.pl: simply excluded all plug-ins which did not build (including Script-Fu). They are trivial to fix.
2001-07-25 05:27:11 +08:00
parent_class = g_type_class_peek_parent (klass);
changed GimpObject::get_memsize() to return a second value named 2003-08-25 Michael Natterer <mitch@gimp.org> * app/core/gimpobject.[ch]: changed GimpObject::get_memsize() to return a second value named "gui_size", where the primary return value is the "constant" actual size (as long as no operation is performed on the object), and the second "gui_size" return value is the size of temporary stuff like preview caches or boundary segments (which may change asynchronously, even if the object is on the undo stack). * app/core/gimp.c * app/core/gimpbrush.c * app/core/gimpbrushpipe.c * app/core/gimpbuffer.c * app/core/gimpchannel.c * app/core/gimpcontainer.c * app/core/gimpcontext.c * app/core/gimpdata.c * app/core/gimpdatafactory.c * app/core/gimpdrawable.c * app/core/gimpgradient.c * app/core/gimpimage-undo.c * app/core/gimpimage.c * app/core/gimpitem.c * app/core/gimplayer.c * app/core/gimplist.c * app/core/gimppalette.c * app/core/gimpparasitelist.c * app/core/gimppattern.c * app/core/gimpundo.c * app/core/gimpundostack.c * app/core/gimpviewable.c * app/text/gimptextlayer.c * app/vectors/gimpstroke.c * app/vectors/gimpvectors.c: changed get_memsize() implementations accordingly. * app/display/gimpdisplayshell-title.c * app/gui/debug-commands.c * app/widgets/gimppreview.c: changed callers accordingly. * app/core/gimpimage-undo-push.c: changed layer, channel, vectors and layer_mask undo steps to add/subtract the size of the resp. objects whenever they take/drop ownership of them. Ignore the objects' "gui_size" to get identical sizes on adding/subtracting. Fixes bug #120429.
2003-08-25 18:49:33 +08:00
data_signals[DIRTY] =
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning) 2001-07-24 Michael Natterer <mitch@gimp.org> Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning) * configure.in: require glib/gtk+ >= 1.3.7, commented out the gtkxmhtml stuff. From now on, you will need glib, pango, atk and gtk+ HEAD from CVS to hack or use GIMP HEAD. Beware, it crashes randomly :) * app/core/Makefile.am * app/core/gimpmarshal.list: new file plus rules to generate gimpmarshal.[ch] from it. * app/core/* * app/tools/* * app/widgets/* * libgimpwidgets/*: started to use the glib object system. All core/ objects are still gtk objects however. All signals are created using g_signal_new(). There are many gtk+ artefacts left. Finally, we will _not_ use the gtk_signal_foo() wrappers and friends any more. * app/colormaps.c * app/devices.[ch] * app/disp_callbacks.c * app/errorconsole.c * app/file-save.[ch] * app/interface.c * app/module_db.c * app/nav_window.c * app/ops_buttons.c * app/scroll.c * app/user_install.c * app/gui/about-dialog.c * app/gui/brush-editor.c * app/gui/brushes-commands.c * app/gui/color-notebook.c * app/gui/colormap-dialog.c * app/gui/dialogs-commands.c * app/gui/dialogs-constructors.c * app/gui/file-commands.c * app/gui/file-dialog-utils.c * app/gui/file-new-dialog.c * app/gui/file-open-dialog.[ch] * app/gui/file-save-dialog.c * app/gui/gradient-editor.c * app/gui/gradients-commands.c * app/gui/image-commands.c * app/gui/info-dialog.[ch] * app/gui/layer-select.c * app/gui/layers-commands.c * app/gui/menus.c * app/gui/offset-dialog.c * app/gui/palette-editor.c * app/gui/palettes-commands.c * app/gui/patterns-commands.c * app/gui/preferences-dialog.c * app/gui/resize-dialog.[ch] * app/gui/splash.c * app/gui/tips-dialog.c * app/gui/tool-options-dialog.c * app/gui/toolbox.c * app/gui/tools-commands.c * libgimp/gimpbrushmenu.c * libgimp/gimpmenu.c * libgimp/gimppatternmenu.c * libgimp/gimpui.c * libgimpbase/gimpenv.c: tons and tons of changes like "const gchar*", switch from GdkDeviceInfo to GdkDevice (very incomplete and currently disables), lots of s/gtk_signal/g_signal/, removal/replacement of deprecated stuff, s/GtkSignalFunc/GCallback/ and lots of small changes and fixes while I was on it, zillions of warnings left... * modules/Makefile.am: disabled the water color selector temporarily (XInput issues). * plug-ins/Makefile.am * plug-ins/common/.cvsignore * plug-ins/common/Makefile.am * plug-ins/common/plugin-defs.pl: simply excluded all plug-ins which did not build (including Script-Fu). They are trivial to fix.
2001-07-25 05:27:11 +08:00
g_signal_new ("dirty",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GimpDataClass, dirty),
NULL, NULL,
bumped version number to 1.3.1. Require Glib/GTK+-1.3.11 and Pango-0.22. 2001-11-23 Sven Neumann <sven@gimp.org> * configure.in: bumped version number to 1.3.1. Require Glib/GTK+-1.3.11 and Pango-0.22. Removed GDK_DISABLE_COMPAT_H and GTK_DISABLE_COMPAT_H from our default CFLAGS since they don't exist any longer. * RELEASE-TO-CVS.patch: removed since the glib/gtk+ API is supposed to be frozen now. * HACKING: removed reference to RELEASE-TO-CVS.patch * app/gui/menus.c * app/tools/gimptexttool.c: applied RELEASE-TO-CVS.patch to conform to the new GTK+/Pango API. * app/core/Makefile.am: generate marshallers with gimp_marshal prefix. * app/core/gimpmarshal.list: added all marshallers we use. * app/core/gimpmarshal.[ch]: regenerated. * app/[lots of .c files]: use gimp_marshal_* for all marshallers. * data/images/ * app/app_procs.c * app/gui/splash.c: * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimputils.[ch]: removed since they are no longer needed. * app/gimprc.c * plug-ins/common/ps.c * plug-ins/gdyntext/gdyntext.c * plug-ins/gdyntext/gdyntextcompat.c * plug-ins/gfig/gfig.c * plug-ins/gflare/gflare.c * plug-ins/script-fu/script-fu-scripts.c: use glib functions instead of gimp_strescape() and gimpstrcompress(). * cleaned up all header files: use G_BEGIN_DECLS/G_END_DECLS, declared all _get_type function as G_GNUC_CONST. * tools/pdbgen/enumcode.pl * tools/pdbgen/lib.pl: make them generate header files using G_BEGIN_DECLS/G_END_DECLS. * pixmaps/Makefile.am * pixmaps/wilber3.xpm: removed ... * data/images/tips_wilber.png: ... and added here as PNG * app/gui/tips-dialog.c: load the Wilber on demand using GdkPixbuf. * data/images/gimp_splash.ppm: removed ... * data/images/gimp_splash.png: ... and added as PNG * app/app_procs.c * app/gui/splash.[ch]: load the splash image using GdkPixbuf. * app/gui/about-dialog.c: sink the GtkPreview.
2001-11-23 07:46:13 +08:00
gimp_marshal_VOID__VOID,
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning) 2001-07-24 Michael Natterer <mitch@gimp.org> Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning) * configure.in: require glib/gtk+ >= 1.3.7, commented out the gtkxmhtml stuff. From now on, you will need glib, pango, atk and gtk+ HEAD from CVS to hack or use GIMP HEAD. Beware, it crashes randomly :) * app/core/Makefile.am * app/core/gimpmarshal.list: new file plus rules to generate gimpmarshal.[ch] from it. * app/core/* * app/tools/* * app/widgets/* * libgimpwidgets/*: started to use the glib object system. All core/ objects are still gtk objects however. All signals are created using g_signal_new(). There are many gtk+ artefacts left. Finally, we will _not_ use the gtk_signal_foo() wrappers and friends any more. * app/colormaps.c * app/devices.[ch] * app/disp_callbacks.c * app/errorconsole.c * app/file-save.[ch] * app/interface.c * app/module_db.c * app/nav_window.c * app/ops_buttons.c * app/scroll.c * app/user_install.c * app/gui/about-dialog.c * app/gui/brush-editor.c * app/gui/brushes-commands.c * app/gui/color-notebook.c * app/gui/colormap-dialog.c * app/gui/dialogs-commands.c * app/gui/dialogs-constructors.c * app/gui/file-commands.c * app/gui/file-dialog-utils.c * app/gui/file-new-dialog.c * app/gui/file-open-dialog.[ch] * app/gui/file-save-dialog.c * app/gui/gradient-editor.c * app/gui/gradients-commands.c * app/gui/image-commands.c * app/gui/info-dialog.[ch] * app/gui/layer-select.c * app/gui/layers-commands.c * app/gui/menus.c * app/gui/offset-dialog.c * app/gui/palette-editor.c * app/gui/palettes-commands.c * app/gui/patterns-commands.c * app/gui/preferences-dialog.c * app/gui/resize-dialog.[ch] * app/gui/splash.c * app/gui/tips-dialog.c * app/gui/tool-options-dialog.c * app/gui/toolbox.c * app/gui/tools-commands.c * libgimp/gimpbrushmenu.c * libgimp/gimpmenu.c * libgimp/gimppatternmenu.c * libgimp/gimpui.c * libgimpbase/gimpenv.c: tons and tons of changes like "const gchar*", switch from GdkDeviceInfo to GdkDevice (very incomplete and currently disables), lots of s/gtk_signal/g_signal/, removal/replacement of deprecated stuff, s/GtkSignalFunc/GCallback/ and lots of small changes and fixes while I was on it, zillions of warnings left... * modules/Makefile.am: disabled the water color selector temporarily (XInput issues). * plug-ins/Makefile.am * plug-ins/common/.cvsignore * plug-ins/common/Makefile.am * plug-ins/common/plugin-defs.pl: simply excluded all plug-ins which did not build (including Script-Fu). They are trivial to fix.
2001-07-25 05:27:11 +08:00
G_TYPE_NONE, 0);
object_class->finalize = gimp_data_finalize;
took gimpcontextpreview.[ch] out of the build but still left the sources 2001-02-12 Michael Natterer <mitch@gimp.org> * app/Makefile.am: took gimpcontextpreview.[ch] out of the build but still left the sources there as reference. * app/app_procs.c: initialize the render stuff before creating the toolbox (needed for the previews). * app/devices.c * app/indicator_area.c: use GimpPreviews instead of GimpContextPreviews. * app/context_manager.[ch]: create the global data lists here because they now must exist before any context is created. * app/brushes.[ch] * app/gradients.[ch] * app/palettes.[ch] * app/patterns.[ch]: removed them here. * app/gimpcontainer.[ch]: added a "freeze_count" and emit the "freeze" and "thaw" signals accordingly. * app/gimpcontext.[ch]: greatly simplified the way how the contexts connect to the data lists (simply keep them connected all the time). Also removed all those ugly explicit update functions because "thaw" callbacks do this job now. * app/gimpdata.c: a GimpData object now becomes dirty on "name_changed"; "dirty" now triggers "invalidate_preview" because the context does not dispatch these signals any more soon. * app/brush_select.c * app/convert.c * app/gimpdnd.c * app/gradient_editor.c * app/gradient_select.c * app/pattern_select.c * app/gradient_editor.c * app/gradient_select.c * app/gradients.[ch] * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/convert_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/convert.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: changed accordingly.
2001-02-12 11:27:28 +08:00
gimp_object_class->name_changed = gimp_data_name_changed;
gimp_object_class->get_memsize = gimp_data_get_memsize;
took gimpcontextpreview.[ch] out of the build but still left the sources 2001-02-12 Michael Natterer <mitch@gimp.org> * app/Makefile.am: took gimpcontextpreview.[ch] out of the build but still left the sources there as reference. * app/app_procs.c: initialize the render stuff before creating the toolbox (needed for the previews). * app/devices.c * app/indicator_area.c: use GimpPreviews instead of GimpContextPreviews. * app/context_manager.[ch]: create the global data lists here because they now must exist before any context is created. * app/brushes.[ch] * app/gradients.[ch] * app/palettes.[ch] * app/patterns.[ch]: removed them here. * app/gimpcontainer.[ch]: added a "freeze_count" and emit the "freeze" and "thaw" signals accordingly. * app/gimpcontext.[ch]: greatly simplified the way how the contexts connect to the data lists (simply keep them connected all the time). Also removed all those ugly explicit update functions because "thaw" callbacks do this job now. * app/gimpdata.c: a GimpData object now becomes dirty on "name_changed"; "dirty" now triggers "invalidate_preview" because the context does not dispatch these signals any more soon. * app/brush_select.c * app/convert.c * app/gimpdnd.c * app/gradient_editor.c * app/gradient_select.c * app/pattern_select.c * app/gradient_editor.c * app/gradient_select.c * app/gradients.[ch] * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/convert_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/convert.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: changed accordingly.
2001-02-12 11:27:28 +08:00
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning) 2001-07-24 Michael Natterer <mitch@gimp.org> Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning) * configure.in: require glib/gtk+ >= 1.3.7, commented out the gtkxmhtml stuff. From now on, you will need glib, pango, atk and gtk+ HEAD from CVS to hack or use GIMP HEAD. Beware, it crashes randomly :) * app/core/Makefile.am * app/core/gimpmarshal.list: new file plus rules to generate gimpmarshal.[ch] from it. * app/core/* * app/tools/* * app/widgets/* * libgimpwidgets/*: started to use the glib object system. All core/ objects are still gtk objects however. All signals are created using g_signal_new(). There are many gtk+ artefacts left. Finally, we will _not_ use the gtk_signal_foo() wrappers and friends any more. * app/colormaps.c * app/devices.[ch] * app/disp_callbacks.c * app/errorconsole.c * app/file-save.[ch] * app/interface.c * app/module_db.c * app/nav_window.c * app/ops_buttons.c * app/scroll.c * app/user_install.c * app/gui/about-dialog.c * app/gui/brush-editor.c * app/gui/brushes-commands.c * app/gui/color-notebook.c * app/gui/colormap-dialog.c * app/gui/dialogs-commands.c * app/gui/dialogs-constructors.c * app/gui/file-commands.c * app/gui/file-dialog-utils.c * app/gui/file-new-dialog.c * app/gui/file-open-dialog.[ch] * app/gui/file-save-dialog.c * app/gui/gradient-editor.c * app/gui/gradients-commands.c * app/gui/image-commands.c * app/gui/info-dialog.[ch] * app/gui/layer-select.c * app/gui/layers-commands.c * app/gui/menus.c * app/gui/offset-dialog.c * app/gui/palette-editor.c * app/gui/palettes-commands.c * app/gui/patterns-commands.c * app/gui/preferences-dialog.c * app/gui/resize-dialog.[ch] * app/gui/splash.c * app/gui/tips-dialog.c * app/gui/tool-options-dialog.c * app/gui/toolbox.c * app/gui/tools-commands.c * libgimp/gimpbrushmenu.c * libgimp/gimpmenu.c * libgimp/gimppatternmenu.c * libgimp/gimpui.c * libgimpbase/gimpenv.c: tons and tons of changes like "const gchar*", switch from GdkDeviceInfo to GdkDevice (very incomplete and currently disables), lots of s/gtk_signal/g_signal/, removal/replacement of deprecated stuff, s/GtkSignalFunc/GCallback/ and lots of small changes and fixes while I was on it, zillions of warnings left... * modules/Makefile.am: disabled the water color selector temporarily (XInput issues). * plug-ins/Makefile.am * plug-ins/common/.cvsignore * plug-ins/common/Makefile.am * plug-ins/common/plugin-defs.pl: simply excluded all plug-ins which did not build (including Script-Fu). They are trivial to fix.
2001-07-25 05:27:11 +08:00
klass->dirty = gimp_data_real_dirty;
klass->save = NULL;
klass->get_extension = NULL;
klass->duplicate = NULL;
}
static void
gimp_data_init (GimpData *data)
{
data->filename = NULL;
data->writeable = TRUE;
data->dirty = FALSE;
data->internal = FALSE;
}
static void
gimp_data_finalize (GObject *object)
{
GimpData *data;
data = GIMP_DATA (object);
if (data->filename)
{
g_free (data->filename);
data->filename = NULL;
}
G_OBJECT_CLASS (parent_class)->finalize (object);
}
took gimpcontextpreview.[ch] out of the build but still left the sources 2001-02-12 Michael Natterer <mitch@gimp.org> * app/Makefile.am: took gimpcontextpreview.[ch] out of the build but still left the sources there as reference. * app/app_procs.c: initialize the render stuff before creating the toolbox (needed for the previews). * app/devices.c * app/indicator_area.c: use GimpPreviews instead of GimpContextPreviews. * app/context_manager.[ch]: create the global data lists here because they now must exist before any context is created. * app/brushes.[ch] * app/gradients.[ch] * app/palettes.[ch] * app/patterns.[ch]: removed them here. * app/gimpcontainer.[ch]: added a "freeze_count" and emit the "freeze" and "thaw" signals accordingly. * app/gimpcontext.[ch]: greatly simplified the way how the contexts connect to the data lists (simply keep them connected all the time). Also removed all those ugly explicit update functions because "thaw" callbacks do this job now. * app/gimpdata.c: a GimpData object now becomes dirty on "name_changed"; "dirty" now triggers "invalidate_preview" because the context does not dispatch these signals any more soon. * app/brush_select.c * app/convert.c * app/gimpdnd.c * app/gradient_editor.c * app/gradient_select.c * app/pattern_select.c * app/gradient_editor.c * app/gradient_select.c * app/gradients.[ch] * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/convert_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/convert.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: changed accordingly.
2001-02-12 11:27:28 +08:00
static void
gimp_data_name_changed (GimpObject *object)
{
if (GIMP_OBJECT_CLASS (parent_class)->name_changed)
GIMP_OBJECT_CLASS (parent_class)->name_changed (object);
gimp_data_dirty (GIMP_DATA (object));
}
static gint64
changed GimpObject::get_memsize() to return a second value named 2003-08-25 Michael Natterer <mitch@gimp.org> * app/core/gimpobject.[ch]: changed GimpObject::get_memsize() to return a second value named "gui_size", where the primary return value is the "constant" actual size (as long as no operation is performed on the object), and the second "gui_size" return value is the size of temporary stuff like preview caches or boundary segments (which may change asynchronously, even if the object is on the undo stack). * app/core/gimp.c * app/core/gimpbrush.c * app/core/gimpbrushpipe.c * app/core/gimpbuffer.c * app/core/gimpchannel.c * app/core/gimpcontainer.c * app/core/gimpcontext.c * app/core/gimpdata.c * app/core/gimpdatafactory.c * app/core/gimpdrawable.c * app/core/gimpgradient.c * app/core/gimpimage-undo.c * app/core/gimpimage.c * app/core/gimpitem.c * app/core/gimplayer.c * app/core/gimplist.c * app/core/gimppalette.c * app/core/gimpparasitelist.c * app/core/gimppattern.c * app/core/gimpundo.c * app/core/gimpundostack.c * app/core/gimpviewable.c * app/text/gimptextlayer.c * app/vectors/gimpstroke.c * app/vectors/gimpvectors.c: changed get_memsize() implementations accordingly. * app/display/gimpdisplayshell-title.c * app/gui/debug-commands.c * app/widgets/gimppreview.c: changed callers accordingly. * app/core/gimpimage-undo-push.c: changed layer, channel, vectors and layer_mask undo steps to add/subtract the size of the resp. objects whenever they take/drop ownership of them. Ignore the objects' "gui_size" to get identical sizes on adding/subtracting. Fixes bug #120429.
2003-08-25 18:49:33 +08:00
gimp_data_get_memsize (GimpObject *object,
gint64 *gui_size)
{
GimpData *data;
gint64 memsize = 0;
data = GIMP_DATA (object);
if (data->filename)
memsize += strlen (data->filename) + 1;
changed GimpObject::get_memsize() to return a second value named 2003-08-25 Michael Natterer <mitch@gimp.org> * app/core/gimpobject.[ch]: changed GimpObject::get_memsize() to return a second value named "gui_size", where the primary return value is the "constant" actual size (as long as no operation is performed on the object), and the second "gui_size" return value is the size of temporary stuff like preview caches or boundary segments (which may change asynchronously, even if the object is on the undo stack). * app/core/gimp.c * app/core/gimpbrush.c * app/core/gimpbrushpipe.c * app/core/gimpbuffer.c * app/core/gimpchannel.c * app/core/gimpcontainer.c * app/core/gimpcontext.c * app/core/gimpdata.c * app/core/gimpdatafactory.c * app/core/gimpdrawable.c * app/core/gimpgradient.c * app/core/gimpimage-undo.c * app/core/gimpimage.c * app/core/gimpitem.c * app/core/gimplayer.c * app/core/gimplist.c * app/core/gimppalette.c * app/core/gimpparasitelist.c * app/core/gimppattern.c * app/core/gimpundo.c * app/core/gimpundostack.c * app/core/gimpviewable.c * app/text/gimptextlayer.c * app/vectors/gimpstroke.c * app/vectors/gimpvectors.c: changed get_memsize() implementations accordingly. * app/display/gimpdisplayshell-title.c * app/gui/debug-commands.c * app/widgets/gimppreview.c: changed callers accordingly. * app/core/gimpimage-undo-push.c: changed layer, channel, vectors and layer_mask undo steps to add/subtract the size of the resp. objects whenever they take/drop ownership of them. Ignore the objects' "gui_size" to get identical sizes on adding/subtracting. Fixes bug #120429.
2003-08-25 18:49:33 +08:00
return memsize + GIMP_OBJECT_CLASS (parent_class)->get_memsize (object,
gui_size);
}
gboolean
gimp_data_save (GimpData *data,
GError **error)
{
gboolean success = FALSE;
g_return_val_if_fail (GIMP_IS_DATA (data), FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
added a boolean "internal" which indicates that the data object is an 2002-06-12 Michael Natterer <mitch@gimp.org> * app/core/gimpdata.[ch]: added a boolean "internal" which indicates that the data object is an automatically created internal object. Changed the code to refuse saving to deleting internal objects. * app/core/Makefile.am * app/core/gimp-gradients.[ch]: new files implementing internal gradients (FG -> BG in RGB and HSV and FG -> transparent). * app/core/gimp.c: call gimp_gradients_init(). * app/core/gimpdatafactory.c (gimp_data_factory_data_free): don't free internal objects so they stay there on "Refresh". * app/core/gimpdatalist.c: sort internal objects to the beginning of the list. * app/widgets/gimpdataeditor.c: refuse to change the name of internal objects. * app/widgets/gimpdatafactoryview.c: set the "Delete" button insensitive for internal objects. * app/widgets/gimpgradienteditor.c: refuse to edit internal gradients, just display them so color picking works. * app/gui/brushes-commands.c * app/gui/gradients-commands.c * app/gui/palettes-commands.c * app/gui/patterns-commands.c: set the "Delete" menu item insensitive for internal objects. * app/gui/gui.c: need to call render_setup() earlier because of you-dont-want-to-know-why. Will change it back once the previews have their own render buffers. * app/tools/gimpblendtool.c: Replaced the "Type" menu by a preview showing the active gradient. Clicking the preview pops up the gradient selection. Renamed the "Gradient" menu to "Shape". Removed "blend_mode" from the BlendOptions struct because we always use "custom" mode now.
2002-06-12 21:48:47 +08:00
if (data->internal)
{
data->dirty = FALSE;
return TRUE;
}
g_return_val_if_fail (data->filename != NULL, FALSE);
if (GIMP_DATA_GET_CLASS (data)->save)
success = GIMP_DATA_GET_CLASS (data)->save (data, error);
if (success)
data->dirty = FALSE;
return success;
}
void
gimp_data_dirty (GimpData *data)
{
g_return_if_fail (GIMP_IS_DATA (data));
g_signal_emit (data, data_signals[DIRTY], 0);
}
static void
gimp_data_real_dirty (GimpData *data)
{
data->dirty = TRUE;
took gimpcontextpreview.[ch] out of the build but still left the sources 2001-02-12 Michael Natterer <mitch@gimp.org> * app/Makefile.am: took gimpcontextpreview.[ch] out of the build but still left the sources there as reference. * app/app_procs.c: initialize the render stuff before creating the toolbox (needed for the previews). * app/devices.c * app/indicator_area.c: use GimpPreviews instead of GimpContextPreviews. * app/context_manager.[ch]: create the global data lists here because they now must exist before any context is created. * app/brushes.[ch] * app/gradients.[ch] * app/palettes.[ch] * app/patterns.[ch]: removed them here. * app/gimpcontainer.[ch]: added a "freeze_count" and emit the "freeze" and "thaw" signals accordingly. * app/gimpcontext.[ch]: greatly simplified the way how the contexts connect to the data lists (simply keep them connected all the time). Also removed all those ugly explicit update functions because "thaw" callbacks do this job now. * app/gimpdata.c: a GimpData object now becomes dirty on "name_changed"; "dirty" now triggers "invalidate_preview" because the context does not dispatch these signals any more soon. * app/brush_select.c * app/convert.c * app/gimpdnd.c * app/gradient_editor.c * app/gradient_select.c * app/pattern_select.c * app/gradient_editor.c * app/gradient_select.c * app/gradients.[ch] * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/convert_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/convert.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: changed accordingly.
2001-02-12 11:27:28 +08:00
gimp_viewable_invalidate_preview (GIMP_VIEWABLE (data));
}
gboolean
gimp_data_delete_from_disk (GimpData *data,
GError **error)
{
g_return_val_if_fail (GIMP_IS_DATA (data), FALSE);
g_return_val_if_fail (data->filename != NULL, FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
added a boolean "internal" which indicates that the data object is an 2002-06-12 Michael Natterer <mitch@gimp.org> * app/core/gimpdata.[ch]: added a boolean "internal" which indicates that the data object is an automatically created internal object. Changed the code to refuse saving to deleting internal objects. * app/core/Makefile.am * app/core/gimp-gradients.[ch]: new files implementing internal gradients (FG -> BG in RGB and HSV and FG -> transparent). * app/core/gimp.c: call gimp_gradients_init(). * app/core/gimpdatafactory.c (gimp_data_factory_data_free): don't free internal objects so they stay there on "Refresh". * app/core/gimpdatalist.c: sort internal objects to the beginning of the list. * app/widgets/gimpdataeditor.c: refuse to change the name of internal objects. * app/widgets/gimpdatafactoryview.c: set the "Delete" button insensitive for internal objects. * app/widgets/gimpgradienteditor.c: refuse to edit internal gradients, just display them so color picking works. * app/gui/brushes-commands.c * app/gui/gradients-commands.c * app/gui/palettes-commands.c * app/gui/patterns-commands.c: set the "Delete" menu item insensitive for internal objects. * app/gui/gui.c: need to call render_setup() earlier because of you-dont-want-to-know-why. Will change it back once the previews have their own render buffers. * app/tools/gimpblendtool.c: Replaced the "Type" menu by a preview showing the active gradient. Clicking the preview pops up the gradient selection. Renamed the "Gradient" menu to "Shape". Removed "blend_mode" from the BlendOptions struct because we always use "custom" mode now.
2002-06-12 21:48:47 +08:00
if (data->internal)
return TRUE;
if (unlink (data->filename) == -1)
{
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_DELETE,
_("Could not delete '%s': %s"),
data->filename, g_strerror (errno));
return FALSE;
}
return TRUE;
}
gimprc.in user_install user_install.bat app/gimprc.[ch] removed the 2001-02-13 Michael Natterer <mitch@gimp.org> * gimprc.in * user_install * user_install.bat * app/gimprc.[ch] * app/preferences_dialog.c: removed the "brush_vbr_path" variable, because all data types will be editable and saveable soon. * app/Makefile.am * app/apptypes.h * app/gimpdatafactory.[ch]: new object which holds a data list and knows how to create, edit, duplicate etc. the items in it. Will completely replace the brushes.[ch], patterns.[ch], ... files soon. * po/POTFILES.in * app/gimpdatacontainerview.[ch]: removed. * app/gimpdatafactoryview.[ch]: added. A view on the GimpDataFactory with a GUI for creating, editing, deleting etc. items (mostly unimplemented). * app/context_manager.[ch]: replaced the global data lists by global data factories. * app/brush_select.c * app/brushes.[ch] * app/commands.c * app/convert.c * app/devices.c * app/gimpbrush.[ch] * app/gimpbrushgenerated.c * app/gimpcontext.c * app/gimpdata.[ch] * app/gimpdatalist.[ch] * app/gimpdnd.c * app/gimpgradient.[ch] * app/gimppalette.[ch] * app/gimppattern.[ch] * app/gradient_editor.c * app/gradient_select.c * app/gradients.[ch] * app/indicator_area.c * app/palette.c * app/palette_import.c * app/palette_select.c * app/palettes.[ch] * app/pattern_select.c * app/patterns.[ch] * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/convert_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/convert.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: changed accordingly.
2001-02-14 03:53:07 +08:00
const gchar *
gimp_data_get_extension (GimpData *data)
{
g_return_val_if_fail (GIMP_IS_DATA (data), NULL);
if (GIMP_DATA_GET_CLASS (data)->get_extension)
return GIMP_DATA_GET_CLASS (data)->get_extension (data);
gimprc.in user_install user_install.bat app/gimprc.[ch] removed the 2001-02-13 Michael Natterer <mitch@gimp.org> * gimprc.in * user_install * user_install.bat * app/gimprc.[ch] * app/preferences_dialog.c: removed the "brush_vbr_path" variable, because all data types will be editable and saveable soon. * app/Makefile.am * app/apptypes.h * app/gimpdatafactory.[ch]: new object which holds a data list and knows how to create, edit, duplicate etc. the items in it. Will completely replace the brushes.[ch], patterns.[ch], ... files soon. * po/POTFILES.in * app/gimpdatacontainerview.[ch]: removed. * app/gimpdatafactoryview.[ch]: added. A view on the GimpDataFactory with a GUI for creating, editing, deleting etc. items (mostly unimplemented). * app/context_manager.[ch]: replaced the global data lists by global data factories. * app/brush_select.c * app/brushes.[ch] * app/commands.c * app/convert.c * app/devices.c * app/gimpbrush.[ch] * app/gimpbrushgenerated.c * app/gimpcontext.c * app/gimpdata.[ch] * app/gimpdatalist.[ch] * app/gimpdnd.c * app/gimpgradient.[ch] * app/gimppalette.[ch] * app/gimppattern.[ch] * app/gradient_editor.c * app/gradient_select.c * app/gradients.[ch] * app/indicator_area.c * app/palette.c * app/palette_import.c * app/palette_select.c * app/palettes.[ch] * app/pattern_select.c * app/patterns.[ch] * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/convert_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/convert.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: changed accordingly.
2001-02-14 03:53:07 +08:00
return NULL;
gimprc.in user_install user_install.bat app/gimprc.[ch] removed the 2001-02-13 Michael Natterer <mitch@gimp.org> * gimprc.in * user_install * user_install.bat * app/gimprc.[ch] * app/preferences_dialog.c: removed the "brush_vbr_path" variable, because all data types will be editable and saveable soon. * app/Makefile.am * app/apptypes.h * app/gimpdatafactory.[ch]: new object which holds a data list and knows how to create, edit, duplicate etc. the items in it. Will completely replace the brushes.[ch], patterns.[ch], ... files soon. * po/POTFILES.in * app/gimpdatacontainerview.[ch]: removed. * app/gimpdatafactoryview.[ch]: added. A view on the GimpDataFactory with a GUI for creating, editing, deleting etc. items (mostly unimplemented). * app/context_manager.[ch]: replaced the global data lists by global data factories. * app/brush_select.c * app/brushes.[ch] * app/commands.c * app/convert.c * app/devices.c * app/gimpbrush.[ch] * app/gimpbrushgenerated.c * app/gimpcontext.c * app/gimpdata.[ch] * app/gimpdatalist.[ch] * app/gimpdnd.c * app/gimpgradient.[ch] * app/gimppalette.[ch] * app/gimppattern.[ch] * app/gradient_editor.c * app/gradient_select.c * app/gradients.[ch] * app/indicator_area.c * app/palette.c * app/palette_import.c * app/palette_select.c * app/palettes.[ch] * app/pattern_select.c * app/patterns.[ch] * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/convert_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/convert.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: changed accordingly.
2001-02-14 03:53:07 +08:00
}
void
gimp_data_set_filename (GimpData *data,
const gchar *filename)
{
g_return_if_fail (GIMP_IS_DATA (data));
added a boolean "internal" which indicates that the data object is an 2002-06-12 Michael Natterer <mitch@gimp.org> * app/core/gimpdata.[ch]: added a boolean "internal" which indicates that the data object is an automatically created internal object. Changed the code to refuse saving to deleting internal objects. * app/core/Makefile.am * app/core/gimp-gradients.[ch]: new files implementing internal gradients (FG -> BG in RGB and HSV and FG -> transparent). * app/core/gimp.c: call gimp_gradients_init(). * app/core/gimpdatafactory.c (gimp_data_factory_data_free): don't free internal objects so they stay there on "Refresh". * app/core/gimpdatalist.c: sort internal objects to the beginning of the list. * app/widgets/gimpdataeditor.c: refuse to change the name of internal objects. * app/widgets/gimpdatafactoryview.c: set the "Delete" button insensitive for internal objects. * app/widgets/gimpgradienteditor.c: refuse to edit internal gradients, just display them so color picking works. * app/gui/brushes-commands.c * app/gui/gradients-commands.c * app/gui/palettes-commands.c * app/gui/patterns-commands.c: set the "Delete" menu item insensitive for internal objects. * app/gui/gui.c: need to call render_setup() earlier because of you-dont-want-to-know-why. Will change it back once the previews have their own render buffers. * app/tools/gimpblendtool.c: Replaced the "Type" menu by a preview showing the active gradient. Clicking the preview pops up the gradient selection. Renamed the "Gradient" menu to "Shape". Removed "blend_mode" from the BlendOptions struct because we always use "custom" mode now.
2002-06-12 21:48:47 +08:00
if (data->internal)
return;
g_free (data->filename);
data->filename = NULL;
data->writeable = TRUE;
if (filename)
{
data->filename = g_strdup (filename);
if (access (filename, W_OK) && /* check if the file is writeable */
access (filename, F_OK) == 0) /* or doesn't exist */
{
gchar *dirname = g_path_get_dirname (filename);
if (access (dirname, W_OK | X_OK)) /* check if we can write to the dir */
data->writeable = FALSE;
g_free (dirname);
}
}
}
void
gimp_data_create_filename (GimpData *data,
const gchar *basename,
const gchar *data_path)
{
GList *path;
gchar *dir;
gchar *filename;
gchar *fullpath;
gchar *safe_name;
gint i;
gint unum = 1;
g_return_if_fail (GIMP_IS_DATA (data));
g_return_if_fail (basename != NULL);
g_return_if_fail (data_path != NULL);
path = gimp_path_parse (data_path, 16, TRUE, NULL);
dir = gimp_path_get_user_writable_dir (path);
gimp_path_free (path);
if (! dir)
return;
safe_name = g_strdup (basename);
if (safe_name[0] == '.')
safe_name[0] = '_';
for (i = 0; safe_name[i]; i++)
if (safe_name[i] == G_DIR_SEPARATOR || g_ascii_isspace (safe_name[i]))
safe_name[i] = '_';
filename = g_strdup_printf ("%s%s",
safe_name,
gimprc.in user_install user_install.bat app/gimprc.[ch] removed the 2001-02-13 Michael Natterer <mitch@gimp.org> * gimprc.in * user_install * user_install.bat * app/gimprc.[ch] * app/preferences_dialog.c: removed the "brush_vbr_path" variable, because all data types will be editable and saveable soon. * app/Makefile.am * app/apptypes.h * app/gimpdatafactory.[ch]: new object which holds a data list and knows how to create, edit, duplicate etc. the items in it. Will completely replace the brushes.[ch], patterns.[ch], ... files soon. * po/POTFILES.in * app/gimpdatacontainerview.[ch]: removed. * app/gimpdatafactoryview.[ch]: added. A view on the GimpDataFactory with a GUI for creating, editing, deleting etc. items (mostly unimplemented). * app/context_manager.[ch]: replaced the global data lists by global data factories. * app/brush_select.c * app/brushes.[ch] * app/commands.c * app/convert.c * app/devices.c * app/gimpbrush.[ch] * app/gimpbrushgenerated.c * app/gimpcontext.c * app/gimpdata.[ch] * app/gimpdatalist.[ch] * app/gimpdnd.c * app/gimpgradient.[ch] * app/gimppalette.[ch] * app/gimppattern.[ch] * app/gradient_editor.c * app/gradient_select.c * app/gradients.[ch] * app/indicator_area.c * app/palette.c * app/palette_import.c * app/palette_select.c * app/palettes.[ch] * app/pattern_select.c * app/patterns.[ch] * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/convert_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/convert.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: changed accordingly.
2001-02-14 03:53:07 +08:00
gimp_data_get_extension (data));
fullpath = g_build_filename (dir, filename, NULL);
g_free (filename);
while (g_file_test (fullpath, G_FILE_TEST_EXISTS))
{
g_free (fullpath);
filename = g_strdup_printf ("%s-%d%s",
safe_name,
unum++,
gimprc.in user_install user_install.bat app/gimprc.[ch] removed the 2001-02-13 Michael Natterer <mitch@gimp.org> * gimprc.in * user_install * user_install.bat * app/gimprc.[ch] * app/preferences_dialog.c: removed the "brush_vbr_path" variable, because all data types will be editable and saveable soon. * app/Makefile.am * app/apptypes.h * app/gimpdatafactory.[ch]: new object which holds a data list and knows how to create, edit, duplicate etc. the items in it. Will completely replace the brushes.[ch], patterns.[ch], ... files soon. * po/POTFILES.in * app/gimpdatacontainerview.[ch]: removed. * app/gimpdatafactoryview.[ch]: added. A view on the GimpDataFactory with a GUI for creating, editing, deleting etc. items (mostly unimplemented). * app/context_manager.[ch]: replaced the global data lists by global data factories. * app/brush_select.c * app/brushes.[ch] * app/commands.c * app/convert.c * app/devices.c * app/gimpbrush.[ch] * app/gimpbrushgenerated.c * app/gimpcontext.c * app/gimpdata.[ch] * app/gimpdatalist.[ch] * app/gimpdnd.c * app/gimpgradient.[ch] * app/gimppalette.[ch] * app/gimppattern.[ch] * app/gradient_editor.c * app/gradient_select.c * app/gradients.[ch] * app/indicator_area.c * app/palette.c * app/palette_import.c * app/palette_select.c * app/palettes.[ch] * app/pattern_select.c * app/patterns.[ch] * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/convert_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/convert.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: changed accordingly.
2001-02-14 03:53:07 +08:00
gimp_data_get_extension (data));
fullpath = g_build_filename (dir, filename, NULL);
g_free (filename);
}
g_free (dir);
g_free (safe_name);
gimp_data_set_filename (data, fullpath);
g_free (fullpath);
}
added a note about apptype.h and about not including headers in headers. 2001-02-14 Michael Natterer <mitch@gimp.org> * HACKING: added a note about apptype.h and about not including headers in headers. * app/apptypes.h: added GimpTool and BitmapCursor. * app/cursorutil.h * app/devices.h * app/draw_core.h * app/tools/color_picker.h * app/tools/tool.h * app/tools/tool_options.h * app/gimpcontext.h: removed includes of "tools/tool.h" * app/gimprc.[ch]: indentadion cleanup, added "module_db_load_inhibit". * app/module_db.c: removed the above variable here. * app/gimpdata.[ch]: added a vitrual "duplicate" method. * app/gimpbrush.[ch] * app/gimpbrushgenerated.[ch] * app/gimpbrushpipe.[ch] * app/gimpgradient.[ch] * app/gimppalette.[ch] * app/gimppattern.[ch]: all "load", "new" and "get_standard" functions return a GimpData pointer now. * app/gimpdatafactory.[ch]: made some stuff const. * app/gimpdatafactoryview.c: activate the "duplicate" button and set the initial button sensitivity correctly. * app/brush_select.c * app/gradient_select.c * app/pattern_select.c: use the new GimpDataFactoryView. * libgimp/Makefile.am: grouped the file to sort out what _may_ go to subdirs or separate libs. * libgimp/gimpenv.[ch]: added many "const". * app/app_procs.c * app/brush_edit.c * app/gimpcontext.c * app/gimpdnd.c * app/gradient_editor.c * app/palette.c * app/palette_import.c * app/user_install.c: many related changes. * libgimpmath/gimpmathtypes.h * libgimpmath/gimpvector.[ch]: minor cleanups. * plug-ins/script-fu/script-fu.c: gimp_data_directory() is const now.
2001-02-14 22:57:14 +08:00
GimpData *
gimp_data_duplicate (GimpData *data,
gboolean stingy_memory_use)
added a note about apptype.h and about not including headers in headers. 2001-02-14 Michael Natterer <mitch@gimp.org> * HACKING: added a note about apptype.h and about not including headers in headers. * app/apptypes.h: added GimpTool and BitmapCursor. * app/cursorutil.h * app/devices.h * app/draw_core.h * app/tools/color_picker.h * app/tools/tool.h * app/tools/tool_options.h * app/gimpcontext.h: removed includes of "tools/tool.h" * app/gimprc.[ch]: indentadion cleanup, added "module_db_load_inhibit". * app/module_db.c: removed the above variable here. * app/gimpdata.[ch]: added a vitrual "duplicate" method. * app/gimpbrush.[ch] * app/gimpbrushgenerated.[ch] * app/gimpbrushpipe.[ch] * app/gimpgradient.[ch] * app/gimppalette.[ch] * app/gimppattern.[ch]: all "load", "new" and "get_standard" functions return a GimpData pointer now. * app/gimpdatafactory.[ch]: made some stuff const. * app/gimpdatafactoryview.c: activate the "duplicate" button and set the initial button sensitivity correctly. * app/brush_select.c * app/gradient_select.c * app/pattern_select.c: use the new GimpDataFactoryView. * libgimp/Makefile.am: grouped the file to sort out what _may_ go to subdirs or separate libs. * libgimp/gimpenv.[ch]: added many "const". * app/app_procs.c * app/brush_edit.c * app/gimpcontext.c * app/gimpdnd.c * app/gradient_editor.c * app/palette.c * app/palette_import.c * app/user_install.c: many related changes. * libgimpmath/gimpmathtypes.h * libgimpmath/gimpvector.[ch]: minor cleanups. * plug-ins/script-fu/script-fu.c: gimp_data_directory() is const now.
2001-02-14 22:57:14 +08:00
{
g_return_val_if_fail (GIMP_IS_DATA (data), NULL);
if (GIMP_DATA_GET_CLASS (data)->duplicate)
return GIMP_DATA_GET_CLASS (data)->duplicate (data, stingy_memory_use);
added a note about apptype.h and about not including headers in headers. 2001-02-14 Michael Natterer <mitch@gimp.org> * HACKING: added a note about apptype.h and about not including headers in headers. * app/apptypes.h: added GimpTool and BitmapCursor. * app/cursorutil.h * app/devices.h * app/draw_core.h * app/tools/color_picker.h * app/tools/tool.h * app/tools/tool_options.h * app/gimpcontext.h: removed includes of "tools/tool.h" * app/gimprc.[ch]: indentadion cleanup, added "module_db_load_inhibit". * app/module_db.c: removed the above variable here. * app/gimpdata.[ch]: added a vitrual "duplicate" method. * app/gimpbrush.[ch] * app/gimpbrushgenerated.[ch] * app/gimpbrushpipe.[ch] * app/gimpgradient.[ch] * app/gimppalette.[ch] * app/gimppattern.[ch]: all "load", "new" and "get_standard" functions return a GimpData pointer now. * app/gimpdatafactory.[ch]: made some stuff const. * app/gimpdatafactoryview.c: activate the "duplicate" button and set the initial button sensitivity correctly. * app/brush_select.c * app/gradient_select.c * app/pattern_select.c: use the new GimpDataFactoryView. * libgimp/Makefile.am: grouped the file to sort out what _may_ go to subdirs or separate libs. * libgimp/gimpenv.[ch]: added many "const". * app/app_procs.c * app/brush_edit.c * app/gimpcontext.c * app/gimpdnd.c * app/gradient_editor.c * app/palette.c * app/palette_import.c * app/user_install.c: many related changes. * libgimpmath/gimpmathtypes.h * libgimpmath/gimpvector.[ch]: minor cleanups. * plug-ins/script-fu/script-fu.c: gimp_data_directory() is const now.
2001-02-14 22:57:14 +08:00
return NULL;
}
GQuark
gimp_data_error_quark (void)
{
static GQuark q = 0;
if (q == 0)
q = g_quark_from_static_string ("gimp-data-error-quark");
added a note about apptype.h and about not including headers in headers. 2001-02-14 Michael Natterer <mitch@gimp.org> * HACKING: added a note about apptype.h and about not including headers in headers. * app/apptypes.h: added GimpTool and BitmapCursor. * app/cursorutil.h * app/devices.h * app/draw_core.h * app/tools/color_picker.h * app/tools/tool.h * app/tools/tool_options.h * app/gimpcontext.h: removed includes of "tools/tool.h" * app/gimprc.[ch]: indentadion cleanup, added "module_db_load_inhibit". * app/module_db.c: removed the above variable here. * app/gimpdata.[ch]: added a vitrual "duplicate" method. * app/gimpbrush.[ch] * app/gimpbrushgenerated.[ch] * app/gimpbrushpipe.[ch] * app/gimpgradient.[ch] * app/gimppalette.[ch] * app/gimppattern.[ch]: all "load", "new" and "get_standard" functions return a GimpData pointer now. * app/gimpdatafactory.[ch]: made some stuff const. * app/gimpdatafactoryview.c: activate the "duplicate" button and set the initial button sensitivity correctly. * app/brush_select.c * app/gradient_select.c * app/pattern_select.c: use the new GimpDataFactoryView. * libgimp/Makefile.am: grouped the file to sort out what _may_ go to subdirs or separate libs. * libgimp/gimpenv.[ch]: added many "const". * app/app_procs.c * app/brush_edit.c * app/gimpcontext.c * app/gimpdnd.c * app/gradient_editor.c * app/palette.c * app/palette_import.c * app/user_install.c: many related changes. * libgimpmath/gimpmathtypes.h * libgimpmath/gimpvector.[ch]: minor cleanups. * plug-ins/script-fu/script-fu.c: gimp_data_directory() is const now.
2001-02-14 22:57:14 +08:00
return q;
added a note about apptype.h and about not including headers in headers. 2001-02-14 Michael Natterer <mitch@gimp.org> * HACKING: added a note about apptype.h and about not including headers in headers. * app/apptypes.h: added GimpTool and BitmapCursor. * app/cursorutil.h * app/devices.h * app/draw_core.h * app/tools/color_picker.h * app/tools/tool.h * app/tools/tool_options.h * app/gimpcontext.h: removed includes of "tools/tool.h" * app/gimprc.[ch]: indentadion cleanup, added "module_db_load_inhibit". * app/module_db.c: removed the above variable here. * app/gimpdata.[ch]: added a vitrual "duplicate" method. * app/gimpbrush.[ch] * app/gimpbrushgenerated.[ch] * app/gimpbrushpipe.[ch] * app/gimpgradient.[ch] * app/gimppalette.[ch] * app/gimppattern.[ch]: all "load", "new" and "get_standard" functions return a GimpData pointer now. * app/gimpdatafactory.[ch]: made some stuff const. * app/gimpdatafactoryview.c: activate the "duplicate" button and set the initial button sensitivity correctly. * app/brush_select.c * app/gradient_select.c * app/pattern_select.c: use the new GimpDataFactoryView. * libgimp/Makefile.am: grouped the file to sort out what _may_ go to subdirs or separate libs. * libgimp/gimpenv.[ch]: added many "const". * app/app_procs.c * app/brush_edit.c * app/gimpcontext.c * app/gimpdnd.c * app/gradient_editor.c * app/palette.c * app/palette_import.c * app/user_install.c: many related changes. * libgimpmath/gimpmathtypes.h * libgimpmath/gimpvector.[ch]: minor cleanups. * plug-ins/script-fu/script-fu.c: gimp_data_directory() is const now.
2001-02-14 22:57:14 +08:00
}