Commit Graph

8152 Commits

Author SHA1 Message Date
William Skaggs 354d247c67 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/tools/gimprectangleselecttool.c: don't autoshrink when
	there is no display; fixes crash reported by Carol.
2006-06-12 22:17:52 +00:00
William Skaggs 131aad120c Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/tools/gimprectangleselecttool.c
	* app/tools/gimprectangletool.c: fix three issues identified by
	jimmac: (1) when shift or ctrl are pressed, should start a new
	rect regardless of pointer loc; (2) zoom was incorrectly affecting
	width of sensitive areas; (3) must emit "rectangle-changed" after
	keyboard-driven rectangle movement.
2006-06-12 21:15:22 +00:00
Tor Lillqvist 2e0f2b8dfc Use g_listenv() and g_getenv() instead of looking at environ directly.
2006-06-12  Tor Lillqvist  <tml@novell.com>

	* app/plug-in/gimpenvirontable.c (gimp_environ_table_populate):
	Use g_listenv() and g_getenv() instead of looking at environ
	directly. Fixes breakage on Win32 when any (!) environment
	variable has a non-ASCII value, as environ is in system codepage,
	while we want UTF-8.
2006-06-12 16:54:51 +00:00
William Skaggs a442179713 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/tools/gimpellipseselecttool.c (gimp_ellipse_select_tool_draw):
	Call gimp_rectangle_tool_draw.
2006-06-12 00:36:56 +00:00
William Skaggs 77c4b0541e Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/tools/gimprectangleselecttool.c: handle situations
	where the user "flips" the rectangle while modifying it.
	This solution is not perfect, but better than before.

	* app/tools/gimprectangletool.c: remove unneeded variable.
2006-06-11 23:59:33 +00:00
William Skaggs 990e475d77 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/tools/gimprectangleselecttool.c
	* app/tools/gimprectangletool.c: make auto-shrink work.  Does
	the wrong thing for ellipse-select, though.
2006-06-11 18:52:42 +00:00
William Skaggs ca059c11d6 Bill Skaggs <weskaggs@primate.ucdavis.edu>
Following up on previous commit, with assist from yosh.

	* app/tools/gimpnewrectselectoptions.[ch]
	* app/tools/gimpnewrectselecttool.[ch]: removed

	* app/tools/gimprectangleselectoptions.[ch]: magic-moved
	from gimpnewrectselectoptions.[ch]

	* app/tools/gimprectangleselecttool.[ch]: magic-moved
	from gimpnewrectselecttool.[ch]

	* app/tools/Makefile.am
	* app/tools/gimp-tools.c
	* app/tools/gimpellipseselecttool.c
	* app/tools/gimpellipseselecttool.h
	* app/tools/gimpselectionoptions.c: change file names to
	refer to moved files.
2006-06-10 21:34:12 +00:00
William Skaggs 36ee184375 Bill Skaggs <weskaggs@primate.ucdavis.edu>
Here is the big change-over, finally.

	* app/tools/gimprectselecttool.[ch]: removed.

	* app/tools/Makefile.am
	* app/tools/gimp-tools.c
	* app/tools/gimpellipseselecttool.c
	* app/tools/gimpellipseselecttool.h
	* app/tools/gimpnewrectselectoptions.c
	* app/tools/gimpnewrectselectoptions.h
	* app/tools/gimpnewrectselecttool.c
	* app/tools/gimpnewrectselecttool.h
	* app/tools/gimpselectionoptions.c
	* app/widgets/gimptoolbox.c
	* menus/image-menu.xml.in: get rid of the "new" in everything
	referring to the new rect select tool, except filenames.  This
	will wait for yosh to perform cvs-magic-foo.

	* app/tools/gimprectangleoptions.[ch]
	* app/tools/gimprectangletool.[ch]: fix a couple of minor
	problems that popped up during testing.
2006-06-10 18:24:58 +00:00
Michael Natterer 10c8c709d3 simply use gimp_button_new() instead of g_object_new(). Don't set the
2006-06-10  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpeditor.c (gimp_editor_add_action_button): simply
	use gimp_button_new() instead of g_object_new(). Don't set the
	"use-stock" property and reordered some code. Keeps GtkButton from
	thinking that is has constructed the button's child itself and
	thus makes the function more rubust against changes in GtkButton.
