Commit graph

8979 commits

Author SHA1 Message Date
Michael Natterer e8edf3f408 added new ugly function gimp_dialog_factory_hide_dialog() which does
2007-03-13  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpdialogfactory.[ch]: added new ugly function
	gimp_dialog_factory_hide_dialog() which does gtk_widget_hide() and
	sets the stored visibility state to GIMP_DIALOG_VISIBILITY_INVISIBLE
	in order to avoid re-showing dialogs that were already insivible due
	to TAB-toggling when we gtk_widget_hided them.

	* app/tools/gimptransformtool.c
	* app/tools/gimpimagemaptool.c: use the new function instead of
	gtk_widget_hide() to hide tool dialogs. Fixes bug #414006.


svn path=/trunk/; revision=22111
2007-03-13 22:55:07 +00:00
Sven Neumann 54f709ec06 added a g_return_if_fail() check to catch bug #414006.
2007-03-13  Sven Neumann  <sven@gimp.org>

	* app/tools/gimptransformtool.c (gimp_transform_tool_response):
	added a g_return_if_fail() check to catch bug #414006.


svn path=/trunk/; revision=22108
2007-03-13 07:43:37 +00:00
Sven Neumann 8374e79e49 code cosmetics.
2007-03-12  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell-transform.c: code cosmetics.



svn path=/trunk/; revision=22106
2007-03-12 15:38:08 +00:00
Michael Natterer ef30d0079c lots of fixes and changes:
2007-03-12  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpmagnifytool.[ch]: lots of fixes and changes:

	- Request click events and use them instead of looking at the
	  distance the mouse travelled ourselves.
	- Also zoom when the user draws a very thin rectangle or just a
	  line, there is no reason to treat that as click.
	- Changed all calculations and stored values to double so the tool
	  continues to work smoothly at high zoom levels.
	- Fix scale calculation when zooming out (was totally b0rk).
	- Changed offset calculation when zooming out so that the current
	  viewport ends up within the drawn rectangle (which is the
	  opposite of what zooming in does).


svn path=/trunk/; revision=22105
2007-03-12 14:36:49 +00:00
Sven Neumann 4d44bacd74 deal with gimp_plug_in_procedure_get_label() returning NULL
svn path=/trunk/; revision=22104
2007-03-12 13:07:18 +00:00
Sven Neumann c63d0506ca gimp_plug_in_get_undo_desc() uses gimp_plug_in_procedure_get_label(). Made
2007-03-12  Sven Neumann  <sven@gimp.org>

	* app/plug-in/gimpplugin.[ch]: gimp_plug_in_get_undo_desc() uses
	gimp_plug_in_procedure_get_label(). Made the return value const.

	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/message.pdb
	* tools/pdbgen/pdb/undo.pdb: changed accordingly.

	* app/actions/plug-in-actions.c: cosmetics.

	* app/pdb/undo_cmds.c
	* app/pdb/message_cmds.c
	* app/pdb/drawable_cmds.c: regenerated.


svn path=/trunk/; revision=22103
2007-03-12 13:04:32 +00:00
Michael Natterer 4648f542cf app/core/gimpbrush.[ch] app/core/gimpbrushgenerated.c
2007-03-12  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpbrush.[ch]
	* app/core/gimpbrushgenerated.c
	* app/tools/gimppaintoptions-gui.c
	* app/base/brush-scale.[ch]
	* app/base/temp-buf.[ch]
	* app/paint/gimppaintoptions.c
	* app/paint/gimpbrushcore.c: revert last commit. The patch needs
	more review and it's easier to start from quare one than have
	patches on top of patches.


