Commit Graph

209 Commits

Author SHA1 Message Date
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
Manish Singh 5d01581069 Fix a bunch of warnings from Sparse:
2004-11-13  Manish Singh  <yosh@gimp.org>

        Fix a bunch of warnings from Sparse:

        * app/actions/dockable-commands.c
        * app/actions/layers-actions.c
        * app/actions/view-commands.c
        * app/base/pixel-surround.c
        * app/config/gimpconfig-utils.c
        * app/config/gimpscanner.c
        * app/core/gimpbrushgenerated.c
        * app/core/gimpcontainer.c
        * app/core/gimpimage.c
        * app/dialogs/palette-import-dialog.c
        * app/file/gimprecentlist.c
        * app/plug-in/plug-in-params.c
        * app/text/gimptext-compat.c
        * app/text/gimptext-parasite.c
        * app/vectors/gimpbezierstroke.c
        * app/vectors/gimpstroke.c
        * app/widgets/gimpcellrendereraccel.c
        * app/widgets/gimpselectiondata.c
        * app/xcf/xcf.c
        * libgimp/gimp.c
        * libgimpthumb/gimpthumb-utils.c
        * libgimpthumb/gimpthumbnail.c
        * modules/cdisplay_proof.c
        * plug-ins/Lighting/lighting_ui.c
        * plug-ins/common/csource.c
        * plug-ins/common/glasstile.c
        * plug-ins/common/nova.c
        * plug-ins/common/pcx.c
        * plug-ins/common/pnm.c
        * plug-ins/common/randomize.c
        * plug-ins/common/screenshot.c
        * plug-ins/common/sel_gauss.c
        * plug-ins/common/spheredesigner.c
        * plug-ins/common/wind.c
        * plug-ins/gfig/gfig-dialog.c
        * plug-ins/gfig/gfig-dobject.c
        * plug-ins/gimpressionist/gimpressionist.c
        * plug-ins/ifscompose/ifscompose.c
        * plug-ins/print/gimp_main_window.c
        * plug-ins/print/print.c: Cleanup integer vs. pointer confusion.

        * app/base/temp-buf.c
        * app/dialogs/about-dialog.c
        * plug-ins/common/bumpmap.c
        * plug-ins/common/jigsaw.c
        * plug-ins/gfig/gfig-dobject.c: Cosmetic cleanups.

        * app/config/gimpconfig-deserialize.c
        * app/config/gimpconfig-path.c
        * app/config/gimpconfigwriter.c
        * app/core/gimpgradient.c
        * app/tools/gimpdrawtool.c
        * plug-ins/common/nlfilt.c
        * plug-ins/common/unsharp.c
        * plug-ins/common/zealouscrop.c: Define inline functions before they
        are used.

        * app/core/gimpdrawable-blend.c: PixelRegion definition was changed
        some time ago, but the initialization here didn't change. Fix it.

        * app/plug-in/plug-in-rc.c (plug_in_extra_deserialize): No need to
        assign token twice in a row.

        * libgimpbase/gimpdatafiles.c (gimp_datafiles_read_directories): No
        need to initialize file_data, since the code fills out all the fields.

        * plug-ins/common/CML_explorer.c
        * plug-ins/common/vpropagate.c: Declare function pointers fully.

        * plug-ins/common/grid.c (pix_composite): G_INLINE_FUNC isn't needed,
        we assume we can use the "inline" keyword always.

        * plug-ins/common/psd_save.c
        * plug-ins/common/vinvert.c
        * plug-ins/gfig/gfig-arc.c
        * plug-ins/gfig/gfig-bezier.c
        * plug-ins/gfig/gfig-circle.c
        * plug-ins/gfig/gfig-dialog.c
        * plug-ins/gfig/gfig-dobject.c
        * plug-ins/gfig/gfig-ellipse.c
        * plug-ins/gfig/gfig-line.c
        * plug-ins/gfig/gfig-poly.c
        * plug-ins/gfig/gfig-spiral.c
        * plug-ins/gfig/gfig-star.c
        * plug-ins/gfig/gfig.c
        * plug-ins/gimpressionist/orientmap.c
        * plug-ins/gimpressionist/placement.c
        * plug-ins/gimpressionist/sizemap.c
        * plug-ins/imagemap/imap_grid.c
        * plug-ins/imagemap/imap_main.c
        * plug-ins/imagemap/imap_preferences.c
        * plug-ins/imagemap/imap_settings.c
        * plug-ins/maze/maze.c
        * plug-ins/sel2path/curve.c
        * plug-ins/sel2path/fit.c
        * plug-ins/sel2path/pxl-outline.c
        * plug-ins/sel2path/spline.c
        * plug-ins/xjt/xjt.c: Functions with no args should be declared
        with (void).

        * plug-ins/common/retinex.c (MSRCR): Initialize max_preview to quiet
        the compiler.
2004-11-14 02:50:33 +00:00
Sven Neumann bd3a5ed2c0 copy the file permissions also.
2004-10-31  Sven Neumann  <sven@gimp.org>

	* app/config/gimpconfig-utils.c (gimp_config_file_copy): copy the
	file permissions also.

	* app/dialogs/user-install-dialog.c: added code to migrate user
	settings from ~/.gimp-2.0. It copies all files (except GIMP swap
	files) and all subdirectories (except tmp) with all files. It
	doesn't recurse into subdirectories.
2004-10-31 17:51:00 +00:00
Michael Natterer 6965b0b881 set construct_param->foo, not construct_param*s*->foo, so we don't set the
2004-08-31  Michael Natterer  <mitch@gimp.org>

	* app/config/gimpconfig.c (gimp_config_iface_duplicate): set
	construct_param->foo, not construct_param*s*->foo, so we don't set
	the first construct param again and crash.
