Commit graph

2471 commits

Author SHA1 Message Date
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