svn path=/trunk/; revision=22101
2007-03-12 09:33:57 +00:00
Michael Schumacher a4e81c3a6c Made brushes scalable (both up and down) by using existing scaling
2007-03-11  Michael Schumacher  <schumaml@cvs.gnome.org>

	Made brushes scalable (both up and down) by using existing
	scaling routines, and also refactored some brush-code. Patch by
	Martin Nordholts. Fixes bug #65030.

	* app/paint/gimpbrushcore.c:
	(gimp_brush_core_calc_brush_length_scale) Refactored 'get brush
	size' code to where it belongs, in GimpBrush-classes, and renamed
	gimp_brush_core_calc_brush_size to
	gimp_brush_core_calc_brush_length_scale.

	* app/paint/gimppaintoptions.c (gimp_paint_options_class_init):
	Changed Scale scale to [0.0, 100.0].

	* app/base/temp-buf.[ch] (mask_buf_new): Change signature to also
	take a bpp parameter.

	* app/base/brush-scale.[ch]: Changed brush_scale_(mask|pixmap) to
	the new brush_scale_buf, which uses existing scaling routines
	(scale_region) instead of dedicated down-scaling only routines.

	* app/tools/gimppaintoptions-gui.c (gimp_paint_options_gui): Made
	the brush Scale-slider logarithmic.

	* app/core/gimpbrushgenerated.c: Implemented the new
	get_scaled_size method inherited from GimpBrush, and modified
	gimp_brush_generated_calc to use this helper function.

	* app/core/gimpbrush.[ch]: Added public virtual method
	get_scaled_size to GimpBrush, overridden by GimpBrushGenerated,
	which calculates the buffer sizes for a given brush scaled with a
	given scale. Also changed calls to brush_scale_(mask|pixmap) to
	the new brush_scale_buf.

svn path=/trunk/; revision=22099
2007-03-11 16:28:08 +00:00
Sven Neumann 5eb341d2a5 removed default label from enum switch statement.
2007-03-10  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpeditselectiontool.c 
(gimp_edit_selection_tool_motion):
	removed default label from enum switch statement.


svn path=/trunk/; revision=22098
2007-03-10 22:35:21 +00:00
Sven Neumann 2d7f6cb50b unset the progress_active flag before popping the progress message
svn path=/trunk/; revision=22097
2007-03-10 22:10:56 +00:00
Sven Neumann 414eb93d72 while the statusbar is being used as a progress bar, only show progress
2007-03-10  Sven Neumann  <sven@gimp.org>

	* app/display/gimpstatusbar.c (gimp_statusbar_update): while the
	statusbar is being used as a progress bar, only show progress
	messages.


svn path=/trunk/; revision=22096
2007-03-10 22:07:42 +00:00
Sven Neumann 8fd67e0e95 cache the result of gimp_plug_in_procedure_get_label() and made the return
2007-03-10  Sven Neumann  <sven@gimp.org>

	* app/plug-in/gimppluginprocedure.[ch]: cache the result of
	gimp_plug_in_procedure_get_label() and made the return value 
const.


	* app/actions/plug-in-actions.c
	* app/plug-in/gimpplugin-cleanup.c
	* app/plug-in/gimppluginmanager.c
	* app/widgets/gimpfiledialog.c
	* app/widgets/gimpfileprocview.c
	* app/widgets/gimpimagepropview.c: changed accordingly.

	* app/file/file-open.c
	* app/file/file-save.c: include the plug-in name (or actually 
the
	label) in the error messages.


svn path=/trunk/; revision=22095
2007-03-10 21:22:22 +00:00
Michael Natterer 4ddfeb7ddc don't include libgimpmath/gimpmathtypes.h
2007-03-10  Michael Natterer  <mitch@gimp.org>

	* app/core/core-types.h: don't include libgimpmath/gimpmathtypes.h

	* app/base/base-types.h: include it here. Also include
	libgimpcolor/gimpcolortypes.h


