Commit Graph

85 Commits

Author SHA1 Message Date
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 5d402908f8 added new utility functions gimp_config_connect() and
2003-02-10  Sven Neumann  <sven@gimp.org>

	* app/config/gimpconfig-utils.[ch]: added new utility functions
	gimp_config_connect() and gimp_config_disconnect() and documented
	most functions.

	* app/tools/gimptexttool.c (gimp_text_tool_connect): use the new
	GimpConfig utility functions.
2003-02-10 14:13:55 +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 f6b3fb7eea allow G_CSET_DIGITS in identifiers so we can parse e.g. (foo-1 bar).
2003-02-09  Michael Natterer  <mitch@gimp.org>

	* app/config/gimpscanner.c: allow G_CSET_DIGITS in identifiers so
	we can parse e.g. (foo-1 bar).
2003-02-08 23:48:29 +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
Michael Natterer eeec3cedb8 Added object properties for almost all tool_options values and registered
2003-02-07  Michael Natterer  <mitch@gimp.org>

	Added object properties for almost all tool_options values
	and registered lots of enums with the type system:

	Part I (enum and type cleanup):

	* app/core/core-enums.[ch]
	* app/core/core-types.h: removed InternalOrientaionType and
	register GimpOrientationType. Register GimpChannelOps.
	Removed GimpToolOptionsGUIFunc.

	* app/xcf/xcf-private.h: added XcfOrientationType with the
	same values as the old InternalOrientationType

	* app/xcf/xcf-load.c
	* app/xcf/xcf-save.c: translate between GimpOrientationType and
	XcfOrientationType.

	* app/core/gimpdrawable-transform-utils.[ch]
	* app/core/gimpdrawable-transform.[ch]
	* app/core/gimpimage-crop.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-guides.c
	* app/core/gimpimage-resize.c
	* app/core/gimpimage-scale.c
	* app/core/gimpimage.h
	* app/display/gimpdisplayshell.c
	* tools/pdbgen/stddefs.pdb
	* tools/pdbgen/pdb/transform_tools.pdb: changed accordingly.

	* app/pdb/guides_cmds.c
	* app/pdb/transform_tools_cmds.c
	* libgimp/gimpenums.h
	* libgimpproxy/gimpproxytypes.h
	* plug-ins/script-fu/script-fu-constants.c
	* tools/pdbgen/enums.pl: regenerated.

	* libgimptool/gimptoolenums.[ch]: added GimpTransformGridType.

	* libgimptool/gimptooltypes.h: removed GimpToolOptionsResetFunc,
	added GimpToolOptionsGUIFunc.

	Part II (tool options changes):

	* app/config/gimpconfig-utils.c (gimp_config_reset_properties):
	don't reset object properties because they have NULL as default
	value.

	* app/widgets/gimppropwidgets.[ch]: added
	gimp_prop_[enum|boolean]_radio_frame_new(),
	gimp_prop_paint_mode_menu_new() and gimp_prop_scale_entry_new(),
	which are all needed by the new tool options GUI code.

	* app/tools/tool_options.[ch]: removed the "reset_func" since
	the virtual reset() method is used now.

	* app/paint/gimpairbrushoptions.[ch]
	* app/paint/gimpcloneoptions.[ch]
	* app/paint/gimpconvolveoptions.[ch]
	* app/paint/gimpdodgeburnoptions.[ch]
	* app/paint/gimperaseroptions.[ch]
	* app/paint/gimppaintoptions.[ch]
	* app/paint/gimpsmudgeoptions.[ch]: added properties all over the
	place and removed the widget and default_value members from
	the structs. Renamed some values (e.g. s/type/clone_type/).
	Don't #include <gtk/gtk.h>.

	* app/paint/gimpairbrush.c
	* app/paint/gimpclone.c
	* app/paint/gimpconvolve.c
	* app/paint/gimpdodgeburn.c
	* app/paint/gimperaser.c
	* app/paint/gimppaintbrush.c
	* app/paint/gimppaintcore-stroke.c
	* app/paint/gimppaintcore.c
	* app/paint/gimppencil.c
	* app/paint/gimpsmudge.c
	* app/paint/paint-types.h
	* app/paint/paint.c: changed accordingly. Don't #include <gtk/gtk.h>.

	* tools/pdbgen/pdb/paint_tools.pdb: changed accordingly.

	* app/pdb/paint_tools_cmds.c: regenerated.

	* app/tools/gimpblendoptions.[ch]
	* app/tools/gimpbucketfilloptions.[ch]
	* app/tools/gimpcolorpickeroptions.[ch]
	* app/tools/gimpcropoptions.[ch]
	* app/tools/gimpflipoptions.[ch]
	* app/tools/gimpinkoptions.c
	* app/tools/gimpmagnifyoptions.[ch]
	* app/tools/gimpmeasureoptions.[ch]
	* app/tools/gimpmoveoptions.[ch]
	* app/tools/gimptextoptions.c
	* app/tools/paint_options.[ch]
	* app/tools/selection_options.[ch]
	* app/tools/transform_options.[ch]: ditto: added properties and
	removed widget and default_value stuff. Removed most reset functions.
	Use gimp_prop widgets all over the place, renamed some values
	as above.

	* app/tools/Makefile.am
	* app/tools/gimpairbrushtool.c
	* app/tools/gimpblendtool.c
	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpbycolorselecttool.c
	* app/tools/gimpclonetool.c
	* app/tools/gimpconvolvetool.c
	* app/tools/gimpcroptool.c
	* app/tools/gimpdodgeburntool.c
	* app/tools/gimperasertool.c
	* app/tools/gimpfliptool.c
	* app/tools/gimpfuzzyselecttool.c
	* app/tools/gimpmagnifytool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimpselectiontool.c
	* app/tools/gimpsheartool.c
	* app/tools/gimpsmudgetool.c
	* app/tools/gimptransformtool.c
	* app/tools/gimpvectoroptions.c: changed accordingly. Ported
	the paint_options GUI constructors to gimp_prop widgets.

	* app/widgets/gimpselectioneditor.c
	* app/gui/tool-options-dialog.c: changed accordingly.
