Commit Graph

1061 Commits

Author SHA1 Message Date
Michael Natterer b705a3ab99 cosmetic cleanup.
2002-10-30  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpbrush.[ch]: cosmetic cleanup.
2002-10-30 18:25:40 +00:00
Michael Natterer c7ac6aff52 Moved generic datafile loading to LibGimpBase:
2002-10-23  Michael Natterer  <mitch@gimp.org>

	Moved generic datafile loading to LibGimpBase:

	* app/core/gimpdatafiles.[ch]: removed...

	* libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed
	API which requires no more global variables.

	* libgimpbase/Makefile.am
	* libgimpbase/gimpbase.h
	* libgimpbase/gimpbasetypes.h
	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpdatafactory.c
	* app/gui/gui.c
	* app/plug-in/plug-in.c
	* app/plug-in/plug-ins.c
	* app/tools/tools.c: changed accordingly.

	Moved module loading to LibGimpModule:

	* app/core/gimpmodules.c: removed lots of code...

	* libgimpmodule/gimpmoduledb.[ch]: ...and added it here as
	GimpModuleDB object.

	* libgimpmodule/Makefile.am
	* libgimpmodule/gimpmoduletypes.h: changed accordingly.

	* app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db.

	* libgimpmodule/gimpmodule.[ch]: added
	gimp_module_query(). Internal cleanup. Stuff...

	* app/gui/module-browser.c: changed accordingly. Unfinished...

	* app/core/gimpcontainer.c
	* app/core/gimplist.c: reverted the HACKS introduced recently.

	* app/core/gimpobject.[ch]: added gimp_g_object_get_memsize()
	utility function.

	* libgimpproxy/gimpobject.[ch]: regenerated.

	Changed display filter configuration stuff:

	* libgimpwidgets/gimpcolordisplay.[ch]: made the virtual
	configure() function return a GtkWidget instead of opening a
	dialog. Changed configure_cancel() to configure_reset(). Added
	"changed" signal.

	* app/display/gimpdisplayshell-filter-dialog.c: embed the filters'
	config GUI in the dialog. Connect to "changed" and added a "Reset"
	button which resets the filter.

	* modules/cdisplay_gamma.c
	* modules/cdisplay_highcontrast.c: changed accordingly.

	* modules/colorsel_triangle.c
	* modules/colorsel_water.c: minor fixes.

2002-10-23  Michael Natterer  <mitch@gimp.org>

	* libgimpbase/libgimpbase-docs.sgml
	* libgimpbase/libgimpbase-sections.txt
	* libgimpbase/tmpl/gimpbasetypes.sgml
	* libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles

	* libgimpmodule/libgimpmodule-docs.sgml
	* libgimpmodule/libgimpmodule-sections.txt
	* libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB.

	* libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type

	* libgimpmodule/tmpl/gimpmodule.sgml
	* libgimpwidgets/tmpl/gimpcolordisplay.sgml
	* libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 14:55:07 +00:00
Michael Natterer 0f77b4228f Makefile.am libgimpmodule/.cvsignore libgimpmodule/Makefile.am
2002-10-21  Michael Natterer  <mitch@gimp.org>

	* Makefile.am
	* libgimpmodule/.cvsignore
	* libgimpmodule/Makefile.am
	* libgimpmodule/gimpmodule.[ch]
	* libgimpmodule/gimpmodule.def
	* libgimpmodule/gimpmoduletypes.h
	* libgimpmodule/makefile.msc: new library for module loading.

	* configure.in: generate Makefiles for libgimpmodule and its
	devel-docs. Added GMODULE_CFLAGS and GMODULE_LIBS.

	* app/Makefile.am: link the app against it.

	* libgimp/gimpmodule.h
	* app/core/gimpmoduleinfo.[ch]: removed.

	* libgimp/Makefile.am
	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpmodules.c
	* app/gui/module-browser.c: changed accordingly.

	* modules/cdisplay_gamma.c
	* modules/cdisplay_highcontrast.c
	* modules/colorsel_triangle.c
	* modules/colorsel_water.c: #include "libgimpmodule/gimpmodule.h"

2002-10-21  Michael Natterer  <mitch@gimp.org>

	* Makefile.am
	* libgimpmodule/.cvsignore
	* libgimpmodule/Makefile.am
	* libgimpmodule/libgimpmodule-docs.sgml
	* libgimpmodule/libgimpmodule-sections.txt
	* libgimpmodule/libgimpmodule.types
	* libgimpmodule/tmpl/.cvsignore
	* libgimpmodule/tmpl/gimpmodule.sgml
	* libgimpmodule/tmpl/gimpmoduletypes.sgml: added API docs for the
	new module loading lib.

	* libgimp/tmpl/gimpmodule.sgml: removed.

	* libgimp/libgimp-docs.sgml
	* libgimp/libgimp-sections.txt: changed accordingly.

	* libgimpwidgets/tmpl/gimpcolordisplay.sgml
	* libgimpwidgets/tmpl/gimpcolorselect.sgml
	* libgimpwidgets/tmpl/gimpcolorselector.sgml: updated.

