Commit graph

8956 commits

Author SHA1 Message Date
Michael Natterer e9029e04e0 renamed members and added last_x and last_y to remember the last mouse
2007-03-08  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpblendtool.h (struct GimpBlendTool): renamed
	members and added last_x and last_y to remember the last mouse
	coords.

	* app/tools/gimpblendtool.c: changed accordingly. Take drawable
	offset into account in button_release() and remove offset
	calculations from all other places. Enabled using ALT for moving
	the entire line.


svn path=/trunk/; revision=22077
2007-03-08 18:07:38 +00:00
Sven Neumann 012ecd81f5 do one less call to tile_manager_get_tile().
2007-03-08  Sven Neumann  <sven@gimp.org>

	* app/base/pixel-surround.c (pixel_surround_get_data): do one less
	call to tile_manager_get_tile().


svn path=/trunk/; revision=22076
2007-03-08 16:38:53 +00:00
Michael Natterer 8fcb05e6e7 request click events, removed target_x,y struct members and button_press()
2007-03-08  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpbucketfilltool.[ch]: request click events, removed
	target_x,y struct members and button_press() implementation and
	use the coords passed in button_release(). Also make sure that
	a click has no effect in areas where we show the bad corsor.


svn path=/trunk/; revision=22075
2007-03-08 15:32:58 +00:00
Sven Neumann a092677a4d fixed boundary case.
2007-03-08  Sven Neumann  <sven@gimp.org>

	* app/base/pixel-surround.c: fixed boundary case.

svn path=/trunk/; revision=22073
2007-03-08 14:50:19 +00:00
Sven Neumann f663cb8bc4 app/tools/gimpperspectivetool.c app/tools/gimpscaletool.c
2007-03-08  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpperspectivetool.c
	* app/tools/gimpscaletool.c
	* app/tools/gimprotatetool.c
	* app/tools/gimpfliptool.c
	* app/tools/gimpsheartool.c
	* app/tools/gimptransformtool.[ch]: removed shell_desc member 
from
	GimpTransformToolClass and just use the tool blurb instead.


svn path=/trunk/; revision=22067
2007-03-08 08:21:39 +00:00
Sven Neumann 18efb16d5e added missing call to gimp_rectangle_tool_rectangle_changed(). Fixes bug
2007-03-08  Sven Neumann  <sven@gimp.org>

	* app/tools/gimprectangletool.c (gimp_rectangle_tool_key_press):
	added missing call to gimp_rectangle_tool_rectangle_changed().
	Fixes bug #415833.


svn path=/trunk/; revision=22066
2007-03-08 06:52:41 +00:00
Sven Neumann 1bdb26be15 describe usage of modifiers as suggested in bug #415796.
2007-03-07  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpvectoroptions.c (gimp_vector_options_gui): 
describe
	usage of modifiers as suggested in bug #415796.


svn path=/trunk/; revision=22065
2007-03-07 19:48:38 +00:00
Sven Neumann c9073a2449 reduced number of calls to tile_manager_get_tile().
2007-03-07  Sven Neumann  <sven@gimp.org>

	* app/base/pixel-surround.c (pixel_surround_lock): reduced number
	of calls to tile_manager_get_tile().


svn path=/trunk/; revision=22064
2007-03-07 17:57:10 +00:00
Michael Natterer c2c21a30f2 Clean up fix for bug #328001:
2007-03-07  Michael Natterer  <mitch@gimp.org>

	Clean up fix for bug #328001:

	* app/tools/gimpeditselectiontool.[ch] (process_event_queue_keys):
	made private again.

	(gimp_edit_selection_tool_translate): new function which has an
	additional GimpTransformType parameter to determine what transform
	to perform. Do all the work here, ignoring the key event's
	modifier state.

	(gimp_edit_selection_tool_key_press): just determine the transform
	type from the key event's modifier state and call
	gimp_edit_selection_tool_translate().

	* app/tools/gimpmovetool.c (gimp_move_tool_key_press): removed all
	code and call gimp_edit_selection_tool_translate() with
	options->move_type. Moved the function to its proper place in the
	file.


svn path=/trunk/; revision=22063
2007-03-07 09:34:47 +00:00
Sven Neumann 4d76165127 keep an internal buffer filled with the background color and use it for
2007-03-07  Sven Neumann  <sven@gimp.org>

	* app/base/pixel-surround.c: keep an internal buffer filled with
	the background color and use it for out of bounds requests. 
