Commit graph

2729 commits

Author SHA1 Message Date
Michael Natterer b25559c3e5 app/gegl/Makefile.am app/gegl/gegl-types.h new config object.
2008-01-24  Michael Natterer  <mitch@gimp.org>

	* app/gegl/Makefile.am
	* app/gegl/gegl-types.h
	* app/gegl/gimpcolorbalanceconfig.[ch]: new config object.

	* app/gegl/gimpoperationcolorbalance.[ch]: use it.

	* app/tools/gimpcolorbalancetool.[ch]: port to
	GimpColorBalanceConfig and use the old ColorBalance cruft only in
	map(). The effect of the GEGL operator is now even more different
	from the cruft code because I removed a hack that was applying an
	additional factor when mapping between the ColorBalance values and
	the new properties, but that was only a workaround to make it look
	more similar anyway. Will have to fix this properly.

	* app/base/color-balance.[ch]: remove API that is now obsolete.


svn path=/trunk/; revision=24701
2008-01-24 10:37:21 +00:00
Michael Natterer fdc4eded22 added reset() and to_cruft() functions.
2008-01-24  Michael Natterer  <mitch@gimp.org>

	* app/gegl/gimpcolorizeconfig.[ch]: added reset() and to_cruft()
	functions.

	* app/tools/gimpcolorizetool.c: use them.