2002-10-21  Michael Natterer  <mitch@gimp.org>

	* POTFILES.in: removed app/core/gimpmoduleinfo.c

2002-10-21  Michael Natterer  <mitch@gimp.org>

	* POTFILES.in: added libgimpmodule/gimpmodule.c
2002-10-21 14:15:02 +00:00
Michael Natterer 4cb04533e4 app/core/gimpmoduleinfo.[ch] separated module query from type registration
2002-10-20  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpmoduleinfo.[ch]
	* libgimp/gimpmodule.h: separated module query from type
	registration by adding a separate "gimp_module_query" function
	which must be implemented by modules. Make local copies of the
	strings returned by the query function.

	* app/core/gimpmodules.c
	* app/gui/module-browser.c: changed accordingly.

	* modules/cdisplay_gamma.c
	* modules/cdisplay_highcontrast.c
	* modules/colorsel_triangle.c
	* modules/colorsel_water.c: added the gimp_module_query() functions.
2002-10-20 12:40:30 +00:00
Michael Natterer d7055a3351 Ported module loading to GTypeModule, getting rid of all own module
2002-10-20  Michael Natterer  <mitch@gimp.org>

	Ported module loading to GTypeModule, getting rid of all own
	module registering/bookkeeping stuff for color selectors and
	display filters. The modules now simply register GimpColorSelector
	and GimpColorDisplay subclasses, the list of registered subclasses
	can then be obtained calling g_type_children() on the abstract
	base classes.

	This is work in progress and just the first working state after I
	started breaking everything...

	* app/gui/color-select.[ch]
	* libgimp/gimpcolordisplay.h
	* libgimp/gimpcolorselector.h: removed.

	* app/gui/Makefile.am
	* libgimp/Makefile.am: changed accordingly.

	* libgimp/gimpmodule.h: massively simplified. All voodoo is gone.

	* libgimpwidgets/gimpcolordisplay.[ch]
	* libgimpwidgets/gimpcolorselector.[ch]: new abstract base classes
	which need to be subclassed by modules.

	* libgimpwidgets/gimpcolorselect.[ch]: the built-in color selector
	from app/gui/color-select.* ported to be a GimpColorSelector
	subclass.

	* libgimpwidgets/Makefile.am
	* libgimpwidgets/gimpwidgets.h
	* libgimpwidgets/gimpwidgetsmarshal.list
	* libgimpwidgets/gimpwidgetstypes.h: changed accordingly.

	* app/core/gimpmoduleinfo.[ch]: made it a GTypeModule subclass

	* app/core/gimpmodules.c: changed accordingly.

	* app/core/gimpcontainer.c
	* app/core/gimplist.c: HACKED around to allow GimpLists of
	GObjects (not GimpObjects). This is EEKy, so I will either make
	gimp->modules a simple GList and revert this bit of change, or
	allow GObjects all over the place in GimpContainer land...

	* app/display/gimpdisplayshell-filter.[ch]
	* app/gui/color-notebook.c: removed all module stuff and use
	g_type_children() to get the list of available color_selectors
	and display_filters.

	* app/display/gimpdisplayshell-filter-dialog.c
	* app/display/gimpdisplayshell-render.c
	* app/gui/module-browser.c: changed accordingly.

	* app/gui/gui.c: ref the built-in color selector's class before
	the modules are queried so it appears first in the list of
	GimpColorSelector's children.

	* modules/Makefile.am: build the water color selector again.

	* modules/cdisplay_gamma.c
	* modules/cdisplay_highcontrast.c
	* modules/colorsel_triangle.c
	* modules/colorsel_water.c: ported them all to the new API.

	* modules/gimpmodregister.[ch]: removed the old EMX module hack.
2002-10-20 10:14:17 +00:00
Sven Neumann cedcb7bc8d changed an error message.
2002-10-18  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage-mask.c (gimp_image_mask_extract): changed an
	error message.

	* app/widgets/gimpmessagebox.c: tweaked so it looks more like the
	query box.
2002-10-18 15:16:05 +00:00
Sven Neumann 6303579945 added convenience function gimp_display_coords_in_active_drawable().
2002-10-14  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplay.[ch]: added convenience function
	gimp_display_coords_in_active_drawable().

	* app/tools/gimpcurvestool.c: indicate the possibility to pick color
	values from the image by showing a color picker cursor. Made the
	file selection dialog transient for the tool shell.

	* app/tools/gimplevelstool.c: made the file selection dialog
	transient for the tool shell.
2002-10-14 13:39:35 +00:00
Sven Neumann 01a8d7cb93 added PANGO_FT2_CFLAGS.
2002-10-11  Sven Neumann  <sven@gimp.org>

	* app/core/Makefile.am (INCLUDES): added PANGO_FT2_CFLAGS.