Speed
	up filling the internal buffer by copying data row-by-row.


svn path=/trunk/; revision=22062
2007-03-06 23:32:25 +00:00
Sven Neumann f878258e5d Patch by Martin Nordholts. Fixes bug #328001.
2007-03-06  Sven Neumann  <sven@gimp.org>

	Patch by Martin Nordholts. Fixes bug #328001.

	* app/tools/gimpeditselectiontool.[ch] 
(process_event_queue_keys):
	Made process_event_queue_keys public for use of gimpmovetool.c.
	Still needs to be renamed and moved to another place.

	* app/tools/gimpmovetool.c (gimp_move_tool_key_press): Created
	gimp_move_tool_key_press() which takes care of events that
	gimp_edit_selection_tool_key_press() is not is able to
	handle. Otherwise just pass key events on to that method.


svn path=/trunk/; revision=22058
2007-03-06 19:56:08 +00:00
Michael Natterer d741af2656 if the user clicks inside an existing selection, initialize the rectangle
2007-03-05  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimprectangleselecttool.c
	(gimp_rect_select_tool_execute): if the user clicks inside an
	existing selection, initialize the rectangle tool to the entire
	selection, not just to the part of it that is within the active
	drawable. Also removed some dead code.


svn path=/trunk/; revision=22049
2007-03-05 21:03:02 +00:00
Sven Neumann 7044701112 added missing cast.
2007-03-05  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpstrokeeditor.c: added missing cast.


svn path=/trunk/; revision=22048
2007-03-05 20:28:31 +00:00
Michael Natterer e6fb62d4ac Makes default Select -> Border behaviour consistent, and makes 'sticky
2007-03-05  Michael Natterer  <mitch@gimp.org>

	Makes default Select -> Border behaviour consistent, and makes
	'sticky image edges' optional by adding a checkbox in the Border
	Selection dialog. Patch by Martin Nordholts. Fixes bug #350009.

	* app/actions/select-commands.c (select_border_cmd_callback)
	(select_border_callback): Added edge-lock checkbox to dialog and
	modified calls accordingly.

	* app/paint-funcs/paint-funcs.c (border_region)
	(compute_transition): Fixed algorithm. (compute_transition is a
	helper function to the algorithm). Also clarified many parts of
	the algorithm with comments.

	* app/paint-funcs/paint-funcs.h
	* app/core/gimpchannel.[ch]
	* app/core/gimpselection.c: Added gboolean edge_lock to function
	calls/signatures.

	* app/pdb/selection_cmds.c: Regenerated. 


svn path=/trunk/; revision=22047
2007-03-05 20:21:23 +00:00
Michael Natterer 395b06ad8b added typdef GimpMemsizeFunc.
2007-03-05  Michael Natterer  <mitch@gimp.org>

	* app/core/core-types.h: added typdef GimpMemsizeFunc.

	* app/core/gimp-utils.[ch]: added _foreach() variants of
	GHashTable, GList and GSList functions which take GimpMemsizeFunc
	callbacks. Added gimp_parasite_get_memsize(). Added "data_size"
	parameter to gimp_g_hash_table_get_memsize().

	* app/core/gimp.c
	* app/core/gimppalette.c
	* app/core/gimpparasitelist.c
	* app/pdb/gimppdb.c
	* app/plug-in/gimppluginmanager.c: use the new functions instead
	of itering manually or ignoring the containers' elements. Changed
	callers of gimp_g_hash_table_get_memsize().


svn path=/trunk/; revision=22046
2007-03-05 20:09:46 +00:00
Michael Natterer 1bfc742f03 don't pass random strings to g_print() without running them through %s.
2007-03-04  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpobject.c (gimp_object_get_memsize): don't pass
	random strings to g_print() without running them through %s.
	Fixes crash/warning when the string contains '%'.


svn path=/trunk/; revision=22042
2007-03-04 21:38:50 +00:00
Hans Breuer f8b13080e4 updated
2007-03-04  Hans Breuer  <hans@breuer.org>

	* **/makefile.msc app/gimpcore.def : updated


svn path=/trunk/; revision=22041
2007-03-04 19:04:42 +00:00
Sven Neumann f1692ea6fc app/display/gimpdisplayshell.[ch] only change the remembered last scale
2007-03-04  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell.[ch]
	* app/display/gimpdisplayshell-scale.c: only change the 
