Commit Graph

70 Commits

Author SHA1 Message Date
Michael Natterer cc47b2a600 libgimpwidgets/color: move the cairo color utility functions to libgimpcolor
Add CAIRO_CFLAGS to a lot of Makefiles to make this possible, and
because they pull in cairo via the libgimp headers.
2011-04-28 15:50:39 +02:00
Michael Natterer 6b30250353 libgimpconfig: don't crash if g_value_get_boxed() returns NULL 2010-09-25 16:02:02 +02:00
Michael Natterer 945641232e libgimpconfig: fix a lot of gtk-doc warnings 2010-06-29 22:19:11 +02:00
Michael Natterer 1af54c7874 libgimpconfig: move docs from template files to inline comments 2010-06-29 20:59:07 +02:00
Michael Natterer d9b5207aa2 Change licence to GPLv3 (and to LGPLv3 for libgimp).
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
2009-01-17 22:28:01 +00:00
Michael Natterer c65b09921a libgimpconfig/gimpconfig-serialize.[ch] add
2008-05-18  Michael Natterer  <mitch@gimp.org>

	* libgimpconfig/gimpconfig-serialize.[ch]
	* libgimpconfig/gimpconfig.def: add
	gimp_config_serialize_property_by_name().

	* app/gegl/gimpcolorbalanceconfig.c
	* app/gegl/gimpcurvesconfig.c
	* app/gegl/gimphuesaturationconfig.c
	* app/gegl/gimplevelsconfig.c: implement serialize() and
	deserialize() and make sure the properties which change when the
	channel/range property changes are handled correctly. Not too
	ugly but it's still a hack...


svn path=/trunk/; revision=25703
2008-05-18 19:13:28 +00:00
Michael Natterer ff95dd50d6 fix API docs.
2008-01-28  Michael Natterer  <mitch@gimp.org>

	* libgimpconfig/gimpconfig-serialize.c
	(gimp_config_serialize_property): fix API docs.