2006-06-10 17:48:33 +00:00
William Skaggs 4742424b78 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/tools/gimpcroptool.c
	* app/tools/gimpellipseselecttool.c
	* app/tools/gimprectangletool.[ch]: code cleanups

	* app/tools/gimpnewrectselecttool.[ch]: try to do what
	the user intuitively expects when deciding which selection
	operation to perform.  When modifying an existing rectangle,
	always use the operation with which it was created.
2006-06-10 16:49:07 +00:00
William Skaggs c4ffc27293 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/tools/gimpcropoptions.c: clean up code.

	* app/tools/gimpnewrectselecttool.c: really remove some
	commented-out code.

	* app/tools/gimprectangleoptions.[ch]: add "aspect-square"
	and "controls-expanded" properties.  Show "Make square" and
	"Expand from center" in options so that we don't need modifier
	keys to do this.  Place numerical entries inside an expander
	and hide them by default.
2006-06-10 01:39:10 +00:00
William Skaggs e732c769c9 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/core/core-enums.[ch]: add GimpAlignReferenceType enum

	* app/core/gimpimage-arrange.c: support using a channel as
	reference for alignment.

	* app/tools/gimpaligntool.[ch]: support aligning with a list item,
	image, selection, active layer, active channel, or active path.
	Now similar in form and function to Inkscape Align/Distribute
	dialog.
2006-06-09 21:52:45 +00:00
Sven Neumann 303150eee5 formatting.
2006-06-09  Sven Neumann  <sven@gimp.org>

	* app/batch.c (batch_run_cmd): formatting.
2006-06-09 06:47:03 +00:00
William Skaggs 9dbc0ee193 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/core/core-enums.[ch]: add GIMP_ARRANGE_FOO values
	to GimpAlignmentType, and change CENTER to HCENTER,
	MIDDLE to VCENTER.

	* app/core/gimpimage-arrange.c: extensively rewritten
	to handle arrangement of objects, and to do the
	required sorting of lists by offset.

	* app/tools/gimpaligntool.[ch]: added ability to arrange
	groups of layers etc with constant spacing.  Also try
	to change things so that the tool aligns with the
	object that users expect intuitively.
2006-06-08 22:15:45 +00:00
William Skaggs 40db64f48c Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/core/gimpimage-arrange.[ch]: added, utility function for
	aligning and arranging things in an image.

	* app/core/gimpitem-align.[ch}: removed, no longer needed.

	* app/core/gimpimage-item-list.[ch] (gimp_image_item_list_align):
	removed this function, no longer used.

	* app/core/Makefile.am: changes described above.

	* app/core/gimpguide.c: remove bit of cruft left accidentally.

	* app/tools/gimpalignoptions.[ch]: remove "alignment type"
	option, not needed at this point.

	* app/tools/gimpaligntool.[ch]: numerous changes, most
	importantly ability to align guides, and use them for
	alignment.  More work coming on this tool.
2006-06-07 21:29:54 +00:00
William Skaggs 4a60cf418b Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/core/gimpguide.[ch]: add "removed" signal and associated
	paraphernalia.

	* app/core/gimpimage-guides.c (gimp_image_remove_guide): call
	gimp_guide_removed() to cause signal emission.