remembered
	last scale value if the last change occured more than a second 
ago.

	* app/tools/gimprectangletool.c: fixed compiler warnings.


svn path=/trunk/; revision=22040
2007-03-04 10:27:17 +00:00
Michael Natterer 4dd7d18b06 use gimp_drawable_bytes_with_alpha() instead of manually adding alpha to
2007-03-01  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawable-blend.c (gimp_drawable_blend): use
	gimp_drawable_bytes_with_alpha() instead of manually adding
	alpha to the value returned by gimp_drawable_bytes()


svn path=/trunk/; revision=22037
2007-03-01 17:53:56 +00:00
Raphael Quinet ff6ca82828 don't suggest Shift when a new point cannot be added to point 0.
2007-02-29  Raphael Quinet  <raphael@gimp.org>

	* app/tools/gimpmeasuretool.c (gimp_measure_tool_cursor_update): 
	don't suggest Shift when a new point cannot be added to point 0.

svn path=/trunk/; revision=22031
2007-03-01 08:52:37 +00:00
Raphael Quinet 89c4abd6ea added status bar help messages explaining the usage of the modifiers.
2007-02-28  Raphael Quinet  <raphael@gimp.org>

	* app/tools/gimpmeasuretool.[ch]: added status bar help messages
	explaining the usage of the modifiers.

	* app/tools/gimpvectortool.c (gimp_vector_tool_status_update):
	suggest Ctrl for edit mode, to close the path or move handles.

	* app/tools/gimpcroptool.c (gimp_crop_tool_button_release):
	"press enter" should be "press Enter", as in the other tools.

svn path=/trunk/; revision=22030
2007-02-28 22:35:37 +00:00
Sven Neumann 8353fafbc5 made labels selectable.
2007-02-28  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpmeasuretool.c: made labels selectable.

svn path=/trunk/; revision=22029
2007-02-28 16:46:55 +00:00
João S. O. Bueno Calligaris d7b7bb40b9 removes recursive code when adjusting rectangle size. Fixes bug #410234.
2007-02-28  João S. O. Bueno Calligaris <gwidion@mpc.com.br>

        * app/tools/gimprectangletool.c: removes recursive code
        when adjusting rectangle size. Fixes bug #410234.

svn path=/trunk/; revision=22028
2007-02-28 16:05:52 +00:00
Sven Neumann 6e59aec825 simplified callers and moved calculations out of the SQR() macro.
2007-02-28  Sven Neumann  <sven@gimp.org>

	* app/tools/gimptool.c (gimp_tool_check_click_distance):
	simplified callers and moved calculations out of the SQR() macro.


svn path=/trunk/; revision=22027
2007-02-28 16:00:26 +00:00
Sven Neumann 0af9507ab8 don't change the selection while the tool is active. Fixes bug #398185.
2007-02-28  Sven Neumann  <sven@gimp.org>

	* app/tools/gimprectangleselecttool.c
	(gimp_rect_select_tool_rectangle_changed): don't change the
	selection while the tool is active. Fixes bug #398185. Thanks to
	Martin Nordholts for investigating this problem.

	* app/tools/gimprectangletool.c: minor cleanup.


svn path=/trunk/; revision=22025
2007-02-28 13:08:09 +00:00
Michael Natterer 9e15c24251 need to check the distance in screen coords, not image coords.
2007-02-28  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptool.c (gimp_tool_check_click_distance): need to
	check the distance in screen coords, not image coords.

	* app/tools/gimpmovetool.c (gimp_move_tool_button_release): forgot
	two manual checks for GDK_BUTTON3_MASK.


svn path=/trunk/; revision=22024
2007-02-28 13:04:20 +00:00
Michael Natterer b60fbd3324 even more whitespace cleanup.
2007-02-28  Michael Natterer  <mitch@gimp.org>

	* app/core/gimp-transform-resize.c: even more whitespace cleanup.


svn path=/trunk/; revision=22023
2007-02-28 11:17:29 +00:00
Sven Neumann a75dc8a046 removed trailing whitespace.
2007-02-28  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-transform-resize.c: removed trailing whitespace.


svn path=/trunk/; revision=22022
2007-02-28 09:14:40 +00:00
Sven Neumann c294d9bc94 app/core/gimpimage-scale.c app/core/gimpimage-rotate.c
2007-02-28  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage-scale.c
	* app/core/gimpimage-rotate.c
	* app/core/gimpimage-resize.c
	* app/core/gimpimage-flip.c: cosmetics.