2002-10-10 23:46:45 +00:00
Sven Neumann ce5aa0c929 optionally allow GIMP_UNIT_PIXEL as value for GimpUnit params.
2002-10-10  Sven Neumann  <sven@gimp.org>

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

	* app/core/gimpimage-text.[ch]
	* app/core/gimptext.[ch]
	* app/tools/gimptexttool.c: moved some code around.
2002-10-10 17:07:46 +00:00
Sven Neumann ce3af12618 app/core/Makefile.am app/core/core-types.h added first draft of a GimpText
2002-10-10  Sven Neumann  <sven@gimp.org>

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimptext.[ch]: added first draft of a GimpText object.
2002-10-10 14:30:01 +00:00
Michael Natterer 0c586b3044 adjust the cell_size of the preview dynamically (makes them look nicer).
2002-10-09  Michael Natterer  <mitch@gimp.org>

	* app/core/gimppalette.c (gimp_palette_get_new_preview): adjust
	the cell_size of the preview dynamically (makes them look nicer).

	* app/core/gimppalette-import.c: require n_colors to be at least
	2, not 1. Cleanup.

	* app/gui/palette-import-dialog.c: completely chopped and
	re-assembled source and GUI. Please have a look and comment...
2002-10-09 14:04:25 +00:00
Sven Neumann 29a75b7b07 new files that implement the text rendering that used to live in
2002-10-09  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage-text.[ch]: new files that implement the text
	rendering that used to live in gimptexttool.[ch].

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/tools/gimptexttool.[ch]
	* tools/pdbgen/Makefile.am
	* tools/pdbgen/pdb/text_tool.pdb: changed accordingly.

	* tools/pdbgen/enums.pl
	* app/pdb/text_tool_cmds.c: regenerated.
2002-10-09 14:00:26 +00:00
Sven Neumann e5595d6153 an attempt to fix bug #94749 (gimp_image_duplicate crashes if floating
2002-10-08  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage-duplicate.c: an attempt to fix bug #94749
	(gimp_image_duplicate crashes if floating selection exists).

	* data/images/gimp_splash.png: a new blinkensplash from Paris.