svn path=/trunk/; revision=22094
2007-03-10 19:31:07 +00:00
Michael Natterer 34130a569e forgot to commit this file.
svn path=/trunk/; revision=22093
2007-03-10 15:27:47 +00:00
Michael Natterer 55c9c20843 added value GIMP_BUTTON_RELEASE_NO_MOTION.
2007-03-10  Michael Natterer  <mitch@gimp.org>

	* app/tools/tools-enums.[ch] (enum GimpButtonReleaseType): added
	value GIMP_BUTTON_RELEASE_NO_MOTION.

	* app/tools/gimptool.[ch]: when click events are requested and the
	click was too long for a "click" event, send a NO_MOTION event if
	the pointer didn't move at all.

	* app/tools/gimpbucketfilltool.c: treat NO_MOTION as tool
	confirmation too.

	* app/tools/gimpfreeselecttool.c: request click events and treat
	both CLICK and NO_MOTION as tool confirmation.

	* app/tools/gimprectangletool.c: ignore NO_MOTION.


svn path=/trunk/; revision=22091
2007-03-10 15:07:56 +00:00
Sven Neumann 4e43d3048f fixed build of test-config.
2007-03-09  Sven Neumann  <sven@gimp.org>

	* app/config/Makefile.am: fixed build of test-config.


svn path=/trunk/; revision=22086
2007-03-09 19:29:31 +00:00
Michael Natterer 83d3a750d4 include "libgimpmath/gimpmathtypes.h" instead of "libgimpmath/gimpmath.h".
2007-03-09  Michael Natterer  <mitch@gimp.org>

	* app/core/core-types.h: include "libgimpmath/gimpmathtypes.h"
	instead of "libgimpmath/gimpmath.h".

	* app/core/gimpbrush.h
	* app/paint/gimppaintcore.h
	* app/paint/gimpperspectiveclone.h
	* app/text/gimptext.h
	* app/tools/gimptransformtool.h: include gimpvector.h and
	gimpmatrix.h explicitely where they are needed in public structs.

	* app/*/*.c
	* tools/pdbgen/pdb/paths.pdb: include "libgimpmath/gimpmath.h"
	where needed.

	* app/pdb/paths_cmds.c: regenerated.


svn path=/trunk/; revision=22084
2007-03-09 13:00:01 +00:00
Michael Natterer 974a74004f remove useless includes. Some minor cleanup.
2007-03-09  Michael Natterer  <mitch@gimp.org>

	* app/tools/*.c: remove useless includes. Some minor cleanup.


svn path=/trunk/; revision=22083
2007-03-09 11:10:40 +00:00
Sven Neumann 101d1b6512 replaced inner loop by a call to memcpy.
2007-03-09  Sven Neumann  <sven@gimp.org>

	* app/base/pixel-surround.c: replaced inner loop by a call to memcpy.


svn path=/trunk/; revision=22082
2007-03-09 10:18:25 +00:00
Sven Neumann 7758757d89 Much better fix which doesn't slow down handling of out-of-bounds requests
and also covers a corner case that the previous fix didn't handle. 

svn path=/trunk/; revision=22081
2007-03-09 09:53:21 +00:00
Sven Neumann 3760f9ec49 fixed handling of uncovered regions.
2007-03-09  Sven Neumann  <sven@gimp.org>

	* app/base/pixel-surround.c: fixed handling of uncovered 
regions.


svn path=/trunk/; revision=22080
2007-03-09 09:19:57 +00:00
Sven Neumann e62825eecc added missing call to gimp_rectangle_tool_update_options (). Fixes bug
2007-03-09  Sven Neumann  <sven@gimp.org>

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


svn path=/trunk/; revision=22079
2007-03-09 07:16:18 +00:00
Raphael Quinet 2c1e06c107 make the new feature visible in the status bar (alas, this implies a new
2007-03-09  Raphael Quinet  <raphael@gimp.org>

	* app/tools/gimpblendtool.c (gimp_blend_tool_push_status): make
	the new feature visible in the status bar (alas, this implies a
	new translatable string).

svn path=/trunk/; revision=22078
2007-03-08 23:33:55 +00:00
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