svn path=/trunk/; revision=22021
2007-02-28 08:57:17 +00:00
Sven Neumann bcbca9b612 documentation.
2007-02-27  Sven Neumann  <sven@gimp.org>

        * app/base/pixel-surround.c: documentation.


svn path=/trunk/; revision=22020
2007-02-27 21:55:52 +00:00
Michael Natterer d40c0a5883 clean up last commit a bit. Pass the recorded button_press_coords to
2007-02-27  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptool.[ch]: clean up last commit a bit. Pass the
	recorded button_press_coords to GimpTool::button_release() when a
	click was detected.


svn path=/trunk/; revision=22019
2007-02-27 21:40:35 +00:00
Sven Neumann 54cfb83fec increased default value for "undo-size" to 64 MB.
2007-02-27  Sven Neumann  <sven@gimp.org>

	* app/config/gimpcoreconfig.c: increased default value for
	"undo-size" to 64 MB.

	* app/config/gimpguiconfig.c: increased default value for
	'max-new-image-size' to 128 MB.


svn path=/trunk/; revision=22017
2007-02-27 21:13:49 +00:00
Michael Natterer 83eb96db21 added "gboolean wants_click" member and getters/setters.
2007-02-27  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptoolcontrol.[ch]: added "gboolean wants_click"
	member and getters/setters.

	* app/tools/gimptool.[ch] (struct GimpTool): added members
	in_click_distance, press_coords and press_time.

	(gimp_tool_button_press): if the tool wants click events, record
	press_coords and press_time.

	(gimp_tool_motion): check if we are still in click distance.

	(gimp_tool_button_release): ditto. If we are still in click
	distance, synthesize a motion event back to the recorded
	press_coords and send the tool release_type = CLICK.

	(gimp_tool_check_click_distance): utility function which checks
	the current coords and time against the recorded ones, using
	gtk-double-click-time and gtk-double-click-distance as thresholds.

	* app/tools/gimpcroptool.c
	* app/tools/gimprectangleselecttool.c: request click events
	and handle them.

	* app/tools/gimprectangletool.[ch]: handle click events. Removed
	gimp_rectangle_tool_no_movement().


svn path=/trunk/; revision=22016
2007-02-27 21:11:35 +00:00
Michael Natterer d7ed63948c Step one towards enabling tool cancellation by other means than mouse
2007-02-27  Michael Natterer  <mitch@gimp.org>

	Step one towards enabling tool cancellation by other means than
	mouse button 3 and towards proper "clicked" semantics.

	* app/tools/tools-enums.[ch]: added enum GimpButtonReleaseType
	which can be one of { NORMAL, CANCEL, CLICK } (click is curently
	unused).

	* app/tools/gimptool.[ch] (GimpTool::button_release): added
	"release_type" parameter.

	(gimp_tool_button_release): if the state contains
	GDK_BUTTON3_MASK, call the tool's button_release() with CANCEL,
	use NORMAL otherwise.

	* app/tools/gimpaligntool.c
	* app/tools/gimpblendtool.c
	* app/tools/gimpbrightnesscontrasttool.c
	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpcolortool.c
	* app/tools/gimpcroptool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpforegroundselecttool.c
	* app/tools/gimpfreeselecttool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimpmagnifytool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimppainttool.c
	* app/tools/gimprectangleselecttool.c
	* app/tools/gimprectangletool.[ch]
	* app/tools/gimpregionselecttool.c
	* app/tools/gimptransformtool.c
	* app/tools/gimpvectortool.c (button_release): added
	"release_type" parameters and get rid of own checks for
	GDK_BUTTON3_MASK.


svn path=/trunk/; revision=22015
2007-02-27 18:55:12 +00:00
Michael Natterer e172a72c63 set the gradient-type and gradient-repeat combo boxes to ELLIPSIZE_END so
2007-02-27  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpblendoptions.c (gimp_blend_options_gui): set the
	gradient-type and gradient-repeat combo boxes to ELLIPSIZE_END so
	the blend options can be one tool icon size smaller without
	scrolling horizontally.


svn path=/trunk/; revision=22014
2007-02-27 18:44:55 +00:00
Sven Neumann 4a6b039f88 update the progress less often.
2007-02-27  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/scale-funcs.c: update the progress less often.