svn path=/trunk/; revision=24698
2008-01-24 09:06:50 +00:00
Martin Nordholts d089ea9c3e Reset the automatic undo/redo mechanism so that commiting pending
2008-01-23  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangleselecttool.c
	(gimp_rect_select_tool_execute): Reset the automatic undo/redo
	mechanism so that commiting pending rectangles with Return
	works (bug #511599).

svn path=/trunk/; revision=24696
2008-01-23 20:43:44 +00:00
Michael Natterer df24e66869 call hue_saturation_calculate_transfers() here...
2008-01-23  Michael Natterer  <mitch@gimp.org>

	* app/gegl/gimphuesaturationconfig.[ch]
	(gimp_hue_saturation_config_to_cruft): call
	hue_saturation_calculate_transfers() here...

	* app/tools/gimphuesaturationtool.c (gimp_hue_saturation_tool_map):
	...instead of here.


svn path=/trunk/; revision=24693
2008-01-23 16:51:33 +00:00
Michael Natterer 17e0ee4192 to_levels_cruft() -> to_cruft().
2008-01-23  Michael Natterer  <mitch@gimp.org>

	* app/gegl/gimplevelsconfig.[ch]: to_levels_cruft() -> to_cruft().

	* app/core/gimpdrawable-levels.c
	* app/tools/gimplevelstool.c: changed accordingly.


svn path=/trunk/; revision=24692
2008-01-23 16:49:05 +00:00
Michael Natterer 61b2d2c474 change signature of widget callbacks to take a GimpHueSaturationTool
2008-01-23  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimphuesaturationtool.c: change signature of widget
	callbacks to take a GimpHueSaturationTool pointer instead of
	"gpointer data".

	* app/tools/gimpposterizetool.c: remove redundant GTK_ADJUSTMENT()
	casts.


svn path=/trunk/; revision=24691
2008-01-23 15:14:28 +00:00
Michael Natterer ca5ffa5b3f don't #include <gegl.h>
2008-01-23  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpimagemaptool.h: don't #include <gegl.h>

	* app/actions/tools-commands.c
	* app/display/gimpdisplayshell-callbacks.c
	* app/tools/gimp-tools.c: include it here. Whenever the build
	breaks because of some GEGL change in GIMP, please inlcude
	<gegl.h> instead of <glib-object.h> or before <gtk/gtk.h> in the
	affected .c files.


svn path=/trunk/; revision=24685
2008-01-23 09:51:43 +00:00
Michael Natterer 8990062156 app/gegl/Makefile.am app/gegl/gegl-types.h app/gegl/gimpcurvesconfig.[ch]
2008-01-23  Michael Natterer  <mitch@gimp.org>

	* app/gegl/Makefile.am
	* app/gegl/gegl-types.h
	* app/gegl/gimpcurvesconfig.[ch]
	* app/gegl/gimpoperationcurves.[ch]: add curves operation and its
	config object. Hack around badly to be able to use GimpCurve from
	app/core.

	* app/gegl/gimp-gegl.c: register the curves operation.

	* app/tools/gimpcurvestool.[ch]: added get_operation() implemenetation
	and use the new config object instead of keeping around 5 curves.


svn path=/trunk/; revision=24683
2008-01-23 09:28:16 +00:00
Michael Natterer 5d07620d58 new utility function which maps a single value.
2008-01-23  Michael Natterer  <mitch@gimp.org>

	* app/gegl/gimpoperationlevels.[ch]
	(gimp_operation_levels_map_input): new utility function which maps
	a single value.

	* app/tools/gimplevelstool.[ch] (levels_update_adjustments): use the
	new function to create the input arrays for gimp_color_bar_set_buffer().

	Removed the Levels struct from the GimpLevelsTool struct and only
	use it in map() when needed.

	* app/base/levels.[ch]: remove obsolete API and struct members.


svn path=/trunk/; revision=24682
2008-01-23 08:48:29 +00:00
Sven Neumann 18156ac03f dilate the brush mask in order to obtain a simpler boundary. Addresses bug
2008-01-22  Sven Neumann  <sven@gimp.org>

	* app/paint/gimpbrushcore.c (gimp_brush_core_create_bound_segs):
	dilate the brush mask in order to obtain a simpler boundary.
	Addresses bug #304798.

	* app/tools/gimpbrushtool.c (gimp_brush_tool_draw_brush): 
removed
	redundant casts.


svn path=/trunk/; revision=24676
2008-01-22 20:06:01 +00:00
Sven Neumann 64880a8107 added new function gimp_use_gegl().
2008-01-22  Sven Neumann  <sven@gimp.org>

	* app/core/gimp.[ch]: added new function gimp_use_gegl().

	* app/core/gimpdrawable-desaturate.c
	* app/core/gimpdrawable-levels.c
	* app/core/gimpdrawable-invert.c
	* app/tools/gimpimagemaptool.c
	* app/pdb/color_cmds.c
	* tools/pdbgen/pdb/color.pdb: use it instead of accessing the
	GimpCoreConfig struct directly.

svn path=/trunk/; revision=24668
2008-01-22 11:28:48 +00:00
Michael Natterer 14a20cc3d7 app/gegl/Makefile.am app/gegl/gegl-types.h new config object.
2008-01-22  Michael Natterer  <mitch@gimp.org>

	* app/gegl/Makefile.am
	* app/gegl/gegl-types.h
	* app/gegl/gimphuesaturationconfig.[ch]: new config object.

	* app/gegl/gimpoperationhuesaturation.[ch]: remove all properties
	and add a "config" property. Also add API to map a single GimpRGB
	needed by the hue-saturation tool's color areas.

	* app/tools/gimphuesaturationtool.[ch]: switch to using
	GimpHueSaturationConfig, use the old HueSaturation struct only in
	map().

	* app/base/hue-saturation.[ch]: remove API that's no longer needed.


svn path=/trunk/; revision=24667
2008-01-22 09:49:40 +00:00
Martin Nordholts 8aabfe2c1d Don't foget to update the integer representation of the rectangle.
2008-01-21  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangletool.c
	(gimp_rectangle_tool_set_other_side_coord): Don't foget to update
	the integer representation of the rectangle.

svn path=/trunk/; revision=24665
2008-01-21 21:34:41 +00:00
Martin Nordholts 86199bcddc Moved the logic in _motion to a new helper function _update_motion that is
2008-01-21  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimpeditselectiontool.[ch]: Moved the logic in _motion
	to a new helper function _update_motion that is also called in
	_active_modifier_key. Makes toggling Ctrl immediately apply/remove
	movement constraints for the Move Tool when a move has been
	initiated. This completes the fix for bug #78730.

svn path=/trunk/; revision=24663
2008-01-21 18:55:37 +00:00
Michael Natterer 89146f4433 add utility function gimp_levels_config_to_levels_cruft() which fills the
2008-01-21  Michael Natterer  <mitch@gimp.org>

	* app/gegl/gimplevelsconfig.[ch]: add utility function
	gimp_levels_config_to_levels_cruft() which fills the old Levels
	struct from a GimpLevelsConfig object.

	* app/tools/gimplevelstool.c: use it.


svn path=/trunk/; revision=24658
2008-01-21 12:03:19 +00:00
Martin Nordholts 7a190d35fd Reformat a bit, essentially just removed one pointless level of
2008-01-19  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimpeditselectiontool.c
	(gimp_edit_selection_tool_motion): Reformat a bit, essentially
	just removed one pointless level of indentation.

svn path=/trunk/; revision=24655
2008-01-19 15:08:39 +00:00
Michael Natterer 30907dbd76 app/gegl/Makefile.am app/gegl/gegl-types.h new config object.
2008-01-18  Michael Natterer  <mitch@gimp.org>

	* app/gegl/Makefile.am
	* app/gegl/gegl-types.h
	* app/gegl/gimpcolorizeconfig.[ch]: new config object.

	* app/gegl/gimpoperationcolorize.[ch]: remove all properties and
	add a "config" property.

	* app/tools/gimpcolorizetool.[ch]: port to GimpColorizeConfig, use
	the old Colorize struct only in map().


svn path=/trunk/; revision=24647
2008-01-18 14:44:27 +00:00
Michael Natterer a09925eae8 ported the stretch and pick functions from base/levels.c.
2008-01-18  Michael Natterer  <mitch@gimp.org>

	* app/gegl/gimplevelsconfig.[ch]: ported the stretch and pick
	functions from base/levels.c.

	* app/tools/gimplevelstool.[ch]: use them instead of the old
	stuff. Also switch to GimpLevelsConfig as primary storage for all
	settings and fill the old Levels struct only when needed in map().
	Remove all hackish fiddling with levels_tool->channel because it
	is now always what is set in the menu.


svn path=/trunk/; revision=24646
2008-01-18 13:54:46 +00:00
Martin Nordholts b502111a2e Use this new helper function instead of duplicating its logic.
2008-01-17  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimpeditselectiontool.c
	(gimp_edit_selection_tool_get_active_item): Use this new helper
	function instead of duplicating its logic.

svn path=/trunk/; revision=24638
2008-01-17 21:41:21 +00:00
Michael Natterer adf8f48016 app/gegl/Makefile.am app/gegl/gegl-types.h new config object for the
2008-01-17  Michael Natterer  <mitch@gimp.org>

	* app/gegl/Makefile.am
	* app/gegl/gegl-types.h
	* app/gegl/gimplevelsconfig.[ch]: new config object for the levels
	operation's settings.

	* app/gegl/gimpoperationlevels.[ch]: remove all properties and add
	a "config" property instead.

	* app/tools/gimplevelstool.[ch]: keep a GimpLevelsConfig around.


svn path=/trunk/; revision=24637
2008-01-17 17:18:23 +00:00
Michael Natterer e824546886 create the operation in GObject::constructor() so it's available during
2008-01-17  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpimagemaptool.c: create the operation in
	GObject::constructor() so it's available during the entire tool
	life time (needed soon).


svn path=/trunk/; revision=24635
2008-01-17 12:51:39 +00:00
Michael Natterer 7b8fa4c34c Fix gegl types and includes so we can include operations from app/gegl in
2008-01-16  Michael Natterer  <mitch@gimp.org>

	Fix gegl types and includes so we can include operations from
	app/gegl in other gimp files (needed soon):

	* app/gegl/gegl/gegl-types.h: not copied from gegl any longer.
	Now contains only two typedefs needed by the copied operation
	headers.

	* app/gegl/gegl-types.h: include above types file.

	* app/gegl/gimp-gegl.c
	* app/gegl/gimpoperationcolorbalance.c
	* app/gegl/gimpoperationcolorize.c
	* app/gegl/gimpoperationdesaturate.c
	* app/gegl/gimpoperationhuesaturation.c
	* app/gegl/gimpoperationlevels.c
	* app/gegl/gimpoperationposterize.c
	* app/gegl/gimpoperationthreshold.c
	* app/gegl/gimpoperationtilesink.c
	* app/gegl/gimpoperationtilesource.c: include only <gegl.h> and
	"gegl-types.h" from this directory, which is much more gimpish
	now. Include "gegl/buffer/gegl-buffer.h" in the source and sink
	operations.

	* app/tools/gimpimagemaptool.h: warn about inclusion of <gegl.h>
	only if it hasn't been included before, so it only warns in the
	files where we still have to address this issue.


svn path=/trunk/; revision=24625
2008-01-16 15:52:02 +00:00
Martin Nordholts 8772b0a150 Added symbolic constants for common values to the n_snap_lines parameter
2008-01-15  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/tools-utils.h: Added symbolic constants for common
	values to the n_snap_lines parameter of
	gimp_tool_motion_constrain.

	* app/tools/gimpblendtool.c:
	* app/tools/gimpeditselectiontool.c:
	* app/tools/gimpmeasuretool.c:
	* app/tools/gimppainttool.c: Use these new symbolic constants.

svn path=/trunk/; revision=24623
2008-01-15 21:05:57 +00:00
Martin Nordholts 9934221a07 Made it possible to constrain movement with the Move Tool in 45 degree
2008-01-15  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimpeditselectiontool.[ch]: Made it possible to
	constrain movement with the Move Tool in 45 degree angles by
	holding Ctrl when a move has been initiated. This fixes the
	essential part of bug #78730.

svn path=/trunk/; revision=24622
2008-01-15 20:01:39 +00:00
Michael Natterer 572115701f app/gegl/gimpoperationcolorize.[ch] app/gegl/gimpoperationlevels.[ch]
2008-01-15  Michael Natterer  <mitch@gimp.org>

	* app/gegl/gimpoperationcolorize.[ch]
	* app/gegl/gimpoperationlevels.[ch]
	* app/gegl/gimpoperationthreshold.[ch]: changed all properties from
	float to double.

	* app/gegl/gimpoperationcolorize.c: normalized property ranges to
	[0.0..1.0] or [-1.0..1.0] resp.

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


svn path=/trunk/; revision=24621
2008-01-15 17:23:45 +00:00
Michael Natterer c7b8f0599c check for image_map_tool->image_map also when the preview is switched on,
2008-01-15  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpimagemaptool.c (gimp_image_map_tool_notify_preview):
	check for image_map_tool->image_map also when the preview is
	switched on, not only when it's switched off.


svn path=/trunk/; revision=24618
2008-01-15 14:39:41 +00:00
Michael Natterer 0b74e6e1b5 don't call map() if image_map_tool->image_map is NULL.
2008-01-15  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpimagemaptool.c (gimp_image_map_tool_preview):
	don't call map() if image_map_tool->image_map is NULL.


svn path=/trunk/; revision=24610
2008-01-15 00:56:33 +00:00
Martin Nordholts 4ef8797faa Generalized to allow a variable number of lines for snapping, and
2008-01-14  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/tools-utils.[ch]
	(gimp_tool_motion_constrain): Generalized to allow a variable
	number of lines for snapping, and rewritten to make snapping
	happen more intuitively; snap the shortest distance rather than
	only horizontally or vertically.
	(gimp_tool_utils_point_to_line_distance): New helper function.

	* app/tools/gimpblendtool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimppainttool.c: Adjust to the new function signature.

svn path=/trunk/; revision=24609
2008-01-14 21:23:02 +00:00
Michael Natterer f8808d8afc app/gegl/Makefile.am app/gegl/gegl-types.h new operation.
2008-01-14  Michael Natterer  <mitch@gimp.org>

	* app/gegl/Makefile.am
	* app/gegl/gegl-types.h
	* app/gegl/gimpoperationhuesaturation.[ch]: new operation.

	* app/gegl/gimp-gegl.c: register it.

	* app/tools/gimphuesaturationtool.c: use it.


svn path=/trunk/; revision=24608
2008-01-14 20:44:01 +00:00
Michael Natterer dac333f72d Simplify things a bit and enable gegl-only color correction tools (without
2008-01-10  Michael Natterer  <mitch@gimp.org>

	Simplify things a bit and enable gegl-only color correction
	tools (without legacy functions).

	* app/tools/gimpimagemaptool.c (gimp_image_map_tool_create_map):
	always create the operation if ::get_operation() is implemented
	and always use it when creating the GimpImageMap if there is no
	legacy apply_func.

	* app/tools/gimpbrightnesscontrasttool.c
	* app/tools/gimpcolorbalancetool.c
	* app/tools/gimpcolorizetool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimpposterizetool.c
	* app/tools/gimpthresholdtool.c (map): set the operation's
	properties unconditionally since it always exists now if we also
	implement ::get_operation().


svn path=/trunk/; revision=24588
2008-01-10 13:12:44 +00:00
Michael Natterer 91788fe393 app/gegl/Makefile.am app/gegl/gegl-types.h new operator.
2008-01-10  Michael Natterer  <mitch@gimp.org>

	* app/gegl/Makefile.am
	* app/gegl/gegl-types.h
	* app/gegl/gimpoperationcolorbalance.[ch]: new operator.

	* app/gegl/gimp-gegl.c: register it.

	* app/tools/gimpcolorbalancetool.c: use it.


svn path=/trunk/; revision=24587
2008-01-10 12:52:19 +00:00
Michael Natterer c9af6ea8d3 fix alpha handling on greyscale images.
2008-01-09  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimplevelstool.c (gimp_levels_tool_map): fix alpha
	handling on greyscale images.


svn path=/trunk/; revision=24577
2008-01-09 13:47:52 +00:00
Michael Natterer dc65f5fc20 add typedef GimpImageMapApplyFunc here.
2008-01-09  Michael Natterer  <mitch@gimp.org>

	* app/core/core-types.h: add typedef GimpImageMapApplyFunc here.

	* app/core/gimpimagemap.[ch] (gimp_image_map_new): add apply_func
	and apply_data parameters.

	(gimp_image_map_apply): remove them here and add a GeglRectangle
	parameter which is the visible area of the affected drawable.

	* app/tools/gimpimagemaptool.[ch]: keep apply_func and apply_data
	around in the GimpImageMapTool struct.

	(gimp_image_map_tool_create_map): pass them to gimp_image_map_new().

	(gimp_image_map_tool_map): call gimp_image_map_apply() here and
	pass the drawable's visible rectangle.

	* app/tools/gimpbrightnesscontrasttool.c
	* app/tools/gimpcolorbalancetool.c
	* app/tools/gimpcolorizetool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimpposterizetool.c
	* app/tools/gimpthresholdtool.c (init): set apply_func and
	apply_data in the parent instance.

	(map): remove calls to gimp_image_map_apply().


svn path=/trunk/; revision=24573
2008-01-09 01:06:46 +00:00
Michael Natterer 27319afde9 add properties, some cleanup.
2008-01-07  Michael Natterer  <mitch@gimp.org>

	* app/gegl/gimpoperationlevels.[ch]: add properties, some cleanup.

	* app/tools/gimplevelstool.c: use gegl_node_set() instead of
	accessing the operation directly.


svn path=/trunk/; revision=24566
2008-01-07 21:39:05 +00:00
Michael Natterer 1c804c8d43 app/gegl/Makefile.am app/gegl/gegl-types.h new operator.
2008-01-07  Michael Natterer  <mitch@gimp.org>

	* app/gegl/Makefile.am
	* app/gegl/gegl-types.h
	* app/gegl/gimpoperationlevels.[ch]: new operator.

	* app/gegl/gimp-gegl.c: register it.

	* app/tools/gimplevelstool.c: use it,


svn path=/trunk/; revision=24565
2008-01-07 20:37:25 +00:00
Øyvind Kolås 43a3c37259 make the mapping between slider values and gegl-op properties more closely
* app/tools/gimpbrightnesscontrasttool.c: make the mapping between
slider values and gegl-op properties more closely resemble gimp for
the brightness property.

svn path=/trunk/; revision=24560
2008-01-07 15:36:02 +00:00
Michael Natterer 4324d68141 don't call a NULL GimpImageMapToolClass::get_operation().
2008-01-06  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpimagemaptool.c (gimp_image_map_tool_create_map):
	don't call a NULL GimpImageMapToolClass::get_operation().


svn path=/trunk/; revision=24553
2008-01-06 15:18:00 +00:00
Michael Natterer 50335ca918 toggle the image map mode only if an image map currently exists. Fixes
2008-01-06  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpimagemaptool.c (gimp_image_map_tool_gegl_notify):
	toggle the image map mode only if an image map currently exists.
	Fixes crash when toggling "Use GEGL" while the tool is not active.


svn path=/trunk/; revision=24552
2008-01-06 15:10:04 +00:00
Hans Breuer 9a1d5f3453 **/makefile.msc app/gimpcore.def : updated so it compiles and links
2008-01-04  Hans Breuer  <hans@breuer.org>

	**/makefile.msc app/gimpcore.def : updated so it compiles and links
	(almost, see bug #507298)

svn path=/trunk/; revision=24533
2008-01-04 18:42:07 +00:00
Michael Natterer dd97e60591 add "use-gegl" property but don't serialize it.
2008-01-04  Michael Natterer  <mitch@gimp.org>

	* app/config/gimpcoreconfig.[ch]: add "use-gegl" property but
	don't serialize it.

	* app/widgets/gimptoolbox.c: add super ugly "Use GEGL" toggle to
	the toolbox so we don't need to have prefs open all the time when
	experimenting with gegl.

	* app/tools/gimpimagemaptool.[ch]: remove "Use GEGL" toggle from
	the tool dialogs and connect to the config property instead.

	* app/core/gimpdrawable-desaturate.c
	* app/core/gimpdrawable-invert.c: made them runtime-switchable by
	looking at the config property.


svn path=/trunk/; revision=24530
2008-01-04 17:28:49 +00:00
Michael Natterer d1719638db app/gegl/Makefile.am app/gegl/gegl-types.h
2008-01-04  Michael Natterer  <mitch@gimp.org>

	* app/gegl/Makefile.am
	* app/gegl/gegl-types.h
	* app/gegl/gimpoperationcolorize.[ch]
	* app/gegl/gimpoperationposterize.[ch]: new operators which still
	use a lot of gimp stuff they shouldn't use, but at least the
	infrastructure for improving them is there now.

	* app/gegl/gimp-gegl.c: register them.

	* app/tools/gimpcolorizetool.c
	* app/tools/gimpposterizetool.c: use them.


svn path=/trunk/; revision=24528
2008-01-04 15:16:32 +00:00
Michael Natterer 61a14f1f70 enable disabling gegl again, which i broke with my last commit.
2008-01-04  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpimagemaptool.c (gimp_image_map_tool_create_map):
	enable disabling gegl again, which i broke with my last commit.


svn path=/trunk/; revision=24525
2008-01-04 14:43:03 +00:00
Sven Neumann f1678dc46d also update trans_info[REAL_ANGLE]. Fixes bug #507167.
2008-01-04  Sven Neumann  <sven@gimp.org>

	* app/tools/gimprotatetool.c (rotate_angle_changed): also update
	trans_info[REAL_ANGLE]. Fixes bug #507167.


svn path=/trunk/; revision=24521
2008-01-04 09:01:55 +00:00
Michael Natterer 48358e3452 keep the central processing node around here...
2008-01-03  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpimagemaptool.[ch]: keep the central processing
	node around here...

	* app/tools/gimpbrightnesscontrasttool.[ch]
	* app/tools/gimpthresholdtool.[ch]: ...instead of here.


svn path=/trunk/; revision=24517
2008-01-03 19:36:23 +00:00
Michael Natterer bd938d40a0 app/gegl/Makefile.am app/gegl/gegl-types.h gimpish threshold operator
2008-01-03  Michael Natterer  <mitch@gimp.org>

	* app/gegl/Makefile.am
	* app/gegl/gegl-types.h
	* app/gegl/gimpoperationthreshold.[ch]: gimpish threshold operator
	which has "low" and "high" properties.

	* app/gegl/gimp-gegl.c: register it.

	* app/gegl/gimpoperationdesaturate.[ch]: fix copyright.

	* app/tools/gimpthresholdtool.[ch]: use the new operator.


svn path=/trunk/; revision=24515
2008-01-03 19:23:35 +00:00
Martin Nordholts afecdd6868 Use × instead of x when initializing the rectangle size in the status
2008-01-01  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangletool.c (gimp_rectangle_tool_start): Use ×
	instead of x when initializing the rectangle size in the status
	bar.

svn path=/trunk/; revision=24498
2007-12-31 23:36:01 +00:00
Michael Natterer 5780913e2f app/tools/gimpcolorbalancetool.c app/tools/gimpcolorizetool.c
2007-12-30  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpcolorbalancetool.c
	* app/tools/gimpcolorizetool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimpposterizetool.c
	* app/tools/gimpthresholdtool.c: #include <gegl.h>. Fixes the build.


svn path=/trunk/; revision=24489
2007-12-30 17:54:51 +00:00
Michael Natterer d6ab4d19bd First actual image processing with GEGL! Wheeeee :-)
2007-12-30  Michael Natterer  <mitch@gimp.org>

	First actual image processing with GEGL! Wheeeee :-)

	* app/core/gimpimagemap.[ch]: added code to use gegl instead of the
	old apply_func and apply_data.

	(gimp_image_map_new): add GeglNode parameter that, if passed,
	switches the whole thing to using a gegl graph with this node
	as central processing node.

	* app/tools/gimpimagemaptool.[ch]: add virtual function
	get_operation() which, if implemented, returns a GeglNode to pass
	to gimp_image_map_new(). Added a "Use GEGL" toggle so we can
	switch between legacy and gegl code for the migration period.

	* app/tools/gimpbrightnesscontrasttool.[ch]: implement
	get_operation() and return a brightness-contrast node.

	(gimp_briughtness_contrast_tool_map): set the node's properties
	from the GUI.


svn path=/trunk/; revision=24488
2007-12-30 17:47:37 +00:00
Michael Natterer 529fd5e629 app/actions/Makefile.am app/core/Makefile.am app/display/Makefile.am use
2007-12-29  Michael Natterer  <mitch@gimp.org>

	* app/actions/Makefile.am
	* app/core/Makefile.am
	* app/display/Makefile.am
	* app/tools/Makefile.am: use GEGL_CFLAGS.


svn path=/trunk/; revision=24472
2007-12-29 19:18:57 +00:00
Michael Natterer e485274069 app/tools/gimpbrightnesscontrasttool.c app/tools/gimpcolorbalancetool.c
2007-12-29  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpbrightnesscontrasttool.c
	* app/tools/gimpcolorbalancetool.c
	* app/tools/gimpcolorizetool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimpthresholdtool.c: more cleanup in preparation of
	migrating to gegl.


svn path=/trunk/; revision=24468
2007-12-29 16:29:31 +00:00
Martin Nordholts 4e66d93f79 When setting the highlight, use the external rectangle representation, not
2007-12-28  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangletool.c
	(gimp_rectangle_tool_update_highlight): When setting the
	highlight, use the external rectangle representation, not the
	internal one.

svn path=/trunk/; revision=24453
2007-12-28 19:21:35 +00:00
Michael Natterer 33854be9fb remove the same cruft here.
2007-12-27  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpcolorbalancetool.c: remove the same cruft here.


svn path=/trunk/; revision=24441
2007-12-27 22:44:52 +00:00
Michael Natterer e5579d46ce remove unused cruft.
2007-12-27  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpbrightnesscontrasttool.c: remove unused cruft.


svn path=/trunk/; revision=24440
2007-12-27 22:22:39 +00:00
Michael Natterer 1e8371361e app/actions/image-commands.c app/actions/select-commands.c
2007-12-26  Michael Natterer  <mitch@gimp.org>

	* app/actions/image-commands.c
	* app/actions/select-commands.c
	* app/core/gimp-edit.c
	* app/core/gimpdrawable-stroke.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-preview.c
	* app/core/gimpimage-rotate.c
	* app/core/gimpimageundo.c
	* app/core/gimpitem-preview.c
	* app/dialogs/grid-dialog.c
	* app/dialogs/layer-options-dialog.c
	* app/dialogs/offset-dialog.c
	* app/dialogs/stroke-dialog.c
	* app/display/gimpdisplayshell-scale.c
	* app/display/gimpdisplayshell-title.c
	* app/display/gimpdisplayshell.c
	* app/display/gimpstatusbar.c
	* app/paint/gimppaintoptions.c
	* app/tools/gimpmagnifytool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimppainttool.c
	* app/tools/gimprectangletool.c
	* app/tools/gimprotatetool.c
	* app/tools/gimpscaletool.c
	* app/tools/gimptexttool.c
	* app/vectors/gimpvectors-export.c
	* app/vectors/gimpvectors-import.c
	* app/widgets/gimpcursorview.c
	* app/widgets/gimpimagepropview.c
	* app/widgets/gimptoolbox-dnd.c
	* app/widgets/gimpviewrendererdrawable.c
	* app/widgets/gimpviewrendererimage.c
	* app/xcf/xcf-load.c
	* app/xcf/xcf-save.c: use gimp_image_get/set_resolution() instead
	of accessing the GimpImage members directly.


svn path=/trunk/; revision=24436
2007-12-26 17:33:41 +00:00
Michael Natterer 75061fccfd app/actions/channels-commands.c app/actions/colormap-actions.c
2007-12-25  Michael Natterer  <mitch@gimp.org>

	* app/actions/channels-commands.c
	* app/actions/colormap-actions.c
	* app/actions/colormap-commands.c
	* app/actions/image-commands.c
	* app/core/gimp-edit.c
	* app/core/gimpdrawable-preview.c
	* app/core/gimpimage-colorhash.c
	* app/core/gimpimage-colormap.c
	* app/core/gimpimage-convert.c
	* app/core/gimpimage-crop.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-flip.c
	* app/core/gimpimage-guides.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage-preview.c
	* app/core/gimpimage-quick-mask.c
	* app/core/gimpimage-resize.c
	* app/core/gimpimage-rotate.c
	* app/core/gimpimage-sample-points.c
	* app/core/gimpimage-scale.c
	* app/core/gimpimage-snap.c
	* app/core/gimpimage.c
	* app/core/gimpimagefile.c
	* app/core/gimpimageundo.c
	* app/core/gimpitem-preview.c
	* app/core/gimpitem.c
	* app/core/gimplayer.c
	* app/core/gimppalette-import.c
	* app/core/gimpprojection-construct.c
	* app/core/gimpprojection.c
	* app/core/gimpselection.c
	* app/core/gimpundo.c
	* app/dialogs/layer-options-dialog.c
	* app/dialogs/print-size-dialog.c
	* app/display/gimpdisplay.c
	* app/display/gimpdisplayshell-draw.c
	* app/display/gimpdisplayshell-scale.c
	* app/display/gimpdisplayshell-scroll.c
	* app/display/gimpdisplayshell-title.c
	* app/display/gimpdisplayshell-transform.c
	* app/display/gimpdisplayshell.c
	* app/display/gimpstatusbar.c
	* app/file/file-open.c
	* app/paint/gimppaintoptions.c
	* app/tools/gimpaligntool.c
	* app/tools/gimpcolortool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimpperspectiveclonetool.c
	* app/tools/gimprectangleselecttool.c
	* app/tools/gimprectangletool.c
	* app/tools/gimprotatetool.c
	* app/vectors/gimpvectors-export.c
	* app/vectors/gimpvectors-import.c
	* app/vectors/gimpvectors.c
	* app/widgets/gimpimagepropview.c
	* app/widgets/gimpnavigationview.c
	* app/widgets/gimpselectioneditor.c
	* app/widgets/gimpviewrendererdrawable.c
	* app/widgets/gimpviewrendererimage.c
	* app/xcf/xcf-load.c
	* app/xcf/xcf-save.c
	* tools/pdbgen/pdb/guides.pdb
	* tools/pdbgen/pdb/image.pdb: use accessors for many image properties.

	* app/pdb/guides_cmds.c
	* app/pdb/image_cmds.c: regenerated.


svn path=/trunk/; revision=24432
2007-12-25 16:21:40 +00:00
Michael Natterer b7dace78b4 app/tools/gimpeditselectiontool.c app/tools/gimpiscissorstool.c
2007-12-21  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimptexttool.c
	* app/tools/gimptransformtool.c: use accessors for drawable and
	item properties.


svn path=/trunk/; revision=24424
2007-12-21 20:10:27 +00:00
Michael Natterer 1542f99678 app/core/gimp-contexts.[ch] add GErrors to save() and load().
2007-12-19  Michael Natterer  <mitch@gimp.org>

	* app/core/gimp-contexts.[ch]
	* app/core/gimp-documents.[ch]: add GErrors to save() and load().

	* app/core/gimp.c
	* app/tools/gimp-tools.c: handle the returned errors.


svn path=/trunk/; revision=24403
2007-12-19 17:45:47 +00:00
Martin Nordholts 1014fca378 Reverted the changes that made GimpRectangleTool keep track of its active
2007-12-14  Martin Nordholts  <martinn@svn.gnome.org>

	Reverted the changes that made GimpRectangleTool keep track of its
	active display in GimpRectangleToolPrivate, the approach is
	broken.

svn path=/trunk/; revision=24364
2007-12-14 17:22:46 +00:00
Martin Nordholts 8208d16bb0 Changed name of `gimp_rectangle_tool_is_active_at' to
2007-12-13  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangletool.[ch]: Changed name of
	`gimp_rectangle_tool_is_active_at' to
	`gimp_rectangle_tool_is_active_on_display'.

	* app/tools/gimpcroptool.c
	* app/tools/gimprectangleselecttool.c: Use the new name.

svn path=/trunk/; revision=24360
2007-12-13 21:48:55 +00:00
Martin Nordholts f643d5545c Don't use the `display' member of GimpTool for keeping track of what
2007-12-13  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangletool.[ch]: Don't use the `display' member
	of GimpTool for keeping track of what display the rectangle is
	active on. Instead store the active display in
	GimpRectangleToolPrivate. This change is based on a patch by Bill
	Skaggs.
	(gimp_rectangle_tool_is_active)
	(gimp_rectangle_tool_is_active_at)
	(gimp_rectangle_tool_get_active_display): New public functions for
	GimpRectangleTool active-display interaction.

	* app/tools/gimpellipseselecttool.c
	(gimp_ellipse_select_tool_select): Use the active display of
	GimpRectangleTool instead of tool->display.

	* app/tools/gimprectangleselecttool.c
	(gimp_rect_select_tool_rectangle_changed): Use the active display
	of GimpRectangleTool instead of tool->display.

	* app/tools/gimpcroptool.c
	(gimp_crop_tool_button_press): Use the active display of
	GimpRectangleTool instead of tool->display.

svn path=/trunk/; revision=24358
2007-12-13 21:30:59 +00:00
Martin Nordholts 453f54584d Make canceling work a bit better.
2007-12-13  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangletool.c
	(gimp_rectangle_tool_button_release): Make canceling work a bit
	better.

svn path=/trunk/; revision=24355
2007-12-13 20:14:41 +00:00
Martin Nordholts c0ab783568 Extended public interface a bit. (gimp_rectangle_tool_point_in_rectangle):
2007-12-12  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangletool.c: Extended public interface a bit.
	(gimp_rectangle_tool_point_in_rectangle): New convenience function
	to test if a point is within the rectangle (if active).
	(gimp_rectangle_tool_rectangle_is_new): New function so that
	clients can determine if the rectangle currently being
	rubber-banded was created from scatch or not.

svn path=/trunk/; revision=24343
2007-12-12 21:11:56 +00:00
Hans Breuer 6f5bbfe0bd updated and removed -GD to let msvc9 complain less
2007-12-09  Hans Breuer  <hans@breuer.org>

	* **/makefile.msc : updated and removed -GD to let msvc9 complain less


svn path=/trunk/; revision=24305
2007-12-09 14:11:09 +00:00
Martin Nordholts 8372fd28bf Added gimp_rectangle_tool_init() (and minor code cleanup).
2007-12-09  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangletool.[ch]: Added
	gimp_rectangle_tool_init() (and minor code cleanup).

	* app/tools/gimprectangleselecttool.c
	(gimp_rect_select_tool_init): Call gimp_rectangle_tool_init().

	* app/tools/gimpcroptool.c
	(gimp_crop_tool_init): Call gimp_rectangle_tool_init().

svn path=/trunk/; revision=24304
2007-12-09 09:38:34 +00:00
Michael Natterer efda62544d renamed log domain TOOLS to TOOL_EVENTS and added domain TOOL_FOCUS.
2007-12-07  Michael Natterer  <mitch@gimp.org>

	* app/gimp-log.[ch]: renamed log domain TOOLS to TOOL_EVENTS and
	added domain TOOL_FOCUS.

	* app/display/gimpdisplayshell-callbacks.c: s/TOOLS/TOOL_EVENTS/

	* app/tools/gimptool.c: port focus debug output to GIMP_LOG().


svn path=/trunk/; revision=24287
2007-12-07 18:52:41 +00:00
Michael Natterer 58c2dd9bba added GErrors to gimp_selection_extract() and gimp_selection_float().
2007-12-07  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpselection.[ch]: added GErrors to
	gimp_selection_extract() and gimp_selection_float().

	* app/core/gimp-edit.c
	* app/tools/gimpeditselectiontool.c
	* app/actions/select-commands.c: handle the returned error.

	* app/core/gimpdrawable-transform.c: pass NULL errors since this
	file knows what it does and won't get errors.

	* tools/pdbgen/pdb/selection.pdb: pass the error.

	* app/pdb/selection_cmds.c: regenerated.


svn path=/trunk/; revision=24286
2007-12-07 18:16:28 +00:00
Martin Nordholts fddd27bc83 Also update the integer representation of the rect when the GObject
2007-12-06  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangletool.c
	(gimp_rectangle_tool_set_property): Also update the integer
	representation of the rect when the GObject properties has been
	set.

svn path=/trunk/; revision=24277
2007-12-06 20:55:10 +00:00
Michael Natterer 90606bc4fa add GError parameter.
2007-12-06  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawable-bucket-fill.[ch]: add GError parameter.

	* app/tools/gimpbucketfilltool.c: handle the returned error.

	* tools/pdbgen/pdb/edit.pdb: pass the error.

	* app/pdb/edit_cmds.c: regenerated.


svn path=/trunk/; revision=24275
2007-12-06 19:07:11 +00:00
William Skaggs 7c27d0d2eb Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/tools/gimprectangletool.c: initialize vars to quiet
	stupid compile warnings.

svn path=/trunk/; revision=24236
2007-11-27 19:28:38 +00:00
Martin Nordholts c94eb4d170 Fix indentation.
2007-11-24  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangleoptions.c
	(gimp_rectangle_options_iface_base_init): Fix indentation.

svn path=/trunk/; revision=24227
2007-11-24 10:09:09 +00:00
Martin Nordholts 6e22ccd92a Renamed RECT_* identifiers of the GimpRectangleFunction enum to
2007-11-24  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangletool.[ch]: Renamed RECT_* identifiers of
	the GimpRectangleFunction enum to GIMP_RECTANGLE_TOOL_*.

	* app/tools/gimprectangleselecttool.c: Use the new names.

svn path=/trunk/; revision=24226
2007-11-24 09:27:55 +00:00
Martin Nordholts 4fee7a4e0e Ported the internal representation of the rectangle to gdouble:s instead
2007-11-24  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangletool.[ch]: Ported the internal
	representation of the rectangle to gdouble:s instead of
	gint:s. This solves problems like not being able to swap portrait
	for landscape on very small rectangle and bug #442027, as well as
	provides a nice base to solve other similar problems when they are
	discovered. It is possible to choose what precision the
	GimpRectangleTool:s will appear to have externally through a new
	GimpRectanglePrecision enum and property, but the gdouble
	precision mode still requires some work in order to be useful. In
	the processes quite some refactoring has taken place, mostly
	restructuring code and splitting larger functions into smaller
	more managable ones.
	(gimp_rectangle_tool_rect_rubber_banding_func)
	(gimp_rectangle_tool_setup_snap_offsets)
	(gimp_rectangle_tool_apply_fixed_rule)
	(gimp_rectangle_tool_update_int_rect)
	(gimp_rectangle_tool_get_public_rect): New helper functions.

	* app/tools/tools-enums.h: Added GimpRectanglePrecision.

svn path=/trunk/; revision=24224
2007-11-24 09:09:26 +00:00
Michael Natterer 46f2b44f5b forgot one bar.
svn path=/trunk/; revision=24220
2007-11-22 17:11:05 +00:00
Michael Natterer 8fba0a2f27 derive from GtkEventBox instead of GtkMisc, but use an input-only window.
2007-11-22  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpcolorbar.[ch]: derive from GtkEventBox instead
	of GtkMisc, but use an input-only window.

	* app/tools/gimplevelstool.c: redirect the events of the color
	bars to te handle bars. The historgram dialog has this change
	already. Functionality should be 100% restored now.


svn path=/trunk/; revision=24218
2007-11-22 17:07:33 +00:00
Sven Neumann dc5d601675 use gtk_widget_set_tooltip_text() from gimp_help_set_help() and added
2007-11-22  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimphelpui.[ch]: use
	gtk_widget_set_tooltip_text() from gimp_help_set_help() and added
	gimp_help_set_help_data_with_markup() for the cases where markup
	is needed.

	* libgimpwidgets/gimpwidgets.def: updated.

	* app/tools/gimpselectionoptions.c
	* app/widgets/gimpeditor.c
	* app/widgets/gimpwidgets-utils.c: use the new function where markup
	in tooltips is being used.

	* app/widgets/gimptoolbox-color-area.c: no need to escape the
	ampersand any longer.

svn path=/trunk/; revision=24217
2007-11-22 13:59:06 +00:00
Michael Natterer fb0da885f4 use a GimpHandleBar also for the input frame, added a second adjustment
2007-11-22  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimplevelstool.[ch]: use a GimpHandleBar also for the
	input frame, added a second adjustment for gamma and map between
	the linear and logarithmic gamma values in the adjustment
	callbacks, get rid of one GtkFrame just as in the histogram
	dialog. Still not finished since mouse events on the color bars
	are currently not handled.


svn path=/trunk/; revision=24214
2007-11-22 09:45:40 +00:00
Michael Natterer f00af7fead use a GimpHandleBar widget for the output sliders. Removes a bunch of code
2007-11-20  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimplevelstool.[ch]: use a GimpHandleBar widget for
	the output sliders. Removes a bunch of code already, more to
	come...


svn path=/trunk/; revision=24203
2007-11-20 17:24:37 +00:00
Martin Nordholts 9ddec7eb78 Cosmitics. More strictly align static function prototypes and consistently
2007-11-18  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangleselecttool.c: Cosmitics. More strictly
	align static function prototypes and consistently use the name
	rect_sel_tool for pointers to GimpRectSelectTool.

svn path=/trunk/; revision=24192
2007-11-18 21:26:52 +00:00
Sven Neumann 410a6ffabd plugged a memory leak.
2007-11-15  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpselectionoptions.c (gimp_selection_options_gui):
	plugged a memory leak.

	* libgimpwidgets/gimpintstore.c (gimp_int_store_add_empty):
	initialize the iter to avoid using uninitialized memory.


svn path=/trunk/; revision=24169
2007-11-15 20:23:27 +00:00
Michael Natterer ab465c742d add read-only property "frozen" and new API
2007-11-15  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpviewable.[ch]: add read-only property "frozen" and
	new API gimp_viewable_preview_is_fozen(). Emit property notifications.

	* app/widgets/gimphistogramview.[ch]: add API to show a second
	histogram in the background. Remove member "light_histogram" from
	the GimpHistogramViewClass struct.

	* app/widgets/gimpcurveview.c: don't set "light_histogram".

	* app/tools/gimpcurvestool.c: set the background histogram instead.

	* app/widgets/gimphistogrameditor.[ch]: connect to "notify::frozen"
	of the drawable and show its histogram at the freezing point in
	the background. This way the original histogram is visible while
	we are doing color corrections.


svn path=/trunk/; revision=24159
2007-11-15 10:33:51 +00:00
Martin Nordholts 25ebadcd30 Avoid GimpRectangleTool internals to make use of its public own interface
2007-11-13  Martin Nordholts  <martinn@svn.gnome.org>

	Avoid GimpRectangleTool internals to make use of its public own
	interface by making gimp_rectangle_tool_get_other_side() work on
	pointers to members instead of GObject property names.

	* app/tools/gimprectangletool.c
	(gimp_rectangle_tool_set_other_side_coord)
	(gimp_rectangle_tool_get_other_side_coord): Use
	gimp_rectangle_tool_get_other_side() in the new way.

svn path=/trunk/; revision=24152
2007-11-13 21:30:45 +00:00
Martin Nordholts f211ed5b59 Fixed warnings about negative rectangle widths/heights when toggling
2007-11-13  Martin Nordholts  <martinn@svn.gnome.org>

	Fixed warnings about negative rectangle widths/heights when
	toggling 'Fixed center' while rubber banding a rectangle.

	* app/tools/gimprectangletool.c
	(gimp_rectangle_tool_set_other_side_coord): Finnishing off with a
	call to gimp_rectangle_tool_check_function() as changing the
	coordinates of the opposite side might swap the orientation of the
	rectangle.

svn path=/trunk/; revision=24151
2007-11-13 21:15:57 +00:00
Michael Natterer 873cf2b53e Enable brush scaling for smudge (but only before, not while painting).
2007-11-13  Michael Natterer  <mitch@gimp.org>

	Enable brush scaling for smudge (but only before, not while
	painting). Fixes bug #471348.

	* app/paint/gimpbrushcore.[ch] (struct GimpBrushCoreClass): rename
	member "use_scale" to "handles_scaling_brush".

	(gimp_brush_core_calc_brush_scale): apply pressure scale only if
	both "handles_scaling_brush" and "use_pressure" are TRUE, and
	apply the scaling from the options unconditionally.

	(gimp_brush_core_get_paint_area): don't re-fetch core->scale if
	"handles_scaling_brush" is FALSE to keep the brush from scaling
	*while* painting.

	(gimp_brush_core_create_bound_segs): use the brush scale from the
	options unconditionally since that's always used now.

	* app/paint/gimpsmudge.c (gimp_smudge_brush_coords): use
	gimp_brush_scale_size() to figure the accum_buffer's size instead
	of using the brush mask's size directly.

	* app/tools/gimppaintoptions-gui.c (gimp_paint_options_gui): show
	the brush scale controls for all brush tools.


svn path=/trunk/; revision=24140
2007-11-13 09:30:46 +00:00
Martin Nordholts 49e2670eb6 Removed gimp_rectangle_tool_get_press_coords() as it doesn't make sense
2007-11-11  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangletool.[ch]: Removed
	gimp_rectangle_tool_get_press_coords() as it doesn't make sense
	for a rectangle tool interface to provide this functionality.
	Clients should take care of that themselves. Also adjusted
	internal code accordingly.

	* app/tools/gimprectangleselecttool.c: Remember the pressed
	coordinates on _button_press instead of asking GimpRectangleTool
	about it.

svn path=/trunk/; revision=24119
2007-11-11 14:00:48 +00:00
Martin Nordholts 6087b86675 Don't expose private instance members, use g_type_class_add_private()
2007-11-11  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangleselecttool.[ch]: Don't expose private
	instance members, use g_type_class_add_private() instead.

svn path=/trunk/; revision=24117
2007-11-11 11:45:07 +00:00
Martin Nordholts 760edd173d Updated comments to reflect current behaviour.
2007-11-11  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangletool.c
	(gimp_rectangle_tool_update_with_coord): Updated comments to
	reflect current behaviour.

svn path=/trunk/; revision=24116
2007-11-11 07:59:51 +00:00
Martin Nordholts e157ac06b1 Lessen code bloat by removing code that manages center-[xy] properies of
2007-11-11  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangletool.c: Lessen code bloat by removing
	code that manages center-[xy] properies of GimpRectangleOptions.
	Instead use x1, y1 and x2, y2 when working with the rectangle
	center.

	* app/tools/gimprectangleoptions.[ch]: Removed "center-x" and
	"center-y" properties.

svn path=/trunk/; revision=24115
2007-11-11 07:44:17 +00:00
Michael Natterer a9d29324ab app/tools/gimpairbrushtool.c (gimp_airbrush_tool_init) don't enable color
2007-11-10  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpairbrushtool.c (gimp_airbrush_tool_init)
	* app/tools/gimppenciltool.c (gimp_pencil_tool_init): don't enable
	color picking, it already gets enabled by the parent class.


svn path=/trunk/; revision=24109
2007-11-10 14:41:26 +00:00
Michael Natterer a446f3d7fb use the new tooltip API instead of the old deprecated one. Removed
2007-11-09  Michael Natterer  <mitch@gimp.org>

	* libgimpwidgets/gimphelpui.[ch]: use the new tooltip API instead
	of the old deprecated one. Removed _gimp_help_init(). Remember
	whether tooltips are enabled or not in a local variable that can
	only be altered at startup time and not after. The API now expects
	markup instead of plain text which might cause warnings and
	perhaps needs to be changed.

	* libgimpwidgets/gimpwidgets-private.c: don't call _gimp_help_init().

	* app/config/gimpguiconfig.c: made show-tooltips a
	GIMP_CONFIG_PARAM_RESTART property.

	* app/widgets/gimptoolbox-color-area.c: don't add the tooltip here...

	* app/widgets/gimptoolbox.c: ...but here (as for all other
	indicators). Also escape '&' properly because we now use markup.

	* app/tools/gimpselectionoptions.c
	* app/widgets/gimpeditor.c
	* app/widgets/gimpwidgets-utils.c: print modifiers and
	shortcuts in bold instead of in ().

	* app/widgets/gimpcontainertreeview.c: show tooltips on rows if
	gimp_viewable_get_description() returns a tip.

	* app/dialogs/preferences-dialog.c
	* plug-ins/jpeg/jpeg-save.c
	* plug-ins/MapObject/mapobject_ui.c
	* plug-ins/Lighting/lighting_ui.c
	* plug-ins/common/animationplay.c
	* plug-ins/common/warp.c: no need to add event boxes just to have
	tooltips, the new ones work on all widgets.


svn path=/trunk/; revision=24093
2007-11-09 11:17:00 +00:00
Martin Nordholts 2ce790a8a5 Don't use any dead areas in narrow-mode, and adjust constants a bit.
2007-11-06  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangletool.c
	(gimp_rectangle_tool_update_handle_sizes): Don't use any dead
	areas in narrow-mode, and adjust constants a bit.

	* app/tools/gimpdrawtool.c (gimp_draw_tool_draw_corner): Adjusted
	to always draw side handles in narrow mode without dead areas.

svn path=/trunk/; revision=24077
2007-11-06 22:04:18 +00:00
Martin Nordholts bd1db1a1c8 Bail out early if the rectangle function is RECT_DEAD. This prevents
2007-11-05  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangletool.c (gimp_rectangle_tool_motion): Bail
	out early if the rectangle function is RECT_DEAD. This prevents
	flickering.

svn path=/trunk/; revision=24071
2007-11-05 20:24:11 +00:00
Martin Nordholts 0e70d5f5a7 also don't show the shell highlight when a rectangle is being moved.
2007-11-05  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangletool.c: also don't show the shell
	highlight when a rectangle is being moved. Achieved through
	slightly modifying code logic and renaming variables and functions
	a bit.

svn path=/trunk/; revision=24070
2007-11-05 20:17:56 +00:00
Michael Natterer 21b3675ea8 don't recalculate the curve if the data object is frozen. Recalculate on
2007-11-05  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpcurve.[ch]: don't recalculate the curve if the data
	object is frozen. Recalculate on thaw instead. Made
	gimp_curve_calculate() private and emit some GimpData::dirty
	signals where appropriate.

	* app/tools/gimpcurvestool.c
	* app/widgets/gimpcurveview.c
	* tools/pdbgen/pdb/color.pdb: changed accodingly (connect to "dirty"
	instead of "notify" and added some freeze/thaw where approproate).

	* app/pdb/color_cmds.c: regenerated.


svn path=/trunk/; revision=24063
2007-11-05 10:02:20 +00:00
Michael Natterer 2d827be2f3 added event handling and completely edit the curve here.
2007-11-05  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpcurveview.[ch]: added event handling and
	completely edit the curve here.

	* app/tools/gimpcurvestool.[ch]: remove all event handling and
	curve editing code and only listen to curve signals.


svn path=/trunk/; revision=24060
2007-11-05 08:59:09 +00:00
Martin Nordholts a07756d894 Do not do shell darkening while GimpRectangleTool rectangles are being
2007-11-04  Martin Nordholts  <martinn@svn.gnome.org>

	Do not do shell darkening while GimpRectangleTool rectangles are
	being rubber-banded.

	* app/tools/gimprectangletool.c
	(gimp_rectangle_tool_button_press)
	(gimp_rectangle_tool_button_release): Maintain a variable keeping
	track of if the rectangle is being rubber banded or not.
	(gimp_rectangle_tool_update_highlight): Do not set a shell
	highligt if the rectangle is being rubber-banded.
	(gimp_rectangle_tool_rubber_banding_func): New helper function.

svn path=/trunk/; revision=24059
2007-11-04 21:26:01 +00:00
Sven Neumann 982ae0eb0c minor cleanup.
2007-11-04  Sven Neumann  <sven@gimp.org>

	* app/tools/gimplevelstool.c (levels_input_area_event): minor 
cleanup.


svn path=/trunk/; revision=24055
2007-11-04 14:53:38 +00:00
Martin Nordholts 587b350b36 Consistently use the name rect_tool' instead of rectangle' or
2007-11-04  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangletool.c: Consistently use the name
	`rect_tool' instead of `rectangle' or `rectangle_tool' for
	pointers to GimpRectangleTool.

svn path=/trunk/; revision=24054
2007-11-04 14:47:48 +00:00
Martin Nordholts c902d7bc74 Put GimpRectangleTool handles on the outside of the rectangle when it has
2007-11-04  Martin Nordholts  <martinn@svn.gnome.org>

	Put GimpRectangleTool handles on the outside of the rectangle when
	it has a small width or height. Some polishing left to do but the
	base functionality works nicely.

	* app/tools/gimpdrawtool.[ch] (gimp_draw_tool_draw_corner): Add a
	put_outside boolean parameter that if true draws the handles on
	the outside of the rectangle.

	* app/tools/gimprectangletool.c
	(gimp_rectangle_tool_update_handle_sizes)
	(gimp_rectangle_tool_coord_on_handle)
	(gimp_rectangle_tool_draw): Take into account if the rectangle is
	in narrow-mode or not.

svn path=/trunk/; revision=24053
2007-11-04 14:10:56 +00:00
Michael Natterer ae1f2eb2bc app/widgets/Makefile.am app/widgets/widgets-types.h new GimpHistogramView
2007-11-04  Michael Natterer  <mitch@gimp.org>

	* app/widgets/Makefile.am
	* app/widgets/widgets-types.h
	* app/widgets/gimpcurveview.[ch]: new GimpHistogramView subclass
	which does all the curve stuff.

	* app/widgets/gimphistorgramview.[ch]: removed all curve code again.

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


svn path=/trunk/; revision=24051
2007-11-04 13:09:10 +00:00
Michael Natterer 6c64c64b07 added API to set the selected point.
2007-11-02  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimphistogramview.[ch]: added API to set the
	selected point.

	* app/tools/gimpcurvestool.c: use it.


svn path=/trunk/; revision=24046
2007-11-02 17:08:42 +00:00
Michael Natterer e5927feba1 added API to modify free-form curves and properties to listen to curve
2007-11-02  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpcurve.[ch]: added API to modify free-form curves
	and properties to listen to curve changes.

	* app/widgets/gimphistogramview.[ch]: added everything that's
	needed for rendering a curve with all its color and cursor
	indicators on top of a histogram. This code will move to a
	subclass soon.

	* app/tools/gimpcurvestool.[ch]: removed all curve rendering here.
	Also removed all explicit updating by connecting to curve signals
	and updating in the callback.


svn path=/trunk/; revision=24045
2007-11-02 16:51:18 +00:00
Michael Natterer 5dd23ae18b app/core/Makefile.am app/core/core-types.h app/core/gimpcurve-save.[ch]
2007-11-02  Michael Natterer  <mitch@gimp.org>

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpcurve-save.[ch]
	* app/core/gimpcurve-load.[ch]
	* app/core/gimpcurve.[ch]: new GimpData subclass which keeps a
	curve as known from the curves tool. Pretty much unfinished, but
	can do everything that used to be done by base/curves.c and more.

	* app/base/curves.[ch]: stripped down to plain arrays of
	uchar (the actual curve) and the LUT setup function. All the rest
	is done by GimpCurve now.

	* app/tools/gimpcurvestool.[ch]: use an array of GimpCurves
	instead of the old Curves cruft. Use Curves only for the last step
	of creating the LUT. Pretty much unfinished migration here too.

	* tools/pdbgen/pdb/color.pdb: use a GimpCurve here too.

	* app/pdb/color_cmds.c: regenerated.


svn path=/trunk/; revision=24041
2007-11-02 12:18:50 +00:00
Michael Natterer de65da8d96 depend on glib 2.14.1
2007-10-31  Michael Natterer  <mitch@gimp.org>

	* configure.in: depend on glib 2.14.1

	* app/tools/gimpdrawtool.c
	* app/vectors/gimpvectors-import.c: use g_slice_dup() instead of
	g_slice_new() and memcpy().


svn path=/trunk/; revision=24014
2007-10-31 10:59:44 +00:00
Michael Natterer ba62d2b9d3 some general indentation, spacing and coding style convention paranoia
2007-10-31  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimprectangletool.c: some general indentation, spacing
	and coding style convention paranoia cleanups.

	(gimp_rectangle_tool_get_constraints): set all return values also
	when bailing out early to avoid valgrind warnings about
	uninitialized memory.


svn path=/trunk/; revision=24009
2007-10-31 10:36:03 +00:00
Martin Nordholts 1c8d6bb8ce Update the selection when Rounded corners is toggled or the radius is
2007-10-30  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangleselecttool.c
	(gimp_rect_select_tool_round_corners_notify): Update the selection
	when Rounded corners is toggled or the radius is changed as
	discussed in bug #418284.

svn path=/trunk/; revision=23991
2007-10-30 17:13:10 +00:00
Sven Neumann 81d38532a2 Fix drawing of straight lines using the Shift key and a tablet (bug
2007-10-30  Sven Neumann  <sven@gimp.org>

	Fix drawing of straight lines using the Shift key and a tablet
	(bug #164240):

	* app/tools/gimppainttool.c (gimp_paint_tool_button_press): set
	use_pressure to FALSE when drawing a straight line.

	* app/paint/gimppaintbrush.c (_gimp_paintbrush_motion): respect
	the use_pressure flag.

svn path=/trunk/; revision=23988
2007-10-30 11:24:08 +00:00
Sven Neumann 96a46d0d70 Fix bug #491272 (no cursor drawn for small brush sizes):
2007-10-29  Sven Neumann  <sven@gimp.org>

	Fix bug #491272 (no cursor drawn for small brush sizes):

	* app/tools/gimpbrushtool.[ch]
	(gimp_brush_tool_draw_brush): don't draw the brush outline if it
	becomes too small. Instead draw a small cross, but only if
	"draw_fallback" was passed as TRUE.
	(gimp_brush_tool_draw_brush): pass TRUE for "draw_fallback" if
	cursor drawing is disabled for the paint tools.

	* app/tools/gimpsourcetool.c (gimp_source_tool_draw): pass FALSE
	for "draw_fallback".

	* app/tools/gimpdrawtool.c (gimp_draw_tool_draw_cross_by_anchor):
	draw a symmetric cross for odd handle sizes.

svn path=/trunk/; revision=23984
2007-10-29 17:17:14 +00:00
Sven Neumann 3057677e59 initialize variables to suppress a compiler warning.
2007-10-29  Sven Neumann  <sven@gimp.org>

	* app/tools/gimprectangletool.c (gimp_rectangle_tool_coord_on_handle):
	initialize variables to suppress a compiler warning.

svn path=/trunk/; revision=23983
2007-10-29 17:11:17 +00:00
Martin Nordholts 7bf0fb645f Renamed handle_[wh] to corner_handle_[wh] since that are the appropriate
2007-10-26  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangletool.c (struct GimpRectangleToolPrivate):
	Renamed handle_[wh] to corner_handle_[wh] since that are the
	appropriate names.

svn path=/trunk/; revision=23960
2007-10-26 21:07:45 +00:00
Martin Nordholts 5e2f39b645 Use new helper functions to decide if the cursor is on a handle (or
2007-10-26  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangletool.c (gimp_rectangle_tool_oper_update):
	Use new helper functions to decide if the cursor is on a
	handle (or outside of the rectangle + handle bounds) to ease the
	introduction of having handles on the outside of the pending
	rectangle.
	(gimp_rectangle_tool_coord_outside)
	(gimp_rectangle_tool_coord_on_handle): New helper functions.

svn path=/trunk/; revision=23959
2007-10-26 20:58:08 +00:00
Sven Neumann 5ec574ba37 Reenabled update of the histogram while doing color corrections (bug
2007-10-26  Sven Neumann  <sven@gimp.org>

	Reenabled update of the histogram while doing color corrections
	(bug 490182):

	* app/core/gimpviewable.[ch]: added new methods preview_freeze()
	and preview_thaw().

	* app/core/gimpimagemap.c
	(gimp_image_map_new): freeze the drawable preview.
	(gimp_image_map_dispose): thaw the  drawable preview.
	(gimp_image_map_do): update the drawable, not the image.

	* app/tools/gimpimagemaptool.c (gimp_image_map_tool_response): no
	need to invalidate the drawable preview any longer.

svn path=/trunk/; revision=23956
2007-10-26 14:42:58 +00:00
Martin Nordholts c40518f33a Aligned static function prototypes.
2007-10-25  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangletool.c: Aligned static function
	prototypes.

svn path=/trunk/; revision=23951
2007-10-25 20:43:51 +00:00
Martin Nordholts 3f1d817eb6 Tiny cosmetic change on the ClampedSide enum definition.
2007-10-25  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangletool.c: Tiny cosmetic change on the
	ClampedSide enum definition.

svn path=/trunk/; revision=23950
2007-10-25 20:28:23 +00:00
Sven Neumann 8e880ebb68 changed aspect ratio of the wrap-box used for the "Pressure sensitivity"
2007-10-22  Sven Neumann  <sven@gimp.org>

	* app/tools/gimppaintoptions-gui.c: changed aspect ratio of the
	wrap-box used for the "Pressure sensitivity" controls to make 
them
	fit better into the tool-options.


svn path=/trunk/; revision=23910
2007-10-22 18:27:31 +00:00
Sven Neumann 5e33911ec2 don't draw the source brush outline while selecting a new source location
2007-10-22  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpsourcetool.[ch]: don't draw the source brush
	outline while selecting a new source location (bug #488839).

svn path=/trunk/; revision=23902
2007-10-22 10:24:41 +00:00
Sven Neumann a5fa311290 removed a frame.
2007-10-17  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpselectionoptions.c: removed a frame.

	* app/tools/gimptransformoptions.c: tweaked layout to reduce
	horizontal extent.

	* app/widgets/gimpviewablebox.c (gradient_box_new): use an icon
	for the "Reverse" check button.

svn path=/trunk/; revision=23857
2007-10-17 14:36:12 +00:00
Michael Natterer 17eb0c6934 honor the "show-pixels" and "show-percent" properties of the unit param
2007-10-16  Michael Natterer  <mitch@gimp.org>

	* libgimpwidgets/gimppropwidgets.c (gimp_prop_size_entry_new):
	honor the "show-pixels" and "show-percent" properties of the unit
	param spec.

	* app/tools/gimprectangletool.c (gimp_rectangle_tool_start): set
	the image's width/height on the size entries so the percent unit
	works correctly.


svn path=/trunk/; revision=23852
2007-10-16 15:39:56 +00:00
Sven Neumann c612cd379e changed "Show interactive boundary" to "Interactive boundary".
2007-10-16  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpselectionoptions.c (gimp_selection_options_gui):
	changed "Show interactive boundary" to "Interactive boundary".

	* app/tools/gimptextoptions.c: align the color panel with the
	button box below it.

svn path=/trunk/; revision=23851
2007-10-16 15:29:42 +00:00
Sven Neumann 8783fb5be8 reduced width of the tool options.
2007-10-16  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpaligntool.c: reduced width of the tool options.

svn path=/trunk/; revision=23850
2007-10-16 15:07:56 +00:00
Sven Neumann e4c6b1a8dc changed "Create Path from Text" to "Path from Text".
2007-10-16  Sven Neumann  <sven@gimp.org>

	* app/tools/gimptextoptions.c (gimp_text_options_gui): changed
	"Create Path from Text" to "Path from Text".

svn path=/trunk/; revision=23846
2007-10-16 14:38:51 +00:00
Sven Neumann 331ad62d22 Changed "Create Selection from Path" to "Selection from Path".
2007-10-16  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpvectoroptions.c (gimp_vector_options_gui):
	Changed "Create Selection from Path" to "Selection from Path".

svn path=/trunk/; revision=23845
2007-10-16 14:31:48 +00:00
Michael Natterer 74be00e0b6 redid the x, y, width and height entries according to a mockup from peter.
2007-10-16  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimprectangleoptions.c: redid the x, y, width and
	height entries according to a mockup from peter.


svn path=/trunk/; revision=23843
2007-10-16 14:24:08 +00:00
Sven Neumann f72606f09b more translator comments
svn path=/trunk/; revision=23835
2007-10-15 20:53:41 +00:00
Sven Neumann 46fa984a2d added translator comment for the string "Current". Changed "Auto Shrink
2007-10-15  Sven Neumann  <sven@gimp.org>

	* app/tools/gimprectangleoptions.c: added translator comment for 
the
	string "Current". Changed "Auto Shrink Selection" to "Auto 
Shrink".


svn path=/trunk/; revision=23834
2007-10-15 20:49:27 +00:00
Martin Nordholts 8690e913a7 Use gimp_vectors_bounds() instead of gimp_item_offsets|width|height() when
2007-10-15  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimpaligntool.c (gimp_align_tool_draw): Use
	gimp_vectors_bounds() instead of gimp_item_offsets|width|height()
	when calculating bounding rectangle for a path. Part of a fix for
	bug #486517.

svn path=/trunk/; revision=23832
2007-10-15 17:58:58 +00:00
Michael Natterer 6a6591b457 split the "unit" property into "position-unit" and "size-unit" and added a
2007-10-15  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimprectangleoptions.[ch]: split the "unit" property
	into "position-unit" and "size-unit" and added a unit menu to the
	position widget group. UI pending further changes...


svn path=/trunk/; revision=23831
2007-10-15 16:47:07 +00:00
Michael Natterer 2d4ce38ae4 moved the "Highlight" toggle down to the "Guides" combo.
2007-10-15  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimprectangleoptions.c (gimp_rectangle_options_gui):
	moved the "Highlight" toggle down to the "Guides" combo.


svn path=/trunk/; revision=23830
2007-10-15 16:34:58 +00:00
Michael Natterer a16e2c9a9f added the x and y size entries to the GimpRectangleOptionPrivate struct.
2007-10-15  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimprectangleoptions.[ch]: added the x and y size
	entries to the GimpRectangleOptionPrivate struct.

	* app/tools/gimprectangletool.c (gimp_rectangle_tool_start): set
	the image's resolution on the x, y, width and height size entries.


svn path=/trunk/; revision=23829
2007-10-15 16:26:05 +00:00
Michael Natterer 3b2fa02a6e Reduced the Width: and Height: labels to W: and H:. Please check and
2007-10-14  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimprectangleoptions.c (gimp_rectangle_options_gui):
	Reduced the Width: and Height: labels to W: and H:. Please check
	and comment, we need some solution for this group of widgets
	including the unit menu.


svn path=/trunk/; revision=23825
2007-10-14 20:24:57 +00:00
Michael Natterer 9003166a10 enable the unit menu on the "Height" entry. Looks like crap and needs to
2007-10-14  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimprectangleoptions.c (gimp_rectangle_options_gui):
	enable the unit menu on the "Height" entry. Looks like crap and
	needs to be changed, but the unit functionality is almost complete
	now.


svn path=/trunk/; revision=23824
2007-10-14 20:15:50 +00:00
Michael Natterer c5d70d901f Fix last commit.
svn path=/trunk/; revision=23823
2007-10-14 19:55:10 +00:00
Michael Natterer 1e71a30ce3 renamed properties x0 and y0 to x and y. Also reordered all property code
2007-10-14  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimprectangleoptions.[ch]: renamed properties x0 and
	y0 to x and y. Also reordered all property code to be in the same
	order and added some empty lines to group the properties.

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


svn path=/trunk/; revision=23822
2007-10-14 19:48:56 +00:00
Michael Natterer 0a824ddba0 added parameter "gboolean property_is_pixel" which indicates that the
2007-10-14  Michael Natterer  <mitch@gimp.org>

	* libgimpwidgets/gimppropwidgets.[ch] (gimp_prop_size_entry_new):
	added parameter "gboolean property_is_pixel" which indicates that
	the stored property value is always in pixels and not in the
	selected unit.

	* app/tools/gimptextoptions.c
	* app/widgets/gimpstrokeeditor.c: pass FALSE to keep the old
	behavior.

	* app/tools/gimprectangleoptions.c (gimp_rectangle_options_gui):
	added property "fixed-unit" which is used for all fixed values
	now. Perhaps we need separate units for width/height/size. Enable
	the unit menu on the "Width" and "Height" size entries of the
	"Fixed" section and configure them to store the value in
	pixels. This was the easy part, some other widgets still need unit
	support.

	* app/tools/gimprectangletool.c (gimp_rectangle_tool_start): set
	the image's resolution on the size entries changed above.


svn path=/trunk/; revision=23821
2007-10-14 18:51:58 +00:00
Raphael Quinet a76ec5c8aa Re-wrote the cursor handling logic, added cursor modifiers, added hints in
2007-10-14  Raphael Quinet  <raphael@gimp.org>

	* app/tools/gimpaligntool.[ch]: Re-wrote the cursor handling
	logic, added cursor modifiers, added hints in the status bar in
	order to make it easier to discover how to use the tool.  Adds new
	translatable strings, fixes bug #486110.

svn path=/trunk/; revision=23819
2007-10-14 08:54:19 +00:00
Martin Nordholts 09516e5837 When Fixed: Size/Aspect ratio numbers are swapped and the Fixed:-rule is
2007-10-14  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangletool.c
	(gimp_rectangle_tool_options_notify): When Fixed: Size/Aspect
	ratio numbers are swapped and the Fixed:-rule is active, swap
	width and height on any pending rectangle. Fixed bug #479999.

svn path=/trunk/; revision=23818
2007-10-14 08:26:18 +00:00
Martin Nordholts 9305d2a1cc Use ROUND() not round().
2007-10-13  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangletool.c
	(gimp_rectangle_tool_apply_aspect): Use ROUND() not round().

svn path=/trunk/; revision=23816
2007-10-13 12:14:46 +00:00
Martin Nordholts de694a5de3 Use round() when solving the aspect ratio equations as this produces more
2007-10-13  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangletool.c
	(gimp_rectangle_tool_apply_aspect): Use round() when solving the
	aspect ratio equations as this produces more accurate results.

svn path=/trunk/; revision=23811
2007-10-13 10:17:50 +00:00
Michael Natterer 68af3a33eb massively simplified the fixed rule widget showing/hiding, fixed their
2007-10-12  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimprectangleoptions.[ch]: massively simplified the
	fixed rule widget showing/hiding, fixed their spacing, make sure
	they don't cause UI resizing on rule change.


svn path=/trunk/; revision=23809
2007-10-12 13:00:55 +00:00
Sven Neumann f6863a0ef7 left-align the size entries.
2007-10-11  Sven Neumann  <sven@gimp.org>

	* app/tools/gimprectangleoptions.c (gimp_rectangle_options_gui):
	left-align the size entries.

svn path=/trunk/; revision=23804
2007-10-11 17:02:54 +00:00
Michael Natterer 45ca11b324 if we need to delete/create tools on button press because the active tool
2007-10-11  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplayshell-callbacks.c
	(gimp_display_shell_canvas_tool_events): if we need to
	delete/create tools on button press because the active tool
	doesn't support changing drawables, make sure the newly created
	tool gets its focus_display and modifier states set correctly.
	Fixes bug #485119. Improved disabled debug output.

	* app/tools/gimptool.c: stylistic cleanup in debug output.


svn path=/trunk/; revision=23803
2007-10-11 15:25:28 +00:00
Sven Neumann 8560f25665 an object can access its own private struct directly.
2007-10-10  Sven Neumann  <sven@gimp.org>

	* app/tools/gimprectangleoptions.c
	(gimp_rectangle_options_string_current_updates): an object can
	access its own private struct directly.


svn path=/trunk/; revision=23791
2007-10-10 06:20:01 +00:00
Martin Nordholts d583686878 Connect a new function gimp_rectangle_options_string_current_updates()
2007-10-09  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangleoptions.[ch]: Connect a new function
	gimp_rectangle_options_string_current_updates() that updates the
	Fixed: Aspect entry with a 'Current' string when aspect of the
	current pending rectangle is used, and sets sensitivity FALSE on
	aspect ratio changing buttons when that string is shown. Prevents
	the confusion mentioned in bug #479999.

	A new Rectangle Options property 'use-string-current' has been
	added that should be refactored away from the options object along
	with references to option widgets.

	* app/tools/gimprectangleselecttool.c
	(gimp_rect_select_tool_update_option_defaults): Set default Fixed:
	Aspect ratio to that of the pending rectangle, and always have
	default Fixed: Size as 100x100.

	* app/tools/gimpcroptool.c
	(gimp_crop_tool_update_option_defaults): Always have default
	Fixed: Size 100x100.

	* libgimpwidgets/gimpnumberpairentry.[ch]
	(gimp_number_pair_entry_class_init): Add a new property
	'default-text' that contains text to be shown instead of numbers
	when default numbers are to be shown.
	(gimp_number_pair_entry_get_default_text)
	(gimp_number_pair_entry_set_default_text): Getter and setter for
	it.

	* libgimpwidgets/gimpwidgets.def: Updated.

svn path=/trunk/; revision=23788
2007-10-09 20:54:07 +00:00
Sven Neumann e51e8d9a05 app/core/gimpitem.c app/tools/gimprectangletool.c fixed ambiguous gtk-doc
2007-10-09  Sven Neumann  <sven@gimp.org>

	* app/core/gimpitem.c
	* app/tools/gimprectangletool.c
	* app/tools/tools-utils.c: fixed ambiguous gtk-doc comments.

svn path=/trunk/; revision=23779
2007-10-09 15:59:04 +00:00
Sven Neumann 6136c89051 implement button_release and stop the draw tool when in adjust mode. Fixes
2007-10-08  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpperspectiveclonetool.c: implement button_release
	and stop the draw tool when in adjust mode. Fixes bug #483912.

	(gimp_perspective_clone_tool_mode_notify): start the draw tool.


svn path=/trunk/; revision=23770
2007-10-08 21:41:00 +00:00
Sven Neumann 8978ae84dd cosmetics.
2007-10-08  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpperspectiveclonetool.c: cosmetics.


svn path=/trunk/; revision=23769
2007-10-08 20:23:51 +00:00
Sven Neumann 82edc4b4a6 check that there are segments to draw before calling
2007-10-06  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpeditselectiontool.c 
(gimp_edit_selection_tool_draw):
	check that there are segments to draw before calling
	gimp_draw_tool_draw_boundary().


svn path=/trunk/; revision=23750
2007-10-06 18:09:00 +00:00
Martin Nordholts 0ad8adf1b5 Reverted commits for bug #479426, it's NOTABUG.
2007-09-23  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangleselecttool.c: Reverted commits for
	bug #479426, it's NOTABUG.

svn path=/trunk/; revision=23627
2007-09-23 12:25:16 +00:00
Martin Nordholts 386f9c69ca New name for gimp_rect_select_selection_visible() which has been changed
2007-09-23  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangleselecttool.c
	(gimp_rect_select_tool_should_draw): New name for
	gimp_rect_select_selection_visible() which has been changed to
	always return TRUE when the tool is active, i.e. when a rectangle
	is being create or resized. Better fix for bug #479426.

svn path=/trunk/; revision=23623
2007-09-23 07:55:30 +00:00
Martin Nordholts 1444b854e7 Only draw the rectangle when Show selection' is true', with the help of
2007-09-23  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangleselecttool.c
	(gimp_rect_select_tool_draw): Only draw the rectangle when `Show
	selection' is `true', with the help of a new function
	gimp_rect_select_tool_selection_visible(). Fixes bug #474509.

svn path=/trunk/; revision=23621
2007-09-23 07:26:52 +00:00
Martin Nordholts cd5a441610 Add an allow-growing option.
2007-09-22  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimpcropoptions.[ch]: Add an allow-growing option.

	* app/tools/gimpcroptool.c: Take the new allow-growing option into
	account when setting crop rectangle constraints, and restructure
	the code a bit.
	(gimp_crop_tool_execute): Allow rectangles larger than the
	image/layer being sent to gimp_image_crop() since that function
	handles that fine. These changes fixes bug #368325.

svn path=/trunk/; revision=23616
2007-09-22 18:55:14 +00:00
Martin Nordholts 7b65c24e35 Enforce constraints of any pending rectangle when setting a constraint.
2007-09-22  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangletool.c
	(gimp_rectangle_tool_set_constraint): Enforce constraints of any
	pending rectangle when setting a constraint.

svn path=/trunk/; revision=23615
2007-09-22 18:20:29 +00:00
Michael Natterer ec11dbc1a1 remove FOO_DISABLE_DEPRECATED for only glib >= 2.15 and gtk+ >= 2.13, GIMP
2007-09-13  Michael Natterer  <mitch@gimp.org>

	* configure.in: remove FOO_DISABLE_DEPRECATED for only glib >= 2.15
	and gtk+ >= 2.13, GIMP builds fine against the 2.14 and 2.12 APIs
	apart from:

	* app/tools/gimpselectionoptions.c
	* libgimpwidgets/gimphelpui.c: undef GTK_DISABLE_DEPRECATED because
	GtkTooltips is deprecated in gtk+ 2.12.

	* libgimp/gimpui.c
	* plug-ins/common/pat.c: the address of an array is always
	non-NULL, no need to check for that. Fixes new gcc warnings.


svn path=/trunk/; revision=23522
2007-09-13 10:44:07 +00:00
Sven Neumann 1954ee81fe use the offsets module TILE_WIDTH and TILE_HEIGHT instead of doing the
2007-09-12  Sven Neumann  <sven@gimp.org>

	* app/base/tile.c (tile_data_pointer): use the offsets module
	TILE_WIDTH and TILE_HEIGHT instead of doing the module operation
	in each and every caller.

	* app/base/boundary.c
	* app/base/pixel-region.c
	* app/base/tile-manager.c
	* app/core/gimpchannel.c
	* app/core/gimpdrawable-blend.c
	* app/core/gimpdrawable.c
	* app/core/gimpimage-contiguous-region.c
	* app/core/gimplayer.c
	* app/display/gimpdisplayshell-render.c
	* app/paint-funcs/paint-funcs.c
	* app/paint/gimppaintcore.c
	* app/tools/gimpiscissorstool.c: changed accordingly.


svn path=/trunk/; revision=23515
2007-09-12 18:29:11 +00:00
Sven Neumann 77b7161a32 app/core/gimp-transform-region.[ch] app/core/gimpchannel.c
2007-09-10  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-transform-region.[ch]
	* app/core/gimpchannel.c
	* app/core/gimpdrawable-transform.[ch]
	* app/core/gimpdrawable.c
	* app/core/gimpimage-item-list.[ch]
	* app/core/gimpitem-linked.[ch]
	* app/core/gimpitem.[ch]
	* app/core/gimplayer.c
	* app/paint/gimpperspectiveclone.c
	* app/vectors/gimpvectors.c: removed supersample parameter from
	transform functions and perform it depending on the interpolation
	type (bug #473265).

	* app/tools/gimptransformoptions.[ch]
	* app/tools/gimptransformtool.c: removed Supersample toggle from
	the transform tool options.

	* tools/pdbgen/pdb/drawable_transform.pdb
	* tools/pdbgen/pdb/transform_tools.pdb: document that the
	supersample parameter is unused and improved documentation of the
	recursion-level parameter.

	* app/pdb/transform_tools_cmds.c
	* app/pdb/drawable_transform_cmds.c
	* libgimp/gimpdrawabletransform_pdb.c: regenerated.

svn path=/trunk/; revision=23494
2007-09-10 15:29:48 +00:00
Sven Neumann 5062ba3e30 removed unused variable.
2007-09-10  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpperspectiveclonetool.c
	(gimp_perspective_clone_tool_motion): removed unused variable.


svn path=/trunk/; revision=23493
2007-09-10 14:48:08 +00:00
Sven Neumann 626ca3fce0 removed unused variable.
2007-09-08  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpforegroundselecttoolundo.c: removed unused 
variable.


svn path=/trunk/; revision=23479
2007-09-08 15:31:23 +00:00
Martin Nordholts dd7fa05cdc Call gimp_rectangle_tool_rectangle_changed after 'Auto shrink selection',
2007-09-06  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangletool.c (gimp_rectangle_tool_auto_shrink):
	Call gimp_rectangle_tool_rectangle_changed after 'Auto shrink
	selection', and recalculate handle sizes. Fixes bug #474344.

svn path=/trunk/; revision=23471
2007-09-06 20:38:11 +00:00
Martin Nordholts ce21737d37 New function to update default values for Fixed: Size. This function is
2007-09-02  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangleselecttool.c
	(gimp_rect_select_tool_update_option_defaults): New function to
	update default values for Fixed: Size. This function is called to
	update defaults values for Fixed: Size to that of the pending
	rectangle width x height if there is one, or 100x100 otherwise.

	* app/tools/gimpcroptool.c
	(gimp_crop_tool_update_option_defaults): Set Fixed: Size to the
	size of the pending crop rectangle, or 100x100 if there is none.

svn path=/trunk/; revision=23440
2007-09-02 04:39:17 +00:00
Martin Nordholts 63fbdc2600 Generalize the default Fixed: Aspect ratio option setting code so that it
2007-09-01  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimpcroptool.c
	(gimp_crop_tool_update_default_fixed_ratio_options):
	Generalize the default Fixed: Aspect ratio option setting code
	so that it can later be used for Fixed: Size as well, and move
	it to

	* app/tools/gimprectangletool.[ch]
	(gimp_rectangle_tool_pending_size_set)
	(gimp_rectangle_tool_constraint_size_set): and use these two new
	functions instead.

svn path=/trunk/; revision=23435
2007-09-01 20:01:38 +00:00
Martin Nordholts 6b8026a5fd Don't adjust the rectangle shape if it is is merely being moved.
2007-08-21  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangletool.c
	(gimp_rectangle_tool_update_with_coord): Don't adjust the
	rectangle shape if it is is merely being moved.

svn path=/trunk/; revision=23343
2007-08-21 19:52:00 +00:00
Martin Nordholts af13bcb9fc Don't make GIMP_RECTANGLE_CONSTRAIN_NONE into
2007-08-18  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangletool.c: Don't make
	GIMP_RECTANGLE_CONSTRAIN_NONE into GIMP_RECTANGLE_CONSTRAIN_IMAGE,
	and restructure the code a bit in the rectagle adjusting functions
	so that they can handle the _NONE constraint. The effect of this
	change is that rectangle tools no longer are constrained when
	using fixed-rules.

svn path=/trunk/; revision=23319
2007-08-18 09:44:18 +00:00
Martin Nordholts 264d44588b Clear highlight in previously active shell when changing active shell.
2007-08-18  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangletool.c
	(gimp_rectangle_tool_button_press): Clear highlight in previously
	active shell when changing active shell.

svn path=/trunk/; revision=23318
2007-08-18 06:59:02 +00:00
Martin Nordholts e4baf09863 Call gimp_crop_tool_update_default_fixed_ratio_options after
2007-08-18  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimpcroptool.c (gimp_crop_tool_button_release): Call
	gimp_crop_tool_update_default_fixed_ratio_options after
	gimp_rectangle_tool_button_release, so that the state of the
	rectangle tool is reflected when updating the default aspect.

svn path=/trunk/; revision=23317
2007-08-18 06:39:18 +00:00
Martin Nordholts bf4858c52c Added a 'ignore_pending' boolean parameter so that the pending rectangle
2007-08-18  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimpcroptool.c
	(gimp_crop_tool_update_default_fixed_ratio_options): Added a
	'ignore_pending' boolean parameter so that the pending rectangle
	can be ignored in gimp_crop_tool_execute, as it should be.

svn path=/trunk/; revision=23316
2007-08-18 06:31:15 +00:00
Martin Nordholts eb06a11ea9 Connect to the "image-changed" signal of GimpContext and update default
2007-08-17  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimpcroptool.c
	(gimp_crop_tool_constructor): Connect to the "image-changed"
	signal of GimpContext and update default aspect when image
	changes (fixes bug #417166), by using
	(gimp_crop_tool_update_default_fixed_ratio_options): which is a
	new function that does this. This function is called whenever it
	is time to update defualts.

	* app/tools/gimprectangletool.[ch]: Made
	gimp_rectangle_tool_get_constraint part of the rectangle tool API.

svn path=/trunk/; revision=23312
2007-08-17 18:29:09 +00:00
Michael Natterer bf500e16d0 app/tools/gimpperspectiveclonetool.c (motion) don't allow to ctrl-switch
2007-08-17  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpperspectiveclonetool.c (motion)
	* app/tools/gimpsourcetool.c (motion): don't allow to ctrl-switch
	between clone and set-source mode while painting. It's totally
	unclear to me why we used to allow this since it doesn't make much
	sense and isn't very intuitive either. Fixes bug #467605.


svn path=/trunk/; revision=23302
2007-08-17 15:20:25 +00:00
Sven Neumann 5df43c2cbb use italic font if not in user-override mode.
2007-08-13  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimpnumberpairentry.c: use italic font if not in
	user-override mode.

	* app/tools/gimprectangleoptions.c: removed auto-mode icon.

	* themes/Default/images/Makefile.am
	* themes/Default/images/stock-auto-mode-16.png
	* libgimpwidgets/gimpnumberpairentry.[ch]: removed
	GIMP_STOCK_AUTO_MODE.


svn path=/trunk/; revision=23231
2007-08-13 09:25:27 +00:00
Martin Nordholts 296c2de807 Put the auto-mode GtkImage to the right of the Aspect ratio/Size entry
2007-08-13  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangleoptions.c (gimp_rectangle_options_gui):
	Put the auto-mode GtkImage to the right of the Aspect ratio/Size
	entry instead of to the left.

svn path=/trunk/; revision=23228
2007-08-13 06:41:52 +00:00
Martin Nordholts 3c7474582a Set a 16x16 size request on the auto-mode images.
2007-08-12  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangleoptions.c (gimp_rectangle_options_gui):
	Set a 16x16 size request on the auto-mode images.

svn path=/trunk/; revision=23227
2007-08-12 12:13:15 +00:00
Martin Nordholts 998748d6f4 Right-align X, Y, Width and Height.
2007-08-12  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangleoptions.c (gimp_rectangle_options_gui):
	Right-align X, Y, Width and Height.

svn path=/trunk/; revision=23225
2007-08-12 09:36:23 +00:00
Martin Nordholts b45b8aa096 Setup a GIMP_STOCK_AUTO_MODE GtkImage to be shown in the options when
2007-08-12  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangleoptions.[ch]: Setup a
	GIMP_STOCK_AUTO_MODE GtkImage to be shown in the options when
	Fixed: Aspect ratio/Size entries are in auto-mode.

	* themes/Default/images/Makefile.am: Added
	stock-auto-mode-16.png (which is a copy of
	preferences/folders-interp-16.png for now).

	* libgimpwidgets/gimpstock.[ch]: Added GIMP_STOCK_AUTO_MODE.

svn path=/trunk/; revision=23224
2007-08-12 08:43:35 +00:00
Martin Nordholts 6ea396963b Initialize 'tool' before using it.
2007-08-11  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimpcroptool.c (gimp_crop_tool_execute): Initialize
	'tool' before using it.

svn path=/trunk/; revision=23210
2007-08-11 16:13:14 +00:00
Martin Nordholts 4356bb7aeb Update handle sizes based on the shell-visible part of the rectangle.
2007-08-11  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangletool.c
	(gimp_rectangle_tool_update_handle_sizes): Update handle sizes
	based on the shell-visible part of the rectangle.
	(gimp_rectangle_tool_start, gimp_rectangle_tool_halt):
	Connect/disconnect to the "scrolled" signal of the shell and
	update handle sizes.

svn path=/trunk/; revision=23204
2007-08-11 09:42:16 +00:00
Martin Nordholts 8f69046e11 Halt the tool on cancel if a rectangle has not previously been created.
2007-08-11  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangletool.c
	(gimp_rectangle_tool_button_release): Halt the tool on cancel if a
	rectangle has not previously been created.

svn path=/trunk/; revision=23202
2007-08-11 08:42:59 +00:00
Martin Nordholts 49a9bdc6d1 Renamed from gimp_rectangle_tool_set_highlight
2007-08-11  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangletool.c
	(gimp_rectangle_tool_update_highlight): Renamed from
	gimp_rectangle_tool_set_highlight
	(gimp_rectangle_tool_button_release): Add call to
	gimp_rectangle_tool_update_highlight to keep highlight in sync
	when a crop rectangle is cancelled.

svn path=/trunk/; revision=23201
2007-08-11 08:27:00 +00:00
Martin Nordholts fd5363cd87 Set default 'Fixed: Aspect ratio' values to the size of the pending crop
2007-08-10  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimpcroptool.c (gimp_crop_tool_button_release): Set
	default 'Fixed: Aspect ratio' values to the size of the pending
	crop rectangle. Fixes bug #355545.

	* app/tools/gimprectangletool.[ch]
	(gimp_rectangle_tool_get_rectangle_size): New helper function.

svn path=/trunk/; revision=23194
2007-08-10 16:41:30 +00:00
Martin Nordholts 49df5ada5b Added "default-aspect-numerator", "default-aspect-denominator",
2007-08-10  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangleoptions.c: Added
	"default-aspect-numerator", "default-aspect-denominator",
	"default-fixed-size-width" and "default-fixed-size-height" as
	non-serialized tool options, and "overridden-fixed-aspect" and
	"overridden-fixed-size" as serialized ones.

	* app/widgets/gimppropwidgets.c (gimp_prop_number_pair_entry_*):
	Added support for the new GimpRectangleOptions.

svn path=/trunk/; revision=23187
2007-08-10 14:57:27 +00:00
Martin Nordholts a8907b94be Merged gimp_prop_size_2d_* and gimp_prop_aspect_ratio_* to
2007-08-10  Martin Nordholts  <martinn@svn.gnome.org>

	* app/widgets/gimppropwidgets.[ch]: Merged gimp_prop_size_2d_* and
	gimp_prop_aspect_ratio_* to gimp_prop_number_pair_*.

	* app/tools/gimprectangleoptions.c (gimp_rectangle_options_gui):
	Use the merged gimp_prop_number_pair_entry_new.

svn path=/trunk/; revision=23184
2007-08-10 10:52:35 +00:00
Martin Nordholts 93d4dc68de Renamed GimpRatioEntry to GimpNumberPairEntry, and generalized the code a
2007-08-08  Martin Nordholts  <martinn@svn.gnome.org>

	Renamed GimpRatioEntry to GimpNumberPairEntry, and generalized the
	code a lot, so that it can be used both for 'Fixed: Aspect ratio'
	and 'Fixed: Size'. Support is also added for having default values
	and a 'user overrided' value mode.

	* libgimpwidgets/gimpnumberpairentry.[ch]: Now contains the
	rewrite and generalization of GimpRatioEntry.
	(gimp_number_pair_entry_get_type)
	(gimp_number_pair_entry_new)
        (gimp_number_pair_entry_set_default_values)
	(gimp_number_pair_entry_set_values)
        (gimp_number_pair_entry_get_values): New libgimpwidget API.

	* app/widgets/gimppropwidgets.[ch] (gimp_prop_size_2d_new): Added
	new helper widget for setting up a GimpNumberPairEntry for the
	Fixed: Size entry in the Rectangle Options.

	* app/tools/gimprectangleoptions.c (gimp_rectangle_options_gui):
	Use the new gimp_prop_size_2d_entry for the Fixed: Size entry.

	* libgimpwidgets/gimpwidgets.def: Removed gimp_ratio_entry_* and
	added gimp_number_pair_entry_*.

	* libgimpwidgets/gimpwidgets.h * libgimpwidgets/gimpwidgetstypes.h
	* libgimpwidgets/Makefile.am (libgimpwidgets_2_0_la_sources)
	(libgimpwidgetsinclude_HEADERS): Updated accordingly.

svn path=/trunk/; revision=23154
2007-08-08 18:08:24 +00:00
Martin Nordholts 17020f29b2 Migrate entry completion code and put responsability on clients to set
2007-08-08  Martin Nordholts  <martinn@svn.gnome.org>

	* libgimpwidgets/gimpratioentry.[ch]: Migrate entry completion
	code and put responsability on clients to set that up when needed.

	* app/tools/gimprectangleoptions.[ch]: Setup entry completion code
	manually for the GimpRatioEntry widgets by using
	(gimp_rectangle_options_setup_ratio_completion)
	(gimp_ratio_entry_history_select, gimp_ratio_entry_history_add):
	these new functions.

svn path=/trunk/; revision=23149
2007-08-08 12:52:25 +00:00
Martin Nordholts 75c759e87a Serialize Fixed: Width/Height/Size to config.
2007-08-08  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangleoptions.c
	(gimp_rectangle_options_iface_base_init): Serialize Fixed:
	Width/Height/Size to config.

svn path=/trunk/; revision=23143
2007-08-08 08:08:03 +00:00
Martin Nordholts d050042232 Remove fixed_aspect_property.
2007-08-08  Martin Nordholts  <martinn@svn.gnome.org>

	* app/widgets/gimppropwidgets.[ch]
	(gimp_prop_aspect_ratio_new)
	(gimp_prop_aspect_ratio_changed): Remove fixed_aspect_property.

	* app/tools/gimprectangleoptions.c (gimp_rectangle_options_gui):
	Changed accordingly.

svn path=/trunk/; revision=23141
2007-08-08 06:32:45 +00:00
Martin Nordholts e87d0a123a Use separate desired-fixed-size-width/height properties for Fixed: Size
2007-08-08  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangleoptions.[ch]: Use separate
	desired-fixed-size-width/height properties for Fixed: Size instead
	of sharing properties with Fixed: Width/Height.

	* app/tools/gimprectangletool.c: Use the two new properties for
	Fixed: Size.

svn path=/trunk/; revision=23140
2007-08-08 06:10:00 +00:00
Martin Nordholts 9a350d71e3 When a new rectangle is created and Fixed: Size is used, set rectangle
2007-08-05  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangletool.c (gimp_rectangle_tool_motion): When
	a new rectangle is created and Fixed: Size is used, set rectangle
	function to RECT_MOVING.

svn path=/trunk/; revision=23117
2007-08-05 10:52:38 +00:00
Martin Nordholts f33ef1024c Update tool options after shrinking.
2007-08-05  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangletool.c (gimp_rectangle_tool_auto_shrink):
	Update tool options after shrinking.

svn path=/trunk/; revision=23116
2007-08-05 10:28:19 +00:00
Martin Nordholts d6915f0fbe Aligned widgets.
2007-08-05  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangleoptions.c (gimp_rectangle_options_gui):
	Aligned widgets.

svn path=/trunk/; revision=23115
2007-08-05 09:14:17 +00:00
Martin Nordholts 6f2171375b Update rectangle tool options to bring it closer to the spec. The major
2007-08-04  Martin Nordholts  <martinn@svn.gnome.org>

	Update rectangle tool options to bring it closer to the spec. The
	major change is the use of a 'Fixed:' check box and a 'Aspect
	ratio/Width/Height/Size' combo box. The check box is togglable
	with Shift while rubber-banding.

	* app/tools/gimprectangletool.c
	(gimp_rectangle_tool_active_modifier_key): Set other side also
	when Shift is released.
	(gimp_rectangle_tool_update_options): Don't supress updates of
	tool options on fixed width/height/size
	(gimp_rectangle_tool_apply_fixed_height)
	(gimp_rectangle_tool_update_with_coord)
	(gimp_rectangle_tool_handle_general_clamping): Use new tool option
	interface and members.

	* app/tools/gimprectangleoptions.[ch]
	(gimp_rectangle_options_iface_base_init)
	(gimp_rectangle_options_install_properties)
	(gimp_rectangle_options_(get|set)_property): Remove and add
	relevant properties.
	(gimp_rectangle_options_private_finalize): Unref the new widgets
	used in tool options.
	(gimp_rectangle_options_fixed_rule_changed): New, update tool
	options depending on current option state.
	(gimp_rectangle_options_gui): Modified according to change log
	entry summary.
	(gimp_rectangle_options_unparent_fixed_rule_widgets): New helper.
	(gimp_rectangle_options_fixed_rule_active): New, clients should
	use this to find out if a certain fixed-mode is active.

	* app/tools/tools-enums.[ch]: Added GimpRectangleToolFixedRule.

svn path=/trunk/; revision=23114
2007-08-04 20:20:44 +00:00
Martin Nordholts 7debeded1e Don't apply fixed aspect on pending rectangles that are not being
2007-08-04  Martin Nordholts  <martinn@svn.gnome.org>

	Don't apply fixed aspect on pending rectangles that are not being
	rubber-banded, when this is changed in the rectangle tool options.

	* app/tools/gimprectangletool.c (gimp_rectangle_tool_options_notify):
	Don't synthesize motion for fixed aspect ratio options changes

	* app/tools/gimprectangleoptions.c (gimp_rectangle_options_gui): Removed
	callback to
	(gimp_rectangle_options_notify_aspect): which is not needed any more,
	and hence is removed.

svn path=/trunk/; revision=23113
2007-08-04 12:05:04 +00:00
Michael Natterer 26edfdec1a no need to set the tool cursor here, we already do that in init() and
2007-08-02  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpcroptool.c (gimp_crop_tool_cursor_update): no need
	to set the tool cursor here, we already do that in init() and
	never change it.

	* app/widgets/gimpcursor.c (gimp_cursor_new): don't show the move
	cursor and the move modifier at the same time. Some small
	cleanups.


svn path=/trunk/; revision=23104
2007-08-02 13:33:38 +00:00
Sven Neumann 4110a4b142 formatting, should have gone with the last commit
svn path=/trunk/; revision=23084
2007-07-31 15:41:22 +00:00
Sven Neumann e419ea20c9 app/tools/gimprectangleselecttool.c formatting.
2007-07-31  Sven Neumann  <sven@gimp.org>

	* app/tools/gimprectangleselecttool.c
	* app/tools/gimprectangletool.c: formatting.

svn path=/trunk/; revision=23083
2007-07-31 15:39:26 +00:00
Michael Natterer c180bc4590 don't have the tool release ALT when the user releases CONTROL. Fixes
2007-07-25  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptool.c (gimp_tool_set_active_modifier_state):
	don't have the tool release ALT when the user releases CONTROL.
	Fixes another stuck modifier instance and other modifier
	weirdness.


svn path=/trunk/; revision=22992
2007-07-25 00:39:01 +00:00
Sven Neumann e2b9c20b43 fixed a gtk-doc comment.
2007-07-20  Sven Neumann  <sven@gimp.org>

	* app/tools/gimprectangletool.c: fixed a gtk-doc comment.


svn path=/trunk/; revision=22966
2007-07-20 13:18:43 +00:00
Sven Neumann a5d10b2ff0 renamed gimp_image_active_drawable() to gimp_image_get_active_drawable().
2007-07-19  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage.[ch]: renamed gimp_image_active_drawable() to
	gimp_image_get_active_drawable().

	* app/[lots of files]
	* tools/pdbgen/pdb/paths.pdb
	* tools/pdbgen/pdb/image.pdb: changed accordingly.

svn path=/trunk/; revision=22958
2007-07-19 14:59:51 +00:00
Sven Neumann f6c626fba3 chain up.
2007-07-19  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpcolortool.c (gimp_color_tool_draw): chain up.

svn path=/trunk/; revision=22957
2007-07-19 09:09:26 +00:00
Sven Neumann 9409179aa6 free the context list.
2007-07-17  Sven Neumann  <sven@gimp.org>

	* app/core/gimp.c (gimp_finalize): free the context list.

	* app/tools/gimprectangleoptions.c (gimp_rectangle_options_gui):
	removed unused vbox.

svn path=/trunk/; revision=22944
2007-07-17 11:15:15 +00:00
Sven Neumann f3c451becd use the tool-info identifier as the name of the tool-options object.
2007-07-17  Sven Neumann  <sven@gimp.org>

	* app/core/gimptoolinfo.c (gimp_tool_info_new): use the tool-info
	identifier as the name of the tool-options object.

	* app/paint/gimppaintoptions.c (gimp_paint_options_new): use the
	paint-info identifier as the name of the paint-options object.

	* app/paint/gimp-paint.c (gimp_paint_register): added parameter check.

	* app/tools/gimp-tools.c (gimp_tools_init): formatting.

svn path=/trunk/; revision=22941
2007-07-17 10:04:06 +00:00
Martin Nordholts 6b2187c1bd Added members to keep track of for what shell scale the handle sizes were
2007-07-15  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangletool.c (struct
	_GimpRectangleToolPrivate): Added members to keep track of for
	what shell scale the handle sizes were calculated. This is
	necessary so that in
	(gimp_rectangle_tool_control): we only update the handle sizes
	when the zoom level has changed. We must test this, because the
	tool is also paused/resumed when highlightning is on, and we don't
	want to update handle sizes just because highlightning happends to
	be on.
	(gimp_rectangle_tool_scale_has_changed): Added helper function.

svn path=/trunk/; revision=22933
2007-07-15 09:43:49 +00:00
Martin Nordholts 3a5d96d4f9 Check agains tool->display, this check was lost when this function was
2007-07-14  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangletool.c
	(gimp_rectangle_tool_set_highlight): Check agains tool->display,
	this check was lost when this function was moved out of
	gimp_rectangle_tool_configure.

svn path=/trunk/; revision=22931
2007-07-14 20:15:08 +00:00
Martin Nordholts a8237b23b3 Also update rectangle handle sizes when canvas zoom is changed. (Forgot
2007-07-14  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangletool.c (gimp_rectangle_tool_control):
	Also update rectangle handle sizes when canvas zoom is
	changed. (Forgot that in previous commit.)

svn path=/trunk/; revision=22930
2007-07-14 16:29:04 +00:00
Martin Nordholts 5b3f4ea658 Made the rectangle tool handles not resize during rectangle manipulation,
2007-07-14  Martin Nordholts  <martinn@svn.gnome.org>

	Made the rectangle tool handles not resize during rectangle
	manipulation, as outlined in the spec, by separating highlight
	updating and handle size updating calls.

	* app/tools/gimprectangletool.c (gimp_rectangle_tool_configure):
	Renamed to
	(gimp_rectangle_tool_update_handle_sizes): and moved
	gimp_rectangle_tool_set_highlight out of it. These two are now
	called independantly.

svn path=/trunk/; revision=22929
2007-07-14 16:03:13 +00:00
Martin Nordholts 82430afc70 Fixed crash when creating a rectangle with constraints outside of canvas
2007-07-14  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangletool.c (gimp_rectangle_tool_clamp_width)
	(gimp_rectangle_tool_clamp_height): Fixed crash when creating a
	rectangle with constraints outside of canvas bounds.

svn path=/trunk/; revision=22928
2007-07-14 10:01:46 +00:00
Martin Nordholts 72ec24da5f Don't execute selection if a dead area is clicked.
2007-07-13  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangletool.c
	(gimp_rectangle_tool_button_release): Don't execute selection if a
	dead area is clicked.

svn path=/trunk/; revision=22927
2007-07-13 20:49:32 +00:00
Martin Nordholts eed8dc9b68 Update handle sizes and highlight area also when Ctrl is released.
2007-07-13  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangletool.c
	(gimp_rectangle_tool_active_modifier_key): Update handle sizes and
	highlight area also when Ctrl is released.

svn path=/trunk/; revision=22926
2007-07-13 19:07:02 +00:00
Martin Nordholts 838d61670e Removed bitfieldized values from the SideToResize enum, they are
2007-07-11  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangletool.c: Removed bitfieldized values from
	the SideToResize enum, they are irrelevant. Also renamed
	HANDLE_SIZE to MAX_HANDLE_SIZE.

svn path=/trunk/; revision=22909
2007-07-11 05:09:50 +00:00
Martin Nordholts b62c673dcf Removed declaration of gimp_rectangle_tool_update_and_redraw;
forgot that in previous patch.

svn path=/trunk/; revision=22904
2007-07-08 22:03:52 +00:00
Martin Nordholts 3ae75615d9 Completely rewrote logic in gimp_rectangle_tool_motion, in effect also
2007-07-08  Martin Nordholts  <martinn@svn.gnome.org>

	Completely rewrote logic in gimp_rectangle_tool_motion, in effect
	also fixing bug #353936 and bug #398188. The general strategy now
	is to have specialized functions doing one thing, and one thing
	only.

	The patch also makes adjusting the rectangle through the keyboard
	and through the rectangle tool options follow tool options.

	* app/tools/gimprectangletool.c (gimp_rectangle_tool_motion):
	Completely refactored.

	(gimp_rectangle_tool_active_modifier_key):
	(gimp_rectangle_tool_update_options): Submit to tool options.

	(gimp_rectangle_tool_apply_coord)
	(gimp_rectangle_tool_clamp)
	(gimp_rectangle_tool_clamp_width)
	(gimp_rectangle_tool_clamp_height)
	(gimp_rectangle_tool_keep_inside)
	(gimp_rectangle_tool_keep_inside_horizontally)
	(gimp_rectangle_tool_keep_inside_vertically)
	(gimp_rectangle_tool_apply_fixed_width)
	(gimp_rectangle_tool_apply_fixed_height)
	(gimp_rectangle_tool_apply_aspect)
	(gimp_rectangle_tool_update_with_coord)
	(gimp_rectangle_tool_get_constraints)
	(gimp_rectangle_tool_handle_general_clamping): The new specialized
	functions.

svn path=/trunk/; revision=22903
2007-07-08 21:57:22 +00:00
Martin Nordholts d8803f29b6 Block gimp_rectangle_tool_options_notify when changing fixed-aspect
2007-07-08  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangletool.c
	(gimp_rectangle_tool_active_modifier_key): Block
	gimp_rectangle_tool_options_notify when changing fixed-aspect
	through the shift key. Fixes bug #417168.


svn path=/trunk/; revision=22896
2007-07-08 13:38:58 +00:00
Sven Neumann a2c401b0f6 changed the highlighting of the side handles to follow changes in the
2007-07-05  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpdrawtool.c (gimp_draw_tool_draw_corner): changed
	the highlighting of the side handles to follow changes in the
	specification.

	* app/tools/gimprectangletool.c (gimp_rectangle_tool_draw): cosmetics.

svn path=/trunk/; revision=22867
2007-07-05 11:49:00 +00:00
Martin Nordholts 25fca1a6e2 Started taking GimpRectangleTool towards the new specification. The side
2007-06-30  Martin Nordholts  <martinn@svn.gnome.org>

	Started taking GimpRectangleTool towards the new specification.
	The side handles now have the same width and height as the
	corresponding corner handles, and the size of the side handles do
	not span across the whole rectangle. Side handles also have a
	limited mimimum size, just as corner handles.

	* app/tools/gimprectangletool.c (gimp_rectangle_tool_oper_update,
	gimp_rectangle_tool_draw, gimp_rectangle_tool_configure,
	gimp_rectangle_tool_get_anchor): Changed accordingly.

	* app/tools/gimpdrawtool.c (gimp_draw_tool_draw_corner): Changed
	accordingly.

svn path=/trunk/; revision=22856
2007-06-30 18:13:41 +00:00
Martin Nordholts eeb6d20d8b Made GimpRectangleTools remember where the "other side" is when
2007-06-29  Martin Nordholts  <martinn@svn.gnome.org>

	Made GimpRectangleTools remember where the "other side" is when
	fixed-center is turned on, and reset the "other side" to that position
	when fixed-center is turned off again. Fixes bug 398183.

	* app/tools/gimprectangletool.c
	(gimp_rectangle_tool_button_press): Remember "other side".
	(gimp_rectangle_tool_active_modifier_key): When fixed-center is turned
	off, reset "other side".
	(gimp_rectangle_tool_get_other_side)
	(gimp_rectangle_tool_get_other_side_coord)
	(gimp_rectangle_tool_set_other_side_coord): New functions.

svn path=/trunk/; revision=22854
2007-06-29 16:37:50 +00:00
Michael Natterer 4625597ab8 update the image, not the drawable so we avoid constantly invalidating the
2007-06-27  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimagemap.c (gimp_image_map_clear)
	(gimp_image_map_do): update the image, not the drawable so we
	avoid constantly invalidating the drawable preview.

	* app/tools/gimpimagemaptool.c (gimp_image_map_tool_response):
	invalidate the drawable preview here.

	* app/paint/gimppaintcore.c (gimp_paint_core_paste)
	(gimp_paint_core_replace): clean up drawable offset handling code.


svn path=/trunk/; revision=22843
2007-06-26 22:41:06 +00:00
Michael Natterer 8c8d3786d9 Removed useless image flushing which caused the image preview to be
2007-06-27  Michael Natterer  <mitch@gimp.org>

	Removed useless image flushing which caused the image preview to
	be updated needlessly:

	* app/core/gimpimagemap.c (gimp_image_map_do): don't flush the
	image when the idle rendering is completed, emit our own "flush"
	signal instead just as for the incremental display updates.

	* app/tools/gimpimagemaptool.c (gimp_image_map_tool_notify_preview):
	when switching off the preview don't flush the image, only flush
	projection and display.


svn path=/trunk/; revision=22842
2007-06-26 22:14:35 +00:00
Sven Neumann d2cb639b5e unset the active color picker when the dialog is unmapped. Fixes bug
2007-06-26  Sven Neumann  <sven@gimp.org>

	* app/tools/gimplevelstool.c: unset the active color picker when
	the dialog is unmapped. Fixes bug #451272.

	* app/tools/gimpimagemaptool.c: formatting.

svn path=/trunk/; revision=22838
2007-06-26 16:02:14 +00:00
Sven Neumann 09578ea070 removed extra check for gthread and fold it into the GLIB and GTK checks.
2007-06-25  Sven Neumann  <sven@gimp.org>

	* configure.in: removed extra check for gthread and fold it into
	the GLIB and GTK checks.

	* */Makefile.am: changed accordingly.

	* app/main.c (main): always call g_thread_init().

svn path=/trunk/; revision=22832
2007-06-25 12:41:59 +00:00
Sven Neumann 5544877753 initialize the destination pixel region properly. Fixes bug #450291.
2007-06-25  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpiscissorstool.c (gradmap_tile_validate): 
initialize
	the destination pixel region properly. Fixes bug #450291.


svn path=/trunk/; revision=22830
2007-06-25 07:32:56 +00:00
Sven Neumann bc159e1c93 app/tools/gimpiscissorstool.c (gradmap_tile_validate) (find_max_gradient)
2007-06-25  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpiscissorstool.c (gradmap_tile_validate)
	(find_max_gradient) minor code cleanup.


svn path=/trunk/; revision=22829
2007-06-25 07:04:42 +00:00
Sven Neumann 8755f459ac minor code cleanup.
2007-06-25  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpiscissorstool.c (gradmap_tile_validate): minor
	code cleanup.


svn path=/trunk/; revision=22828
2007-06-25 06:57:31 +00:00
Sven Neumann 610feafb3e app/base/base-types.h app/base/tile-manager.[ch] removed accessors for
2007-06-21  Sven Neumann  <sven@gimp.org>

	* app/base/base-types.h
	* app/base/tile-manager.[ch]
	* app/base/tile-manager-private.h: removed accessors for user_data.
	Instead pass the user_data when setting the validation proc.

	* app/base/tile-pyramid.c
	* app/core/gimpchannel.c
	* app/core/gimpprojection.c
	* app/core/gimpselection.c
	* app/tools/gimpiscissorstool.c: changed accordingly.

svn path=/trunk/; revision=22820
2007-06-21 14:36:58 +00:00
Sven Neumann 263567109d introduced local variables in an attempt to make the code a little more
2007-06-21  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpcurvestool.c: introduced local variables in an
	attempt to make the code a little more readable.

svn path=/trunk/; revision=22814
2007-06-21 09:27:55 +00:00
Sven Neumann 2025f54f69 set proper step and page increments in the scale entry for the corner
2007-06-19  Sven Neumann  <sven@gimp.org>

	* app/tools/gimprectangleselectoptions.c
	(gimp_rect_select_options_gui): set proper step and page
	increments in the scale entry for the corner radius.


svn path=/trunk/; revision=22801
2007-06-19 06:22:59 +00:00
Sven Neumann 50e8d93b54 free live-wire Curve segment using g_slice_free().
2007-06-18  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpiscissorstool.c (gimp_iscissors_tool_draw): free
	live-wire Curve segment using g_slice_free().


svn path=/trunk/; revision=22799
2007-06-18 19:58:06 +00:00
Sven Neumann e23f585f07 removed unused variable.
2007-06-11  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpscaletool.c: removed unused variable.

svn path=/trunk/; revision=22754
2007-06-11 16:07:59 +00:00
Sven Neumann f322854007 app/text/Makefile.am app/core/Makefile.am app/tools/Makefile.am
2007-06-07  Sven Neumann  <sven@gimp.org>

	* app/text/Makefile.am
	* app/core/Makefile.am
	* app/tools/Makefile.am
	* app/display/Makefile.am
	* app/widgets/Makefile.am
	* app/base/Makefile.am
	* app/paint/Makefile.am
	* app/plug-in/Makefile.am
	* libgimp/Makefile.am
	* libgimpthumb/Makefile.am
	* tools/pdbgen/Makefile.am
	* libgimpwidgets/Makefile.am: applied the remaining parts of the
	patch from Daniel Richard G. to fix out-of-source-tree builds
	(bug #444960).

svn path=/trunk/; revision=22735
2007-06-07 13:19:44 +00:00
Michael Natterer de848de405 remove compat property "threshold" because the parser now silently skips
2007-06-04  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpmagnifyoptions.c: remove compat property
	"threshold" because the parser now silently skips unknown
	properties.


svn path=/trunk/; revision=22700
2007-06-04 10:56:17 +00:00
Sven Neumann bbe3a11840 commented out debug output.
2007-06-01  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpperspectiveclonetool.c: commented out debug 
output.


svn path=/trunk/; revision=22692
2007-06-01 15:47:13 +00:00
Sven Neumann ade4dd09d5 formatting
svn path=/trunk/; revision=22660
2007-05-30 11:56:52 +00:00
Mukund Sivaraman f67306c1d3 Added missing include.
2007-05-30  Mukund Sivaraman  <muks@mukund.org>

        * app/tools/gimpdrawtool.c: Added missing include.

        * app/tools/gimpbycolorselecttool.c: Removed unused variable.

        * app/plug-in/gimpenvirontable.c: Added cast for callback function.

        * plug-ins/script-fu/tinyscheme/scheme.c: Correctly cast pointer to
        an long integer type.


svn path=/trunk/; revision=22659
2007-05-30 11:49:14 +00:00
Sven Neumann 2027fdf9ab use GSlice to allocate the transform matrix.
2007-05-29  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpdrawtool.c: use GSlice to allocate the transform
	matrix.

svn path=/trunk/; revision=22652
2007-05-29 09:44:31 +00:00
Sven Neumann ac2f30c485 use a GQueue to store the points.
2007-05-23  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpiscissorstool.[ch]: use a GQueue to store the points.

svn path=/trunk/; revision=22597
2007-05-23 14:56:21 +00:00
Sven Neumann ab71eb9f6a app/paint/gimppaintoptions.c app/tools/gimpcolorbalancetool.c
2007-05-23  Sven Neumann  <sven@gimp.org>

	* app/paint/gimppaintoptions.c
	* app/tools/gimpcolorbalancetool.c
	* app/tools/gimpcolorizetool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimpforegroundselecttool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimprectangleoptions.c
	* app/tools/gimprectangletool.c
	* app/tools/gimpthresholdtool.c
	* app/tools/tool_manager.c: allocate structs using GSlice.

svn path=/trunk/; revision=22595
2007-05-23 13:49:06 +00:00
Michael Natterer 395dc8aa13 remove "threshold" from the options struct and added compat code in
2007-05-22  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpmagnifyoptions.[ch]: remove "threshold" from
	the options struct and added compat code in get_property().


svn path=/trunk/; revision=22579
2007-05-22 17:25:35 +00:00
Michael Natterer e5070a2486 add a local GimpDisplayConfig variable to improve readability.
2007-05-16  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpbrushtool.c (gimp_brush_tool_constructor): add a
	local GimpDisplayConfig variable to improve readability.


svn path=/trunk/; revision=22514
2007-05-16 18:47:47 +00:00
Sven Neumann a4eafbad64 moved brush drawing code to the new function gimp_brush_tool_draw_brush().
2007-05-07  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpbrushtool.[ch] (gimp_brush_tool_draw): moved
	brush drawing code to the new function gimp_brush_tool_draw_brush().

	* app/tools/gimpsourcetool.c: (gimp_source_tool_draw): draw the
	brush outline at the source position (bug #435545).


svn path=/trunk/; revision=22450
2007-05-07 10:19:04 +00:00
Sven Neumann 0fef82fb16 app/base/gimplut.[ch] app/tools/gimpcurvestool.c reverted the changes done
2007-05-05  Sven Neumann  <sven@gimp.org>

	* app/base/gimplut.[ch]
	* app/tools/gimpcurvestool.c
	* app/tools/gimplevelstool.c: reverted the changes done for bug
	#331782. See the bug report for an explanation.


svn path=/trunk/; revision=22421
2007-05-05 14:29:37 +00:00
Mukund Sivaraman a89d0a1cc8 app/base/gimplut.c app/base/gimplut.h app/tools/gimpcurvestool.c Fixed the
2007-05-05  Mukund Sivaraman  <muks@mukund.org>

        * app/base/gimplut.c
        * app/base/gimplut.h
        * app/tools/gimpcurvestool.c
        * app/tools/gimplevelstool.c: Fixed the value channel color
        correction in the curves and levels tools to only modify the
        value channel and not the hues. Fixes bug #331782.


svn path=/trunk/; revision=22418
2007-05-05 11:51:03 +00:00
Michael Natterer f9d9ecfd7a fixed off-by-one (too large) drawing of boundaries by copying the resp.
2007-05-05  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpdrawtool.c (gimp_draw_tool_draw_boundary): fixed
	off-by-one (too large) drawing of boundaries by copying the resp.
	code and its obscure comment from gimpdisplayshell-selection.c
	Fixes bug #416432.


svn path=/trunk/; revision=22417
2007-05-05 04:33:38 +00:00
Sven Neumann c70b55a403 removed get_color_at() from the GimpPickable interface. Implement the same
2007-05-02  Sven Neumann  <sven@gimp.org>

	* app/core/gimppickable.[ch]: removed get_color_at() from the
	GimpPickable interface. Implement the same functionality using
	get_pixel_at() but with a saner API.

	* app/core/gimpdrawable.c
	* app/core/gimpprojection.c
	* app/core/gimpimagemap.c: removed get_color_at() implementations.

	* app/tools/gimpbycolorselecttool.c: adapt to API change of
	gimp_pickable_get_color_at().

	* app/tools/gimprectangleselecttool.c: added missing include.


svn path=/trunk/; revision=22383
2007-05-02 17:15:03 +00:00
Sven Neumann 6a9db536e9 if we are in adjust mode, skip the GimpBrushClass when chaining up. Fixes
2007-05-02  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpperspectiveclonetool.c
	(gimp_perspective_clone_tool_cursor_update): if we are in adjust
	mode, skip the GimpBrushClass when chaining up. Fixes bug #354933.

svn path=/trunk/; revision=22379
2007-05-02 13:24:14 +00:00
Martin Nordholts 8776dc7f38 When adjusting a rectangle it feels unintuitive that the center of the
2007-05-02  Martin Nordholts  <martinn@svn.gnome.org>

	When adjusting a rectangle it feels unintuitive that the center of
	the rectangle when Ctrl is used lands on the corner that was used
	to resize the rectangle. This commit changes the center of the
	rectangle when Ctrl is used on a already-created rectangle to the
	center of the rectangle when the user starts adjusting the size.

	* app/tools/gimprectangletool.c (struct
	_GimpRectangleToolPrivate): Added center_[xy]_on_fixed_center
	members that keeps track on where the center of the rectangle
	should be when the Ctrl modifier is used.

	* app/tools/gimprectangletool.c: Added convenience function
	gimp_rectangle_tool_get_fixed_center_coords.

	* app/tools/gimprectangletool.c
	(gimp_rectangle_tool_button_press): Sets the
	center_[xy]_on_fixed_center members depending on whether the button
	press modifies an existing rectangle or creates a new one.

	* app/tools/gimprectangletool.c
	(gimp_rectangle_tool_active_modifier_key): Adjusted to accomodate to
	above mentioned changes.


svn path=/trunk/; revision=22374
2007-05-02 09:14:35 +00:00
Sven Neumann e3813131b7 also use the middle mouse button for panning.
2007-04-25  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimpscrolledpreview.c: also use the middle mouse
	button for panning.

	* plug-ins/common/nova.c: override the default mouse handling of
	the GimpScrolledPreview and allow to reposition the center using
	the left mouse button. Fixes bug #364432.

	* app/tools/gimprectangletool.c: formatting.

svn path=/trunk/; revision=22319
2007-04-25 10:10:43 +00:00
Sven Neumann 9870749e1a implement GimpTool::key_press and delegate to the rectangle tool or the
2007-04-12  Sven Neumann  <sven@gimp.org>

	* app/tools/gimprectangleselecttool.c: implement
	GimpTool::key_press and delegate to the rectangle tool or the 
edit
	selection tool. This resurrects positioning of floating 
selections
	with the cursor keys.


svn path=/trunk/; revision=22244
2007-04-12 20:07:38 +00:00
Sven Neumann c68c91c94d app/tools/gimplevelstool.c app/tools/gimpcurvestool.c app/xcf/xcf-save.c
2007-04-12  Sven Neumann  <sven@gimp.org>

	* app/tools/gimplevelstool.c
	* app/tools/gimpcurvestool.c
	* app/xcf/xcf-save.c
	* app/xcf/xcf-load.c
	* app/widgets/gimppaletteeditor.c
	* app/widgets/gimpcolormapeditor.c
	* app/widgets/gimpcolorframe.c: get rid of compiler warnings about
	dereferencing type-punned pointers.


svn path=/trunk/; revision=22238
2007-04-12 14:48:04 +00:00
Michael Natterer 3adb312e12 made the GimpRectangleOptionsPrivate struct public (ha ha).
2007-03-31  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimprectangleoptions.[ch]: made the
	GimpRectangleOptionsPrivate struct public (ha ha).

	(gimp_rectangle_options_gui): replaced the "Auto shrink selection"
	toggle by a normal button that needs to be clicked explicitely.

	* app/tools/gimprectangletool.c: access members of
	GimpRectangleOptionsPrivate directly instead of reading them into
	local variables using g_object_get(), this makes the code quite
	more readable. Some code cleanup.

	(gimp_rectangle_tool_button_release): get rid of the confusing
	auto-shrink madness on button release...

	(gimp_rectangle_tool_start)
	(gimp_rectangle_tool_halt): ...instead, connect to the option's
	auto shrink button and shrink on "clicked".


svn path=/trunk/; revision=22209
2007-03-31 16:38:55 +00:00
Michael Natterer 0d7ccd8f56 read the "operation" member of GimpSelectionOptions directly.
2007-03-31  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimprectangleselecttool.c: read the "operation" member
	of GimpSelectionOptions directly.

	* app/tools/gimpellipseselecttool.c (gimp_ellipse_select_tool_draw):
	chain up instead of calling gimp_rectangle_tool_draw() directly,
	don't #include "gimprectantletool.h".


svn path=/trunk/; revision=22208
2007-03-31 16:22:57 +00:00
Michael Natterer 58bea5b1b6 access the GimpCropOptions structure directly to read the "layer_only"
2007-03-31  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpcroptool.c: access the GimpCropOptions structure
	directly to read the "layer_only" option (don't use g_object_get),
	some code cleanup.


svn path=/trunk/; revision=22207
2007-03-31 16:07:05 +00:00
Sven Neumann e2b83b288c app/tools/gimpdrawtool.[ch] app/tools/gimpperspectiveclonetool.c compare
2007-03-30  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpdrawtool.[ch]
	* app/tools/gimpperspectiveclonetool.c
	* app/tools/gimptransformtool.c: compare squared distances.

svn path=/trunk/; revision=22198
2007-03-30 09:41:18 +00:00
Sven Neumann 4c33327046 hardcode the result of sqrt(5).
2007-03-30  Sven Neumann  <sven@gimp.org>

	* app/tools/gimprectangletool.c (gimp_rectangle_tool_draw_guides):
	hardcode the result of sqrt(5).


svn path=/trunk/; revision=22196
2007-03-30 09:26:48 +00:00
Michael Natterer ca83552cd6 don't compare the result of sqrt() with something, compare the original
2007-03-29  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptool.c (gimp_tool_check_click_distance): don't
	compare the result of sqrt() with something, compare the original
	value with something's square instead.


svn path=/trunk/; revision=22195
2007-03-29 19:00:45 +00:00
Sven Neumann e9b050d244 fixed typo spotted by Bill Skaggs.
2007-03-21  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpblendtool.c (gimp_blend_tool_button_release): fixed
	typo spotted by Bill Skaggs.

svn path=/trunk/; revision=22157
2007-03-21 16:06:11 +00:00