svn path=/trunk/; revision=24736
2008-01-28 18:55:21 +00:00
Sven Neumann 0d2c3957c3 libgimpconfig/gimpconfig-serialize.c libgimpconfig/gimpconfig-error.c
2007-03-02  Sven Neumann  <sven@gimp.org>

	* libgimpconfig/gimpconfig-serialize.c
	* libgimpconfig/gimpconfig-error.c
	* libgimpconfig/gimpconfig-path.c
	* libgimpconfig/gimpconfig-deserialize.c
	* libgimpconfig/gimpconfig-utils.c
	* libgimpconfig/gimpconfig-iface.c: corrected copyright notice
	(bug #413731).


svn path=/trunk/; revision=22038
2007-03-02 08:38:13 +00:00
Sven Neumann 44594ae2e0 libgimpconfig/gimpconfig-deserialize.c (gimp_config_deserialize_property)
2006-08-08  Sven Neumann  <sven@gimp.org>

	* libgimpconfig/gimpconfig-deserialize.c
	(gimp_config_deserialize_property)
	* libgimpconfig/gimpconfig-serialize.c
	(gimp_config_serialize_property): check if the properties
	owner_type is an object type before calling g_type_class_peek().
2006-08-08 12:29:48 +00:00
Sven Neumann 0b9a9e4e88 hide the GimpParamSpecRGB struct again. Added getter for the has_alpha
2006-04-27  Sven Neumann  <sven@gimp.org>

	* libgimpcolor/gimprgb.[ch]: hide the GimpParamSpecRGB struct
	again.  Added getter for the has_alpha field.

	* libgimpcolor/gimpcolor.def: updated.

	* app/config/gimpconfig-dump.c
	* libgimpconfig/gimpconfig-serialize.c: use
	gimp_param_spec_rgb_has_alpha() instead of accessing the
	GimpParamSpecRGB struct directly.
2006-04-27 16:01:16 +00:00
Sven Neumann e779cf0b0f added "has_alpha" to GimpParamSpecRGB. Made the GimpParamSpecRGB struct
2006-04-27  Sven Neumann  <sven@gimp.org>

	* libgimpcolor/gimprgb.[ch]: added "has_alpha" to GimpParamSpecRGB.
	Made the GimpParamSpecRGB struct public. When validating a color,
	only look at the alpha channel if has_alpha is set.

	* libgimpconfig/gimpconfig-params.h: added "has_alpha" to
	GIMP_CONFIG_INSTALL_PROP_RGB macro definition.

	* libgimpconfig/gimpconfig-serialize.c: serialize color values as
	"(rgb r g b)" if the param-spec indicates that the alpha channel
	is meaningless.

	* app/config/gimpconfig-dump.c: take "has_alpha" into account when
	documenting color properties.

	* app/core/gimpcontext.c
	* app/core/gimpgrid.c
	* app/display/gimpdisplayoptions.c
	* app/text/gimptext.c
	* app/widgets/gimpaction.c
	* app/widgets/gimpcolorbar.c
	* libgimpwidgets/gimpcolorarea.c
	* libgimpwidgets/gimpcolorbutton.c: specify whether color properties
	have an alpha channel.

	* tools/pdbgen/app.pl: handle "has_alpha" for color paramaters.

	* tools/pdbgen/pdb/channel.pdb
	* tools/pdbgen/pdb/context.pdb
	* tools/pdbgen/pdb/grid.pdb
	* tools/pdbgen/pdb/image.pdb: set the "has_alpha" flag where
	appropriate.

	* app/pdb/gimp-pdb-compat.c (gimp_pdb_compat_param_spec): set
	"has_alpha" to TRUE for GIMP_PDB_COLOR.

	* app/pdb/channel_cmds.c
	* app/pdb/context_cmds.c
	* app/pdb/gradient_cmds.c
	* app/pdb/grid_cmds.c
	* app/pdb/image_cmds.c
	* app/pdb/palette_cmds.c
	* app/pdb/palettes_cmds.c
	* app/pdb/selection_tools_cmds.c: regenerated.

	* app/config/gimpdisplayconfig.c (gimp_display_config_class_init):
	removed unused code.
2006-04-27 15:19:59 +00:00
Sven Neumann f2df31a50e converted tabs to spaces.
2006-04-12  Sven Neumann  <sven@gimp.org>

	* libgimp*/gimp*.[ch]: converted tabs to spaces.
2006-04-12 10:53:28 +00:00
Sven Neumann 692669f4d8 renamed GIMP_PARAM_ #defines to GIMP_CONFIG_PARAM_.
2005-02-05  Sven Neumann  <sven@gimp.org>

	* libgimpconfig/gimpconfig-params.h: renamed GIMP_PARAM_ #defines
	to GIMP_CONFIG_PARAM_.

	* app/config/gimpbaseconfig.c
	* app/config/gimpconfig-dump.c
	* app/config/gimpcoreconfig.c
	* app/config/gimpdisplayconfig.c
	* app/config/gimpguiconfig.c
	* app/config/gimprc-deserialize.c
	* app/config/gimprc-serialize.c
	* app/config/gimprc.c
	* app/core/gimp.c
	* app/core/gimpstrokedesc.c
	* app/dialogs/preferences-dialog.c
	* app/text/gimptext.c
	* app/tools/gimptextoptions.c
	* libgimpconfig/gimpconfig-deserialize.c
	* libgimpconfig/gimpconfig-iface.c
	* libgimpconfig/gimpconfig-serialize.c
	* libgimpconfig/gimpconfig-utils.c: changed accordingly.

	* libgimpmodule/gimpmoduletypes.h: deprecate the
	GIMP_MODULE_PARAM_SERIALIZE #define, GIMP_CONFIG_PARAM_SERIALIZE
	should be used instead.

	* modules/controller_linux_input.c
	* modules/controller_midi.c: changed accordingly.
2005-02-05 14:52:58 +00:00
Sven Neumann b4a68e9569 libgimpconfig/gimpconfig-deserialize.c libgimpconfig/gimpconfig-error.c
2005-01-29  Sven Neumann  <sven@gimp.org>

	* libgimpconfig/gimpconfig-deserialize.c
	* libgimpconfig/gimpconfig-error.c
	* libgimpconfig/gimpconfig-iface.c
	* libgimpconfig/gimpconfig-path.c
	* libgimpconfig/gimpconfig-serialize.c
	* libgimpconfig/gimpconfig-utils.c
	* libgimpconfig/gimpconfigwriter.c
	* libgimpconfig/gimpscanner.c: use libgimp header,
	added "Since: GIMP 2.4" to the gtk-doc comments.
2005-01-29 12:54:48 +00:00
Michael Natterer 3592a58d96 new file holding the opaque typedefs for libgimpconfig. Includes
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-25 20:30:20 +00:00
William Skaggs 1cee9b7298 continuing commit after broken pipe 2005-01-25 19:11:26 +00:00
Sven Neumann 36c9dadf0c app/config/gimpconfig-deserialize.[ch]
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.
2005-01-24 22:05:02 +00:00
William Skaggs c9926ee18e Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/config/gimpconfig-types.c
	* app/config/gimpconfig-types.h: removed...

	* libgimpbase/gimpbasetypes.c
	* libgimpbase/gimpbasetypes.h: and contents merged
	into here.

	* app/config/gimpconfig-params.c: removed...

	* libgimpbase/gimpbaseparams.c
	* libgimpcolor/gimprgb.c
	* libgimpmath/gimpmatrix.c: and contents merged
	into here.

	* app/config/gimpconfig-params.h: part removed...

	* libgimpbase/gimpbaseparams.h
	* libgimpcolor/gimprgb.h
	* libgimpmath/gimpmatrix.h: and merged into here

	* libgimpbase/Makefile.am
	* libgimpbase/gimpbase.h
	* libgimpcolor/gimpbilinear.c
	* libgimpcolor/gimpcmyk.c
	* libgimpmath/gimpvector.c
	* app/config/Makefile.am
	* app/config/gimpconfig-deserialize.c
	* app/config/gimpconfig-dump.c
	* app/config/gimpconfig-serialize.c
	* app/config/gimpcoreconfig.c
	* app/config/gimpguiconfig.c
	* app/config/gimppluginconfig.c
	* app/core/gimp-utils.c
	* app/core/gimpcontext.c
	* app/tools/tools-utils.c
	* app/widgets/gimpaction.c
	* plug-ins/gimpressionist/utils.c: dependencies changed
	accordingly.

	First step in config migration out of core.  Need to fix
	devel-docs to reflect these changes.
2005-01-22 00:42:40 +00:00
Michael Natterer caabe7f334 removed GIMP_TYPE_COLOR.
2004-07-26  Michael Natterer  <mitch@gimp.org>

	* app/config/gimpconfig-types.h: removed GIMP_TYPE_COLOR.

	* app/config/gimpconfig-params.[ch]: renamed GimpParamSpecColor
	to GimpParamSpecRGB.

	* app/config/gimpconfig-deserialize.c
	* app/config/gimpconfig-dump.c
	* app/config/gimpconfig-serialize.c
	* app/config/gimpscanner.c
	* app/core/gimp-utils.c
	* app/core/gimpcontext.c
	* app/core/gimpgrid.c
	* app/display/gimpdisplayoptions.c
	* app/text/gimptext.c
	* app/tools/gimpcolortool.c
	* app/widgets/gimpaction.c
	* app/widgets/gimpcolorbar.c
	* app/widgets/gimppropwidgets.c: changed accordingly.
2004-07-26 19:56:47 +00:00
Sven Neumann a4ac4de072 app/config/gimpconfig-deserialize.c removed redundant casts.
2004-07-08  Sven Neumann  <sven@gimp.org>

	* app/config/gimpconfig-deserialize.c
	* app/config/gimpconfig-serialize.c: removed redundant casts.

	* app/widgets/gimpsessioninfo.[ch]: added convenience functions to
	get and set aux-info based on object properties.

	* app/widgets/gimphistogrameditor.c: use the new functions to save
	a histogram's channel and scale in the sessionrc.
2004-07-08 00:09:41 +00:00
Michael Natterer 3a7f7d54e7 added #define GIMP_CONTROLLER_PARAM_SERIALIZE. Made all properties
2004-06-16  Michael Natterer  <mitch@gimp.org>

	* libgimpwidgets/gimpcontroller.[ch]: added #define
	GIMP_CONTROLLER_PARAM_SERIALIZE. Made all properties serializable.

	* modules/controller_linux_input.c: made "device-name"
	serializable.

	* app/config/gimpconfig-params.h: added macro
	GIMP_CONFIG_INSTALL_PROP_POINTER() which needs to be handled
	by custom (de)serialize_property() implementations.

	* app/config/gimpconfig-deserialize.c
	* app/config/gimpconfig-serialize.c: made object (de)serialization
	work for object properties which are *not* GIMP_PARAM_AGGREGATE.
	Write/parse the exact type of the object to create to enable this.

	* app/core/gimpmarshal.list: new marshaller for GimpControllerInfo.

	* app/widgets/gimpcontrollerinfo.[ch]: implement GimpConfigInterface
	and add "controller" and "mapping" properties. Add "event-mapped"
	signal which carries the action_name.

	* app/widgets/gimpcontrollers.c: removed all deserialization code
	and simply (de)serialize the controller container. Install a
	container handler for "event-mapped" and do the action_name ->
	action mapping in the callback.

	* etc/controllerrc: regenerated with new syntax. Delete your old one!
2004-06-16 18:14:44 +00:00
Michael Natterer fc38ede399 app/config/gimpconfig-serialize.c (gimp_config_serialize_property)
2004-02-19  Michael Natterer  <mitch@gimp.org>

	* app/config/gimpconfig-serialize.c
	(gimp_config_serialize_property)
	* app/config/gimpconfig-deserialize.c
	(gimp_config_deserialize_property): Reverted my last "cleanup" and
	put the "obsolete" check for the exact owner class of the property
	back. It appears that if a subclass does *not* implement
	GimpConfigInterface *itself*, it still inherits
	serialize_property()/deserialize_property().
2004-02-19 12:30:18 +00:00
Michael Natterer 4d24bdbf81 Some code review:
2004-02-18  Michael Natterer  <mitch@gimp.org>

	Some code review:

	* app/config/gimpconfig-deserialize.c
	* app/config/gimpconfig-serialize.c: removed obsolete code which
	made sure serialize_property()/deserialize_property() are only
	called for properties of the correct class. We do it the right way
	for quite a while now and clear the inherited function pointers in
	gimp_config_iface_base_init().

	* app/config/gimprc.c (gimp_rc_dispose): don't forget to chain up.

	* app/base/gimplut.c
	* app/base/lut-funcs.c
	* app/config/gimpconfig-deserialize.c
	* app/config/gimpconfig-serialize.c
	* app/config/gimpconfig-types.c
	* app/config/gimprc.c
	* app/core/gimp-modules.c
	* app/core/gimpbrush.c
	* app/core/gimpcontainer.c
	* app/core/gimpdocumentlist.c
	* app/core/gimpitem.c
	* app/gui/about-dialog.c
	* app/gui/color-notebook.c
	* app/gui/gui.c
	* app/gui/tips-dialog.c
	* app/paint/gimppaintcore.c
	* app/paint-funcs/paint-funcs.c
	* app/widgets/gimpcolorpanel.c
	* app/widgets/gimpcontainergridview.c
	* app/widgets/gimpcontainermenuimpl.c
	* app/widgets/gimpselectioneditor.c: removed I/O includes from
	files which don't use lowlevel APIs any more. Also removes
	a whole bunch of G_OS_WIN32 special casing. Removed trailing
	whitespace. Misc tiny cleanups.
2004-02-18 13:43:50 +00:00
Sven Neumann d533104de7 handle negative float and double values similar to how this is done for
2003-10-26  Sven Neumann  <sven@gimp.org>

	* app/config/gimpconfig-deserialize.c
	(gimp_config_deserialize_fundamental): handle negative float and
	double values similar to how this is done for integers and the
	like.

	* app/config/gimpconfig-params.h: added two new param flags and
	documented all flags in the header file (for now).

	* app/config/gimpconfig-serialize.h: handle the new param flags
	GIMP_PARAM_DEFAULTS and GIMP_PARAM_IGNORE.

	* app/text/text-enums.[ch]
	* app/text/gimptext.[ch]: added some properties that we will need
	sooner or later. Mark the new properties and a lot of the existing
	ones as GIMP_PARAM_DEFAULTS so that their values are not
	serialized unless changed from the default value.

	* app/text/gimptextlayout.c
	* app/tools/gimptextoptions.c: made all length properties in
	GimpText depend on a single unit.
2003-10-26 00:03:16 +00:00
Sven Neumann 4ea392ef3b removed function gimp_config_serialize_comment()...
2003-10-12  Sven Neumann  <sven@gimp.org>

	* app/config/gimpconfig-serialize.[ch]: removed function
	gimp_config_serialize_comment()...

	* app/config/gimpconfig-utils.[ch]: removed function
	gimp_config_string_indent()...

	* app/config/gimpconfigwriter.[ch]: ... and implement both here.
	Added a comment mode to GimpConfigWriter.

	* app/config/gimpconfig-dump.c: handle GimpConfig properties.

	* doc/gimprc-1.3.5.in
	* etc/gimprc: regenerated by gimpconfig-dump.
2003-10-12 01:49:51 +00:00
Sven Neumann a88e11afb3 app/widgets/gimpdocked.[ch] renamed GimpDockedIface to
2003-10-11  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpdocked.[ch]
	* app/widgets/widgets-types.h: renamed GimpDockedIface to
	GimpDockedInterface.

	* app/display/gimpnavigationview.c
	* app/widgets/gimpcoloreditor.c
	* app/widgets/gimpcontainereditor.c
	* app/widgets/gimpcontainerview.c
	* app/widgets/gimpeditor.c
	* app/widgets/gimpimageeditor.c
	* app/widgets/gimpitemtreeview.c
	* app/widgets/gimptooloptionseditor.c: changed accordingly.

	* app/config/config-types.h
	* app/config/gimpconfig.[ch]
	* app/config/gimpconfig-deserialize.[ch]
	* app/config/gimpconfig-serialize.[ch]
	* app/config/gimpconfig-utils.[ch]: added a GimpConfig typedef and
	changed the GimpConfig API to take GimpConfig instead of GObject
	pointers.

	* app/config/gimpconfig-dump.c
	* app/config/gimprc.c
	* app/config/test-config.c
	* app/core/gimp-documents.c
	* app/core/gimp-parasites.c
	* app/core/gimp-templates.c
	* app/core/gimp.[ch]
	* app/core/gimpcontainer.c
	* app/core/gimpcontext.c
	* app/core/gimpdocumentlist.c
	* app/core/gimpgrid.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-new.c
	* app/core/gimpimage.c
	* app/core/gimpparasitelist.c
	* app/core/gimptemplate.c
	* app/core/gimptooloptions.c
	* app/core/gimpviewable.c
	* app/gui/grid-dialog.c
	* app/gui/preferences-dialog.c
	* app/gui/stroke-dialog.c
	* app/gui/templates-commands.c
	* app/gui/tool-options-commands.c
	* app/paint/gimppaintcore.c
	* app/pdb/gimprc_cmds.c
	* app/text/gimptext-parasite.c
	* app/text/gimptext.c
	* app/text/gimptextlayer.c
	* app/tools/gimp-tools.c
	* app/tools/gimptexttool.c
	* app/widgets/gimpdevices.c
	* app/widgets/gimptemplateeditor.c
	* app/widgets/gimptemplateview.c
	* tools/pdbgen/pdb/gimprc.pdb: changed accordingly.
2003-10-11 14:30:18 +00:00
Sven Neumann 555038debf app/composite/gimp-composite-generic.c app/composite/gimp-composite-mmx.c
2003-09-16  Sven Neumann  <sven@gimp.org>

	* app/composite/gimp-composite-generic.c
	* app/composite/gimp-composite-mmx.c
	* app/composite/gimp-composite-sse.c
	* app/composite/gimp-composite-sse2.c
	* app/config/gimpconfig-deserialize.c
	* app/config/gimpconfig-path.c
	* app/config/gimpconfig-serialize.c
	* app/core/cpercep.c
	* app/core/gimpunit.c
	* app/gui/palette-import-dialog.c
	* app/gui/plug-in-menus.c
	* app/paint-funcs/paint-funcs-generic.h
	* app/paint-funcs/paint-funcs.c
	* app/pdb/procedural_db.c
	* app/text/gimptextlayout-render.c
	* app/tools/gimpfuzzyselecttool.c
	* app/widgets/gimpcursor.c: some trivial code cleanups: avoid
	casts that discard const qualifiers and avoid useless comparisons
	on unsigned variables. Also reordered qualifiers in function
	declarations (static comes before const).
2003-09-16 13:12:50 +00:00
Sven Neumann 2dbb388024 app/config/gimpconfig-deserialize.c app/config/gimpconfig-serialize.c
2003-08-08  Sven Neumann  <sven@gimp.org>

	* app/config/gimpconfig-deserialize.c
	* app/config/gimpconfig-serialize.c
	* app/config/gimpconfig.c
	* app/config/gimprc.c
	* app/core/gimpitem.[ch]
	* app/display/gimpprogress.[ch]
	* app/widgets/gimpdialogfactory.c
	* app/widgets/gimpenummenu.c
	* app/widgets/gimpfontselection.c
	* app/widgets/gimpwidgets-utils.c: documentation fixes.
2003-08-08 19:30:23 +00:00
Sven Neumann 6f83a52571 include <libgimpmath/gimpmathtypes.h>.
2003-07-07  Sven Neumann  <sven@gimp.org>

	* libgimpbase/gimpbasetypes.h: include <libgimpmath/gimpmathtypes.h>.

	* libgimpmath/gimpmathtypes.h
	* libgimpmath/gimpmatrix.[ch]: added GimpMatrix2 struct definition
	and new function gimp_matrix2_identity().

	* app/config/gimpconfig-deserialize.c
	* app/config/gimpconfig-params.[ch]
	* app/config/gimpconfig-serialize.c
	* app/config/gimpconfig-types.[ch]
	* app/config/gimpconfig.c
	* app/config/gimpscanner.[ch]: added a boxed type around GimpMatrix2.

	* app/text/gimptext.[ch]: added new property "transformation".
2003-07-07 16:22:45 +00:00
Michael Natterer f82440ff48 made object properties G_PARAM_READWRITE by default. Added flag
2003-04-12  Michael Natterer  <mitch@gimp.org>

	* app/config/gimpconfig-params.h: made object properties
	G_PARAM_READWRITE by default. Added flag GIMP_PARAM_AGGREGATE
	which indicates that an object property is not a reference but a
	real part of its owner.

	* app/config/gimpconfig-deserialize.c: g_object_set_property()
	object properties only if they are not GIMP_PARAM_AGGREGATE.

	* app/config/gimpconfig-utils.c (gimp_config_copy_properties,
	gimp_config_reset_properties): copy and reset GIMP_PARAM_AGGREGATE
	object properties correctly.

	* app/config/gimpconfig-serialize.c: don't call
	gimp_config_writer_open/close() for properties which are handled
	by a GimpConfigIface::serialize_property() implementation.

	* app/core/gimpcontext.c: removed exlicit G_PARAM_WRITABLE from
	object properties since that's the default now. Call
	gimp_config_writer_open/close() when serializing properties.

	* app/core/gimpviewable.c (gimp_viewable_get_property): use
	gimp_viewable_get_stock_id().
	(gimp_viewable_set_stock_id): set stock_id to NULL if the new
	stock_id is the same as viewable_class->default_stock_id.
	Added serialize_property() which skips stock_id serialization
	if it is NULL.

	* app/tools/gimptextoptions.c: made the "text" property
	GIMP_PARAM_AGGREGATE. Added gimp_text_options_set_property()
	(which does nothing).

	* app/widgets/gimptemplateeditor.[ch]: added an optional
	GimpViewableButton to change the template's icon.

	* app/gui/file-new-dialog.c: create it with the icon button so it
	gets some testing.
2003-04-12 19:06:25 +00:00
Sven Neumann b6dbe729a4 added the new function gimp_config_string_append_escaped(), see inline
2003-03-17  Sven Neumann  <sven@gimp.org>

	* app/config/gimpconfig-utils.[ch]: added the new function
	gimp_config_string_append_escaped(), see inline docs.

	* app/config/gimpconfig-serialize.c
	* app/config/gimpconfigwriter.c
	* app/core/gimpcontainer.c: use the new function instead of
	g_strescape().
2003-03-17 14:23:42 +00:00
Sven Neumann 6f3f9556c4 fixed creation of config file, added new function
2003-03-10  Sven Neumann  <sven@gimp.org>

	* app/config/gimpconfigwriter.[ch]: fixed creation of config file,
	added new function gimp_config_writer_string() and improved
	gimp_config_writer_linefeed().

	* app/config/gimpconfig-serialize.c
	* app/core/gimpcontext.c
	* app/core/gimpdocumentlist.c: use gimp_config_writer_string()
	instead of escaping the string manually.

	* app/core/gimpunits.c (gimp_unitrc_save): use a GimpConfigWriter.

	* app/plug-in/plug-in-rc.[ch] (plug_in_rc_write)
	* app/plug-in/plug-ins.c: use a GimpConfigWriter.
2003-03-10 15:48:16 +00:00
Sven Neumann d457b9eb9b app/config/Makefile.am new files featuring a simple config file writer.
2003-03-05  Sven Neumann  <sven@gimp.org>

	* app/config/Makefile.am
	* app/config/gimpconfigwriter.[ch]: new files featuring a simple
	config file writer.

	* app/config/gimpconfig-serialize.[ch]
	* app/config/gimpconfig.[ch]: changed the serialize routines to
	use a GimpConfigWriter instead of passing around a file descriptor
	and the indentation level.

	* app/config/config-types.h
	* app/config/gimpconfig-deserialize.c
	* app/config/gimpconfig-dump.c
	* app/config/gimpconfig-utils.c
	* app/config/gimprc.c
	* app/config/gimpscanner.c
	* app/config/test-config.c
	* app/core/gimp-documents.c
	* app/core/gimp-parasites.c
	* app/core/gimpcontainer.c
	* app/core/gimpcontext.c
	* app/core/gimpdocumentlist.c
	* app/core/gimpparasitelist.c
	* app/gui/test-commands.c
	* app/tools/tool_options.c
	* app/widgets/gimpdevices.c: changed accordingly.

	* libgimpwidgets/gimpwidgets.c: documentation updates.

	* app/core/gimpitem.c: removed a redundant type-check.
2003-03-05 20:21:50 +00:00
Sven Neumann f050987238 app/config/gimpconfig-deserialize.c transparently serialize and
2003-02-28  Sven Neumann  <sven@gimp.org>

	* app/config/gimpconfig-deserialize.c
	* app/config/gimpconfig-serialize.[ch]: transparently serialize
	and deserialize object properties that implement the
	GimpConfigInterface.

	* app/config/gimpconfig-utils.c (gimp_config_reset_properties):
	call reset recursively if properties are itself objects that
	implement the GimpConfigInterface.

	* app/config/gimpconfig-dump.c: adapt to API changes.

	* app/config/gimpconfig-params.h: made object properties installed
	using GIMP_CONFIG_INSTALL_PROP_OBJECT() be not writable by default.

	* app/core/gimpcontext.c (gimp_context_class_init): made objects
	properties explicitely writeable.

	* app/tools/gimptextoptions.c: made the GimpText object a property
	of GimpTextOptions and removed lots of special handling which is
	now transparently done by GimpConfigInterface.
2003-02-28 17:01:13 +00:00
Sven Neumann 25c715c1f4 renamed gimp_config_serialize_changed_properties() to
2003-02-28  Sven Neumann  <sven@gimp.org>

	* app/config/gimpconfig-serialize.[ch]: renamed
	gimp_config_serialize_changed_properties() to
	gimp_config_serialize_properties_diff() and added a new function
	gimp_config_serialize_changed_properties() that saves only
	properties that have been changed from their default values.

	* app/config/gimprc.c: follow the function name change.

	* app/core/gimpcontext.c: override GimpConfigInterface::serialize
	with gimp_config_serialize_changed_properties() so we store only
	tool_options that have been changed from their default values.
2003-02-28 13:58:19 +00:00
Sven Neumann 9519de07e1 simplified by using gimp_config_serialize_property() instead of doing it
2003-02-28  Sven Neumann  <sven@gimp.org>

	* app/config/gimpconfig-serialize.c
	(gimp_config_serialize_changed_properties): simplified by using
	gimp_config_serialize_property() instead of doing it all by hand.
2003-02-28 13:25:13 +00:00
Sven Neumann b3e5867378 don't insert an extra line-break after a serialized property.
2003-02-26  Sven Neumann  <sven@gimp.org>

	* app/config/gimpconfig-serialize.c (gimp_config_serialize_properties):
	don't insert an extra line-break after a serialized property.

	* app/config/gimpconfig-serialize.c
	* app/config/gimpconfig-dump.c
	* app/gui/tips-parser.c: use g_string_truncate (str, 0) instead of
	assigning an empty string.

	* app/tools/gimptextoptions.c: override the serialize and
	deserialize methods of the GimpConfig interface and save/restore
	the associated GimpText object instead of GimpTextOptions.

	* app/tools/tool_options.c (gimp_tool_options_build_filename):
	don't append ".default" if no extension is given.
2003-02-26 20:34:58 +00:00
Sven Neumann bb5d687557 app/text/gimptext.c app/tools/gimpbucketfilloptions.c
2003-02-08  Sven Neumann  <sven@gimp.org>

	* app/text/gimptext.c
	* app/tools/gimpbucketfilloptions.c
	* app/tools/gimpselectionoptions.c
	* app/tools/gimptextoptions.c: use N_() instead of _() with blurbs
	of object properties. GimpConfig wants the untranslated string as
	well.

	* app/widgets/gimpenummenu.c
	* app/widgets/gimppropwidgets.c: added gettext() calls.

	* app/config/gimpconfig-serialize.c: document the fact that
	gimp_config_serialize_comment() only handles ASCII comments.
2003-02-09 00:22:42 +00:00
Michael Natterer 7fe80e8dc8 the virtual serialize_property() returning FALSE doesn't mean the
2003-02-08  Michael Natterer  <mitch@gimp.org>

	* app/config/gimpconfig-serialize.c (gimp_config_serialize_property):
	the virtual serialize_property() returning FALSE doesn't mean the
	serialization failed but that the function didn't handle the
	property, so don't error but continue with the default
	implementation. Print newlines after properties only if
	indent_level == 0.

	* app/gui/tool-options-dialog.c: added tool options saving/loading
	as quickly hacked proof-of-concept.

	* app/paint/paint-enums.[ch]: added enum GimpInkBlobType.

	* app/tools/gimpinkoptions.[ch]: ported to object properties,
	cleanup.

	* app/tools/gimpinktool.c: changed accordingly.
2003-02-08 15:27:51 +00:00
Sven Neumann e0ea1dbcfb app/config/Makefile.am app/config/gimpconfig-dump.c more work on
2003-01-13  Sven Neumann  <sven@gimp.org>

	* app/config/Makefile.am
	* app/config/gimpconfig-dump.c
	* app/config/gimpconfig-serialize.c: more work on gimpconfig-dump.

	* configure.in
	* docs/Makefile.am
	* docs/gimprc-1.3.5.in: removed ...
	* docs/gimprc-1.3.5: ... and replaced with a new version generated
	using gimpconfig-dump (although it's not perfect yet).
2003-01-12 23:57:26 +00:00
Sven Neumann c297913ac7 fixed serialization of empty string properties that I broke yesterday.
2002-12-02  Sven Neumann  <sven@gimp.org>

	* app/config/gimpconfig-serialize.c: fixed serialization of empty
	string properties that I broke yesterday.
2002-12-02 15:14:13 +00:00
Sven Neumann 62be2fff30 small cleanup.
2002-12-01  Sven Neumann  <sven@gimp.org>

	* app/config/gimpconfig-blurbs.h: small cleanup.

	* app/config/gimpconfig-serialize.[ch]: export more functionality.

	* app/config/gimpconfig-dump.c: added some code to dump a
	commented version of the system-wide gimprc with default values.

2002-12-01  Sven Neumann  <neo@wintermute>

	* libgimp/Makefile.am (IGNORE_HFILES): ignore gimpmiscui.h.
2002-12-01 22:31:36 +00:00
Sven Neumann 5cb7cbf8fd oops 2002-11-28 15:33:15 +00:00
Sven Neumann b92d38ce68 app/config/Makefile.am removed ... ... and readded under this name.
2002-11-28  Sven Neumann  <sven@gimp.org>

	* app/config/Makefile.am
	* app/config/gimpconfig-params-blurbs.h: removed ...
	* app/config/gimpconfig-blurbs.h: ... and readded under this name.
	Defined all missing blurb definitions to NULL.

	* app/config/gimpconfig-params.h: added a blurb parameter to all
	GIMP_CONFIG_INSTALL_PROP_* macros.

	* app/config/gimpbaseconfig.c
	* app/config/gimpcoreconfig.c
	* app/config/gimpdisplayconfig.c
	* app/config/gimpguiconfig.c: register blurbs with the GimpRc
	properties.

	* app/config/gimpconfig-serialize.c: do proper line-breaking for
	comments.

	* app/core/gimpcontext.c
	* app/widgets/gimpdeviceinfo.c: register NULL blurbs here.
2002-11-28 15:19:19 +00:00
Sven Neumann 0a69e9c58c app/config/Makefile.am added the basic infrastructure for a utitily that
2002-11-28  Sven Neumann  <sven@gimp.org>

	* app/config/Makefile.am
	* app/config/gimpconfig-dump.c: added the basic infrastructure for
	a utitily that dumps the GimpRc object.

	* app/config/gimpconfig-serialize.c: dump object blurbs as comments.
2002-11-28 00:59:53 +00:00
Michael Natterer 1229d8c84c added gimp_config_diff() which returns the difference beween two
2002-11-25  Michael Natterer  <mitch@gimp.org>

	* app/config/gimpconfig-utils.[ch]: added gimp_config_diff()
	which returns the difference beween two GimpConfig objects
	as a GList of GParamSpecs.

	* app/config/gimpconfig-params.c (gimp_param_color_cmp): compare
	the colors as integers to get rid of rounding foobar.

	* app/config/gimpconfig-serialize.c: use gimp_config_diff().

	* app/display/gimpdisplayshell-handlers.c: only need to call
	gimp_display_shell_scale_setup() on resolution change if the
	display is not in dot-for-dot mode.

	* app/display/gimpdisplayshell.c: changed a separator in the
	padding color menu.

	* app/gui/dialogs.c: made the prefs dialog a singleton again.

	* app/gui/preferences-dialog.c: Should be fully functional again:
	Apply GIMP_PARAM_CONFIRM properties on "OK". Save gimprc on "OK".
	Parse a temporaty GimpRc on dialog creation to get the current
	GIMP_PARAM_RESTART values. Use gimp_config_diff() for all config
	comparisons.
2002-11-25 13:48:24 +00:00
Michael Natterer 4ce4adf87d removed gimp_config_values_equal().
2002-11-23  Michael Natterer  <mitch@gimp.org>

	* app/config/gimpconfig-utils.[ch]: removed
	gimp_config_values_equal().

	* app/config/gimpconfig-serialize.c
	* app/config/gimpconfig.c: use g_param_values_cmp() instead so
	our registered compare methods are used.

	* app/config/gimpdisplayconfig.[ch]: added "canvas_padding_mode"
	and "canvas_padding_color" properties.

	* app/display/display-enums.[ch]: added enum GimpDisplayPaddingMode
	which can be one of { theme, light check, dark check, custom }.

	* app/display/gimpdisplay.h
	* app/display/gimpdisplay-handlers.c: removed cached monitor
	resolution values...

	* app/display/gimpdisplayshell.[ch]: ...and added them here. Added
	padding state as in GimpDisplayConfig. Added utility function
	gimp_display_shell_set_padding() which hides all the details.
	Added the new padding modes to the padding color button's context
	menu.

	* app/display/gimpdisplayshell-callbacks.[ch]: don't fiddle
	with colors manually but use gimp_display_shell_set_padding()
	in realize() and in the color button callbacks.

	* app/display/gimpdisplayshell-handlers.c: connect to
	notify::monitor-[xy]resolution and
	notify::canvas-padding-[mode|color] and update accordingly.

	* app/widgets/gimppropwidgets.[ch]: added
	gimp_prop_color_button_new().

	* app/widgets/gimpdialogfactory.[ch]: added
	gimp_dialog_factories_session_clear() (unimplemented).

	* app/gui/preferences-dialog.c: added widgets for padding mode and
	color. Removed some callbacks by connecting the functions they
	called directly. Cleanup.
2002-11-23 22:22:21 +00:00
Michael Natterer dbc8aeb49c added "gint nest_level" to the deserialization functions, so nested calls
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-27 14:04:21 +00:00
Michael Natterer 708059e463 fixed assertion which did not check for indent_level >= 0 but > 0.
2002-05-24  Michael Natterer  <mitch@gimp.org>

	* app/config/gimpconfig.c (gimp_config_string_indent): fixed assertion
	which did not check for indent_level >= 0 but > 0.

	* app/config/gimpconfig-serialize.c (gimp_config_serialize_value):
	serialize floats with g_ascii_formatd() to be locale independed,
	added serialization of GValueArrays.

	* app/widgets/gimpdeviceinfo.c: added properties for "mode",
	"axes" and "keys". Their set_property() implementations are
	untested.
2002-05-24 13:07:12 +00:00
Michael Natterer b10ade1a35 app/config/gimpconfig.[ch] added "gint indent_level" to all serialization
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-24 02:53:20 +00:00