2004-08-31 13:16:08 +00:00
Sven Neumann 8b9456f6f2 don't emit critical warnings about a messed up state of GimpConfigWriter
2004-08-29  Sven Neumann  <sven@gimp.org>

	* app/config/gimpconfigwriter.c: don't emit critical warnings
	about a messed up state of GimpConfigWriter if the writer is
	disabled because of a write error that occured earlier.
2004-08-29 12:13:34 +00:00
Sven Neumann bd427b2e4d libgimpbase/Makefile.am libgimpbase/gimpbase.h libgimpbase/gimpbase.def
2004-07-27  Sven Neumann  <sven@gimp.org>

	* libgimpbase/Makefile.am
	* libgimpbase/gimpbase.h
	* libgimpbase/gimpbase.def
	* libgimpbase/gimpmemsize.[ch]: added new files with memsize
	related functions (moved here from gimputil.c) and
	GIMP_TYPE_MEMSIZE (moved here from app/config/gimpconfig-types.[ch]).

	* libgimpbase/gimputils.[ch]: removed gimp_memsize_to_string() here.

	* libgimpbase/gimpunit.[ch]: added GIMP_TYPE_UNIT (moved here from
	app/config/gimpconfig-types.[ch]).

	* libgimpbase/gimpbase-private.c
	* libgimp/gimptile.c
	* libgimp/gimpunitcache.c
	* plug-ins/help/domain.c
	* app/xcf/xcf-read.c: need to include glib-object.h.

	* plug-ins/common/uniteditor.c: use GIMP_TYPE_UNIT.

	* app/config/gimpconfig-types.[ch]: removed code that lives in
	libgimpbase now.

	* app/config/gimpconfig-deserialize.c: changed accordingly.

	* app/config/gimpbaseconfig.c
	* app/config/gimpdisplayconfig.c
	* app/core/gimpcontext.c
	* app/gui/grid-dialog.c
	* app/tools/gimpcolortool.c
	* app/widgets/gimpaction.c
	* app/widgets/gimpunitstore.c: no need to include gimpconfig-types.h
	any longer.
2004-07-27 16:39:00 +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
Michael Natterer 9357713a2b removed GimpConfigInterface typedef, added comments to typedefs which
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).
2004-07-19 11:33:59 +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 94010e8316 app/config/gimpconfigwriter.c app/core/gimpstrokeoptions.c
2004-05-24  Michael Natterer  <mitch@gimp.org>

	* app/config/gimpconfigwriter.c
	* app/core/gimpstrokeoptions.c
	* app/widgets/gimpactiongroup.c
	* app/widgets/gimpcolorframe.h
	* app/widgets/gimpcolorpanel.h
	* app/widgets/gimpcontainerview.[ch]
	* app/widgets/gimptooldialog.h
	* app/widgets/gimpuimanager.c
	* app/widgets/widgets-types.h: fixed various small issues I
	stumbled across when updating the API reference for app/.
2004-05-24 14:51:15 +00:00
Michael Natterer 3fb934b2a4 Allow plug-ins to register menu icons. Fixes bug #120500.
2004-05-18  Michael Natterer  <mitch@gimp.org>

	Allow plug-ins to register menu icons. Fixes bug #120500.

	* app/core/core-enums.[ch]: added enum GimpIconType which can
	be one of { STOCK_ID, IMAGE_FILE, INLINE_PIXBUF }.

	* app/config/gimpconfigwriter.[ch] (gimp_config_writer_data)
	* app/config/gimpscanner.[ch] (gimp_scanner_parse_data): new
	functions which write/parse raw binary data. Needed for storing
	inline pixbufs in pluginrc.

	* app/config/gimpconfigwriter.[ch] (gimp_config_writer_identifier):
	new function which writes out an unquoted and unescaped string.

	* app/plug-in/plug-in-proc.[ch] (struct PlugInProcDef): added
	new members "icon_type", "icon_data_length" and "icon_data".
	Reordered members so file_proc specific stuff is at the end.

	(plug_in_proc_def_get_stock_id)
	(plug_in_proc_def_get_pixbuf): new functions to access the
	procedure's icon.

	* app/plug-in/plug-in-rc.c: save/restore the registered icons.

	* app/actions/file-dialog-actions.c
	* app/actions/plug-in-actions.c: set the action's stock ID from
	the procedure's stock ID.

	* app/widgets/gimppluginaction.c
	(gimp_plug_in_action_connect_proxy): if the procedure provides a
	pixbuf, set it as icon for the menu item.

	* app/menus/file-dialog-menu.[ch]
	* app/menus/file-open-menu.c
	* app/menus/file-save-menu.c
	* app/xcf/xcf.c: changed accordingly.

	* tools/pdbgen/pdb/plug_in.pdb (plugin_icon_register): new PDB
	function which can be called during query().

	* tools/pdbgen/enums.pl
	* app/pdb/internal_procs.c
	* app/pdb/plug_in_cmds.c
	* libgimp/gimpenums.h
	* libgimp/gimpplugin_pdb.c
	* libgimp/gimpplugin_pdb.h
	* plug-ins/pygimp/gimpenums.py
	* plug-ins/script-fu/script-fu-constants.c: regenerated.

	* plug-ins/common/plugindetails.c
	* plug-ins/common/uniteditor.c
	* plug-ins/print/print.c: register stock_id icons.

	* plug-ins/common/screenshot.c: register an inline_pixbuf icon for
	testing purposes (used emblem-camera.png from gnome-icon-theme).

	* app/actions/dialogs-actions.c
	* app/actions/file-actions.c: unrelated: added some more icons
	to menu items.