2002-10-08 13:25:50 +00:00
Michael Natterer 45f2ed6294 set channel->bounds_known to FALSE (fixes #93853).
2002-09-24  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpchannel.c (gimp_channel_sharpen): set
	channel->bounds_known to FALSE (fixes #93853).
2002-09-24 15:57:27 +00:00
Michael Natterer 451d392aac Some PDB cleanup:
2002-09-10  Michael Natterer  <mitch@gimp.org>

	Some PDB cleanup:

	* tools/pdbgen/pdb/procedural_db.pdb: removed the get_data() and
	set_data() implementations and the global "data_list" variable.
	Cleaned up the dump() stuff (pass the FILE pointer around instead
	of having a global variable for it). Fixed output_string() so it
	does not crash on NULL strings.

	* app/core/gimp.[ch]: added gimp->procedural_db_data_list.

	* app/pdb/procedural_db.[ch]: added procedural_db_[set|get]_data().
	Don't leak data identifiers when overwriting an already existing
	entry. Added g_return_if_fail() stuff to all public functions.

	* tools/pdbgen/pdb/channel.pdb
	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/layer.pdb
	* tools/pdbgen/pdb/parasite.pdb: tweaked some helper functions to
	take parameters which make them aware of the real type of the
	objects they handle (e.g. the PDB function gimp_layer_set_name()
	matches the core function gimp_object_get_name()).

	* app/pdb/pdb_glue.h: removed ugly CPP-level workarounds for the
	issue mentioned above.

	* app/pdb/channel_cmds.c
	* app/pdb/drawable_cmds.c
	* app/pdb/layer_cmds.c
	* app/pdb/parasite_cmds.c
	* app/pdb/procedural_db_cmds.c: regenerated.
2002-09-10 20:23:00 +00:00
Michael Natterer 3106802da5 return gimage->cmap directly instead of calling
2002-09-08  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage.c (gimp_image_get_colormap): return
	gimage->cmap directly instead of calling
	gimp_drawable_cmap(active_drawable) without checking if there
	actually is an active_drawable.

	* tools/pdbgen/pdb/image.pdb (image_get_cmap): use g_memdup()
	instead of g_new() followed by memcpy().

	* app/pdb/image_cmds.c: regenerated.
2002-09-08 10:00:20 +00:00
Hans Breuer e17baf71d6 updated
2002-09-06  Hans Breuer  <hans@breuer.org>

	* */*/makefile.msc : updated

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

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

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

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

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

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

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

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

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

	* regexrepl/makefile.msc : build as dll

	* plug-ins/makefile.msc : updated

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

	* plug-ins/common/spheredesigner.c : avoid error
	'incompatible types' while assigning, use memcpy()
2002-09-06 22:25:19 +00:00
Michael Natterer 54c377d7dd put the call to gimp_drawable_mask_bounds() back because we always need
2002-09-05  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawable-bucket-fill.c: put the call to
	gimp_drawable_mask_bounds() back because we always need the region
	to apply the fill (fixes non-seed-fill fills). Also take
	"sample_merged" into account when intersecting the resulting mask
	with the image's selection.

	Fixed unrelated bug:

	* app/core/gimpimage-contiguous-region.c: need to use
	gimp_image_projection_bytes(), not drawable->bytes if
	"sample_marged" is TRUE.
2002-09-05 13:36:30 +00:00
Dave Neary 738993fbc5 Small patch to modify the behaviour of the bucket fill tool if there is an
2002-09-04  Dave Neary  <bolsh@gimp.org>
        * app/core/gimpdrawable-bucket-fill.c: Small patch to
        modify the behaviour of the bucket fill tool if there
        is an active selection. Question: Should the bucket fill
        only work if clicked inside the selection? Currently a
        click anywhere works, and stuff gets drawn if the region
        intersects the selection. This patch closes bug #72896.
2002-09-04 18:32:17 +00:00
Michael Natterer 0d91f5a8c3 small speedup: use g_object_[get|set]_qdata() instead of
2002-09-02  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpviewable.c: small speedup: use
	g_object_[get|set]_qdata() instead of g_object_[set|set]_data().
2002-09-02 17:35:16 +00:00
Michael Natterer b830a9cf9f remove the attached preview pixbuf just as the preview temp_buf.
2002-09-02  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpviewable.c (gimp_viewable_real_invalidate_preview):
	remove the attached preview pixbuf just as the preview temp_buf.
2002-09-02 17:14:03 +00:00
Michael Natterer f4e1ec9734 Refcount layer masks correctly. Fixes layer mask undo.
2002-09-01  Michael Natterer  <mitch@gimp.org>

	Refcount layer masks correctly. Fixes layer mask undo.

	* app/core/gimplayer.c (gimp_layer_add_mask): ref the mask.

	* app/xcf/xcf-load.c
	* app/gui/layers-commands.c
	* tools/pdbgen/pdb/image.pdb: unref layer masks after adding them.

	* app/pdb/image_cmds.c: regenerated.
2002-09-01 07:25:41 +00:00
Michael Natterer 3ddc24d805 fixed wrong g_return_if_fail() in gimp_channel_feather() so the function
2002-08-29  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpchannel.c: fixed wrong g_return_if_fail() in
	gimp_channel_feather() so the function can be called again (fixes
	#91923). Also added more g_return_if_fail() where they were
	missing and cleaned up everything a bit.
2002-08-29 16:48:17 +00:00
Michael Natterer 9c416076b1 app/undo.c (undo_pop_layer) emit "alpha_changed" from the image if we
2002-08-28  Michael Natterer  <mitch@gimp.org>

	* app/undo.c (undo_pop_layer)
	* app/core/gimpimage.c (gimp_image_[add|remove]_layer): emit
	"alpha_changed" from the image if we started (or ended up)
	with an image containing one layer without alpha.

	* app/core/gimplayer.c: use gimp_container_num_children() instead
	of accessing container->num_children manually.
2002-08-28 14:09:14 +00:00
Michael Natterer 4dc1b80eb2 fixed a bug introduced by myself on 2001-12-13: the floating selection
2002-08-27  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage-mask.c (gimp_image_mask_float): fixed a bug
	introduced by myself on 2001-12-13: the floating selection layer
	needs to be of the type of it's associated drawable, which may be
	different from the image's type if it is a channel or layer mask
	(fixes #91814).
2002-08-27 20:06:40 +00:00
Michael Natterer 21ae8245bc removed #defines and added enum CurvesType instead.
2002-08-27  Michael Natterer  <mitch@gimp.org>

	* app/base/curves.h: removed #defines and added enum CurvesType
	instead.

	* app/core/gimpchannel.c: use TRANSPARENT_OPACITY and
	OPAQUE_OPACITY instead of 0 and 255.

	* app/core/gimplayer.c (gimp_layer_create_mask): fixed inverse
	layer mask creation by setting GIMP_CHANNEL(mask)->bounds_known to
	FALSE correctly (fixes #90982). Also optimized mask creation
	by calling gimp_channel_all() and gimp_channel_clear() for
	white and black masks.
2002-08-27 14:17:46 +00:00
Michael Natterer 1186e83a28 Color correction tool chopping:
2002-08-26  Michael Natterer  <mitch@gimp.org>

	Color correction tool chopping:

	* app/Makefile.am
	* app/image_map.[ch]: removed...

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpimagemap.[ch]: ...and added here as object.

	* app/base/Makefile.am
	* app/base/base-types.h
	* app/base/color-balance.[ch]
	* app/base/curves.[ch]
	* app/base/hue-saturation.[ch]
	* app/base/threshold.[ch]: the lowlevel color correction functions
	plus their parameter structs cut out of the resp. tools.

	* app/core/core-enums.[ch]: removed GimpTransferMode enum...

	* app/base/base-enums.[ch]: ...added it here. Also added
	GimpHueRange for the new hue-saturation files.

	* tools/pdbgen/enums.pl
	* libgimp/gimpenums.h
	* plug-ins/script-fu/script-fu-constants.c: regenerated.

	* app/tools/Makefile.am
	* app/tools/gimpcolorbalancetool-transfer.c: removed (code went
	to base/color-balance.c).

	* app/tools/gimpimagemaptool.[ch]: added most code which was
	diplicated in subclasses. Create the dialog here with a nice title
	bar including image preview and name (fixes #66033). Added virtual
	functions map(), dialog() and reset() which need to be implemented
	by subclasses.

	* app/tools/gimpbrightnesscontrasttool.[ch]
	* app/tools/gimpcolorbalancetool.[ch]
	* app/tools/gimpcurvestool.[ch]
	* app/tools/gimphuesaturationtool.[ch]
	* app/tools/gimplevelstool.[ch]
	* app/tools/gimpposterizetool.[ch]
	* app/tools/gimpthresholdtool.[ch]: removed tons of duplicated
	code and simply implement GimpImageMapTool's virtual functions.
	Removed all dialog structs and keep the variables in the tool
	structs. The dialogs are now created on-the-fly and destroyed when
	the tool goes away, which makes all callbacks much simpler and
	safer. Lots of GUI & code cleanup in all dialogs.

	* app/tools/gimpcurvestool.c
	* app/tools/gimplevelstool.c: added separate "Reset Channel"
	buttons and let the global "Reset" buttons reset all color
	channels.

	* app/tools/tools.c: the various antique foo_free() functions
	don't exist any more.

	* app/tools/gimphistogramtool.c: removed ImageMap field from
	dialog struct (it was unused). Cleaned up dialog a bit.

	* tools/pdbgen/Makefile.am: don't scan tools/gimphuesaturationtool.h
	for enums.

	* tools/pdbgen/pdb/color.pdb: use the new stuff from base/ and
	don't include stuff from tools/ any more.

	* app/pdb/color_cmds.c
	* app/pdb/paint_tools_cmds.c: regenerated.
2002-08-26 11:35:56 +00:00
Sven Neumann 48e27f1d51 tools/pdbgen/pdb/gimprc.pdb don't leak the result of
2002-08-22  Sven Neumann  <sven@gimp.org>

	* tools/pdbgen/pdb/gimprc.pdb
	* app/pdb/gimprc_cmds.c (gimprc_query_invoker): don't leak the
	result of gimprc_value_to_str().

	* app/core/gimpdrawable-preview.c (gimp_drawable_preview_scale):
	use g_new0() instead of g_new() followed by memset().

	* plug-ins/script-fu/script-fu-server.c (server_log): free the
	string after logging it.
2002-08-22 15:16:36 +00:00
Michael Natterer c2523d8d63 compress emissions of "mask_changed" and "qmask_changed" across undo
2002-08-22  Michael Natterer  <mitch@gimp.org>

	* app/undo.c: compress emissions of "mask_changed" and
	"qmask_changed" across undo groups.

	* app/core/gimpimage-mask.c: set GIMP_DRAWABLE(mask)->preview_valid
	to FALSE in gimp_image_mask_invalidate(), not in
	gimp_image_mask_push_undo(). Fixes selection preview rendering
	after a mask undo.
2002-08-22 10:40:11 +00:00
Michael Natterer 5103c495fb call gimp_image_mask_changed() after performing the selection op.
2002-08-21  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage-mask-select.c: call gimp_image_mask_changed()
	after performing the selection op.
2002-08-21 10:59:26 +00:00
Michael Natterer 33bba65728 Make sure the selection (gimpimage-mask.c) functionality is really built
2002-08-20  Michael Natterer  <mitch@gimp.org>

	Make sure the selection (gimpimage-mask.c) functionality is really
	built *on top* of the GimpChannel functionality:

	* app/undo.[ch]: renamed undo_push_image_mask() to
	undo_push_mask() and generalized it's API to take a GimpChannel
	param so undos can be pushed for channels which are not the
	image's selection. Simplified the API and added code which copies
	the region of interest instead of leaving this to callers.

	* app/undo_types.h: s/IMAGE_MASK_UNDO/MASK_UNDO/

	* app/undo_history.c: changed accordingly.

	* app/core/gimpchannel.[ch]: don't #include "gimpimage-mask.h".
	Changed gimp_channel_push_undo() to really push a channel undo,
	not a selection undo. Added "gboolean push_undo" params to all
	functions which are called from gimpimage-mask.c. Various cleanups
	and optimizations. Added /*< proxy-foo >*/ stuff to the header so
	we export just the struct itself to libgimpproxy. Added accessors
	gimp_channel_[get|set]_show_masked().

	* app/core/gimpimage-mask.[ch]: renamed gimp_image_mask_undo() to
	gimp_image_mask_push_undo(). Call it before calling GimpChannel
	functions which modify the mask, also call all GimpChannel
	functions with push_undo = FALSE. Emit gimp_image_mask_changed()
	after each operation instead of calling it in
	gimp_image_mask_invalidate(). Removed gimp_image_mask_none()
	because it is the same as gimp_image_mask_clear().
	General cleanup.

	* app/core/gimpimage-mask-select.c
	* app/core/gimpimage-qmask.c: changed accordingly.

	* app/core/gimpedit.c: call gimp_image_mask_clear(), not
	gimp_channel_clear (gimp_image_get_mask()).

	* app/core/gimpimage-crop.c
	* app/core/gimpimage-resize.c
	* app/core/gimpimage-scale.c: call gimp_image_mask_changed()

	* app/gui/channels-commands.c
	* app/gui/select-commands.c
	* app/tools/gimptexttool.c
	* tools/pdbgen/pdb/channel.pdb
	* tools/pdbgen/pdb/selection.pdb: follow GimpChannel and
	gimp_image_mask* API changes.

	* app/pdb/channel_cmds.c
	* app/pdb/selection_cmds.c
	* libgimpproxy/gimpchannel.h: regenerated.

	Unrelated:

	* app/core/gimpimage.c: call gimp_drawable_push_undo() instead of
	undo_push_image() directly.
2002-08-20 10:22:23 +00:00
Michael Natterer ab53e0d3f5 fixed warning, coding style.
2002-08-11  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpcontainer.c: fixed warning, coding style.
2002-08-11 18:45:24 +00:00
Sven Neumann 00d408bdd6 bumbed version number to 1.3.8.
2002-07-11  Sven Neumann  <sven@gimp.org>

	* configure.in: bumbed version number to 1.3.8.

	* app/core/gimpcontainer.c: use gulong for signal handler IDs.
2002-07-11 11:37:41 +00:00
Michael Natterer fa537489d7 removed gdisp->scale, gdisp->dot_for_dot, the scaling marcos and the
2002-06-27  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplay.[ch]: removed gdisp->scale,
	gdisp->dot_for_dot, the scaling marcos and the
	gdisplay_[un]transform[_f]() functions.

	* app/display/gimpdisplayshell.[ch]: added them here. Named the
	transform functions gimp_display_shell_[un]transform_xy[_f]().

	Made the gimp_display_shell_[un]transform_coords() functions copy
	all values of the GimpCoords struct, not just x and y.

	* app/display/gimpstatusbar.[ch]: keep a pointer to
	GimpDisplayShell, not GimpDisplay.

	* app/display/gimpdisplayshell-callbacks.c
	* app/display/gimpdisplayshell-render.c
	* app/display/gimpdisplayshell-scale.c
	* app/display/gimpdisplayshell-scroll.c
	* app/display/gimpdisplayshell-selection.c
	* app/display/gimpnavigationview.c
	* app/gui/image-commands.c
	* app/gui/info-window.c
	* app/gui/select-commands.c
	* app/gui/view-commands.c
	* app/tools/gimpbezierselecttool.c
	* app/tools/gimpcroptool.c
	* app/tools/gimpdrawtool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpmagnifytool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimppainttool.c
	* app/tools/gimppathtool.c
	* app/tools/gimprotatetool.c
	* app/tools/gimpscaletool.c
	* app/tools/gimpvectortool.c: changed accordingly.

	* app/gui/layers-commands.c: if(gimage->selection_mask) is always
	TRUE, use if(!gimp_image_mask_is_empty(gimage)) instead.

	* app/tools/gimpfuzzyselecttool.[ch]: moved global variables
	to the object struct.
2002-06-26 22:16:59 +00:00
Michael Natterer 0aec31c3c6 Fixed color picking (reported by jimmac on #gimp):
2002-06-20  Michael Natterer  <mitch@gimp.org>

	Fixed color picking (reported by jimmac on #gimp):

	* app/core/gimpimage-pick-color.c: set the returned color's alpha
	value to opaque if the drawable we pick from has no aplha.

	* app/tools/gimpcolorpickertool.c: ignore all values returned by
	gimp_image_pick_color() if it returns FALSE (which happens if we
	want to pick outside the drawable).
2002-06-19 22:09:02 +00:00
Sven Neumann c585964707 Obviously I disagree with Tim about the symbol_name parameter in
2002-06-17  Sven Neumann  <sven@gimp.org>

	Obviously I disagree with Tim about the symbol_name parameter in
	g_scanner_unexp_token(). As it seems it's not supposed to be used
	to tell the user about the expected symbol (see bug #81850):

	* gimpconfig.[ch] (gimp_config_deserialize_return): removed the
	symbol_name parameter.

	* app/config/gimpconfig-deserialize.c
	* app/core/gimpcontainer.c
	* app/core/gimpdocumentlist.c
	* app/core/gimpparasitelist.c: changed the callers accordingly.

	* app/core/gimpunits.c (gimp_unitrc_load): pass NULL as symbol_name
	to g_scanner_unexp_token().
2002-06-17 19:36:33 +00:00
Michael Natterer a3f44d8b0f Separated tool_options creation from tool registration so we don't
2002-06-17  Michael Natterer  <mitch@gimp.org>

	Separated tool_options creation from tool registration so we
	don't implicitly create widgets before gui_init():

	* libgimptool/gimptooltypes.h: removed GimpToolOptionsNewFunc
	typedef here...

	* app/core/core-types.h: ...and added it here.

	* libgimpproxy/gimpproxytypes.h: regenerated.

	* app/core/gimptoolinfo.[ch]: added a GimpToolOptionsNewFunc
	pointer to remember the constructor. Fixed the finalize() method
	(bug was never noticed because we leaked all tool infos)

	* app/tools/tool_manager.[ch]: moved tool_options creation to the
	new function tool_manager_restore(). Unref the tool infos after
	adding them to their container. Added "brush" and "gradient" to
	the context properties which are defined for tool contexts.

	* app/app_procs.c: call tool_manager_restore() after gui_init().

	* app/gui/gui.c: removed the hack introduced recently and call
	render_setup() in gui_init() again, not in gui_themes_init().

	Use the correct contexts now that they are properly initialized
	at the time of tool_options creation:

	* app/tools/gimpblendtool.c: use tool_info->context, not
	gimp_get_user_context() to get/set the tool's gradient.

	* app/paint/gimppaintcore.[ch] (gimp_paint_core_start): added a
	GimpPaintOptions paramater and get the brush to use from
	paint_options->context (instead of gimp_get_current_context()).

	* app/paint/gimppaintcore-stroke.c
	* app/tools/gimppainttool.c: changed accordingly.

	* app/tools/paint_options.c: added a brush preview to the paint
	options.
2002-06-17 10:34:28 +00:00
Maurits Rijk 0e0114f7fb Adding more mnemonic stuff (#80804) and replaced some memcpy of structure variables by structure assignments. 2002-06-13 20:32:21 +00:00
Michael Natterer 91cfa78384 added a boolean "internal" which indicates that the data object is an
2002-06-12  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdata.[ch]: added a boolean "internal" which
	indicates that the data object is an automatically created
	internal object. Changed the code to refuse saving to deleting
	internal objects.

	* app/core/Makefile.am
	* app/core/gimp-gradients.[ch]: new files implementing internal
	gradients (FG -> BG in RGB and HSV and FG -> transparent).

	* app/core/gimp.c: call gimp_gradients_init().

	* app/core/gimpdatafactory.c (gimp_data_factory_data_free): don't
	free internal objects so they stay there on "Refresh".

	* app/core/gimpdatalist.c: sort internal objects to the beginning
	of the list.

	* app/widgets/gimpdataeditor.c: refuse to change the name of
	internal objects.

	* app/widgets/gimpdatafactoryview.c: set the "Delete" button
	insensitive for internal objects.

	* app/widgets/gimpgradienteditor.c: refuse to edit internal
	gradients, just display them so color picking works.

	* app/gui/brushes-commands.c
	* app/gui/gradients-commands.c
	* app/gui/palettes-commands.c
	* app/gui/patterns-commands.c: set the "Delete" menu item
	insensitive for internal objects.

	* app/gui/gui.c: need to call render_setup() earlier because of
	you-dont-want-to-know-why. Will change it back once the previews
	have their own render buffers.

	* app/tools/gimpblendtool.c: Replaced the "Type" menu by a preview
	showing the active gradient. Clicking the preview pops up the
	gradient selection. Renamed the "Gradient" menu to "Shape". Removed
	"blend_mode" from the BlendOptions struct because we always use
	"custom" mode now.
2002-06-12 13:48:47 +00:00
Sven Neumann fd21daebdf app/undo.c app/config/gimpconfig-deserialize.c app/core/gimpbrushpipe.c
2002-06-09  Sven Neumann  <sven@gimp.org>

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

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

	* POTFILES.in: updated.

	* de.po: updated german translation.
2002-06-09 12:53:42 +00:00
Sven Neumann 3aae39405e app/base/Makefile.am automake-1.6 seems to use yet another variable to
2002-06-08  Sven Neumann  <sven@gimp.org>

	* app/base/Makefile.am
	* app/paint-funcs/Makefile.am: automake-1.6 seems to use yet another
	variable to pass flags to the assembler (bug #84514). Define
	AM_CCASFLAGS like AM_ASFLAGS to satisfy all versions of automake.

	* configure.in
	* all Makefiles: removed STRIP_BEGIN and STRIP_END since it's a
	GNU make extension that we don't really need and newer versions of
	automake don't seem to like it.
2002-06-07 23:00:46 +00:00
Michael Natterer f064fa4e69 added gimp_list_reverse().
2002-06-07  Michael Natterer  <mitch@gimp.org>

	* app/core/gimplist.[ch]: added gimp_list_reverse().

	* app/core/gimpdocumentlist.c: call it after deserializing so we
	don't reverse the history each time.

	* app/widgets/gimpdevices.c: use it instead of manually fiddling
	with list->list.
2002-06-07 20:23:33 +00:00
Michael Natterer 413b9d3329 renamed gimp_drawable_apply_image() to gimp_drawable_push_undo() because
2002-06-06  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawable.[ch]: renamed gimp_drawable_apply_image()
	to gimp_drawable_push_undo() because that's what it actually does.

	* app/image_map.c
	* app/core/gimpdrawable-offset.c
	* app/core/gimpimage-mask.c
	* app/core/gimpimage.c
	* app/core/gimplayer.c
	* app/paint/gimppaintcore.c
	* app/tools/gimpinktool.c: changed accordingly. Removed redundant
	comments because it's now obvious what the function does from
	looking at its name.

	* app/core/gimpdrawable.[ch]
	* app/core/gimpimage.h: renamed "gboolean undo" parameters to
	"gboolean push_undo".
2002-06-06 19:44:05 +00:00
Michael Natterer 8bfd02fa5a added a boolean "push_undo" parameter.
2002-06-06  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpchannel.[ch] (gimp_channel_invert): added a boolean
	"push_undo" parameter.

	* app/core/gimpimage-mask.c
	* app/core/gimpimage-qmask.c: pass push_undo == TRUE.

	* app/core/gimplayer.c (gimp_layer_create_mask): call
	gimp_channel_invert(), not gimp_drawable_invert() because the
	latter takes the current selection into accout (reported by Jimmac
	on #gimp). Added g_return_if_fail() stuff to all public functions.
	Cleanup.
2002-06-06 19:07:59 +00:00
Michael Natterer 8c3f15b42a don't warn if an out-of-bounds index is passed in but simply return NULL
2002-06-06  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpcontainer.c (gimp_container_get_child_by_index):
	don't warn if an out-of-bounds index is passed in but simply
	return NULL (removes the need to check if the container has 0
	children before asking the container for it's first child).
2002-06-06 18:57:37 +00:00
Michael Natterer c6948e6e95 configure the scanner the same way GimpConfig did (scanner->user_data is,
2002-05-31  Michael Natterer  <mitch@gimp.org>

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

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

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

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

	* app/plug-in/plug-in-rc.c: made the main parse loops consistent
	with the other places using GScanner.
2002-05-31 13:58:18 +00:00
Sven Neumann bb32c3c267 determine the src_base_type from the passed drawable, not from the image
2002-05-28  Sven Neumann  <sven@gimp.org>

	* app/core/gimplayer.c (gimp_layer_new_from_drawable): determine
	the src_base_type from the passed drawable, not from the image it
	is attached to.

	* app/core/gimpimage-convert.c (gimp_drawable_convert_rgb)
	(gimp_drawable_convert_grayscale): added a check for the expected
	bpp of the passed tile_manager.
2002-05-28 21:32:06 +00:00
Michael Natterer b7e3c716c4 override GObjectClass->constructor() and do the setup stuff there, not in
2002-05-28  Michael Natterer  <mitch@gimp.org>

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

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

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

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

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

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

	* app/gui/menus.c
	* app/gui/test-commands.[ch]: removed devicerc testing entries
	and callbacks.
2002-05-28 16:41:56 +00:00
Michael Natterer dbc8aeb49c added "gint nest_level" to the deserialization functions, so nested calls
2002-05-27  Michael Natterer  <mitch@gimp.org>

	* app/config/gimpconfig.[ch]: added "gint nest_level" to the
	deserialization functions, so nested calls to deserialize()
	don't error on the trailing ')'. Made the scanner config parse
	one-character identifiers and allow G_CSET_A_2_Z for all
	identifiers.
	Added gimp_config_deserialize_return() because returning the
	correct return value from a deserialize() function is not
	trivial any more with nested calls.

	* app/config/gimpconfig-deserialize.[ch]
	* app/config/gimprc.c
	* app/core/gimpdocumentlist.c
	* app/core/gimpparasitelist.c: use the new return value utility
	function and made the main parsing loops simpler.

	* app/core/gimpunits.c: made the main parsing loops consistent
	with the stuff that uses GimpConfig.

	* app/config/gimpconfig-deserialize.c
	* app/config/gimpconfig-serialize.c: call the
	(de)serialize_property() functions only if the property's class
	implements the method itself (does *not* inherit it from one of
	it's parents).

	* app/core/gimpcontainer.c: implemented deserialization of
	containers. For each child entry encountered in the input, check
	if it's already contained in the container and create it if not.
	If a "gimp" pointer is passed as user_data pass it as construct
	property to g_object_new() when creating the object.

	* app/core/gimpcontext.c: changed deserialization of brush,
	pattern etc. to honor "no_data".

	* app/widgets/gimpdeviceinfo.c: added a "gimp" construct_only
	property which overrides GimpContext's "gimp" property. Moved all
	initialisation code from gimp_device_info_new() to
	gimp_device_info_set_property(PROP_GIMP) so it is properly
	performed if the object is created by GimpContainer's
	deserialize() implementation.

	* app/widgets/gimpdevices.c: made gimp_devices_restore_test() work.
2002-05-27 14:04:21 +00:00
Sven Neumann 9ba70e461f "%lld" is not a portable format string, cast to gint64 and use
2002-05-27  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimagefile.c: "%lld" is not a portable format string,
	cast to gint64 and use G_GINT64_FORMAT instead.
2002-05-27 11:45:50 +00:00