2003-02-07 17:12:21 +00:00
Michael Natterer b55203abb5 handle negative integers.
2003-02-03  Michael Natterer  <mitch@gimp.org>

	* app/config/gimpscanner.c (gimp_scanner_parse_int): handle
	negative integers.

	(gimp_scanner_parse_string[no_validate]): return NULL for empty
	strings (don't simply leave the return location untouched).
2003-02-03 14:48:39 +00:00
Sven Neumann daf60f2582 handle negative integers.
2003-02-03  Sven Neumann  <sven@gimp.org>

	* app/config/gimpconfig-deserialize.c
	(gimp_config_deserialize_fundamental): handle negative integers.

	* app/core/gimp.c (gimp_edit_config_notify): commented out
	debugging output.
2003-02-03 14:37:59 +00:00
Sven Neumann 47f2a7f8d9 app/config/gimpconfig.[ch] added a reset method to GimpConfigInterface.
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 ...
2003-02-01 21:50:21 +00:00
Sven Neumann 27698a2b3f app/config/gimpconfig-params.h
2003-01-31  Sven Neumann  <sven@gimp.org>

	* app/config/gimpconfig-params.h

	* app/config/gimpcoreconfig.c: added a pixels parameter to the
	GIMP_CONFIG_INSTALL_PROP_UNIT() macro.

	* app/core/Makefile.am
	* app/core/gimpimage-text.[ch]: removed these two files.

	* app/text/Makefile.am
	* app/text/gimptext-compat.[ch]: new files with compatibility
	routines that provide the old text API (solely for PDB calls).

	* app/text/gimptext-render.[ch]: new files with text rendering
	routines (not much yet).

	* app/text/text-types.h
	* app/text/gimptextlayer.[ch]: new object derived from GimpLayer.

	* app/text/gimptext.[ch]: prepared for future improvements.

	* app/pdb/text_tool_cmds.c
	* app/tools/gimptexttool.c
	* tools/pdbgen/pdb/text_tool.pdb: changed accordingly.
2003-01-31 09:22:42 +00:00
Sven Neumann e6bd0db317 removed the description of the image title format string from the blurb
2003-01-26  Sven Neumann  <sven@gimp.org>

	* app/config/gimprc-blurbs.h: removed the description of the image
	title format string from the blurb ...

	* app/config/gimpconfig-dump.c: ... and added it here.  Slightly
	improved manpage formatting.

	* app/config/gimpconfig-deserialize.c: fixed a typo.

	* docs/gimprc-1.3.5.in
	* etc/gimprc: regenerated.
2003-01-26 01:20:20 +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 bf12a078f0 always build gimpconfig-dump.
2003-01-11  Sven Neumann  <sven@gimp.org>

	* app/config/Makefile.am: always build gimpconfig-dump.

	* app/config/gimpconfig-params.[ch]: added an enum to specify the
	type of path with GIMP_PARAM_SPEC_PATH.

	* app/config/gimpconfig-dump.c: document the different types of
	paths differently.

	* app/config/gimpbaseconfig.c
	* app/config/gimpcoreconfig.c
	* app/config/gimpguiconfig.c
	* app/config/gimppluginconfig.c: register the path types.

	* etc/gimprc: generated a new system gimprc.

	* plug-ins/common/tiff.c: added missing spaces in warning and
	removed trailing newlines in strings passed to g_message().
2003-01-11 01:31:22 +00:00
Sven Neumann 023c76978f configure.in etc/Makefile.am etc/gimprc.in removed templates for gimprc
2002-12-29  Sven Neumann  <sven@gimp.org>

	* configure.in
	* etc/Makefile.am
	* etc/gimprc.in
	* etc/gimprc_user.in: removed templates for gimprc files.

	* etc/gimprc: added this file as generated by gimp-config-dump.

	* app/gui/user-install-dialog.c
	* data/misc/user_install: don't install an empty user gimprc.

	* app/config/Makefile.am
	* app/config/gimpconfig-substitute.[ch]: removed these files.
	* app/config/gimpconfig-path.[ch]: and added them again with
	reduced functionality. Paths found in config files are now
	basically handled like standard strings by the config system.
	Users of the GimpConfig path variables need to expand the path
	themselves.

	* app/config/gimpbaseconfig.c
	* app/config/gimpconfig-deserialize.c
	* app/config/gimpconfig-dump.c
	* app/config/gimpconfig-utils.c
	* app/config/gimpconfig.c
	* app/config/gimpcoreconfig.c
	* app/config/gimprc.c:
	* app/base/base.c
	* app/base/temp-buf.c
	* app/core/gimp.c
	* app/core/gimpdatafactory.c
	* app/core/gimpmodules.c
	* app/gui/user-install-dialog.c
	* app/plug-in/plug-in.c
	* app/tools/tools.c
	* app/widgets/gimppropwidgets.c: changed accordingly.
2002-12-29 18:58:24 +00:00
Sven Neumann 4b985f8e81 Sven Neumann <sven@gimp.org>
* app/config/gimpconfig.c (gimp_config_serialize): check the return
	value of close().
2002-12-20 12:27:05 +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
Hans Breuer 7c7ff46cc6 updated
2002-11-30  Hans Breuer  <hans@breuer.org>

	* */makefile.msc */*/makefile.msc : updated

	* themes/Default/images/makefile.msc : new file
	* themes/Default/makefile.msc : removed

	* libgimpwidgets/gimpwidgets.def : updated

	* app/core/core-types.h : renamed PIXELS and POINTS
	to SIZE_* to avoid clashes with system headers
	* app/pdb/text_tool_cmds.c : updated ...
	* tools/pdbgen/enums.py : ... by renaming here too.

	* app/widgets/gimphistogrambox.c : <string.h> for memcpy()
	* app/widgets/gimppropwidgets.c : <string.h> for strlen()

	* app/config/gimpconfig.c : on win32 rename always fails
	if the destination file exists. Delete it first.

	* libgimp/gimp.def : removed all '_'-prefixed exports
	* plug-ins/common/iwarp.c : replace _gimp_layer_copy()
	with gimp_layer_copy(), gimp_layer_add_alpha()

	* libgimp/gimpmisc.c : ported gimp_timer funcs to use
	g_timer to be more portable

	* libgimpbase/gimpdatafiles.c : there are no symlinks on
	win32, inverted to #ifndef G_OS_WIN32 as it was meant.

	* libgimpbase/gimpbase.def libgimpmodule/gimpmodule.def
	  libgimpwidgets/gimpwidgets.def : updated externals

	* plug-ins/common/randomize.c plug-ins/common/sinus.c :
	don't initialize more than the defined struct size

	* plug-ins/common/warp.c : removed unneeded unistd.h and
	signal.h include

	* regexrepl/regexrepl.def : (new file) needed to build
	as DLL
2002-12-01 14:53:17 +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 8b6ec3b332 added GIMP_PARAM_RESTART and GIMP_PARAM_CONFIRM flags and changed all
2002-11-20  Michael Natterer  <mitch@gimp.org>

	* app/config/gimpconfig-params.h: added GIMP_PARAM_RESTART and
	GIMP_PARAM_CONFIRM flags and changed all param spec macros
	to have a "flags" parameter.

	* app/config/gimpbaseconfig.c
	* app/config/gimpcoreconfig.c
	* app/config/gimpdisplayconfig.c
	* app/config/gimpguiconfig.c: tag the values which need restart or
	confirmation with the resp. flags. Changed all macro calls
	accordingly.

	* app/core/gimpcontext.c
	* app/widgets/gimpdeviceinfo.c: changed macro calls accordingly.
2002-11-20 19:09:40 +00:00
Michael Natterer c3391322df s/gimp_config_equal/gimp_config_is_equal_to/ to match the implementation.
2002-11-20  Michael Natterer  <mitch@gimp.org>

	* app/config/gimpconfig.h:
	s/gimp_config_equal/gimp_config_is_equal_to/ to match the
	implementation.
2002-11-20 18:52:58 +00:00
Sven Neumann 419a64e2ef Derive GimpParamSpecMemsize from GParamSpecULong. 2002-11-19 17:26:42 +00:00
Sven Neumann 6e5f6a0b16 improved error message for the special case of store_unknown_tokens ==
2002-11-18  Sven Neumann  <neo@wintermute>

	* app/config/gimpconfig-deserialize.c
	(gimp_config_deserialize_properties): improved error message for
	the special case of store_unknown_tokens == TRUE.
2002-11-18 20:19:37 +00:00
Sven Neumann 79101957a2 try to substitute paths of the form ${foo} in the unknown token value.
2002-11-18  Sven Neumann  <neo@wintermute>

	* app/config/gimpconfig.c (gimp_config_add_unknown_token): try to
	substitute paths of the form ${foo} in the unknown token value.

	* data/environ/Makefile.am: fixed a comment.
2002-11-18 19:32:57 +00:00
Sven Neumann e90728cfe6 allow numbers when deserializing enum values.
2002-11-18  Sven Neumann  <neo@wintermute>

	* app/config/gimpconfig-deserialize.c (gimp_config_deserialize_enum):
	allow numbers when deserializing enum values.
2002-11-18 18:31:49 +00:00
Sven Neumann ce5aa0c929 optionally allow GIMP_UNIT_PIXEL as value for GimpUnit params.
2002-10-10  Sven Neumann  <sven@gimp.org>

	* app/config/gimpconfig-params.[ch]: optionally allow GIMP_UNIT_PIXEL
	as value for GimpUnit params.

	* app/core/gimpimage-text.[ch]
	* app/core/gimptext.[ch]
	* app/tools/gimptexttool.c: moved some code around.
2002-10-10 17:07:46 +00:00
Sven Neumann cf6564838a fixed some macros that were never used.
2002-09-21  Sven Neumann  <sven@gimp.org>

        * app/config/gimpconfig-params.h: fixed some macros that were never used.

        * data/images/gimp_splash.png: flattened the splash image. The alpha channel
        crashed servers with buggy XRender extension (#93841) (and should have never
        been there anyway).
2002-09-21 21:26:10 +00:00
Hans Breuer e17baf71d6 updated
2002-09-06  Hans Breuer  <hans@breuer.org>

	* */*/makefile.msc : updated

	* libgimptool/makefile.msc : new file, libgimptool
	is currently build as static lib due to references
	into app/core

	* themes/Default/makefile.msc : removed
	* themes/Default/images/makefile.msc : new file

	* libgimpwidgets/makefile.msc libgimpwidgets/gimpwidgets.c
	updated (externals)

	* app/paint-funcs.c : replaced gccism varibale size array on
	stack with portable alloca, removed sizeof(buf) check which
	must fail now.

	* app/config/gimpconfig.c : get write/close protos
	on win32 from io.h
	* app/config/gimprc.c : dito and <string.h>
	* app/config/gimpscanner.c : <string.h> only

	* app/core/gimpcontainer.c : workaround for clumsy
	compilers not supporting vararg macros

	* app/core/gimpdocumentlist.c app/core/gimpparasitelist.c
	include <io.h> on win32

	* app/widgets/gimpdocumentview.c
	  app/widgets/gimpimagedock.c
	  app/widgets/gimppreview.c : add #ifdef __GNUC__
	to avoid breaking on non standard pragma #warning.

	* app/gui/session.c : include <string.h>

	* regexrepl/makefile.msc : build as dll

	* plug-ins/makefile.msc : updated

	* plug-ins/common/pix.c : open file binary

	* plug-ins/common/spheredesigner.c : avoid error
	'incompatible types' while assigning, use memcpy()
2002-09-06 22:25:19 +00:00
Sven Neumann c585964707 Obviously I disagree with Tim about the symbol_name parameter in
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-06-17 19:36:33 +00:00
Sven Neumann fd21daebdf app/undo.c app/config/gimpconfig-deserialize.c app/core/gimpbrushpipe.c
2002-06-09  Sven Neumann  <sven@gimp.org>

	* app/undo.c
	* app/config/gimpconfig-deserialize.c
	* app/core/gimpbrushpipe.c
	* app/core/gimpcontainer.c
	* app/core/gimpimagefile.c
	* app/gui/paths-dialog.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimplevelstool.c
	* app/widgets/gimpcomponentlistitem.c
	* app/widgets/gimpgradienteditor.c: unified translatable strings
	and unmarked a few for translation since they should never be seen.

2002-06-09  Sven Neumann  <sven@gimp.org>

	* POTFILES.in: updated.

	* de.po: updated german translation.
2002-06-09 12:53:42 +00:00
Michael Natterer a46fa39fdd #include "gimpscanner.h"
2002-06-06  Michael Natterer  <mitch@gimp.org>

	* app/config/gimpconfig-deserialize.c: #include "gimpscanner.h"
2002-06-06 19:31:52 +00:00
Michael Natterer 110efe528c parse sessionrc using GScanner.
2002-06-02  Michael Natterer  <mitch@gimp.org>

	* app/gui/session.c: parse sessionrc using GScanner.

	* app/config/gimpscanner.[ch]: added utility function
	gimp_scanner_parse_string_list(). Fixed the color parser's parse
	error detection.

	* app/gimprc.c: removed the sessionrc parsing stuff.

	* app/config/gimpconfig-params.c (gimp_param_spec_color): no need
	to set the param_spec's value_type, it already gets set by it's
	base class' instance_init() function.
2002-06-02 19:48:01 +00:00
Michael Natterer c6948e6e95 configure the scanner the same way GimpConfig did (scanner->user_data is,
2002-05-31  Michael Natterer  <mitch@gimp.org>

	* app/config/gimpscanner.[ch]: configure the scanner the same
	way GimpConfig did (scanner->user_data is, if set, a GError).
	Added gimp_scanner_parse_color(). Added "GError **error" to
	gimp_scanner_new().

	* app/config/gimpconfig.c: use gimp_scanner_new().

	* app/config/gimpconfig-deserialize.c: use gimp_scanner_parse_color().

	* app/core/gimpunits.c
	* app/plug-in/plug-in-rc.c: changed accordingly.

	* app/plug-in/plug-in-rc.c: made the main parse loops consistent
	with the other places using GScanner.
2002-05-31 13:58:18 +00:00
Sven Neumann 4c55933dea renamed gimp_mem_size_entry_new() to gimp_memsize_entry_new() for
2002-05-29  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimpwidgets.[ch]: renamed gimp_mem_size_entry_new()
	to gimp_memsize_entry_new() for consistency. Rewrote using bitshifts.
	Should work correctly for sizeof (gulong) > 32 now. Added new unit
	GigaBytes.

	* app/gui/preferences-dialog.c
	* app/gui/user-install-dialog.c: changed accordingly.

	* app/config/gimpconfig-types.[ch]: added new function
	gimp_memsize_set_from_string() that allows to check if the
	conversion succeeded.

	* app/config/gimpconfig-deserialize.c
	(gimp_config_deserialize_memsize): use gimp_memsize_set_from_string().
2002-05-29 09:20:56 +00:00
Sven Neumann 89585b4c14 app/config/test-config.c use g_error_free() so we crash if our GimpConfig
2002-05-28  Sven Neumann  <sven@gimp.org>

	* app/config/test-config.c
	* app/gui/test-commands.c: use g_error_free() so we crash if our
	GimpConfig functions return FALSE and don't set an error.

	* app/widgets/gimpdevices.c: don't warn if devicerc was not found.

	* app/gui/preferences-dialog.c: use G_MAXULONG as upper limit for
	the mem_size entries.

	* libgimpwidgets/gimpwidgets.c (gimp_mem_size_entry): use gulong
	and set the range of the spinbutton's adjustment properly.
2002-05-28 18:49:45 +00:00
Michael Natterer b7e3c716c4 override GObjectClass->constructor() and do the setup stuff there, not in
2002-05-28  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpcontext.c: override GObjectClass->constructor() and
	do the setup stuff there, not in gimp_context_new(). This way we
	can create properly initialized contexts with g_object_new().

	* app/widgets/gimpdeviceinfo.c: Removed the "gimp" property
	again. Added a constructor() implementation and moved stuff there
	from gimp_device_info_set_property(PROP_GIMP).

	* app/config/gimpconfig-deserialize.c: made deserialization of
	value arrays work by actually using the array any not just leaking
	it ;)

	* app/core/gimpcontainer.c: removed debugging output. Call
	config_iface->deserialize(child, ...) again instead of calling
	gimp_config_deserialize_properties() directly.

	* app/widgets/gimpdevices.c: switch to using the new stuff for
	devicerc.

	* app/widgets/gimpdeviceinfo.[ch]
	* app/widgets/gimpdevices.[ch]
	* app/gimprc.c: removed all old gimprc-style devicerc stuff.

	* app/gui/menus.c
	* app/gui/test-commands.[ch]: removed devicerc testing entries
	and callbacks.
2002-05-28 16:41:56 +00:00
Sven Neumann 0c87d88df9 oops 2002-05-27 21:59:26 +00:00
Sven Neumann 93799415c8 fixed error code and improved error messages.
2002-05-27  Sven Neumann  <sven@gimp.org>

	* app/config/gimpconfig.c (gimp_config_serialize): fixed error code
	and improved error messages.
2002-05-27 21:50:50 +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 40caeab174 added deserialization of GValueArrays (untested). Added
2002-05-24  Michael Natterer  <mitch@gimp.org>

	* app/config/gimpconfig-deserialize.c: added deserialization of
	GValueArrays (untested). Added gimp_config_deserialize_value()
	which is factored out from gimp_config_deserialize_property().
2002-05-24 17:42:21 +00:00
Sven Neumann b5d2dd0867 write newline after serializing the properties.
2002-05-24  Sven Neumann  <sven@gimp.org>

	* app/config/gimprc.c (gimp_rc_serialize): write newline after
	serializing the properties.

	* app/config/gimpconfig.c (gimp_config_string_indent): tiny
	optimization.
2002-05-24 13:52:07 +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
Michael Natterer 42f8ae15e4 added virtual interface methods serialize_property() and
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-22 13:19:19 +00:00
Sven Neumann 3553cf90bf need to link test-config against libgimpcolor now.
2002-05-21  Sven Neumann  <sven@gimp.org>

	* app/config/Makefile.am: need to link test-config against
	libgimpcolor now.

	* app/config/gimpconfig.c (gimp_config_serialize): write newlines
	after header and before footer.

	* app/config/test-config.c
	* app/config/gimprc.c
	* app/core/gimp-documents.c
	* app/core/gimp-parasites.c
	* app/gui/test-commands.c: removed the newlines here.

	* app/config/gimpconfig-params.h: define GIMP_PARAM_SERIALZE flag
	which can be used to mark an object property as serializable.
	Make the GIMP_CONFIG_INSTALL_PROP_* macros set it.

	* app/config/gimpconfig-deserialize.c
	* app/config/gimpconfig-serialize.c: check the GIMP_PARAM_SERIALIZE
	flag.

	* app/config/gimpconfig-params.c (gimp_param_color_set_default):
	fixed.

	* app/core/gimpcontext.c: install serializable properties using the
	GIMP_CONFIG_INSTALL_PROP_* macros.
2002-05-21 17:33:04 +00:00
Michael Natterer 292ec087eb added GIMP_TYPE_COLOR as boxed type encapsulating GimpRGB.
2002-05-21  Michael Natterer  <mitch@gimp.org>

	* app/config/gimpconfig-types.[ch]: added GIMP_TYPE_COLOR as boxed
	type encapsulating GimpRGB.

	* app/config/gimpconfig-params.[ch]: added GimpParamSpecColor
	which is derived from GParamSpecBoxed and adds a default value.

	* app/config/gimpconfig-deserialize.c
	* app/config/gimpconfig-serialize.c: added generic
	(de)serialization of the new property type.

	* app/core/gimpcontext.c: implement the config interface, changed
	signal parameters and property types to use the new
	GIMP_TYPE_COLOR.

	* app/core/gimpmarshal.list: added a VOID__BOXED marshaller.

	* app/gui/menus.c
	* app/gui/test-commands.[ch]: some test code which (de)serializes
	the user context.
2002-05-21 15:01:57 +00:00