2004-05-18 21:19:43 +00:00
Michael Natterer de7a940501 app/config/gimpconfig-deserialize.c app/config/gimpscanner.c
2004-05-12  Michael Natterer  <mitch@gimp.org>

	* app/config/gimpconfig-deserialize.c
	* app/config/gimpscanner.c
	* app/core/gimp-edit.c
	* app/core/gimpchannel-combine.c
	* app/core/gimpcontainer.c
	* app/core/gimpdrawable-bucket-fill.c
	* app/core/gimpdrawable-combine.c
	* app/core/gimpdrawable.c
	* app/core/gimpgradient.c
	* app/core/gimpimage-flip.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage-projection.c
	* app/core/gimpimage.c
	* app/display/gimpdisplay-handlers.c
	* app/display/gimpdisplayshell-callbacks.c
	* app/display/gimpprogress.c
	* app/gui/info-dialog.c
	* app/gui/module-browser.c
	* app/gui/offset-dialog.c
	* app/plug-in/plug-in.c
	* app/tools/gimpdrawtool.c
	* app/tools/tool_manager.c
	* app/widgets/gimpactiongroup.c
	* app/widgets/gimpdialogfactory.c
	* app/widgets/gimpgradienteditor.c
	* app/widgets/gimpitemfactory.c
	* app/widgets/gimppropwidgets.c
	* app/widgets/gimpwidgets-utils.c
	* app/xcf/xcf-save.c
	* libgimp/gimpexport.c
	* libgimpwidgets/gimphelpui.c
	* libgimpwidgets/gimppixmap.c
	* libgimpwidgets/gimpunitmenu.c: replaced G_GNUC_FUNCTION,
	G_GNUC_PRETTY_FUNCTION, G_STRLOC and hardcoded function names in
	g_warning()s by G_STRFUNC.
2004-05-12 08:13:33 +00:00
Michael Natterer 741854b58d define G*_DISABLE_DEPRECATED for all G* modules except GTK+. Don't do so
2004-05-11  Michael Natterer  <mitch@gimp.org>

	* configure.in: define G*_DISABLE_DEPRECATED for all G* modules
	except GTK+. Don't do so if compiling against GLib, GTK+ >= 2.5.0
	and Pango >= 1.5.0

	* libgimpwidgets/gimpoffsetarea.c: s/gdk_gc_unref/g_object_unref/

	* app/config/gimpconfig-deserialize.c
	* app/widgets/gimpdeviceinfo.c:
	s/g_value_set_foo_take_ownership/g_value_take_foo/

	* app/text/gimptext-vectors.c
	* app/text/gimptext-bitmap.c:
	s/pango_ft2_font_get_face/pango_fc_font_lock,unlock_face/
2004-05-11 17:19:24 +00:00
Sven Neumann 21f26743c1 made gimp_config_sync() and gimp_config_connect() also work on objects of
2004-03-11  Sven Neumann  <sven@gimp.org>

	* app/config/gimpconfig-utils.c: made gimp_config_sync() and
	gimp_config_connect() also work on objects of different types.
	Properties with the same name and the same type are synced /
	connected.

	* app/core/gimpcontext.[ch]: added convenience functions to get/set
	the font by name.

	* app/tools/gimptextoptions.[ch]: don't hold a GimpText object
	that duplicates properties like font and color which are in
	GimpContext already. Instead added all text properties that are
	controlled from the text tool options.  Handling of the foreground
	color is somewhat broken and needs a GimpContext wizard (Mitch!).

	* app/text/gimptext.c: blurbs are not any longer needed now that
	the property widgets are created from the GimpTextOptions.

	* app/tools/gimptexttool.c: changed accordingly.

	* app/widgets/gimptexteditor.[ch]: use an internal GtkTextBuffer
	and emit "text-changed" when it changes.
2004-03-11 18:47:37 +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 a430463819 added the new function gimp_rc_set_unknown_token() to get autosave working
2004-02-04  Sven Neumann  <sven@gimp.org>

	* app/config/gimprc.[ch]: added the new function
	gimp_rc_set_unknown_token() to get autosave working for unknown
	gimprc tokens.

	* app/config/gimpconfig.c: indentation.

	* tools/pdbgen/pdb/gimprc.pdb: gimp->edit_config was used for a
	good reason, it's the one that's saved. Reverted a change I did
	about a month ago. Use gimp_rc_set_unknown_token() so unknown
	tokens get saved. This really fixes gimp_gimprc_set().

	* app/pdb/gimprc_cmds.c: regenerated.
2004-02-04 00:07:26 +00:00
Michael Natterer 28f95f9caa when calculating the length of the expanded path, add the length of the
2004-02-01  Michael Natterer  <mitch@gimp.org>

	* app/config/gimpconfig-path.c (gimp_config_path_expand_only):
	when calculating the length of the expanded path, add the length
	of the UTF-8 converted substitution, not its length in filesystem
	encoding. Finally enables GIMP2_DIRECTORY containing non-ascii
	chars (at least on linux). Should fix bug #130118.