2006-06-07 20:13:51 +00:00
Sven Neumann 8ad41a0f1a removed extra semicolon to fix build on Solaris (bug #344203).
2006-06-07  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpnewrectselecttool.c: removed extra semicolon to
	fix build on Solaris (bug #344203).
2006-06-07 20:07:54 +00:00
William Skaggs 323f3cb921 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/display/gimpdisplayshell.c (gimp_display_shell_expose_guide):
	fix typo, s/get_position/get_orientation/.
2006-06-07 19:51:33 +00:00
Sven Neumann e1457fa5ca removed unused includes and property blurbs; fixed registration of the
2006-06-07  Sven Neumann  <sven@gimp.org>

	* app/core/gimpguide.c: removed unused includes and property
blurbs;
	fixed registration of the "id" property, it is not a GIMP_CONFIG
	property.
2006-06-07 18:41:38 +00:00
Sven Neumann f55b151430 removed unused includes and property blurbs.
2006-06-07  Sven Neumann  <sven@gimp.org>

	* app/core/gimpguide.c: removed unused includes and property
blurbs.
2006-06-07 18:32:25 +00:00
Michael Natterer 7499fc89ff added gimp_guide_get_ID().
2006-06-07  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpguide.[ch]: added gimp_guide_get_ID().

	* app/core/gimpimage-crop.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-flip.c
	* app/core/gimpimage-guides.c
	* app/core/gimpimage-resize.c
	* app/core/gimpimage-rotate.c
	* app/core/gimpimage-scale.c
	* app/core/gimpimage-snap.c
	* app/core/gimpimage-undo-push.c
	* app/display/gimpdisplayshell-draw.c
	* app/display/gimpdisplayshell.c
	* app/tools/gimpmovetool.c
	* app/xcf/xcf-save.c
	* tools/pdbgen/pdb/guides.pdb: use accessors instead of accessing
	GimpGuide's struct members directly.

	* app/pdb/guides_cmds.c: regenerated.
2006-06-07 15:49:59 +00:00
Sven Neumann 75815e3a23 app/actions/error-console-commands.[ch] app/widgets/gimphelp-ids.h added
2006-06-07  Sven Neumann  <sven@gimp.org>

	* app/actions/error-console-actions.c:
	* app/actions/error-console-commands.[ch]
	* app/widgets/gimphelp-ids.h
	* menus/error-console-menu.xml: added "select-all" action as
	suggested in bug #328838.
2006-06-07 13:47:55 +00:00
Sven Neumann 23e8715285 added a setter for "orientation".
2006-06-07  Sven Neumann  <sven@gimp.org>

	* app/core/gimpguide.[ch]: added a setter for "orientation".

	* app/core/gimpimage-resize.c (gimp_image_resize_with_layers):
	removed unused variable; use for() loops to iterate over guides
	and sample points.
2006-06-07 07:57:24 +00:00
Sven Neumann 04e1fe94f1 derive from GObject, we don't need any GimpObject functionality here.
2006-06-07  Sven Neumann  <sven@gimp.org>

	* app/core/gimpguide.[ch]: derive from GObject, we don't need any
	GimpObject functionality here.  Declare "orientation" and "id"
	properties CONSTRUCT_ONLY, added a gimp_guide_new() function and
	emit notify on position changes.

	* app/core/gimpimage-guides.c: use gimp_guide_new() to instantiate
	guides.

	* app/core/gimpimage.c (gimp_image_get_memsize): formatting.
2006-06-07 07:45:16 +00:00
Michael Natterer 1cb89bf43f cosmetic cleanup.
2006-06-07  Michael Natterer  <mitch@gimp.org>

	* app/actions/context-commands.c: cosmetic cleanup.

	* app/core/core-types.h: move the GimpGuide typedef to the
	"misc objects" section.

	* app/tools/gimpforegroundselecttool.c: cosmetic cleanup.

	* app/tools/gimpmeasuretool.c (gimp_measure_tool_cursor_update):
	use the new corner and side cursors instead of using X cursors.

	* app/display/gimpdisplayshell-callbacks.c
	(gimp_display_shell_canvas_tool_events): renamed local variable
	"update_cursor" to "update_sw_cursor", it has confused me too
	often...
2006-06-07 07:30:40 +00:00
William Skaggs a49cc445b8 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/core/gimpguide.c
	* app/core/gimpguide.h: new files, implementing GuideGimp as a GimpObject

	* app/core/Makefile.am: add new files as sources

	* app/core/gimpimage-guides.h
	* app/core/gimpimage-guides.c: use the new object instead of defining
	GimpGuide here as a struct.

	* app/core/gimpimage-crop.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-flip.c
	* app/core/gimpimage-resize.c
	* app/core/gimpimage-rotate.c
	* app/core/gimpimage-scale.c
	* app/core/gimpimage-snap.c
	* app/core/gimpimage-undo-push.c
	* app/core/gimpimage.c
	* app/display/gimpdisplayshell-draw.c
	* app/display/gimpdisplayshell.c
	* app/pdb/guides_cmds.c
	* app/tools/gimpmovetool.c
	* app/xcf/xcf-save.c
	* tools/pdbgen/pdb/guides.pdb: include "core/gimpguide.h", and use
	g_object_ref/unref instead of gimp_image_guide_ref/unref.
2006-06-06 22:48:57 +00:00
Sven Neumann 09c605e28f initialize guide with the option's guide value.
2006-06-07  Sven Neumann  <sven@gimp.org>

	* app/tools/gimprectangletool.c
(gimp_rectangle_tool_initialize):
	initialize guide with the option's guide value.
	(gimp_rectangle_tool_notify_guide): always sync with the
option's
	guide value, even when tool->display is NULL.
2006-06-06 22:24:36 +00:00
Karine Delvare 5113488f94 added guide notification.
2006-06-06  Karine Delvare  <edhel@gimp.org>

	* app/tools/gimprectangle.c: added guide notification.
2006-06-06 21:06:06 +00:00
Sven Neumann 73bdbfb43a removed unused variable; other cleanups.
2006-06-06  Sven Neumann  <sven@gimp.org>

	* app/tools/gimprectangletool.c (gimp_rectangle_tool_draw):
removed
	unused variable; other cleanups.
2006-06-06 19:25:53 +00:00
Karine Delvare 0dc6775637 cleanup, moved the guide drawing to a utility function.
2006-06-06  Karine Delvare  <edhel@gimp.org>

	* app/tools/gimprectangletool.c: cleanup, moved the guide drawing
	to a utility function.
2006-06-06 19:14:25 +00:00
Sven Neumann 563af4aea9 minor cleanup.
2006-06-06  Sven Neumann  <sven@gimp.org>

	* app/tools/gimprectangletool.c
	(gimp_rectangle_tool_notify_highlight): minor cleanup.
2006-06-06 18:07:04 +00:00
Michael Natterer b18a520b3f flush the image after changing it.
2006-06-06  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpnewrectselecttool.c
	(gimp_new_rect_select_tool_cancel)
	(gimp_new_rect_select_tool_rectangle_changed): flush the image
	after changing it.

	* app/tools/gimprectangletool.c (gimp_rectangle_tool_halt): don't
	flush it here.
2006-06-06 08:04:49 +00:00
Sven Neumann f50b532494 minor cleanup.
2006-06-06  Sven Neumann  <sven@gimp.org>

	* app/actions/select-commands.c: minor cleanup.
2006-06-06 06:39:40 +00:00
William Skaggs d342691580 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/paint-funcs/scale-funcs.c (scale_region_lanczos):
	fix variable declarations accidentally changed from gdouble
	to gint in revision 1.7; fixes bug #343804.
2006-06-05 22:45:09 +00:00
Michael Natterer 64032cbaca subtract 1 from outlined width/height instead of adding 1 to filled.
2006-06-05  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpdrawtool.c
	(gimp_draw_tool_draw_rectangle_by_anchor)
	(gimp_draw_tool_draw_arc_by_anchor): subtract 1 from outlined
	width/height instead of adding 1 to filled.
2006-06-05 21:39:23 +00:00
Michael Natterer 5e30f2f1d6 use GimpDrawTool API, not GimpCanvas one. Some cleanup.
2006-06-05  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimprectangletool.c (gimp_rectangle_tool_draw): use
	GimpDrawTool API, not GimpCanvas one. Some cleanup.
2006-06-05 20:48:58 +00:00
Sven Neumann fa4427f83a fixed documentation of gimp-selection-sharpen (bug #343911).
2006-06-05  Sven Neumann  <sven@gimp.org>

	* tools/pdbgen/pdb/selection.pdb: fixed documentation of
	gimp-selection-sharpen (bug #343911).

	* libgimp/gimpselection_pdb.c: regenerated.
2006-06-05 20:36:21 +00:00
Sven Neumann 528a5a3691 app/paint-funcs/paint-funcs.[ch] app/core/gimpchannel.[ch]
2006-06-05  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/paint-funcs.[ch]
	* app/core/gimpchannel.[ch]
	* app/core/gimpselection.c:
	* app/actions/select-commands.c: further cleaned up the patch
from
	bug #88633.
2006-06-05 20:19:12 +00:00
Karine Delvare 23f86e93b8 added GimpRectangleGuide enum.
2006-06-05  Karine Delvare  <edhel@gimp.org>

	* app/tools/tools-enums.[ch]: added GimpRectangleGuide enum.

	* app/tools/gimpcropoptions.c
	* app/tools/gimprectangleoptions.[ch]
	* app/tools/gimprectangletool.c: added GimpRectangleGuide option to
	draw guides inside the rectangle. Fixes bug #323669.
2006-06-05 18:50:13 +00:00
Michael Natterer b37478550d Applied slightly modified patch from saulgoode which allows to border a
2006-06-05  Michael Natterer  <mitch@gimp.org>

	Applied slightly modified patch from saulgoode which allows to
	border a selection without feathering. Fixes bug #88633.

	* app/paint-funcs/paint-funcs.[ch] (border_region): added boolean
	"feather_border" parameter.

	* app/core/gimpchannel.[ch]: GimpChannel::border(): ditto.

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

	* app/actions/select-commands.c: added a toggle to the border
	dialog and pass it to gimp_channel_border().

	* tools/pdbgen/pdb/selection.pdb: pass TRUE here.

	* app/pdb/selection_cmds.c: regenerated.
2006-06-05 18:33:49 +00:00
Michael Natterer d2911f6aee removed enum GimpRectangleMode.
2006-06-05  Michael Natterer  <mitch@gimp.org>

	* app/tools/tools-enums.[ch]: removed enum GimpRectangleMode.

	* app/tools/gimprectangletool.[ch]: added virtual function
	GimpRectangleTool::cancel(). Added public wrapper for it. Removed
	coordinates paramaters from gimp_rectangle_tool_execute(). Removed
	gimp_rectangle_tool_response(), need to call either execute() or
	cancel() now. Added gimp_rectangle_tool_halt() which disconnects
	the tool from the display without canceling it.

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

	* app/tools/gimpnewrectselecttool.c: moved the rectangle creating
	code from the execute() implementation to the new function
	gimp_new_rect_select_tool_rect_select(). Added cancel()
	implementation which pops the remembered undo step if
	appropriate. Call the new rect_select() wrapper from
	rectangle_changed() so we don't create the rectangle on both
	button_release *and* execute(), breaking modifiers and stuff.
2006-06-05 17:14:16 +00:00
Sven Neumann 5cb9278d07 connect to "expose-event" with G_SIGNAL_CONNECT_AFTER so that the text is
2006-06-05  Sven Neumann  <sven@gimp.org>

	* app/gui/splash.c (splash_create): connect to "expose-event"
with
	G_SIGNAL_CONNECT_AFTER so that the text is rendered on the
image.
2006-06-05 15:10:05 +00:00
Sven Neumann 4df1b1a5dd added back support for animated splashes but continue to use the optimized
2006-06-05  Sven Neumann  <sven@gimp.org>

	* app/gui/splash.c: added back support for animated splashes but
	continue to use the optimized code for static splash images.
2006-06-05 14:31:28 +00:00
Sven Neumann d74375fd42 simplified further 2006-06-05 13:51:34 +00:00
Sven Neumann ded0516187 app/core/gimp-user-install.[ch] always migrate old user settings during
2006-06-05  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-user-install.[ch]
	* app/app_procs.c: always migrate old user settings during user
	installation.

	* app/dialogs/user-install-dialog.[ch]: don't ask questions and
	only show the dialog in case of an error.
2006-06-05 13:48:57 +00:00
Sven Neumann 84bac48c7c formatting.
2006-06-05  Sven Neumann  <sven@gimp.org>

	* app/tools/gimprectangletool.c: formatting.
2006-06-05 11:18:43 +00:00
William Skaggs 26db965dd5 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/tools/gimprectangletool.c:
	* app/tools/gimpnewrectselecttool.c: enable canceling of
	current action by holding down mouse button 3.
2006-06-04 20:34:46 +00:00
Michael Natterer a787ce388f strcmp() the property name, so we don't change the size on random property
2006-06-04  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpscaletool.c (gimp_scale_tool_size_notify):
	strcmp() the property name, so we don't change the size on random
	property changes. Fixes the tool reverting to the previous
	width/height on each new transform (destroying the previous size
	box causes it to emit stuff like "notify::visible").

	(gimp_scale_tool_prepare): additionally, disconnect from the size
	box before destroying it (paranoia).
2006-06-04 19:27:21 +00:00
William Skaggs 2139012641 ll Skaggs <weskaggs@primate.ucdavis.edu>
* app/tools/gimpnewrectselectoptions.c: turn highlighting
	off by default.
2006-06-04 18:47:11 +00:00
William Skaggs e9e265309d Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/tools/gimprectangletool.c (gimp_rectangle_tool_draw):
	draw anchors in corners; clean up code a bit.

	* app/tools/gimpnewrectselecttool.c: actually remove some code
	previously commented out.
2006-06-04 18:21:56 +00:00