Commit Graph

14 Commits

Author SHA1 Message Date
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
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 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 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
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
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 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
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
Hans Breuer 8522a8470d add appconfig.lib. Statically link libgimptool/gimptool.lib.
2001-05-11  Hans Breuer  <hans@breuer.org>

	* app/makefile.msc : add appconfig.lib. Statically
	link libgimptool/gimptool.lib.

	* app/main.c : use gimp_locale_directory()

	* app/config/gimpconfig-utils.c : <string.h>

	* app/config/makefile.msc : add gimpscanner

	* app/core/gimpimagefile.c : some G_OS_WIN32 mess to get
	mkdir() and chmod()

	* app/display/gimpdisplayshell.c
	  app/plug-in/plug-in-progrss.c
	  app/tool/gimpcolorpickertool.c
	  app/tool/gimpcroptool.c
	  app/tool/gimpmeasuretool.c
	  app/tool/gimpperspectivetool.c
	  app/tool/gimprotatetool.c
	  app/tool/gimpscaletool.c
	  app/tool/gimpsheartool.c
	  app/tool/gimptransformtool.c
	  app/widgets/gimpcolormapeditor.c
	  app/widgets/gimpcolorpanel.c
	  app/widgets/gimptoolbox-color-area.c
	add #ifdef __GNUC__ to avoid breaking on non standard
	pragma #warning

	* app/tools/makefile.msc : add gimptoolcontrol remove
	tools-enum

	* app/tools/tool_manager.c : need to include
	libgimptool/gimptoolcontrol.h after core includes
	otherwise we would compile without prototypes or
	break miserably

	* app/gui/plug-in-menus.c : replace LOCALEDIR with
	gimp_locale_directory ()

	* app/gui/preferences-dialog.c (prefs_notebook_append_page) :
	only try to gdk_pixbuf_new_from_file() with a valid filename.
	It should simply return NULL otherwise, but fails if the
	filename is an empty string.

	* app/paint-funcs/makefile.msc : add -FImsvc_recommended_pragmas.h

	* app/widgets/gimpcolormapeditor.c : the 'row'
	allocated needs to be 'xn * cellsize * 2' (to avoid
	accessing unowned memory) not only width, which has
	become allocation.width by someone commenting out
	the correct size calculation

	* app/widgets/gimpdialogfactory.c : varargs to macros
	are GCCism or at least non standard. #define DEBUG
	to g_print or nothing - without arguments - does fix
	it somewhat dirty as the compiler needs to tolerate
	the '(blah, foo, bar);' statement than

	* app/widgets/makefile.msc : updated

	* app/xcf/makefile.msc : add -FImsvc_recommended_pragmas.h

	* etc/gimprc.win32 : use ';' to separate theme-path

	* libgimpbase/gimpenv.c : #include <stdio.h>
	for sprintf()

	* app/widgets/gimpdnd.c (gimp_dnd_set_file_data) :
	the passed in vals chunk is not always null-terminated
	(at least not on win32). Use the length parameter too
	to avoid reading junk filenames.

	* libgimp/gimp.def : export gimp_image_get_name()

	* libgimpbase/gimpbase.def : export gimp_locale_directory()
	* libgimpbase/gimpenv.[ch] : added gimp_locale_directory ()

	* libgimpbase/makefile.msc : define DATADIR and SYSCONFDIR
	to empty string to let gimp find its files in the common
	place (win32: relative to the top level gimp dir)

	* plug-ins/common/pixelize.c : <string.h>

	* plug-ins/flame/cmap.c : #include <glib.h> for g_random_int()

	* plug-ins/makefile.msc : -FImsvc_recommended_pragams.h
	and a little hack to give imagemap the prototypes it
	desires without changing the lexed source

	* themes/Default/images/makefile.msc : now added (see below)

	* themes/Default/images/stock-button-reset.png : made it binary
2002-05-10 23:30:09 +00:00
Sven Neumann 7f6b1d5593 app/config/gimpconfig-serialize.c app/config/gimpconfig-utils.[ch]
2002-05-06  Sven Neumann  <sven@gimp.org>

	* app/config/gimpconfig-serialize.c
	* app/config/gimpconfig-utils.[ch]
	* app/config/gimpconfig.[ch]
	* app/config/gimprc.[ch]: added a GimpRc implementation of
	gimp_config_duplicate() that also copies unknown tokens. Added new
	function gimp_rc_query().

	* app/config/test-config.c: added tests for gimp_rc_query().

	* app/config/Makefile.am: need to link test app against libappwidgets.
2002-05-05 22:11:34 +00:00
Sven Neumann 43c602dc95 app/arch/i386/mmx/detect_mmx.S applied a patch from iccii@hotmail.com that
2002-05-04  Sven Neumann  <sven@gimp.org>

	* app/arch/i386/mmx/detect_mmx.S
	* app/arch/i386/mmx/paint_funcs_mmx.S: applied a patch from
	iccii@hotmail.com that promises to fix build on mingw (bug #80681).

	* app/config/gimpconfig-serialize.c
	* app/config/gimpconfig-utils.[ch]: moved value compare function to
	gimpconfig-utils.

	* app/config/gimpconfig.[ch]: added duplicate and compare functions
	to GimpConfigInterface so derived interfaces can override them.

	* app/tools/gimptexttool.c: fixed tool cursor.
2002-05-03 23:48:03 +00:00
Sven Neumann def233b497 app/config/Makefile.am new files with utility functions.
2001-12-18  Sven Neumann  <sven@gimp.org>

	* app/config/Makefile.am
	* app/config/gimpconfig-utils.[ch]: new files with utility functions.

	* app/config/gimpdisplayconfig.[ch]: new class with display config
	properties so GimpGuiConfig doesn't get too large.

	* app/config/gimpbaseconfig.c
	* app/config/gimpcoreconfig.[ch]
	* app/config/gimpguiconfig.[ch]: install path properties with
	useable defaults (substituted gimpdir and friends). Moved properties
	around.

	* app/gui/session.c: removed outdated comment.
2001-12-18 12:39:45 +00:00