2004-02-01 22:55:30 +00:00
Michael Natterer 894cf70dd5 Added infrastructure to make sure we don't write to the global brush,
2004-01-28  Michael Natterer  <mitch@gimp.org>

	Added infrastructure to make sure we don't write to the global
	brush, pattern etc. directories. Needed to make this configurable
	because we can't rely on the global directories being read-only,
	having certain names or being otherwise detectable at runtime in a
	sane way. Fixes bug #132214.

	* libgimpbase/gimpdatafiles.[ch]: added "const gchar *dirname" to
	the GimpDataFileData struct so callbacks don't need to call
	g_path_get_dirname() for each file.

	* libgimpwidgets/gimpfileentry.c: made it work with non UTF-8
	encoded filenames.

	* libgimpwidgets/gimppatheditor.[ch]: ditto. Added GUI and API for
	setting/getting a second "writable_path". The widget makes sure
	that the writable_path is always a subset of the path.

	* app/config/gimpconfig-utils.[ch]: added new function
	gimp_config_build_writable_path().

	* app/config/gimpcoreconfig.[ch]: added separate properties for
	the writable brush, pattern, gradient, palette and font paths.

	* app/config/gimprc-blurbs.h: added (still empty) blurbs for the
	new properties.

	* app/core/gimpdata.[ch] (gimp_data_set_filename): added parameter
	"gboolean writable". Set data->writable to FALSE by default. If
	"writable" is passed as TRUE, still check if we can write to the
	file before setting data->writable to TRUE.

	(gimp_data_create_filename): changed "data_path" parameter to
	"dest_dir" and assume dest_dir is writable.

	(gimp_data_duplicate): set data->dirty to TRUE to make sure
	duplicated things will be saved.

	* app/core/gimpbrush.c
	* app/core/gimpbrushgenerated.c
	* app/core/gimpbrushpipe.c
	* app/core/gimpgradient.c
	* app/core/gimppalette.c
	* app/core/gimppattern.c: don't set the data's filename and don't
	touch data->dirty in the _load() functions because that's done by
	the data factory now. Don't touch data->dirty in the _duplicate()
	functions because that's done by gimp_data_duplicate() itself now.

	* app/core/gimpdatafactory.[ch] (gimp_data_factory_new): added
	"writable_property_name" and remember it.
	Added utility function gimp_data_factory_get_save_dir() which
	determines the directory to save new datas to.
	Added public function gimp_data_factory_data_save_single() which
	saves a single data object.
	Make sure new things get saved to the first writable directory
	as specified in preferences.

	* app/core/gimp.c (gimp_real_initialize): pass the writable_paths'
	property names to gimp_data_factory_new().

	* app/widgets/gimpdataeditor.c (gimp_data_editor_save_dirty): use
	gimp_data_factory_data_save_single() instead of implementing
	saving here.

	* app/widgets/gimppropwidgets.[ch] (gimp_prop_path_editor_new):
	added "const gchar *writable_property_name" parameter (can be
	NULL).

	Added the needed callbacks to handle the writable_path and made
	the path_editor and file_entry code aware of non UTF-8 filename
	encodings. Some general cleanup.

	* app/gui/preferences-dialog.c: changed accordingly.
2004-01-28 21:53:50 +00:00
Michael Natterer 9c28c22906 return early if gimp_config_path_expand_only() fails.
2004-01-28  Michael Natterer  <mitch@gimp.org>

	* app/config/gimpconfig-path.c (gimp_config_path_expand): return
	early if gimp_config_path_expand_only() fails.
2004-01-28 14:36:22 +00:00
Michael Natterer 57911bbcba app/app_procs.c app/errors.c app/main.c app/config/gimpconfigwriter.c
2004-01-23  Michael Natterer  <mitch@gimp.org>

	* app/app_procs.c
	* app/errors.c
	* app/main.c
	* app/config/gimpconfigwriter.c
	* app/core/gimpdata.c
	* app/core/gimpdatafactory.c
	* app/gui/user-install-dialog.c
	* app/plug-in/plug-ins.c
	* app/vectors/gimpvectors-import.c: some more gimp_filename_to_utf8().

	* libgimp/gimp.c
	* libgimpmodule/gimpmodule.c
	* libgimpmodule/gimpmoduledb.c: use it here, too, now that is in
	libgimpbase.
2004-01-23 17:24:44 +00:00
Sven Neumann 6d506d51bb include "libgimpbase/gimpbase.h" where needed; removed now unnecessary
2004-01-19  Sven Neumann  <sven@gimp.org>

	* app/*/*.c: include "libgimpbase/gimpbase.h" where needed; removed
	now unnecessary inclusions of "file/file-utils.h".
2004-01-19 01:54:11 +00:00
Sven Neumann a70698c4d9 removed file_utils_filename_to_utf8() ...
2004-01-19  Sven Neumann  <sven@gimp.org>

	* app/file/file-utils.[ch]: removed file_utils_filename_to_utf8() ...

	* libgimpbase/gimputils.[ch]: ... and added it here as
	gimp_filename_to_utf8(). Added some docs that promise less than
	the current implementation holds so that we can change the
	implementation later.

	* app/*/*.c: use gimp_filename_to_utf8() where
	file_utils_filenames_to_utf8() has been used before.

	* libgimpbase/gimpbase.def: changed accordingly.

	* configure.in: reset GIMP_INTERFACE_AGE.
2004-01-19 01:08:43 +00:00
Manish Singh 35f1fd4273 #include "file/file-utils.h" for file_utils_filename_to_utf8.
2004-01-14  Manish Singh  <yosh@gimp.org>

        * app/config/gimpconfig-utils.c: #include "file/file-utils.h" for
        file_utils_filename_to_utf8.