svn path=/trunk/; revision=22013
2007-02-27 16:59:24 +00:00
Sven Neumann 776f7973b2 follow the internal API change
svn path=/trunk/; revision=22011
2007-02-27 11:10:17 +00:00
Sven Neumann 6852fc8068 allow the parent progress to be NULL. Documented the API.
2007-02-27  Sven Neumann  <sven@gimp.org>

	* app/core/gimpsubprogress.[ch]: allow the parent progress to be NULL.
	Documented the API.

	* app/core/gimpimage-scale.c: use the sub-progress unconditionally.


svn path=/trunk/; revision=22010
2007-02-27 11:03:18 +00:00
Sven Neumann 5b5082a433 app/core/Makefile.am app/core/core-types.h added GimpSubProgress, an
2007-02-27  Sven Neumann  <sven@gimp.org>

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpsubprogress.[ch]: added GimpSubProgress, an 
object
	that implements the GimpProgress interface and maps progress
	information to a sub-range of the parent progress.

	* app/core/gimpimage-scale.c (gimp_image_scale): use the new 
object.


svn path=/trunk/; revision=22009
2007-02-27 09:39:31 +00:00
Sven Neumann 99e507de58 removed a redundant condition and marked another one as unlikely.
2007-02-26  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-transform-region.c (normalize_coords): removed a
	redundant condition and marked another one as unlikely.


svn path=/trunk/; revision=22008
2007-02-26 19:43:14 +00:00
Sven Neumann b3ec8a219d app/core/gimpimage-scale.c cosmetics.
2007-02-26  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage-scale.c
	* app/actions/image-commands.c: cosmetics.


svn path=/trunk/; revision=22007
2007-02-26 18:53:07 +00:00
Sven Neumann f267e26644 just redraw the canvas
svn path=/trunk/; revision=22006
2007-02-26 16:03:14 +00:00
Sven Neumann 352d64ab5e cosmetics
svn path=/trunk/; revision=22005
2007-02-26 15:32:54 +00:00
Sven Neumann e644c56ce0 queue a redraw of the display shell instead of exposing the transform
2007-02-26  Sven Neumann  <sven@gimp.org>

	* app/tools/gimptransformtool.c (gimp_transform_tool_doit): queue
	a redraw of the display shell instead of exposing the transform
	preview. Removes annoying flicker when the tool is finished.


svn path=/trunk/; revision=22004
2007-02-26 15:12:26 +00:00
Sven Neumann e2ae556117 moved common code to an inlined function. gimp_transform_region_lanczos()
2007-02-26  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-transform-region.c: moved common code to an
	inlined function. gimp_transform_region_lanczos() now also does
	supersampling.  Removed boundary checks and clamping as
	PixelSurround and read_pixel_data_1() already deal with this for
	us. Gives another small speedup.


svn path=/trunk/; revision=21999
2007-02-26 14:16:31 +00:00
Sven Neumann 6b7996a3e7 use PixelSurround instead of read_pixel_data_1(). This yields a dramatic
2007-02-26  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-transform-region.c (gimp_transform_region_lanczos):
	use PixelSurround instead of read_pixel_data_1(). This yields a
	dramatic speedup.


svn path=/trunk/; revision=21998
2007-02-26 13:36:50 +00:00
Sven Neumann ca30a115b3 iterate over tiles instead of rows in the destination buffer.
2007-02-26  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-transform-region.c (gimp_transform_region_lanczos):
	iterate	over tiles instead of rows in the destination buffer.


svn path=/trunk/; revision=21997
2007-02-26 13:03:51 +00:00
Sven Neumann 43d2cde05f moved linear and cubic code to their own functions and let them iterate
2007-02-24  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-transform-region.c (gimp_transform_region): moved
	linear and cubic code to their own functions and let them iterate
	over tiles instead of rows in the destination buffer.


svn path=/trunk/; revision=21996
2007-02-26 11:50:02 +00:00
Sven Neumann cc6a517f5b added more const qualifiers.
2007-02-26  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-transform-region.c: added more const qualifiers.


svn path=/trunk/; revision=21992
2007-02-26 09:33:13 +00:00
Sven Neumann 4232b8fa4e operate on tiles instead of iterating row by row.
2007-02-24  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-transform-region.c 
(gimp_transform_region_nearest):
	operate on tiles instead of iterating row by row.


svn path=/trunk/; revision=21988
2007-02-24 16:40:56 +00:00