Unlike the last two commits, we don't port GimpConfig to
G_DEFINE_INTERFACE(), since we need to provide a base initializer
for it. However, this commit aligns it with the rest of our
intefaces, by renaming gimp_config_interface_get_type() to
gimp_config_get_type(), and by performing class initialization for
the interface in a separate function than base initialization.
Keep gimp_config_interface_get_type() around as a deprecated
function, to maintain ABI compatibility. It will be removed in a
separate commit in master, so that this commit can be easily
cherry-picked to gimp-2-10.
This only helps to maintain proper includes in app/ and shouldn't
affect plug-ins at all, because these are supposed to only include the
main headers from libgimp/ since the beginning of time.
The gimpfootypes.h files do not have these guards, so we can continue
to maintain app/'s include policy that is very likely to error out if
wrong things are included.
2009-01-17 Michael Natterer <mitch@gimp.org>
* all files with a GPL header and all COPYING files:
Change licence to GPLv3 (and to LGPLv3 for libgimp).
Cleaned up some copyright headers and regenerated the parsers in
the ImageMap plugin.
svn path=/trunk/; revision=27913
2008-02-01 Michael Natterer <mitch@gimp.org>
* libgimpconfig/gimpconfig-iface.[ch]: add new method
GimpConfigInterface::copy() which by default calls
gimp_config_sync() but is overridable for objects which are not
entirely property-defined or otherwise evil.
Freeze/thaw property notifications in deserialize() and reset().
* libgimpconfig/gimpconfig-utils.c (gimp_config_sync): freeze/thaw
property notifications on the dest object.
svn path=/trunk/; revision=24767
2005-01-25 Michael Natterer <mitch@gimp.org>
* libgimpconfig/gimpconfigtypes.h: new file holding the opaque
typedefs for libgimpconfig. Includes "libgimpbase/gimpbasetypes.h"
* libgimpconfig/Makefile.am: added the new file. Removed stuff
that is not needed.
* libgimpconfig/gimpconfigwriter.h
* libgimpconfig/gimpconfig-iface.h: removed typedefs here.
* libgimpconfig/gimpconfig-deserialize.c
* libgimpconfig/gimpconfig-iface.c
* libgimpconfig/gimpconfig-serialize.c
* libgimpconfig/gimpconfig-utils.c
* libgimpconfig/gimpconfig.h
* libgimpconfig/gimpconfigwriter.c: include it before including
any other libgimpconfig stuff.
* app/config/config-types.h: #include "libgimpbase/gimpbasetypes.h"
* app/config/gimpconfig-utils.h: changed include guards to
__APP_GIMP_CONFIG_UTILS_H__.
* app/dialogs/tips-parser.c: include <glib-object.h> instead of
just <glib.h>.
* app/tools/gimphistogramoptions.c
* app/tools/gimptextoptions.c: include "config/gimpconfig-utils.h"
* app/widgets/gimpdialogfactory.h
* app/widgets/gimpsessioninfo.h: removed inclusion of
"libgimpbase/gimpbasetypes.h".
2005-01-24 Sven Neumann <sven@gimp.org>
* app/config/gimpconfig-deserialize.[ch]
* app/config/gimpconfig-serialize.[ch]
* app/config/gimpconfig.[ch]: factored out some rather obscure
GimpConfig features that were added solely for gimprc.
* app/config/Makefile.am
* app/config/gimprc-deserialize.[ch]
* app/config/gimprc-serialize.[ch]
* app/config/gimprc-unknown.[ch]: moved gimprc-specific code to
these new files.
* app/config/gimprc.c
* app/config/test-config.c: changed accordingly.
2004-07-19 Michael Natterer <mitch@gimp.org>
* app/config/config-types.h: removed GimpConfigInterface typedef,
added comments to typedefs which don't belong here.
* app/config/gimpconfig.h: added GimpConfigInterface typedef.
* app/core/core-types.h
* app/display/display-types.h: added commented out typedefs for
types that live in config-types.h for obscure reasons.
* app/core/core-types.h: reordered stuff to match the order in the
API docs (makes keeping stuff in sync much easier).
2003-10-14 Sven Neumann <sven@gimp.org>
* app/config/gimpconfig-utils.[ch]: removed
gimp_config_copy_properties() and added the more intelligent
gimp_config_sync() instead.
* app/config/Makefile.am
* app/config/config-types.h
* app/config/gimpcoreconfig.[ch]
* app/config/gimprc-blurbs.h: replaced default image properties
with a single GimpTemplate object property. Changed the
set_property function to not replace aggregate objects but call
gimp_config_sync() instead.
* app/tools/gimptextoptions.c (gimp_text_options_set_property):
same change here.
* app/config/gimpconfig.[ch]: changed return value of
gimp_config_duplicate() to gpointer to avoid some casts that only
made the code harder to read.
* app/widgets/gimptemplateeditor.[ch]: don't keep an internal copy
here but edit the GimpTemplate passed when the editor was
constructed.
* app/gui/preferences-dialog.c: use a GimpTemplateEditor to allow
editing of the default image paramaters.
* app/config/gimprc.c
* app/core/core-types.h
* app/core/gimp.c
* app/core/gimpimage-duplicate.c
* app/core/gimpimage-grid.c
* app/core/gimpimage-new.c
* app/core/gimpimage-undo-push.c
* app/core/gimpimage.c
* app/core/gimptemplate.[ch]
* app/gui/file-new-dialog.c
* app/gui/grid-dialog.c
* app/gui/info-window.c
* app/gui/resize-dialog.c
* app/gui/templates-commands.[ch]
* app/gui/tool-options-commands.c
* app/text/gimptextlayer.c
* app/text/gimptextlayer.c
* app/tools/gimptexttool.c
* app/widgets/gimptemplateview.c
* app/xcf/xcf-load.c: changed accordingly.
2003-07-24 Sven Neumann <sven@gimp.org>
* app/config/Makefile.am
* app/config/gimpconfig-error.[ch]: moved code from gimpconfig.[ch]
to these new files.
* app/config/gimpconfig-utils.[ch]: moved gimp_config_string_indent()
here from gimpconfig.[ch].
* app/config/gimpconfig.[ch]
* app/config/gimpconfigwriter.c
* app/config/gimprc.c
* app/config/gimpscanner.c
* app/core/gimp-documents.c
* app/core/gimp-parasites.c
* app/core/gimp-templates.c
* app/widgets/gimpdevices.c: changed accordingly.
2003-06-24 Sven Neumann <sven@gimp.org>
* app/config/gimpconfig.[ch]: added new function
gimp_config_serialize_to_fd() for the sake of completeness and
since it's a nice way to generate debugging output.
* app/text/Makefile.am
* app/text/gimptext-xlfd.[ch]: new files with routines to handle X
Logical Font Descriptions in an attempt to improve backwards
compatibility.
* app/text/gimptext-parasite.[ch]
* app/xcf/xcf-load.c: promote layers with GDynText parasite to
GimpTextLayer. Work in progress, we need to improve font matching.
2003-06-23 Sven Neumann <sven@gimp.org>
* app/config/gimpconfig.[ch]
* app/config/gimpconfigwriter.[ch]
* app/config/gimpscanner.[ch]: added support for serializing to
and deserializing from strings. Had to do some smaller changes to
the GimpConfig API.
* app/config/test-config.c: added a simple test for the new
functions.
* app/config/gimpconfig-dump.c
* app/config/gimprc.c
* app/core/gimp-documents.c
* app/core/gimp-parasites.c
* app/core/gimp-templates.c
* app/core/gimpunits.c
* app/gui/session.c
* app/plug-in/plug-in-rc.c
* app/tools/tool_options.c
* app/widgets/gimpdevices.c: follow GimpConfig API changes.
* libgimpbase/gimpparasite.[ch]: declared the return value of
gimp_parasite_data() as gconstpointer.
2003-02-01 Sven Neumann <sven@gimp.org>
* app/config/gimpconfig.[ch]
* app/config/gimpconfig-utils.[ch]: added a reset method to
GimpConfigInterface. Added the new function gimp_config_reset()
* app/text/gimptext.c: added a GimpConfigInterface to GimpText.
* app/widgets/Makefile.am
* app/widgets/gimptexteditor.[ch]: new files that hold the simple
text editor dialog used by the text tool.
* app/widgets/gimppropwidgets.[ch]: added new widget constructor
gimp_prop_scale_entry_new().
* app/tools/gimptexttool.[ch]: replaced old-style ToolOptions with
a GimpText object. Connect text layers to the text tool by means
of their GimpText objects. Still work in progress ...
2002-06-17 Sven Neumann <sven@gimp.org>
Obviously I disagree with Tim about the symbol_name parameter in
g_scanner_unexp_token(). As it seems it's not supposed to be used
to tell the user about the expected symbol (see bug #81850):
* gimpconfig.[ch] (gimp_config_deserialize_return): removed the
symbol_name parameter.
* app/config/gimpconfig-deserialize.c
* app/core/gimpcontainer.c
* app/core/gimpdocumentlist.c
* app/core/gimpparasitelist.c: changed the callers accordingly.
* app/core/gimpunits.c (gimp_unitrc_load): pass NULL as symbol_name
to g_scanner_unexp_token().
2002-05-27 Michael Natterer <mitch@gimp.org>
* app/config/gimpconfig.[ch]: added "gint nest_level" to the
deserialization functions, so nested calls to deserialize()
don't error on the trailing ')'. Made the scanner config parse
one-character identifiers and allow G_CSET_A_2_Z for all
identifiers.
Added gimp_config_deserialize_return() because returning the
correct return value from a deserialize() function is not
trivial any more with nested calls.
* app/config/gimpconfig-deserialize.[ch]
* app/config/gimprc.c
* app/core/gimpdocumentlist.c
* app/core/gimpparasitelist.c: use the new return value utility
function and made the main parsing loops simpler.
* app/core/gimpunits.c: made the main parsing loops consistent
with the stuff that uses GimpConfig.
* app/config/gimpconfig-deserialize.c
* app/config/gimpconfig-serialize.c: call the
(de)serialize_property() functions only if the property's class
implements the method itself (does *not* inherit it from one of
it's parents).
* app/core/gimpcontainer.c: implemented deserialization of
containers. For each child entry encountered in the input, check
if it's already contained in the container and create it if not.
If a "gimp" pointer is passed as user_data pass it as construct
property to g_object_new() when creating the object.
* app/core/gimpcontext.c: changed deserialization of brush,
pattern etc. to honor "no_data".
* app/widgets/gimpdeviceinfo.c: added a "gimp" construct_only
property which overrides GimpContext's "gimp" property. Moved all
initialisation code from gimp_device_info_new() to
gimp_device_info_set_property(PROP_GIMP) so it is properly
performed if the object is created by GimpContainer's
deserialize() implementation.
* app/widgets/gimpdevices.c: made gimp_devices_restore_test() work.
2002-05-24 Michael Natterer <mitch@gimp.org>
* app/config/gimpconfig.[ch]
* app/config/gimpconfig-serialize.[ch]: added "gint indent_level"
to all serialization functions. Added gimp_config_string_indent()
which indents a GString.
* app/config/gimprc.c
* app/core/gimpdocumentlist.c
* app/core/gimpparasitelist.c: changed accordingly.
* app/core/gimpcontext.c: don't crash when serializing NULL object
properties.
* app/config/gimpscanner.[ch]: added gimp_scanner_parse_identifier().
* app/core/gimpcontainer.c: implement GimpConfigInterface.
Container serialization works, deserialization is not implemented yet.
* app/widgets/gimpdevices.[ch]: made
GimpDeviceManager->device_info_list a GimpList, not GList, added
testing functions for (de)serializing it.
* app/gui/menus.c
* app/gui/test-commands.[ch]: call the new test functions from
the <Toolbox>/File/Debug menu.
2002-05-22 Michael Natterer <mitch@gimp.org>
* app/config/gimpconfig.[ch]: added virtual interface methods
serialize_property() and deserialize_property() which can be used
to implement (de)serialization of special properties or to
override the default implementation.
* app/config/gimpconfig-deserialize.c
* app/config/gimpconfig-serialize.c: for each property, check if
the class which added it implements the virtual functions and call
them before trying the default implementations.
* app/config/gimpconfig-params.h: added new macro
GIMP_CONFIG_INSTALL_PROP_OBJECT().
* app/core/gimpcontext.c: declare the "tool", "brush", "pattern",
"gradient" and "palette" properties as serializable and added
implementations of (de)serialize_property().
2002-05-15 Sven Neumann <sven@gimp.org>
* app/config/gimpconfig.[ch]: added user_data pointer to serialize
and deserialize methods.
* app/config/gimprc.[ch]: implement gimp_rc_save() using
gimp_config_serialize() so it can take advantage of the file
handling magic implemented there.
* app/config/test-config.c
* app/core/gimp-documents.c
* app/core/gimp-parasites.c
* app/core/gimpdocumentlist.c
* app/core/gimpparasitelist.c: changed accordingly.
2002-05-15 Sven Neumann <sven@gimp.org>
* app/config/gimpconfig.[ch]: added a return value to indicate
success of GimpConfigInterface::serialize. Added a GimpConfigError
value for write errors and check the return value of all write()
calls. Allow to specify file header and footer when calling
gimp_config_serialize().
* app/config/gimpconfig-serialize.[ch]
* app/config/gimprc.c: changed accordingly.
* app/core/gimp-documents.[ch]: new files with functions to handle
gimp->documents.
* app/core/gimpdocuments.[ch]: removed ...
* app/core/gimpdocumentlist.[ch]: ... and added under this name.
Implements a generic document list.
* app/core/gimp-parasites.[ch]: new files with functions to handle
gimp->parasites.
* app/core/gimpparasite.[ch]: removed.
* app/core/gimpparasitelist.[ch]: nothing more than a generic
parasite list.
* app/undo.c
* app/core/Makefile.am
* app/core/core-types.h
* app/core/gimp.c
* app/core/gimpdrawable.c
* app/core/gimpimage-merge.c
* app/core/gimpimage.c
* app/core/gimpitem.c
* app/file/file-open.c
* app/file/file-save.c
* app/gui/file-open-dialog.c
* app/pdb/parasite_cmds.c
* tools/pdbgen/pdb/parasite.pdb: changed accordingly.
2002-05-06 Sven Neumann <sven@gimp.org>
* app/config/gimpconfig-serialize.c
* app/config/gimpconfig-utils.[ch]
* app/config/gimpconfig.[ch]
* app/config/gimprc.[ch]: added a GimpRc implementation of
gimp_config_duplicate() that also copies unknown tokens. Added new
function gimp_rc_query().
* app/config/test-config.c: added tests for gimp_rc_query().
* app/config/Makefile.am: need to link test app against libappwidgets.
2002-05-04 Sven Neumann <sven@gimp.org>
* app/arch/i386/mmx/detect_mmx.S
* app/arch/i386/mmx/paint_funcs_mmx.S: applied a patch from
iccii@hotmail.com that promises to fix build on mingw (bug #80681).
* app/config/gimpconfig-serialize.c
* app/config/gimpconfig-utils.[ch]: moved value compare function to
gimpconfig-utils.
* app/config/gimpconfig.[ch]: added duplicate and compare functions
to GimpConfigInterface so derived interfaces can override them.
* app/tools/gimptexttool.c: fixed tool cursor.
2001-12-28 Sven Neumann <sven@gimp.org>
* app/config/gimpconfig-serialize.[ch]
* app/config/gimpconfig.h
* app/config/gimprc.[ch]: added new function to only write changes to
the personal gimprc.
* app/config/test-config.c: test the new functionality.
* tools/pdbgen/pdb/procedural_db.pdb: the change I did yesterday
wasn't overly clever; here's a better one.
* app/pdb/procedural_db_cmds.c: regenerated.
2001-12-18 Sven Neumann <sven@gimp.org>
* docs/gimptool-1.3.1.in
* gimptool-1.3.in: applied patch from Roger Leigh <rl117@york.ac.uk>
that makes gimptool respect the DESTDIR environment variable.
* app/config/Makefile.am: declare test-config as TESTS so it is build
and executed when running 'make check'.
* app/config/gimpbaseconfig.c: don't register a GimpConfig interface.
* app/config/gimpcoreconfig.c
* app/config/gimpdisplayconfig.c
* app/config/gimpguiconfig.c: no need to include "gimpconfig.h".
* app/config/gimpconfig.[ch]: removed store_unknown parameter from
deserialize method. The default implementation will bail out on
unknown tokens.
* app/config/gimprc.c: override deserialize method so it stores
unknown tokens.
2001-12-17 Sven Neumann <sven@gimp.org>
* gimpconfig.[ch]: don't serialize unknown tokens; leave that to
the gimprc implementation. Create file with correct permissions.
* test-config.c: changed accordingly.
* gimpguiconfig.[ch]: added more properties.
2001-12-16 Sven Neumann <sven@gimp.org>
* app/core/gimpcoreconfig.[ch]: changed thumbnail_mode to boolean
write_thumbnails. thumbnail_mode used to have only two defined
values; if we need more later, we can change that easily when the
new GimpConfig system is in place.
* app/gimprc.c
* app/file/file-save.c
* app/gui/file-open-dialog.c
* app/gui/preferences-dialog.c: changed accordingly.
* app/config/gimpcoreconfig.[ch]: finished GimpCoreConfig class.
2001-12-09 Sven Neumann <sven@gimp.org>
* autogen.sh: check for pkg.m4.
* configure.in: removed logic to extract GLIB CFLAGS and LDFLAGS
from the GTK CFLAGS and LDFLAGS. Use AM_PATH_GLIB_2_0() instead.
This change will break things on awfully misconfigured systems.
Simplified the checks and moved version numbers to the top to ease
maintainance. Check if gtk-doc is suffiently new.
* app/main.c: removed the GimpConfig test code.
* app/config/Makefile.am
* app/config/test-config.c: added a (yet very small) standalone test
suite for GimpConfig.
* app/config/gimpconfig.[ch]
* app/config/gimpconfig-deserialize.[ch]: allow to specify if
unknown tokens should be stored or should cause a parser error.
Changed code to store unknown tokens to use a list since a hash
table seems to be overkill here.
2001-12-09 Sven Neumann <sven@gimp.org>
* app/config/gimpconfig-params.[ch]
* app/config/gimpconfig-types.[ch]: added new param_spec
GIMP_PARAM_PATH with value_type GIMP_PATH_TYPE.
* app/config/gimpconfig.[ch]: added code to store and lookup unknown
tokens.
* app/config/gimpconfig-deserialize.c: improved logic, prepared for
special handling of GIMP_PATH_TYPE; still work in progress...
* app/config/gimpbaseconfig.c: register temp-path and swap-path as
GIMP_PARAM_PATH properties.
2001-12-07 Sven Neumann <sven@gimp.org>
* app/core/gimpmarshal.[ch]: removed from CVS, they are generated.
* app/base/Makefile.am
* app/base/base-enums.h: new file defining enums that are to be
registered. Used to build app/base/base-enums.c.
* app/base/base-types.h: include base-enums.h.
* tools/pdbgen/Makefile.am
* tools/pdbgen/enumcode.pl
* tools/pdbgen/enums.pl: parse the new base-enums.h file and modified
the perl voodoo so it doesn't prefix enums with GIMP_ that are already
properly namespaced.
* app/core/core-types.h: don't need to chop GIMP from enum.
* app/pdb/color_cmds.c
* app/pdb/tools_cmds.c
* libgimp/gimpenums.h
* plug-ins/script-fu/script-fu-constants.c: regenerated.
* app/config/gimpconfig-deserialize.[ch]
* app/config/gimpconfig-serialize.[ch]
* app/config/gimpconfig.[ch]: made GimpConfig an interface including
a reasonable default implementation that works on object properties.
* app/config/Makefile.am
* app/config/gimpbaseconfig.[ch]: new GimpBaseConfig using the
GimpConfig interface. Yet only used for testing from app/main.c.
* app/main.c: test the new GimpBaseConfig object.
* app/gimprc.c
* app/base/base-config.h
* app/base/*.c
* app/core/gimpdatafiles.c
* app/core/gimpdrawable-transform.c
* app/core/gimppreviewcache.c
* app/gui/preferences-dialog.c
* app/paint-funcs/paint-funcs.c
* app/xcf/xcf-seek.c: need to include glib-object.h since base-config
contains registered enums now. Follow name change of InterpolationType
to GimpInterpolationType.
2001-11-27 Sven Neumann <sven@gimp.org>
* configure.in
* app/Makefile.am
* app/config/gimpconfig.[ch]
* app/config/gimpconfig-serialize.[ch]
* app/config/gimpconfig-deserialize.[ch]: added new base class
GimpConfig that knows how to serialize and deserialize it's properties
in sexp format. Contains two example properties that will go into
derived classes once this is really used.
* app/main.c: deserialize and serialize the test GimpConfig object to
~/.gimp-1.3/foorc (only for debugging).
* app/widgets/widgets-types.h
* app/core/core-types.h: moved GimpPreviewSize enum to core-types.
* app/core/core-types.h: don't include gdk-pixbuf.h.
* app/core/gimptoolinfo.h
* app/core/gimpimagefile.c: include gdk-pixbuf.h.
* app/core/gimpimage.[ch]: made construct_flag a gboolean.
* app/core/gimpdrawable-invert.c
* app/core/gimpunit.c
* tools/pdbgen/pdb/plug_in.pdb
* app/pdb/plug_in_cmds.c: removed unused variables.
* app/display/Makefile.am: removed .PHONY and files cruft
* app/Makefile.am
* libgimp/Makefile.am
* libgimpbase/Makefile.am
* libgimpcolor/Makefile.am
* libgimpmath/Makefile.am
* libgimpwidgets/Makefile.am
* plug-ins/Makefile.am: removed commented out makefile.mingw rules.
If we ever need them again, they can easily be resurrected from CVS.