2004-01-15 00:07:32 +00:00
Tor Lillqvist 18485018b3 Add new function file_utils_filename_to_utf8(), which is to be used when
2004-01-14  Tor Lillqvist  <tml@iki.fi>

	* app/file/file-utils.[ch]: Add new function
	file_utils_filename_to_utf8(), which is to be used when converting
	file names (which are kept in the on-disk encoding) to UTF-8 for
	passing to GTK, or to g_print() etc.

	* app/*/*.c: Call file_utils_filename_to_utf8(). Should fix most
	of the warnings generated by non-UTF8 pathnames. See #130118.

	* libgimpbase/gimpenv.b: Document that gimp_directory() etc return
	strings in the on-disk encoding.

	* libgimpmodule/gimpmodule.c: Convert filenames to UTF-8 (using
	g_filename_to_utf8()) before passing to g_print().
2004-01-14 02:03:37 +00:00
Tor Lillqvist 6ee79a7530 Convert to native encoding (if requested) only after expanding completely.
2004-01-11  Tor Lillqvist  <tml@iki.fi>

	* app/config/gimpconfig-path.c: Convert to native encoding (if
	requested) only after expanding completely. (Mentioned in #130118,
	patch by Sven.)

	* app/base/tile-swap.c
	* app/pdb/image_cmds.c
	* app/plug-in/plug-in.c
	* libgimp/gimp.c
	* libgimpbase/gimpdatafiles.c
	* libgimpbase/gimpenv.c
	* libgimpmodule/gimpmoduledb.c
	* plug-ins/common/bz2.c
	* plug-ins/common/gz.c
	* plug-ins/common/mail.c
	* plug-ins/common/ps.c
	* plug-ins/common/url.c
	* plug-ins/gfig/gfig-preview.c
	* plug-ins/helpbrowser/helpbrowser.c
	* plug-ins/print/print.c
	* plug-ins/script-fu/script-fu-scripts.c
	* tools/pdbgen/pdb/image.pdb: Remove __EMX__ ifdefs. EMX port is
	unmaintained, presumed dead. (#131109)
2004-01-11 21:25:24 +00:00
Michael Natterer c6bd27d286 app/config/gimpconfig-utils.c use standard file error message strings.
2003-11-14  Michael Natterer  <mitch@gimp.org>

	* app/config/gimpconfig-utils.c
	* app/gui/themes.c: use standard file error message
	strings. Removes two more translatable strings.
2003-11-14 17:08:51 +00:00
Michael Natterer 6eb772946b libgimpwidgets/gimpquerybox.c configure the labels in the message dialog
2003-11-14  Michael Natterer  <mitch@gimp.org>

	* libgimpwidgets/gimpquerybox.c
	* app/widgets/gimpwidgets-utils.c: configure the labels in the
	message dialog and the query boxes to do automatic word wrapping
	to be HIG compliant.

	* app/app_procs.c
	* app/batch.c
	* app/config/gimpconfig-deserialize.c
	* app/config/gimpconfig-path.c
	* app/config/gimpconfig-utils.c
	* app/config/gimpconfigwriter.c
	* app/config/gimpscanner.c
	* app/core/gimpbrush.c
	* app/core/gimpbrushgenerated.c
	* app/core/gimpbrushpipe.c
	* app/core/gimpdatafactory.c
	* app/core/gimpgradient.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage.c
	* app/core/gimpimagefile.c
	* app/core/gimplayer-floating-sel.c
	* app/core/gimppalette.c
	* app/core/gimppattern.c
	* app/core/gimpselection.c
	* app/display/gimpdisplayshell.c
	* app/file/file-utils.c
	* app/gui/brush-select.c
	* app/gui/dialogs-commands.c
	* app/gui/drawable-commands.c
	* app/gui/edit-commands.c
	* app/gui/file-commands.c
	* app/gui/file-new-dialog.c
	* app/gui/font-select.c
	* app/gui/gradient-select.c
	* app/gui/gui.c
	* app/gui/image-commands.c
	* app/gui/layers-commands.c
	* app/gui/palette-select.c
	* app/gui/palettes-commands.c
	* app/gui/pattern-select.c
	* app/gui/preferences-dialog.c
	* app/gui/select-commands.c
	* app/gui/stroke-dialog.c
	* app/gui/tool-options-menu.c
	* app/gui/vectors-commands.c
	* app/gui/view-commands.c
	* app/plug-in/plug-in-message.c
	* app/plug-in/plug-in.c
	* app/plug-in/plug-ins.c
	* app/text/gimptextlayer-xcf.c
	* app/text/gimptextlayer.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimptransformtool.c
	* app/vectors/gimpvectors-export.c
	* app/widgets/gimpdatafactoryview.c
	* app/widgets/gimphelp.c
	* app/widgets/gimptemplateview.c
	* app/widgets/gimptooloptionseditor.c
	* app/xcf/xcf.c
	* tools/pdbgen/pdb/image.pdb: removed explicit newlines from
	messages. Reduced number of translatable strings by making many
	file error messages the same. Quote single words and filenames
	with 'foo', not "foo". Replaced some more "drawable" by "layer".
	General message cleanup and consistency check.

	* app/pdb/image_cmds.c: regenerated.
2003-11-14 15:33:40 +00:00
Sven Neumann f98c0013f1 app/config/gimpscanner.c configured the scanner to use 64bit integers.
2003-11-14  Sven Neumann  <sven@gimp.org>

	* app/config/gimpscanner.c
	* app/config/gimpconfig-deserialize.c: configured the scanner to
	use 64bit integers. This means you must now access value.v_int64
	instead of value.v_int. Fortunately gimp_scanner_parse_int() hides
	this ugly detail from you.

	* app/config/gimpconfig-params.[ch]
	* app/config/gimpconfig-types.c: derive GimpMemsize from guint64
	now that support for 64bit integers is guaranteed by glib.

	* app/config/gimpbaseconfig.c
	* app/config/gimpcoreconfig.c
	* app/config/gimpguiconfig.[ch]
	* app/widgets/gimppropwidgets.c: changed accordingly.

	* app/gui/preferences-dialog.c: changed a label.
2003-11-14 13:41:16 +00:00
Sven Neumann c1a2c6d9ce unset the scanner scope to avoid identifiers that match symbol names to be
2003-11-13  Sven Neumann  <sven@gimp.org>

	* app/config/gimpconfig-deserialize.c
	(gimp_config_deserialize_unknown)
	(gimp_config_deserialize_property): unset the scanner scope to
	avoid identifiers that match symbol names to be parsed as symbols.
2003-11-13 17:09:23 +00:00
Sven Neumann 74c8218a3f added GIMP_CONFIG_ERROR_VERSION to GimpConfigError enum.
2003-11-08  Sven Neumann  <sven@gimp.org>

	* app/config/gimpconfig-error.h: added GIMP_CONFIG_ERROR_VERSION
	to GimpConfigError enum.

	* libgimpbase/gimpprotocol.h: renamed GP_VERSION to
	GIMP_PROTOCOL_VERSION.

	* libgimp/gimp.c
	* app/plug-in/plug-in-run.c: changed accordingly.

	* app/plug-in/plug-in-rc.[ch]: write the protocol version to the
	pluginrc and stop parsing when a wrong protocol version is found.

	* app/plug-in/plug-ins.c: pass a GError to plug_in_rc_parse().
2003-11-07 23:47:35 +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 da365fdba9 app/app-docs.sgml updated.
2003-10-25  Sven Neumann  <sven@gimp.org>

	* app/app-docs.sgml
	* app/app-sections.txt: updated.

        * app/config/gimpconfig-utils.c: fixed inline docs.
2003-10-25 20:32:10 +00:00
Sven Neumann f7db733ee2 make it a two-way connection and added a property_name parameter so it can
2003-10-25  Sven Neumann  <sven@gimp.org>

	* app/config/gimpconfig-utils.[ch] (gimp_config_connect): make it
	a two-way connection and added a property_name parameter so it
	can be used to connect only a certain property.

	* app/tools/gimptexttool.c: changed accordingly.

	* app/tools/gimphistogramoptions.c: use gimp_config_connect().
	Changed the default histogram scale to linear.
2003-10-25 17:25:34 +00:00
Sven Neumann f299ada6e3 themes/Default/images/Makefile.am
2003-10-24  Sven Neumann  <sven@gimp.org>

	* themes/Default/images/Makefile.am
	* themes/Default/images/stock-histogram-linear-16.png
	* themes/Default/images/stock-histogram-logarithmic-16.png:
	added placeholders for new icons.

	* libgimpwidgets/gimpstock.[ch]: register the new icons.

	* app/tools/gimphistogramtool.c: made the dialog more compact by
	using a stock-box for the histogram scale.

	* app/widgets/gimphistogramview.c (gimp_histogram_view_expose):
	don't invert the histogram view if the full range is selected.

	* app/widgets/gimphistogrambox.c: moved the range widgets below
	the histogram.

	* app/config/gimpconfig-params.h: added macro
	GIMP_CONFIG_INSTALL_PROP_RESOLUTION() that installs a double
	property with the suitable range.

	* app/core/gimptemplate.c
	* app/config/gimpdisplayconfig.c: use it here.
2003-10-24 06:22:53 +00:00
Sven Neumann 3930693783 base/base.c (base_init) moved the message about possible debug messages to
2003-10-21  Sven Neumann  <sven@gimp.org>

	* base/base.c (base_init)
	* app/errors.c (gimp_errors_init): moved the message about
	possible debug messages to gimp_errors_init() so that it appears
	before any startup debug output.

	* app/app_procs.c (app_init): register a log handler for the
	GimpConfig log domain.

	* app/widgets/gimpwidgets-utils.c (gimp_message_box)
	* app/core/gimp.c (gimp_message): added an extra newline when
	sending messages to stderr. Don't output the full progname for
	messages; use a simple "GIMP" like the GUI message handler does.

	* app/gui/user-install-dialog.c: removed function copy_file()...

	* app/config/gimpconfig-utils.[ch]: ... and added it here as
	gimp_config_file_copy(). Also added utility function
	gimp_config_file_backup_on_error().

	* app/config/gimprc.c (gimp_rc_load): if the user gimprc can't be
	parsed, create a backup and if that succeeds unlink the broken one
	to cure the problem.

	* app/gui/session.c: create a backup if sessionrc can't be parsed.

	* config/gimpconfig-deserialize.c (gimp_config_deserialize_properties):
	don't set an error when token is G_TOKEN_NONE; it should already
	be set then.
2003-10-21 18:14:58 +00:00
Michael Natterer b09cadf033 app/widgets/gimpdocked.c (gimp_docked_iface_base_init) they are base_init,
2003-10-15  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpdocked.c (gimp_docked_iface_base_init)
	* app/config/gimpconfig.c (gimp_config_iface_base_init): they are
	base_init, not just init functions. Changed implementations to not
	overwrite the parent class' vtable entries with the default
	implementations. Fixes derived interface methods and brings
	back all dockable menus.
2003-10-15 20:05:23 +00:00
Sven Neumann 77e69b7b91 fixed comment.
2003-10-15  Sven Neumann  <sven@gimp.org>

	* app/config/gimpconfig-utils.c (gimp_config_sync): fixed comment.
2003-10-15 17:54:42 +00:00
Sven Neumann 1e0816fa93 minor cleanup.
2003-10-15  Sven Neumann  <sven@gimp.org>

	* app/config/gimpconfig-utils.c (gimp_config_diff_internal): minor
	cleanup.

	* app/core/gimptemplate.[ch]: added a comment property.

	* app/config/gimpcoreconfig.[ch]
	* app/config/gimprc-blurbs.h: removed "default_comment" property
	and set the default comment on the default image template.

	* app/widgets/gimptemplateeditor.c: added a comment editor widget.

	* app/core/gimp.c
	* app/gui/file-new-dialog.c
	* app/gui/preferences-dialog.c
	* app/pdb/gimprc_cmds.c
	* tools/pdbgen/pdb/gimprc.pdb: changed accordingly.

	* libgimpwidgets/gimpmemsizeentry.c (gimp_memsize_entry_init):
	increased spacing between the spinbutton and the menu.
2003-10-15 15:30:11 +00:00
Sven Neumann cff08b64ae app/config/gimpconfig-utils.c (gimp_config_diff) (gimp_config_sync)
2003-10-15  Sven Neumann  <sven@gimp.org>

	* app/config/gimpconfig-utils.c (gimp_config_diff) (gimp_config_sync)
	* app/config/gimpconfig.c (gimp_config_iface_equal): compare and sync
	aggregate objects recursively.

	* app/core/gimptemplate.c (gimp_template_finalize): don't leak the
	filename.

	* app/display/gimpdisplayshell-title.c
	* app/config/gimpconfig-dump.c: added %L format identifier for
	verbose layer count. Renamed former %L to %n (layer name).

	* app/config/gimpdisplayconfig.c: changed default image title and
	image status format strings.

	* app/gui/dialogs-constructors.c: added a blurb for Templates
	dockables.

	* app/display/gimpdisplayshell.h: fixed typo.
2003-10-14 23:00:16 +00:00
Sven Neumann 737da42437 removed gimp_config_copy_properties() and added the more intelligent
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-10-14 15:20:59 +00:00
Sven Neumann 350f98824c fixed dependencies for test-config.
2003-10-12  Sven Neumann  <sven@gimp.org>

	* app/config/Makefile.am: fixed dependencies for test-config.

	* app/config/gimpconfigwriter.[ch]: code cleanup and documentation.

	* app/composite/gimp-composite-generic.[ch]: made prototype for
	gimp_composite_color_any_any_any_generic() match the implementation.

	* app/composite/gimp-composite.c: fixed some issues with the
	comment templates.
2003-10-12 16:46:50 +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 75a4ce914e documentation fixes.
2003-10-11  Sven Neumann  <sven@gimp.org>

	* app/config/gimpconfig-deserialize.c: documentation fixes.

2003-10-11  Sven Neumann  <sven@gimp.org>

	* app/app-docs.sgml
	* app/app-sections.txt
	* app/app.types: updated.

	* app/app.prerequisites: removed, it's a generated file.
2003-10-11 15:02:03 +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 bb044204a0 make it handle aggregate object properties by calling itself recursively.
2003-10-01  Sven Neumann  <sven@gimp.org>

	* app/config/gimpconfig-utils.c (gimp_config_diff): make it handle
	aggregate object properties by calling itself recursively.
2003-10-01 12:54:58 +00:00
Michael Natterer 017d183968 Fixed handling of G_PARAM_CONSTRUCT_ONLY properties:
2003-09-29  Michael Natterer  <mitch@gimp.org>

	Fixed handling of G_PARAM_CONSTRUCT_ONLY properties:

	* app/config/gimpconfig.c (gimp_config_iface_duplicate): build
	a GParameter array of G_PARAM_CONSTRUCT_ONLY properties and
	use g_object_newv() instead of g_object_new() to create the
	copy.

	* app/config/gimpconfig-utils.c
	(gimp_config_copy_properties)
	(gimp_consif_reset_properties): don't try to copy/reset
	G_PARAM_CONSTRUCT_ONLY properties because it is impossible.

	(gimp_config_connect_notify): ditto. Also don't try to read
	from unreadable or write to unwritable properties.
2003-09-29 18:29:11 +00:00
Sven Neumann a06c96e5bc workaround for GLib bug #116617: set GimpConfigError before calling
2003-09-23  Sven Neumann  <sven@gimp.org>

	* app/config/gimpscanner.c (gimp_scanner_new_file): workaround for
	GLib bug #116617: set GimpConfigError before calling g_strerror().
	Fixes bug #122939.
2003-09-23 15:22:30 +00:00
Sven Neumann b58e0121af UTF-8 validate the value set using gimprc_set(); mention this in the
2003-09-22  Sven Neumann  <sven@gimp.org>

	* tools/pdbgen/pdb/gimprc.pdb: UTF-8 validate the value set using
	gimprc_set(); mention this in the documentation.

	* app/pdb/gimprc_cmds.c
	* libgimp/gimpgimprc_pdb.c: regenerated.

	* app/config/gimpconfig-path.c (gimp_config_path_expand): added
	inline docs since this function is really not self-explanatory.
2003-09-22 21:20:17 +00:00
Sven Neumann 2b47b79bb7 fixed the fix.
2003-09-17  Sven Neumann  <sven@gimp.org>

	* app/config/gimpconfig-path.c (gimp_config_path_expand): fixed
	the fix.
2003-09-17 10:57:14 +00:00
Dave Neary da6dfbd50f Fixed a seg fault in an earlier commit.
2003-09-16  Dave Neary  <bolsh@gimp.org>

        * app/config/gimpconfig-path.c: Fixed a seg fault in an earlier
        commit.
2003-09-16 19:41:44 +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
Michael Natterer 73b1ed03c6 app/config/gimpcoreconfig.[ch] removed "module-load-inhibit" property
2003-09-02  Michael Natterer  <mitch@gimp.org>

	* app/config/gimpcoreconfig.[ch]
	* app/config/gimprc-blurbs.h: removed "module-load-inhibit"
	property since the GimpModuleDB stores this value.

	* app/config/gimpconfigwriter.[ch] (gimp_config_writer_new):
	renamed parameter "gboolean safe" to "gboolean atomic".

	* app/core/gimpmodules.c: ported modulerc parsing/writing to
	GimpScanner and GimpConfigWriter (apparently it was forgotten
	during gimprc cleanup). Makes keeping modules from being loaded
	work again. Reported by Michael Schumacher on #gimp.
2003-09-02 12:55:38 +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 d75a2f79ba app/config/Makefile.am moved code from gimpconfig.[ch] to these new files.
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-07-24 14:14:23 +00:00
Michael Natterer 486aed8e0d added "gboolean allow_percent" to gimp_param_spec_unit() and to the
2003-07-17  Michael Natterer  <mitch@gimp.org>

	* app/config/gimpconfig-params.[ch]: added "gboolean allow_percent"
	to gimp_param_spec_unit() and to the GIMP_CONFIG_INSTALL_PROP_UNIT()
	macro. Changed value validation accordingly.

	* app/config/gimpconfig-types.c (string_to_unit): parse "percent"
	correctly.

	* app/widgets/gimppropwidgets.c (gimp_prop_unit_menu_new): show
	the "Percent" menu entry if the param_spec allows percent.

	* app/config/gimpcoreconfig.c
	* app/core/gimpgrid.c
	* app/core/gimptemplate.c
	* app/text/gimptext.c: pass FALSE to disallow percent.

	* app/paint/gimppaintoptions.c
	* app/tools/gimpselectionoptions.c: pass TRUE. Brings back the
	percent feature for fade_length, gradient_length and fixed_size
	rect/ellipse select.

	* app/tools/gimpbucketfilloptions.c
	* app/tools/gimpmagnifyoptions.c
	* app/tools/gimpselectionoptions.c
	* app/tools/gimptransformoptions.c: don't call the the reset()
	functions from the GUI constructors (and reset the options just
	deserialized from disk). Instead, added set_defaults() functions
	which do everything the old reset() functions did (except
	upchaining) and call set_defaults() from reset() and from the GUI
	constructors.
2003-07-17 15:22:21 +00:00
Michael Natterer 947df71427 don't return stuff from a void function (spotted by Jimmer on #gimp).
2003-07-11  Michael Natterer  <mitch@gimp.org>

	* app/config/gimpconfig.c (gimp_config_reset): don't return stuff
	from a void function (spotted by Jimmer on #gimp). Removed
	trailing whitespace.
2003-07-11 12:22:42 +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
Sven Neumann 7a6a908ad2 added new function gimp_config_serialize_to_fd() for the sake of
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-24 19:45:55 +00:00
Sven Neumann 7c503b81a6 store file descriptor and filename in a private struct instead of using
2003-06-24  Sven Neumann  <sven@gimp.org>

	* app/config/gimpscanner.c: store file descriptor and filename in
	a private struct instead of using internals of GScanner. Should
	fix problems on Win32 reported by Hans Breuer.
2003-06-24 11:46:19 +00:00
Sven Neumann f30586d112 app/config/gimpconfig.[ch] app/config/gimpconfigwriter.[ch] added support
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-06-23 22:02:56 +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
Michael Natterer e7fbd8106f reset object properties only if they are GIMP_PARAM_SERIALIZABLE.
2003-04-05  Michael Natterer  <mitch@gimp.org>

	* app/config/gimpconfig-utils.c (gimp_config_reset_properties):
	reset object properties only if they are GIMP_PARAM_SERIALIZABLE.

	* app/core/gimpcontext.[ch]: added a GimpTemplate property.

	* app/gui/dialogs-constructors.[ch]
	* app/gui/dialogs.c: added a template dialog.

	* app/gui/dialogs-menu.c
	* app/gui/image-menu.c
	* app/gui/toolbox-menu.c: and menu entries to open it.

	* app/widgets/gimpdnd.[ch]: added DND for GimpTemplates.
2003-04-05 19:56:38 +00:00
Michael Natterer 21def17709 allow object properties to be set again if they are G_PARAM_WRITABLE.
2003-03-27  Michael Natterer  <mitch@gimp.org>

	* app/config/gimpconfig-deserialize.c
	(gimp_config_deserialize_property): allow object properties to be
	set again if they are G_PARAM_WRITABLE. Fixes active brush,
	pattern etc. deserialization.
2003-03-27 11:36:01 +00:00
Sven Neumann 28fddfd554 Makefile.am removed this header file.
2003-03-25  Sven Neumann  <sven@gimp.org>

	* Makefile.am
	* gimpintl.h: removed this header file.

	* gimpmiscui.c: include libgimp-intl.h.

	* gimp.c (gimp_main): call setlocale() and bind to the libgimp
	textdomain so that plug-ins don't need to do that explicitely.

	* libgimp/stdplugins-intl.h: added the functionality that used to
	live in gimpintl.h and removed the libgimp related stuff. Got rid
	of the INIT_I18N_UI() macro.

	* plug-ins/*/*.c: removed all occurances of INIT_I18N_UI().
	Plug-ins simply call INIT_I18N() once in their run() function.

	* plug-ins/script-fu/script-fu-intl.h: added the functionality
	that used to live in gimpintl.h and removed the libgimp related
	stuff.

	* app/Makefile.am
	* app/gimp-intl.h: new file that defines the gettext macros for
	the GIMP core.

	* app/*/*.c: include gimp-intl.h instead of libgimp/gimpintl.h.

	* plug-ins/script-fu/scripts/test-sphere.scm: fixed typos.
2003-03-25 16:38:19 +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 3ab2e64809 removed gimp_scanner_parse_string_list() since the format it read wasn't
2003-03-10  Sven Neumann  <sven@gimp.org>

	* app/config/gimpscanner.[ch]: removed gimp_scanner_parse_string_list()
	since the format it read wasn't proper s-expressions syntax.

	* app/config/gimpconfigwriter.c: a couple of minor cleanups.

	* app/gui/color-history.[ch]
	* app/gui/session.c
	* app/widgets/gimpdialogfactory.[ch]: use GimpConfigWriter to
	write the sessionrc. Had to do some minor changes to the file
	format.
2003-03-10 19:01:07 +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 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