Commit Graph

76 Commits

Author SHA1 Message Date
Michael Natterer 04a7e8585b added new function gimp_statusbar_push_length(), which works exactly like
2004-11-10  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpstatusbar.[ch]: added new function
	gimp_statusbar_push_length(), which works exactly like
	push_coords() but takes only one value plus a GimpOrientationType
	for specifying the value's axis.

	* app/tools/gimptool.[ch]: added the corresponding
	gimp_tool_push_status_length().

	* app/tools/gimpmovetool.c: use gimp_tool_push_status_length()
	so the guide position is shown in the selected display unit.
	Cleaned up the status message code a bit.
2004-11-10 01:17:40 +00:00
Michael Natterer 02b91f6628 app/tools/gimptool.[ch] added boolean return value to
2004-06-24  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptool.[ch]
	* app/tools/tool_manager.[ch]: added boolean return value to
	GimpTool::key_press() which indicates if the event was handled.

	* app/tools/gimpcroptool.c
	* app/tools/gimpeditselectiontool.[ch]
	* app/tools/gimptransformtool.c
	* app/tools/gimpvectortool.c: return TRUE if the key event was handled.

	* app/tools/gimppainttool.c: removed key_press() implementation.

	* app/widgets/Makefile.am
	* app/widgets/widgets-types.h
	* app/widgets/gimpcontrollerkeyboard.[ch]: new controller class
	which takes GdkEventKey and emits controller events for all
	combinations of modifiers and cursor keys.

	* app/widgets/gimpcontrollers.[ch]: added new function
	gimp_controllers_get_keyboard().

	* app/display/gimpdisplayshell-callbacks.c: if a key event was not
	handled by the active tool, dispatch it to the keyboard controller.

	* etc/controllerrc: add a keyboard controller which is configured
	to do the same as the removed gimp_paint_tool_key_press().
2004-06-24 10:16:08 +00:00
Michael Natterer 1082ee6b94 remember the last used GimpCursorFormat so changing the format in prefs
2004-06-14  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplayshell.[ch]: remember the last used
	GimpCursorFormat so changing the format in prefs applies
	instantly, and not after the next tool change.

	* app/display/gimpdisplayshell-cursor.[ch]
	* app/tools/gimptool.[ch]
	* app/tools/gimptoolcontrol.[ch]
	* app/tools/gimpclonetool.c
	* app/tools/gimpcolortool.c
	* app/tools/gimpcroptool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimptransformtool.c: s/GdkCursorType/GimpCursorType/g
2004-06-14 10:19:39 +00:00
Simon Budig 3c1b7fe68f renamed the "arrow_key" member to "key_press", since it is now no longer
2004-06-12  Simon Budig  <simon@gimp.org>

	* app/tools/gimptool.[ch]: renamed the "arrow_key" member
	to "key_press", since it is now no longer about just the arrow
	keys.

	* app/tools/gimpcroptool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpeditselectiontool.h
	* app/tools/gimpmovetool.c
	* app/tools/gimppainttool.c
	* app/tools/gimpselectiontool.c
	* app/tools/gimptexttool.c
	* app/tools/gimpvectortool.c
	* app/tools/tool_manager.c: Changed accordingly.
2004-06-12 18:41:52 +00:00
Sven Neumann dc652db2f5 app/tools/gimpcurvestool.c app/tools/gimpinktool.c print debug output to
2004-03-12  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpcurvestool.c
	* app/tools/gimpinktool.c
	* app/tools/gimptool.c: print debug output to stderr.
2004-03-12 13:50:36 +00:00
Michael Natterer 79e13a1ca0 app/tools/gimpdrawtool.c app/tools/gimpselectiontool.c
2004-03-10  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpdrawtool.c
	* app/tools/gimpselectiontool.c
	* app/tools/gimptool.c
	* app/tools/gimptransformtool.c: minor cleanup.
2004-03-10 12:45:11 +00:00
Michael Natterer 613e328f13 added boolean return value to GimpTool::initialize(). Returning FALSE
2004-01-21  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptool.[ch]: added boolean return value to
	GimpTool::initialize(). Returning FALSE means the tool could not
	be initialized and doesn't want to receive button events.
	Return TRUE from the default implementation.

	* app/tools/tool_manager.[ch]: added boolean return value to
	tool_manager_initialize_active(). Don't set the tool's display or
	drawable if initialize() returns FALSE.

	* app/display/gimpdisplayshell-callbacks.c: don't send button
	events to the tool if initialize() returns FALSE.

	* 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: return FALSE for NULL and indexed
	drawables.

	* app/tools/gimpimagemaptool.c: always return TRUE because our
	subclasses already checked if the active drawable is OK.

	* app/tools/gimptransformtool.c: return FALSE for layers with
	masks. Fixes bug #132089. Some random cleanups.
2004-01-21 16:07:48 +00:00
Michael Natterer b19deeb311 Refactored modifier handling of displays and tools. Hopefully finally
2003-10-14  Michael Natterer  <mitch@gimp.org>

	Refactored modifier handling of displays and tools. Hopefully
	finally fixes bug #124135.

	* app/tools/gimptool.[ch] (struct GimpTool): added private members
	"focus_display" and "modifier_state" so tools are aware of their
	modifier state.

	* app/tools/gimptool.[ch]
	* app/tools/tool_manager.[ch]: removed all public modifier_key()
	API and added set_focus_display() and set_modifier_state()
	instead.

	* app/tools/tool_manager.c (tool_manager_select_tool)
	* app/display/gimpdisplay.c (gimp_display_delete): set the
	active_tool's focus_display to NULL.

	* app/display/gimpdisplayshell.[ch] (struct GimpDisplayShell):
	added almost the whole stuff that used to be static variables of
	gimp_display_shell_tool_events(). Cleaned up the struct a bit.

	* app/display/gimpdisplayshell-callbacks.c: removed utility
	function gimp_display_shell_update_tool_modifiers().

	(gimp_display_shell_tool_events):

	- Replaced all calls to gimp_display_shell_update_tool_modifiers()
	  and tool_manager_modifier_key_active() by
	  tool_manager_modifier_state_active().

	- Call tool_manager_focus_display_active() before setting the
	  tool's modifier_state. Set the tool's focus_display to NULL when
	  we get a focus_out event.

	- Don't grab/ungrab the keyboard twice when <space>-selecting the
	  move tool.

	- Removed most static variables and use the new members of
	  GimpDisplayShell. Don't remember any old modifier states since
	  GimpTool does that by itself now.
2003-10-14 11:14:28 +00:00
Michael Natterer c049f82e59 made "tool-info" a G_PARAM_CONSTRUCT_ONLY property.
2003-08-30  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptool.c: made "tool-info" a G_PARAM_CONSTRUCT_ONLY
	property.

	* app/tools/tool_manager.c (tool_manager_tool_changed): pass it to
	g_object_new() instead of setting it after tool creation.

	* app/tools/gimppainttool.[ch]
	* app/tools/gimptransformtool.[ch]: removed ugly
	"gboolean notify_connected" hacks and connect to the signals in
	GObject::constructor().

	* app/tools/gimppainttool.c (gimp_paint_tool_contstructor): create
	paint_tool->core here from tool->tool_info->paint_info->paint_type.

	* app/tools/gimpairbrushtool.c
	* app/tools/gimpclonetool.c
	* app/tools/gimpconvolvetool.c
	* app/tools/gimpdodgeburntool.c
	* app/tools/gimperasertool.c
	* app/tools/gimppaintbrushtool.c
	* app/tools/gimppenciltool.c
	* app/tools/gimpsmudgetool.c: changed accordingly. Removed lots of
	useless class_init functions. Converted tabs to spaces. Cleanup.
2003-08-30 16:41:35 +00:00
Michael Natterer 5096672060 app/core/gimpbrush.c app/paint/gimppaintcore.c app/tools/gimpcurvestool.c
2003-07-10  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpbrush.c
	* app/paint/gimppaintcore.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimptool.c
	* app/tools/tool_manager.h: removed trailing whitespace.
2003-07-10 12:13:21 +00:00
Michael Natterer f3747dbac2 removed GimpToolState (ACTIVE, INACTIVE).
2003-05-06  Michael Natterer  <mitch@gimp.org>

	* app/tools/tools-enums.[ch]: removed GimpToolState (ACTIVE,
	INACTIVE).

	* app/tools/gimptoolcontrol.[ch]: replaced "GimpToolState state"
	by "gboolean active".

	* app/tools/gimptool.c (gimp_tool_control)
	* app/tools/tool_manager.c (tool_manager_control_active): check
	for gimp_tool_control_is_active() before calling
	gimp_tool_control_halt().
2003-05-06 11:11:15 +00:00
Michael Natterer 1317d1809e added g_return_if_fail (gimp_tool_control_is_active (tool->control)) since
2003-05-06  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptool.c (gimp_tool_motion): added
	g_return_if_fail (gimp_tool_control_is_active (tool->control))
	since that's a basic constraint of tool event handling.

	* app/tools/gimpbezierselecttool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpfreeselecttool.c
	* app/tools/gimpfuzzyselecttool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimpmagnifytool.c
	* app/tools/gimprectselecttool.c (gimp_*_tool_motion):
	removed checks for gimp_tool_control_is_active().
2003-05-06 10:30:34 +00:00
Michael Natterer fefaf61b28 added new function gimp_dialog_factory_add_foreign() which adds a dialog
2003-05-02  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpdialogfactory.[ch]: added new function
	gimp_dialog_factory_add_foreign() which adds a dialog that was not
	created by the factory itself. Its identifier however must be
	registered with the factory. Connect to all toplevel dialogs'
	"configure_event" and remember the resulting window geometry so we
	get session management for *all* dialogs, not only for those which
	were open on exit.

	* app/gui/dialogs.c: added the "File New" dialog. Added foreign
	entries (without constructor) for all dialogs opened by tools.

	* app/gui/dialogs-constructors.[ch]: added a constructor for
	the file_new dialog.

	* app/gui/file-new-dialog.[ch]: renamed file_new_dialog_create()
	to file_new_dialog_new() and removed the gimage and template
	paramaters. Adder new function file_new_dialog_set() to set
	gimage and template after creation.

	* app/gui/file-commands.c
	* app/gui/templates-commands.c: changed accordingly.

	* app/tools/gimpimagemaptool.[ch]
	* app/tools/gimptransformtool.[ch]: added
	"const gchar *shell_identifier" to the tool structs. Register the
	tool dialogs using gimp_dialog_factory_add_foreign().

	* app/tools/gimpbrightnesscontrasttool.c
	* app/tools/gimpcolorbalancetool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimpperspectivetool.c
	* app/tools/gimpposterizetool.c
	* app/tools/gimprotatetool.c
	* app/tools/gimpscaletool.c
	* app/tools/gimpsheartool.c
	* app/tools/gimpthresholdtool.c: set "shell_identifier" so the
	dialogs become session managed. Fixes bug #61091.

	* app/tools/gimpcroptool.c: register the crop dialog with the
	dialog factory. Fixes bug #52849.

	* app/tools/gimpcolorpickertool.c: ditto.

	Unrelated:

	* app/tools/gimptool.c: no need to cast the return value of
	g_object_new().
2003-05-02 18:43:15 +00:00
Michael Natterer 8cee4963fb check for GIMP_IS_DISPLAY(gdisp) again.
2003-04-15  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptool.c: check for GIMP_IS_DISPLAY(gdisp) again.

	* app/tools/gimptool.h: don't #include "gimptoolcontrol.h"

	* app/tools/[all tools].c: #include "gimptoolcontrol.h"
2003-04-15 16:05:52 +00:00
Sven Neumann 0c399e5c93 Removed support for pluggable tools:
2003-04-15  Sven Neumann  <sven@gimp.org>

	Removed support for pluggable tools:

	* configure.in: bumped version number to 1.3.15.

	* Makefile.am
	* libgimpproxy
	* libgimptool
	* plug-ins/Makefile.am
	* plug-ins/plugin-helper
	* plug-ins/tools: removed libgimpproxy, libgimptool and plug-ins
	that used it.

	* tools/Makefile.am
	* tools/gimp-mkproxy: removed tool that used to generate
	libgimpproxy.

	* app/core/core-enums.h
	* app/core/gimpchannel.h
	* app/display/display-types.h
	* app/widgets/widgets-enums.h: removed proxy-skip/resume stuff.

	* app/core/gimpobject.c: use gimp marshallers.

	* app/tools/Makefile.am
	* app/tools/gimptool.h
	* app/tools/tools-enums.[ch]: moved these files back from
	libgimptool.

	* app/tools/gimptool.c
	* app/tools/gimptoolcontrol.h: merged back functionality from
	libgimptool.

	* app/Makefile.am
	* app/display/gimpdisplay.c
	* app/display/gimpdisplayshell-callbacks.c
	* app/gui/tools-commands.c
	* app/tools/gimpairbrushtool.c
	* app/tools/gimpbucketfilltool.h
	* app/tools/gimpdrawtool.h
	* app/tools/gimpimagemaptool.h
	* app/tools/gimpinktool.h
	* app/tools/gimptoolmodule.c
	* app/tools/tool_manager.c
	* app/tools/tools-types.h
	* app/tools/tools.c
	* tools/pdbgen/Makefile.am: changed accordingly.
2003-04-15 14:20:19 +00:00
Sven Neumann ec6c98656e bumped the version number to 1.3.12.
2003-01-03  Sven Neumann  <sven@gimp.org>

	* configure.in: bumped the version number to 1.3.12.

	* app/display/Makefile.am
	* app/display/gimpdisplayshell-cursor.[ch]
	* app/display/gimpdisplayshell-title.[ch]
	* app/display/gimpdisplayshell-transform.[ch]: new files with code
	that used to live in gimpdisplayshell.c.

	* app/display/gimpdisplay-foreach.c
	* app/display/gimpdisplay.c
	* app/display/gimpdisplayshell-callbacks.c
	* app/display/gimpdisplayshell-handlers.c
	* app/display/gimpdisplayshell-selection.c
	* app/display/gimpdisplayshell.[ch]
	* app/tools/gimpbezierselecttool.c
	* app/tools/gimpcroptool.c
	* app/tools/gimpdrawtool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpfuzzyselecttool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimptool.c: changed accordingly.
2003-01-03 18:01:30 +00:00
Michael Natterer ef3f572af4 don't set paused_count to 0.
2003-01-03  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptoolcontrol.c (gimp_tool_control_halt): don't
	set paused_count to 0.

	* app/tools/gimpblendtool.c
	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpbycolorselecttool.c
	* app/tools/gimpcolorpickertool.c
	* app/tools/gimpcroptool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpfreeselecttool.c
	* app/tools/gimpfuzzyselecttool.c
	* app/tools/gimpinktool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimpmagnifytool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimppainttool.c
	* app/tools/gimppathtool.c
	* app/tools/gimprectselecttool.c
	* app/tools/gimptexttool.c
	* app/tools/gimptool.c
	* app/tools/gimptransformtool.c
	* app/tools/gimpvectortool.c
	* app/tools/tool_manager.c: removed comments about doing so.
2003-01-03 13:59:23 +00:00
Sven Neumann 84e1810adc app/tools/gimpairbrushtool.[ch] app/tools/gimpbezierselecttool.[ch]
2002-05-03  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpairbrushtool.[ch]
	* app/tools/gimpbezierselecttool.[ch]
	* app/tools/gimpblendtool.[ch]
	* app/tools/gimpbrightnesscontrasttool.[ch]
	* app/tools/gimpbucketfilltool[.ch]
	* app/tools/gimpbycolorselecttool[.ch]
	* app/tools/gimpclonetool[.ch]
	* app/tools/gimpcolorbalancetool[.ch]
	* app/tools/gimpcolorpickertool[.ch]
	* app/tools/gimpconvolvetool[.ch]
	* app/tools/gimpcroptool[.ch]
	* app/tools/gimpcurvestool[.ch]
	* app/tools/gimpdodgeburntool[.ch]
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpellipseselecttool[.ch]
	* app/tools/gimperasertool[.ch]
	* app/tools/gimpfliptool[.ch]
	* app/tools/gimpfreeselecttool[.ch]
	* app/tools/gimpfuzzyselecttool[.ch]
	* app/tools/gimphistogramtool[.ch]
	* app/tools/gimphuesaturationtool[.ch]
	* app/tools/gimpinktool[.ch]
	* app/tools/gimpiscissorstool[.ch]
	* app/tools/gimplevelstool[.ch]
	* app/tools/gimpmagnifytool[.ch]
	* app/tools/gimpmeasuretool[.ch]
	* app/tools/gimpmovetool[.ch]
	* app/tools/gimppaintbrushtool[.ch]
	* app/tools/gimppainttool.c
	* app/tools/gimppathtool[.ch]
	* app/tools/gimppenciltool[.ch]
	* app/tools/gimpperspectivetool[.ch]
	* app/tools/gimpposterizetool[.ch]
	* app/tools/gimprectselecttool[.ch]
	* app/tools/gimprotatetool[.ch]
	* app/tools/gimpscaletool[.ch]
	* app/tools/gimpselectiontool.c
	* app/tools/gimpsheartool[.ch]
	* app/tools/gimpsmudgetool[.ch]
	* app/tools/gimptexttool[.ch]
	* app/tools/gimpthresholdtool[.ch]
	* app/tools/gimptool.c
	* app/tools/gimptoolcontrol.h
	* app/tools/gimptoolmodule[.ch]
	* app/tools/gimptransformtool.c
	* app/tools/gimpvectortool[.ch]
	* app/tools/path_tool.c
	* app/tools/tool_manager[.ch]
	* app/tools/tools.c
	* libgimptool/gimptool.c
	* libgimptool/gimptoolcontrol.h
	* libgimptool/gimptoolmodule.h: removed tons of warnings. Do we need
	to add -Werror to the CFLAGS to avoid such a mess in the future ?!
	Also had to enforce the GIMP coding style in lots of places :-(

	* libgimp/gimppixelrgn.c: got sick and tired of debugging plug-ins,
	so I've added checks for most parameters passed to the GimpPixelRgn
	functions. This will slow down plug-in execution a little bit but
	should help to find bugs early.
2002-05-03 11:31:08 +00:00
Nate Summers 69ccb4d370 massive tool plugin changes 2002-03-29 03:50:29 +00:00
Michael Natterer 3ff5cee9fb added enum GimpMotionMode which can be one of { EXACT, HINT, COMPRESS }.
2002-03-19  Michael Natterer  <mitch@gimp.org>

	* app/tools/tools-types.h: added enum GimpMotionMode which can be
	one of { EXACT, HINT, COMPRESS }.

	* app/tools/gimptool.[ch]: removed tool->perfectmouse and added
	tool->motion_mode. Default to GIMP_MOTION_MODE_HINT.

	* app/tools/gimpinktool.c
	* app/tools/gimppainttool.c: set GIMP_MOTION_MODE_EXACT.

	* app/tools/gimpfuzzyselecttool.c: set GIMP_MOTION_MODE_COMPRESS.

	* app/tools/gimpeditselectiontool.[ch]: ditto. Removed
	gtkutil_compress_motion().

	* app/display/gimpdisplayshell-callbacks.c: look at
	active_tool->motion_mode and perform pointer grabbing and motion
	compression accordingly. Also, don't request motion hints from
	XInput devices because the wacom driver sends crap (fixes #6901).
	This change also brings hints and ordinary motions back in sync
	albeit compression, so IMHO it also fixes #68542 and #22375, but
	this needs further investigation.
2002-03-19 13:14:25 +00:00
Michael Natterer bec4c72534 app/tools/tools-types.h chain up unconditionally in control(),
2002-02-18  Michael Natterer  <mitch@gimp.org>

	* app/tools/tools-types.h
	* app/tools/*.[ch]: chain up unconditionally in control(),
	s/ToolAction/GimpToolAction/g, s/ToolState/GimpToolState/g.

	* app/tools/gimpbezierselecttool.c
	* app/tools/gimpinktool.c
	* app/tools/gimppainttool.c: don't touch tool->paused_count
	(setting it to 0 was a hack which should no longer be needed).

	* app/tools/gimpdrawtool.c: check if the draw tool has actually
	been started (draw_tool->gdisp != NULL) before calling it's
	draw() function.

	* app/tools/tool_manager.c: simplified tool_manager_control_active():
	simply call gimp_tool_control() if gdisp == tool->gdisp.

	* app/tools/gimptool.[ch]: gimp_tool_control(): do all the PAUSE,
	RESUME and HALT voodoo here.

	* app/tools/gimppainttool.c: implemented #9902 (Drawing straight
	lines does not work between different views). It's an evil hack,
	but clearly marked in the source.
2002-02-18 17:00:09 +00:00
Michael Natterer 758de05b72 made the gimp_object_get_memsize() debugging output configurable by a
2002-02-06  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpobject.c: made the gimp_object_get_memsize()
	debugging output configurable by a global "gimp_debug_memsize"
	boolean.

	* app/display/gimpdisplay.c: removed duplicated prototype.

	* app/display/gimpdisplayshell.[ch]: renamed the various cursor
	functions to be more consistent and shorter. Compress window title
	updates by adding a "gboolean title_dirty" and updating the title
	in gimp_display_shell_flush().  Added "%m" (memory size) to the
	possible title string substitutions.

	* app/display/gimpdisplay-foreach.c
	* app/display/gimpdisplayshell-handlers.c
	* app/tools/gimpfuzzyselecttool.c
	* app/tools/gimptool.c: changed accordingly.

	* app/display/gimpdisplayshell-callbacks.c: forgot to grab the
	pointer when dragging guides from the rulers. Coincidentially,
	this also fixes the buggy offset between guide and mouse
	pointer...
	Cleaned up the main tool event callback a but more.

	* app/widgets/gimppreview.c
	* app/gui/commands.c: set the new global "gimp_debug_memsize"
	toggle to TRUE while calling gimp_object_get_memsize().

	* app/gui/preferences-dialog.c: added a image title example
	containing the new "%m" feature.

	* docs/gimprc-1.3.5.in: document "%m" in the manpage.

	* app/tools/gimpbezierselecttool.c: reordered some statements.

	* app/tools/gimpdrawtool.[ch]: store the GimpDisplay passed to
	gimp_draw_tool_start() in draw_tool->gdisp and use it for
	coordinate transfomration. This way we can paint on a display
	which is not tool->gdisp.

	* app/tools/gimppainttool.c: changed the gimp_draw_tool_foo()
	calls needed to make the straight_line preview work in a way
	that does not interfere with paint_tool subclasses which want
	to do their own drawing (like the clone tool).

	Also changed the paint_tools PRETRACE_PAINT and POSTTRACE_PAINT
	flags usage in a way that subclasses can use them without major
	hackery: don't simply wrap gimp_display_flush_now() with
	PRETRACE/POSTTRACE calls, but wrap the actual painting calls, so
	subclasses are able to do useful things with paint_tool->*_coords.

	* app/tools/gimpclonetool.c: removed poking around in draw_tool
	internals and simply suspend()/resume() it in
	PRETRACE_PAINT/POSTTRACE_PAINT to get the clone_src indicator
	drawn correctly.
2002-02-07 11:33:01 +00:00
Michael Natterer 967d3e4ef1 Removed pointer grabbing from all tools:
2002-02-05  Michael Natterer  <mitch@gimp.org>

	Removed pointer grabbing from all tools:

	* app/tools/gimptool.[ch]: added "gboolean perfectmouse" which
	defaults to FALSE but can be set to TRUE in a tool's instance_init
	function.

	* app/display/gimpdisplayshell-callbacks.c: look at
	active_tool->perfectmouse and gimprc.perfectmouse and do the
	pointer grab/ungrab here. The pointer is now grabbed right before
	dispatching the button_press to the tool and ungrabbed after
	the tool's button_release has returned. It is also grabbed
	*always*, not only if tool->state got ACTIVE by button_press,
	which makes it all much simpler...

	* app/tools/gimpbezierselecttool.c
	* app/tools/gimpblendtool.c
	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpbycolorselecttool.c
	* app/tools/gimpclonetool.c
	* app/tools/gimpcolorpickertool.c
	* app/tools/gimpcroptool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpfliptool.c
	* app/tools/gimpfreeselecttool.c
	* app/tools/gimpfuzzyselecttool.c
	* app/tools/gimpinktool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimpmagnifytool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimppainttool.c
	* app/tools/gimppathtool.c
	* app/tools/gimprectselecttool.c
	* app/tools/gimpselectiontool.c
	* app/tools/gimptexttool.c
	* app/tools/gimptransformtool.c: removed
	gdk_pointer_grab()/ungrab() calls all over the place. Also removed
	inclusion of "display/gimpdisplayshell.h" from most of them.
2002-02-05 11:35:03 +00:00
Michael Natterer 989d80e79e added fields for both the tool's toggled and untoggled GdkCursorType,
2002-02-04  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptool.[ch]: added fields for both the tool's
	toggled and untoggled GdkCursorType, GimpToolCursorType and
	GimpCursorModifier. Added a default implementation of
	gimp_tool_cursor_update() which uses the new fields. Added
	gimp_tool_set_cursor() as simple wrapper around the resp.
	GimpDisplayShell functions so tools don't need to know them.

	Tool implementations can either set the new fields in their
	cursor_update() function and chain up or call the new wrapper.

	* app/tools/gimpbezierselecttool.c
	* app/tools/gimpblendtool.c
	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpbycolorselecttool.c
	* app/tools/gimpclonetool.c
	* app/tools/gimpcolorpickertool.c
	* app/tools/gimpconvolvetool.c
	* app/tools/gimpcroptool.c
	* app/tools/gimpdodgeburntool.c
	* app/tools/gimperasertool.c
	* app/tools/gimpfliptool.c
	* app/tools/gimpinktool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimpmagnifytool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimppainttool.[ch]
	* app/tools/gimppathtool.c
	* app/tools/gimpselectiontool.c
	* app/tools/gimpsmudgetool.c
	* app/tools/gimptexttool.c
	* app/tools/gimptransformtool.c: changed accordingly:

	- set default values in the tools' instance_init functions.
	- changed the cursor_update() stuff.
	- removed inclusion of subclasses in gimppainttool.c
	- the cursor_update() functions are better than before but still evil.
	- i probably broke some of them...
2002-02-04 17:43:01 +00:00
Michael Natterer 0440bbbf5a app/display/Makefile.am app/display/display-types.h new widget derived
2002-02-03  Michael Natterer  <mitch@gimp.org>

	* app/display/Makefile.am
	* app/display/display-types.h
	* app/display/gimpstatusbar.[ch]: new widget derived from
	GtkStatusbar.  Contains the coordinates display, a progress bar
	which is also used for status message display and a cancel button.
	Added a simplified API for pushing/popping messages which takes a
	string as context_id and does the conversion to guint internally
	on each call.

	* app/display/gimpdisplayshell.[ch]: removed the status bar code.

	* app/display/gimpdisplayshell-callbacks.c
	* app/display/gimpdisplayshell-handlers.c
	* app/display/gimpdisplayshell-scale.c
	* app/gui/view-commands.c
	* app/gimpprogress.c: changed accordingly.

	Removed knowledge about GimpDisplayShell from tools:

	* app/tools/gimptool.[ch]: added gimp_tool_push_status() and
	gimp_tool_pop_status() so tools don't need to fiddle with
	display details.

	* app/tools/gimpdrawtool.[ch]: pass a GimpDisplay instead of
	a GdkWindow to gimp_draw_tool_start() (the window passed was
	always gdisp->shell->canvas->window).

	* app/tools/gimpbezierselecttool.c
	* app/tools/gimpblendtool.[ch]
	* app/tools/gimpclonetool.c
	* app/tools/gimpcolorpickertool.c
	* app/tools/gimpcroptool.[ch]
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpfreeselecttool.c
	* app/tools/gimpfuzzyselecttool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimpmagnifytool.c
	* app/tools/gimpmeasuretool.[ch]
	* app/tools/gimpmovetool.c
	* app/tools/gimppainttool.[ch]
	* app/tools/gimppathtool.c
	* app/tools/gimprectselecttool.[ch]
	* app/tools/gimptransformtool.c: changed accordingly:

	- pass GimpDisplay to gimp_draw_tool_start().
	- use GimpTool's new status push/pop functions.
	- removed the statusbar context_id from all tool structs.

	* app/gui/dialogs-constructors.[ch]: a bit cleanup in preparation
	of dockable editor dialogs.
2002-02-03 12:10:23 +00:00
Michael Natterer bf6e5a4b9d replaced the QMask radio buttons ba a single check button. Still needs
2001-11-29  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplayshell.[ch]: replaced the QMask radio
	buttons ba a single check button. Still needs some tuning.

	* app/display/gimpdisplayshell-handlers.c
	* app/display/gimpdisplayshell-qmask.[ch]: changed accordingly.

	* app/tools/gimptool.[ch]: added "gboolean handle_empty_image" to
	the GimpTool structure.

	* app/tools/gimpmovetool.c: set it to TRUE.

	* app/tools/gimpfuzzyselecttool.c: don't gimp_[set|unset]_busy()
	while calculating the selection but set the busy cursor on the
	display manually (we have the pointer grabbed anyway).

	* app/display/gimpdisplayshell-callbacks.c: don't check for
	GIMP_IS_MODE_TOOL(active_tool) but look at
	active_tool->handle_empty_image. Removed the checks for
	GIMP_IS_FUZZY_SELECT_TOOL(active_tool) because fuzzy_select
	doesn't set GIMP busy while it's active any more.

	* app/tools/transform_options.[ch]
	* app/tools/gimptransformtool.c
	* app/tools/gimprotatetool.c
	* app/tools/gimpscaletool.c: added widgets for the transform tools'
	constraints (one more #51108 issue fixed).

	* app/tools/gimperasertool.c: cosmetic.

	* app/widgets/gimpdockbook.c: don't hardcode GtkNotebook's
	tab_border to 0 but add a style property for it...

	* themes/Default/gtkrc: ...and set it to 0 here.
2001-11-29 16:44:51 +00:00
Michael Natterer 9ceb205cec app/tools/gimpdrawtool.[ch] app/tools/gimppainttool.[ch]
2001-11-20  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpdrawtool.[ch]
	* app/tools/gimppainttool.[ch]
	* app/tools/gimprectselecttool.[ch]
	* app/tools/gimptool.[ch]
	* app/tools/gimptransformtool.[ch]: use simple virtual functions
	instead of signals for all tools because they are much faster and
	don't need to be signals at all.
2001-11-20 14:20:17 +00:00
Michael Natterer 02fde14c95 build display/ before tools/.
2001-11-08  Michael Natterer  <mitch@gimp.org>

	* app/Makefile.am: build display/ before tools/.

	* app/devices.c: devices_check_change(): added all events
	which have a GdkDevice pointer.

	* app/gimpprogress.c: include "display-types.h" instead of
	"core-types.h".

	* app/core/Makefile.am
	* app/core/gimpdrawable-bucket-fill.[ch]: new files: the bucket_fill
	stuff taken from tools/gimpbucketfilltool.[ch].

	* app/core/core-types.h: added "BucketFillMode".

	* app/core/gimpimage-mask-select.[ch]: cleanup.

	* app/core/gimpmarshal.list: added more marshallers for GimpTool's
	new signal signatures.

	* app/core/gimpmarshal.[ch]: regenerated.

	* app/display/Makefile.am
	* app/display/gimpdisplayshell-dnd.[ch]
	* app/display/gimpdisplayshell-layer-select.[ch]: new files: the
	canvas drop callbacks from gimpdisplayshell-callbacks.[ch] and
	the stuff formerly knows as gui/layer-select.[ch].

	* app/display/gimpdisplay.h: don't include "gui/gui-types.h".

	* app/display/gximage.c: include "display-types.h".

	* app/display/gimpdisplay-foreach.c
	* app/display/gimpdisplayshell.[ch]: call gdsplay_delete(), don't
	destroy the shell widget.

	* app/gui/Makefile.am
	* app/gui/layer-select.[ch]: removed.

	* app/gui/gradients-commands.c: fixed "Save as POV" fprintf()s.

	* app/gui/preferences-dialog.c: removed the layer_select stuff
	because it is useless with the new preview system.

	* app/gui/tool-options-dialog.c: send the correct data to the
	close_callback.

	* app/gui/tools-commands.c: changed to follow the new
	gimp_tool_initialize() semantics (see below).

	Tool & canvas event handling chainsawing:

	* app/tools/tools-types.h: new struct GimpCoords which contains
	x, y, pressure, tilt etc.

	* app/display/gimpdisplayshell-callbacks.[ch]: added utility
	functions which transparently retreive the current event's
	GimpCoords or take it from the device directly if the event has
	none. Pass GimpCoords _in_image_coordinates_ to all tool
	functions.

	Most important: don't pass GdkEvents and display coordinates to
	tools any more.

	* app/tools/gimptool.[ch]: changed virtual functions to take
	GimpCoords, time and state separately instead of GdkEvents.

	* app/tools/gimpbezierselecttool.c
	* app/tools/gimpblendtool.c
	* app/tools/gimpbucketfilltool.[ch]
	* app/tools/gimpbycolorselecttool.c
	* app/tools/gimpclonetool.c
	* app/tools/gimpcolorpickertool.c
	* app/tools/gimpconvolvetool.c
	* app/tools/gimpcroptool.[ch]
	* app/tools/gimpcurvestool.c
	* app/tools/gimpdodgeburntool.c
	* app/tools/gimpdrawtool.c
	* app/tools/gimpeditselectiontool.[ch]
	* app/tools/gimperasertool.c
	* app/tools/gimpfliptool.c
	* app/tools/gimpfreeselecttool.[ch]
	* app/tools/gimpfuzzyselecttool.c
	* app/tools/gimpinktool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimpmagnifytool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimppainttool.c
	* app/tools/gimppathtool.[ch]
	* app/tools/gimprectselecttool.c
	* app/tools/gimprotatetool.c
	* app/tools/gimpselectiontool.[ch]
	* app/tools/gimpsmudgetool.c
	* app/tools/gimptexttool.c
	* app/tools/gimptransformtool.[ch]
	* app/tools/path_tool.[ch]
	* app/tools/selection_options.c: tons and tons of changes:

	- changed to use the new virtual function parameters.
	- removed zillions of gdisplay_untransform_coords().
	- get the active drawable's offsets manually in many cases.
	  (questionable, but IMHO ok because it's obvious and not simply a
	  "TRUE" passed to some function)
	- reordered some functions to be consistent across tools.
	- some tools had to be changed to work on image coords, not
	  display ones (esp. crop).
	- fixed strange rotate tool behaviour which should be backported
	  to stable.
	- some stuff i came across.
	- indentation and other paranoia.
	- rounding of coordinated may be broken in some tools.
	- new bugs guaranteed.

	* app/tools/tool_manager.[ch]: new semantic of
	tool_manager_initialize_active() (looked at the places where it
	was used from and put common code together). Should be a bit
	better now :)

	* app/tools/gimpblendtool.c
	* app/tools/transform_options.c: use the new GTK+ feature that a
	widget (toggle button) can be a frame's title for this tools' tool
	options.

	* app/widgets/widgets-types.h: stuff.

	* themes/Default/gtkrc: s/GtkDialog/GimpDialog/.

	* tools/pdbgen/Makefile.am: don't scan tools/gimpbucketfilltool.h
	any more.

	* tools/pdbgen/enums.pl: regenerated.

	* tools/pdbgen/pdb/tools.pdb: changed bucket_fill wrapper.

	* app/pdb/tools_cmds.c: regenerated.
2001-11-08 19:14:51 +00:00
Michael Natterer cbce339039 fscking broken pipe... 2001-10-31 21:20:09 +00:00
Michael Natterer 18dd072836 app/gimpprogress.[ch] s/GDisplay/GimpDisplay/
2001-10-16  Michael Natterer  <mitch@gimp.org>

	* app/gimpprogress.[ch]
	* app/undo.c: s/GDisplay/GimpDisplay/

	* app/plug_in.[ch]: removed unused boolean "destroy" field of
	the PlugIn struct.

	* app/core/gimpedit.c: don't include "app_procs.h"

	* app/display/gimpdisplay-callbacks.c: moved the "grab_abd_scroll"
	stuff from gimpdisplay-scroll.* here (less complicated and easier
	to cleanup...)

	* app/display/gimpdisplay-scroll.[ch]: removed here.

	* app/display/gimpdisplay-render.[ch]
	* app/display/gimpdisplay-selection.[ch]
	* app/display/gimpdisplayshell.c: s/GDisplay/GimpDisplay/g

	* app/display/gimpdisplay.[ch]: ditto, removed gdisplay_active()
	which was just a wrapper around
	"gimp_context_get_display (gimp_get_user_context (the_gimp))"
	(which is more to type but makes the use of the global
	"the_gimp" variable more obvious).

	* app/gui/color-area.h
	* app/gui/edit-commands.c
	* app/gui/file-commands.c
	* app/gui/file-dialog-utils.c
	* app/gui/image-commands.c
	* app/gui/info-window.h
	* app/gui/paths-dialog.h
	* app/gui/select-commands.c
	* app/gui/tool-options-dialog.c
	* app/gui/tools-commands.c
	* app/gui/view-commands.c: s/GDisplay/GimpDisplay/, gdisplay_active()
	removal, include "app_procs.h" for "the_gimp".

	* app/tools/gimpbezierselecttool.h
	* app/tools/gimpbrightnesscontrasttool.[ch]
	* app/tools/gimpbycolorselecttool.c
	* app/tools/gimpcolorbalancetool.[ch]
	* app/tools/gimpcurvestool.[ch]
	* app/tools/gimpeditselectiontool.h
	* app/tools/gimphistogramtool.[ch]
	* app/tools/gimphuesaturationtool.[ch]
	* app/tools/gimplevelstool.[ch]
	* app/tools/gimpmovetool.h
	* app/tools/gimpperspectivetool.h
	* app/tools/gimpposterizetool.[ch]
	* app/tools/gimprotatetool.h
	* app/tools/gimpscaletool.h
	* app/tools/gimpsheartool.h
	* app/tools/gimptexttool.h
	* app/tools/gimpthresholdtool.[ch]
	* app/tools/gimptool.[ch]
	* app/tools/gimptransformtool.h
	* app/tools/tool_manager.[ch]: lots of s/GDisplay/GimpDisplay/, made
	all *_dialog_hide() functions private, cleanup.

	* app/widgets/*: removed GtkType and gtk_type_* stuff entirely and
	use GObject functions, removed lots of empty "destroy" methods and
	use more type checking class cast macros instead of casting
	directly.

	* app/widgets/gimpcontainermenu.c: fixed item insert order.

	* app/widgets/gimphistogramview.[ch]: cleaned up and renamed all
	functions.

	* app/widgets/gimpwidgets-utils.[ch]: removed gimp_dialog_hide() as
	Gtk+ does the right thing (TM) now.

	* tools/pdbgen/pdb/color.pdb: implemented "histogram" without
	digging into tools/ and widgets/ (needs to be done for all
	color PDB functions).

	* tools/pdbgen/pdb/gimprc.pdb: no need to use "the_gimp" in a PDB
	function as a "Gimp" pointer is passed to them all.

	* tools/pdbgen/pdb/image.pdb: don't include "app_procs.h"

	* app/pdb/color_cmds.c
	* app/pdb/gimprc_cmds.c
	* app/pdb/image_cmds.c: regenerated.

	* app/pdb/procedural_db.c: don't include "app_procs.h"
2001-10-17 11:33:43 +00:00
Michael Natterer f235eabbf1 app/Makefile.am app/disp_callbacks.[ch] app/gdisplay.[ch]
2001-09-26  Michael Natterer  <mitch@gimp.org>

	* app/Makefile.am
	* app/disp_callbacks.[ch]
	* app/gdisplay.[ch]
	* app/gdisplay_ops.[ch]
	* app/gximage.[ch]
	* app/image_render.[ch]
	* app/interface.[ch]
	* app/marching_ants.h
	* app/scale.[ch]
	* app/scroll.[ch]
	* app/selection.[ch]: removed.

	* app/display/Makefile.am
	* app/display/display-types.h
	* app/display/gimpdisplay-callbacks.[ch]
	* app/display/gimpdisplay-marching-ants.h
	* app/display/gimpdisplay-ops.[ch]
	* app/display/gimpdisplay-render.[ch]
	* app/display/gimpdisplay-scale.[ch]
	* app/display/gimpdisplay-scroll.[ch]
	* app/display/gimpdisplay-selection.[ch]
	* app/display/gimpdisplay.[ch]
	* app/display/gimpdisplayshell.[ch]
	* app/display/gximage.[ch]: added here.

	* app/[many files]
	* app/gui/[many files]
	* app/tools/*
	* app/widgets/[many files]: changed accordingly. Still very
	incomplete separation of the display stuff but it at least
	compiles.

	* tools/pdbgen/pdb.pl:
	* tools/pdbgen/pdb/display.pdb: s/GDisplay/GimpDisplay/,
	s/"gdisplay.h"/"display/gimpdisplay.h"/.

	* app/pdb/display_cmds.c: regenerated.
2001-09-25 23:23:09 +00:00
Michael Natterer 667d8626eb app/tools/gimptool.[ch] removed all *_get_PDB_string() functions and
2001-08-15  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptool.[ch]
	* app/tools/tool_manager.[ch]: removed all *_get_PDB_string()
	functions and GimpToolClass' "pdb_string" field as this info is
	stored independent from a specific tool instance in GimpToolInfo

	* app/tools/gimpbezierselecttool.c: use GimpToolInfo's "pdb_string".
2001-08-14 22:28:25 +00:00
Michael Natterer e2daae315b an evil temp_hack which lets GimpContext managing the active display
2001-08-14  Michael Natterer  <mitch@gimp.org>

	* app/gdisplay.h: an evil temp_hack which lets GimpContext managing
	the active display withoug including "gdisplay.h". Will go away as
	soon ad context properties are registered dynamically.

	* app/module_db.c: cleaned up the object code in preparation of
	moving it to core/.

	* app/path.c: connect to GimpImage's

	* app/core/gimpobject.[ch]: derive it from GObject, not from
	GtkObject any more (yeah :-)

	* app/core/*.c: #include <glib-object.h> instead of <gtk/gtk.h>,
	removed some remaining GtkObject-isms.

	(left in a few #include <gtk/gtk.h> where bigger changes are needed
	to get rid of the UI dependency).

	* app/core/core-types.h: #include <gdk-pixbuf/gdk-pixbuf.h> here
	temporarily.

	* app/core/gimp.c (gimp_create_display): unref the image after
	creating it's first display.

	* app/core/gimpbrush.[ch]: disabled the parts of the code which
	depend on GimpPaintTool.

	* app/core/gimpbrushgenerated.c
	* app/core/gimpbrushpipe.c: changed accordingly.

	* app/core/gimpcontext.[ch]: evil hack (see above) to manage the
	active display without including "gdisplay.h"

	* app/core/gimpimage-mask.[ch]: pass a context to
	gimage_mask_stroke() and get the current tool's PDB string from
	there.

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

	* app/core/gimpimage.c: use gimp_image_update() instead of
	gdisplays_update_full().

	* app/gui/color-area.c
	* app/gui/colormap-dialog.c
	* app/gui/dialogs-constructors.c
	* app/gui/edit-commands.c
	* app/gui/image-commands.c
	* app/gui/toolbox.c: changed accordingly (don't use Gtk methods on
	GObjects).

	* app/gui/menus.c: fix some const warnings by explicit casting.

	* app/tools/*.[ch]: ported all tools to GObject, some minor
	cleanup while i was on it.

	* app/widgets/gimpdialogfactory.[ch]: ported to GObject.

	* app/widgets/gimplayerlistview.h: added FOO_GET_CLASS() macro.

	* tools/pdbgen/app.pl: added a "widgets_eek" hack like "tools_eek"
	which inserts #include "widgets/widgets-types.h" before ordinary
	includes.

	* tools/pdbgen/pdb/brush_select.pdb
	* tools/pdbgen/pdb/edit.pdb
	* app/pdb/brush_select_cmds.c
	* app/pdb/edit_cmds.c: changed according to the stuff above.
2001-08-14 14:53:55 +00:00
Sven Neumann f5cfbd50da app/nav_window.c app/user_install.c app/pdb/color_cmds.c
2001-07-25  Sven Neumann  <sven@gimp.org>

	* app/nav_window.c
	* app/user_install.c
	* app/pdb/color_cmds.c
	* app/pdb/selection_cmds.c
	* app/tools/gimpbezierselecttool.c
	* app/tools/gimpblendtool.c
	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpbycolorselecttool.c
	* app/tools/gimpclonetool.c
	* app/tools/gimpcolorpickertool.c
	* app/tools/gimpdrawtool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpellipseselecttool.c
	* app/tools/gimpfreeselecttool.c
	* app/tools/gimpfuzzyselecttool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimppainttool.c
	* app/tools/gimprectselecttool.c
	* app/tools/gimptexttool.c
	* app/tools/gimptool.c
	* app/tools/paint_options.c
	* app/tools/selection_options.c
	* app/tools/tool_manager.c
	* app/tools/transform_options.c
	* app/widgets/gimpdnd.c
	* tools/pdbgen/pdb/color.pdb
	* tools/pdbgen/pdb/selection.pdb: use GObject functions.
2001-07-25 00:27:41 +00:00
Michael Natterer 06b16890ba Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
2001-07-24  Michael Natterer  <mitch@gimp.org>

	Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)

	* configure.in: require glib/gtk+ >= 1.3.7, commented out the
	gtkxmhtml stuff.

	From now on, you will need glib, pango, atk and gtk+ HEAD from CVS
	to hack or use GIMP HEAD.

	Beware, it crashes randomly :)

	* app/core/Makefile.am
	* app/core/gimpmarshal.list: new file plus rules to generate
	gimpmarshal.[ch] from it.

	* app/core/*
	* app/tools/*
	* app/widgets/*
	* libgimpwidgets/*: started to use the glib object system. All
	core/ objects are still gtk objects however. All signals are
	created using g_signal_new(). There are many gtk+ artefacts left.
	Finally, we will _not_ use the gtk_signal_foo() wrappers and
	friends any more.

	* app/colormaps.c
	* app/devices.[ch]
	* app/disp_callbacks.c
	* app/errorconsole.c
	* app/file-save.[ch]
	* app/interface.c
	* app/module_db.c
	* app/nav_window.c
	* app/ops_buttons.c
	* app/scroll.c
	* app/user_install.c
	* app/gui/about-dialog.c
	* app/gui/brush-editor.c
	* app/gui/brushes-commands.c
	* app/gui/color-notebook.c
	* app/gui/colormap-dialog.c
	* app/gui/dialogs-commands.c
	* app/gui/dialogs-constructors.c
	* app/gui/file-commands.c
	* app/gui/file-dialog-utils.c
	* app/gui/file-new-dialog.c
	* app/gui/file-open-dialog.[ch]
	* app/gui/file-save-dialog.c
	* app/gui/gradient-editor.c
	* app/gui/gradients-commands.c
	* app/gui/image-commands.c
	* app/gui/info-dialog.[ch]
	* app/gui/layer-select.c
	* app/gui/layers-commands.c
	* app/gui/menus.c
	* app/gui/offset-dialog.c
	* app/gui/palette-editor.c
	* app/gui/palettes-commands.c
	* app/gui/patterns-commands.c
	* app/gui/preferences-dialog.c
	* app/gui/resize-dialog.[ch]
	* app/gui/splash.c
	* app/gui/tips-dialog.c
	* app/gui/tool-options-dialog.c
	* app/gui/toolbox.c
	* app/gui/tools-commands.c
	* libgimp/gimpbrushmenu.c
	* libgimp/gimpmenu.c
	* libgimp/gimppatternmenu.c
	* libgimp/gimpui.c
	* libgimpbase/gimpenv.c: tons and tons of changes like "const
	gchar*", switch from GdkDeviceInfo to GdkDevice (very incomplete
	and currently disables), lots of s/gtk_signal/g_signal/,
	removal/replacement of deprecated stuff,
	s/GtkSignalFunc/GCallback/ and lots of small changes and fixes
	while I was on it, zillions of warnings left...

	* modules/Makefile.am: disabled the water color selector
	temporarily (XInput issues).

	* plug-ins/Makefile.am
	* plug-ins/common/.cvsignore
	* plug-ins/common/Makefile.am
	* plug-ins/common/plugin-defs.pl: simply excluded all plug-ins
	which did not build (including Script-Fu). They are trivial to
	fix.
2001-07-24 21:27:11 +00:00
Michael Natterer b70ee4b76d put all tool_manager variables into a struct which is attached to a
2001-07-07  Michael Natterer  <mitch@gimp.org>

	* app/tools/tool_manager.[ch]: put all tool_manager variables into
	a struct which is attached to a "Gimp". Pass a Gimp* to all
	tool_manager functions.

	* app/disp_callbacks.c
	* app/gdisplay.c
	* app/gimage.c
	* app/scale.c
	* app/scroll.c
	* app/undo.c
	* app/gui/convert-dialog.c
	* app/gui/edit-commands.c
	* app/gui/tool-options-dialog.c
	* app/gui/tools-commands.c: changed accordingly.

	* app/tools/gimpbezierselecttool.c
	* app/tools/gimpbrightnesscontrasttool.c
	* app/tools/gimpbycolorselecttool.c
	* app/tools/gimpclonetool.c
	* app/tools/gimpcolorbalancetool.c
	* app/tools/gimpcroptool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimphistogramtool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimpposterizetool.c
	* app/tools/gimptexttool.c
	* app/tools/gimpthresholdtool.c
	* app/tools/gimptool.c
	* app/tools/gimptransformtool.c: mostly bad hacks for tool dialogs
	which exist without a real context. Needs some more review.
2001-07-07 17:36:00 +00:00
Michael Natterer 170a9cbcab All tools are back :)
2001-05-25  Michael Natterer  <mitch@gimp.org>

	All tools are back :)

	* app/tools/Makefile.am
	* app/tools/brightness_contrast.[ch]
	* app/tools/color_balance.[ch]
	* app/tools/curves.[ch]
	* app/tools/histogram_tool.[ch]
	* app/tools/hue_saturation.[ch]
	* app/tools/levels.[ch]
	* app/tools/posterize.[ch]
	* app/tools/threshold.[ch]: removed...

	* app/tools/gimpbrightnesscontrasttool.[ch]
	* app/tools/gimpcolorbalancetool.[ch]
	* app/tools/gimpcurvestool.[ch]
	* app/tools/gimphistogramtool.[ch]
	* app/tools/gimphuesaturationtool.[ch]
	* app/tools/gimplevelstool.[ch]
	* app/tools/gimpposterizetool.[ch]
	* app/tools/gimpthresholdtool.[ch]: ...and ported to the new tool
	system. Yes, the toolbox looks strange right now.

	* app/tools/gimpimagemaptool.[ch]: base class for all image_map
	tools. Does nothing at all right now.

	* app/tools/gimpbucketfilltool.h: removed _new() function
	declaration.

	* app/tools/gimptool.c: removed obsolete stuff and STUB()s.

	* app/tools/tools.c: register the new tools.

	* app/menus.c: removed the #if 0 around the code which reorders
	the color tool menu entries.

	* app/app_procs.c
	* tools/pdbgen/Makefile.am
	* tools/pdbgen/enums.pl
	* tools/pdbgen/pdb/color.pdb
	* app/pdb/color_cmds.c
	* po/POTFILES.in: changed accordingly.
2001-05-24 23:57:08 +00:00
Michael Natterer 6a5242c0bf config.guess new versions from CVS (at least that's what my debian package
2001-05-24  Michael Natterer  <mitch@gimp.org>

	* config.guess
	* config.sub: new versions from CVS (at least that's what my
	debian package says...)

	* app/Makefile.am
	* app/gimppreviewcache.[ch]: removed.

	* app/core/Makefile.am
	* app/core/gimppreviewcache.c: added.

	* app/core/gimpdrawable.c: reordered #includes

	* app/apptypes.h: make ImageMap a proper opaque typedef, not
	simply a gpointer.

	* app/image_map.[ch]: changed accordingly. cleanup.

	* app/tools/color_balance.h
	* app/tools/curves.h
	* app/tools/gimptool.c
	* app/tools/histogram_tool.h
	* app/tools/hue_saturation.h
	* app/tools/threshold.h: changed here too.

	* libgimpbase/gimpbasetypes.h: /*< skip >*/ GIMP_UNIT_PERCENT as
	it's a UI convenience thing and no unit.

	* plug-ins/script-fu/script-fu-constants.c
	* tools/pdbgen/enums.pl: regenerated.

	* libgimpwidgets/gimpbutton.c: maybe this change makes GimpButton
	behave even more careful when changing GtkButton's private stuff.
2001-05-24 17:09:57 +00:00
David Neary 67564fef93 Activate "Select by color" tool.
2001-05-10  David Neary  <dneary@eircom.net>

        * app/tools/gimpbycolorselecttool.[ch]: Activate
        "Select by color" tool.

        * app/tools/Makefile.am
        * app/tools/tools.c
        * app/tools/gimptool.[ch]
        * app/tools/selection_options.c
        * tools/pdbgen/pdb/tools.pdb: Changed accordingly
2001-05-10 08:10:25 +00:00
Michael Natterer d1022c34b6 app/Makefile.am removed.
2001-05-10  Michael Natterer  <mitch@gimp.org>

	* app/Makefile.am
	* app/asupsample.[ch]: removed.

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/tools/Makefile.am
	* app/tools/tools-types.h: new files.

	* app/tools/gimptoolinfo.[ch]: removed.
	* app/core/gimptoolinfo.[ch]: added here.

	* libgimp/Makefile.am
	* libgimp/gimp.h
	* libgimp/gimpadaptivesupersample.[ch]
	* libgimp/gimpbilinear.[ch]: removed here...

	* libgimpcolor/Makefile.am
	* libgimpcolor/gimpcolortypes.h
	* libgimpcolor/gimpadaptivesupersample.[ch]
	* libgimpcolor/gimpbilinear.[ch]: ..and added here.

	* tools/pdbgen/app.pl
	* tools/pdbgen/pdb/paths.pdb

	* app/*.c: changed tons of #include's
2001-05-09 22:34:59 +00:00
Michael Natterer 8985b107c3 configure.in added new directory app/core/ for the core object system.
2001-05-09  Michael Natterer  <mitch@gimp.org>

	* configure.in
	* app/Makefile.am: added new directory app/core/ for the core
	object system.

	* app/gimage_mask.[ch]
	* app/gimpbrush-header.h
	* app/gimpbrush.[ch]
	* app/gimpbrushgenerated.[ch]
	* app/gimpbrushpipe.[ch]
	* app/gimpchannel.[ch]
	* app/gimpcontainer.[ch]
	* app/gimpcontext.[ch]
	* app/gimpdata.[ch]
	* app/gimpdatafactory.[ch]
	* app/gimpdatalist.h
	* app/gimpdrawable-desaturate.[ch]
	* app/gimpdrawable-equalize.[ch]
	* app/gimpdrawable-invert.[ch]
	* app/gimpdrawable-offset.[ch]
	* app/gimpdrawable-preview.[ch]
	* app/gimpdrawable.[ch]
	* app/gimpgradient.[ch]
	* app/gimpimage-convert.[ch]
	* app/gimpimage-duplicate.[ch]
	* app/gimpimage-undo.[ch]
	* app/gimpimage.[ch]
	* app/gimplayer.[ch]
	* app/gimplayermask.[ch]
	* app/gimplist.[ch]
	* app/gimpmarshal.[ch]
	* app/gimpobject.[ch]
	* app/gimppalette-import.[ch]
	* app/gimppalette.[ch]
	* app/gimppattern-header.h
	* app/gimppattern.[ch]
	* app/gimpundo.[ch]
	* app/gimpundostack.[ch]
	* app/gimpviewable.[ch]: removed these files...

	* app/core/*: ...and added them here.

	* app/*.c
	* app/gui/*.c
	* app/pdb/*.c
	* app/tools/*.c
	* app/widgets/*.c
	* plug-ins/common/gbr.c
	* plug-ins/common/gih.c
	* plug-ins/common/pat.c
	* po/POTFILES.in
	* tools/pdbgen/Makefile.am
	* tools/pdbgen/enums.pl
	* tools/pdbgen/pdb.pl
	* tools/pdbgen/pdb/*.pdb: changed accordingly.
2001-05-09 02:32:03 +00:00
Michael Natterer 59b06707bd added GimpDropMode... ...removed from here.
2001-05-06  Michael Natterer  <mitch@gimp.org>

	* app/appenums.h: added GimpDropMode...
	* app/gimpdnd.h: ...removed from here.

	* app/gimpimage.[ch]:
	- New signal "mode_changed".
	- removed "const GimpImage*" from gimp_image_colormap_changed()
	  because a signal emission is never "const" for the object
	  which emits the signal.
	- Fixed gimp_image_[set|get]_component_[active|visible]():
	  ALPHA_CHANNEL maps to ALPHA_PIX only in RGB mode, use
	  ALPHA_G_PIX/ALPHA_I_PIX in GRAY/INDEXED mode.

	* app/gimpimage-convert.c
	* app/undo.c: call gimp_image_mode_changed().

	* app/gimpviewable.c: added an implementation of
	"invalidate_preview" which frees the preview temp_buf which may be
	attached to the viewable. Subclasses need to chain up now.

	* app/gimpdrawable.c
	* app/gimpimage.c: chain up in invalidate_preview().

	* app/widgets/gimpchannellistview.c: connect to the image's
	"mode_changed" signal and rebuild the channel list in the
	callback.

	* app/widgets/gimpcontainerview.h: indentation.

	* app/widgets/gimpdockbook.c: set the dockable's context to NULL
	in gimp_dockbook_remove()

	* app/widgets/gimpimagedock.c: forgot to actually set the dock's
	image in gimp_image_dock_new().

	* app/gui/dialogs-constructors.c: added a get_name_func() for tool
	views which returns the tool's "blurb". It's safe to assume now
	that a dockable's context will exist as long as the dockable
	exists unless it's explicitely set to NULL, so remove ugly hacks
	handling context destruction.

	* app/tools/gimptool.c: removed COMPAT_CRUFT and useless #include's.
2001-05-06 16:14:34 +00:00
David Neary 24c39e398a Enabled the rest of the transform tools and changed some of the options
Enabled the rest of the transform tools and changed some of
the options stuff in transform_options_new(). There are one or two
outstanding (non-critical) runtime problems in that function.
2001-04-24 18:43:31 +00:00
Michael Natterer f283b957b1 app/session.[ch] removed the old dialog session management code...
2001-04-17  Michael Natterer  <mitch@gimp.org>

	* app/session.[ch]
	* app/gimprc.c: removed the old dialog session management code...

	* app/widgets/gimpdialogfactory.[ch]: ...and manage all dialogs here.

	* app/gui/dialogs-constructors.[ch]: dialog factory compliant
	constructors for all session managed toplevel dialogs.

	* app/brush_select.[ch]
	* app/devices.[ch]
	* app/docindex.[ch]
	* app/errorconsole.[ch]
	* app/gradient_select.[ch]
	* app/info_dialog.c
	* app/lc_dialog.[ch]
	* app/palette.[ch]
	* app/pattern_select.[ch]
	* app/toolbox.[ch]
	* app/tools/tool_options_dialog.[ch]: all dialog constructors have
	to return the dialog now (even the legacy ones that will go away).
	Removed the session management code as this is now done for the
	dialogs, not by them.

	* app/app_procs.c
	* app/color_select.c
	* app/commands.[ch]
	* app/indicator_area.c
	* app/menus.c
	* app/palette_select.c
	* app/preferences_dialog.c
	* app/gui/dialogs.c
	* app/gui/dialogs-commands.[ch]
	* app/gui/gui.c
	* app/tools/gimptool.c
	* app/widgets/gimpdock.c: changed accordingly.
2001-04-17 16:00:27 +00:00
Michael Natterer 4f69c5a09e app/tools/Makefile.am app/tools/gimpsmudgetool.[ch]
2001-04-11  Michael Natterer  <mitch@gimp.org>

	* app/tools/Makefile.am
	* app/tools/gimpsmudgetool.[ch]
	* app/tools/gimptool.[ch]
	* app/tools/paint_options.c
	* app/tools/tool_manager.c
	* app/tools/tools.c
	* app/pdb/tools_cmds.c
	* tools/pdbgen/pdb/tools.pdb: applied a (slightly modified) patch
	from Dave Neary <dave.neary@palamon.ie> which reactivates the
	smudge tool.
2001-04-11 17:20:34 +00:00
Michael Natterer 647bf4433b app/tools/Makefile.am back again.
2001-04-01  Michael Natterer  <mitch@gimp.org>

	* app/tools/Makefile.am
	* app/tools/gimpairbrushtool.[ch]: back again.

	* app/tools/gimptool.[ch]
	* app/tools/paint_options.c
	* app/tools/tool_manager.c
	* app/tools/tools.c: changed accordingly.
2001-03-31 23:04:29 +00:00
Michael Natterer 2824801f78 made undo_pop_paint() work again.
2001-03-31  Michael Natterer  <mitch@gimp.org>

	* app/undo.c: made undo_pop_paint() work again.

	* app/tools/gimppainttool.[ch]: store the tool ID and the tool
	type in the PaintUndo struct.

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

	* app/tools/gimptool.c: removed and reordered STUB()s and cruft.
2001-03-31 17:46:59 +00:00
Michael Natterer f81a8b0024 app/tools/Makefile.am applied a patch from Dave Neary which re-activates
2001-03-31  Michael Natterer  <mitch@gimp.org>

	* app/tools/Makefile.am
	* app/tools/gimpfliptool.[ch]: applied a patch from Dave Neary
	which re-activates this tool. Enabled the tool options too.

	* app/tools/gimpbezierselecttool.c
	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimptexttool.c: trivial fixes.

	* app/tools/gimptool.c: removed cruft.

	* app/tools/gimptransformtool.[ch]: a special case for the flip
	tool, cleanup.

	* app/tools/tools.c: register the flip tool.
2001-03-31 17:08:55 +00:00
Michael Natterer bb134d6ed4 app/tools/bezier_select.[ch] app/tools/bezier_selectP.h
2001-03-31  Michael Natterer  <mitch@gimp.org>

	* app/tools/bezier_select.[ch]
	* app/tools/bezier_selectP.h
	* app/tools/transform_core.[ch]
	* app/tools/transform_tool.[ch]: removed.

	* app/tools/Makefile.am
	* po/POTFILES.in: changed accordingly.

	* app/tools/gimpbezierselecttool.c: indentation fixes.

	* app/tools/gimpdodgeburntool.[ch]: made cursor toggling work
	again, cleanup.

	* app/tools/gimpscaletool.[ch]
	* app/tools/gimptool.c: minor cleanups like removing STUB()s.

	* app/tools/tool_manager.c: applied patch from Dave Neary which
	returns useful PDB strings for the paint tools again.
2001-03-31 15:45:05 +00:00
Michael Natterer 4ee31d0cac re-enabled transform undo. Fixes the transform tool crashes.
2001-03-31  Michael Natterer  <mitch@gimp.org>

	* app/undo.c: re-enabled transform undo. Fixes the transform tool
	crashes.

	* app/tools/gimptool.[ch]: put tool->ID back because the undo
	system uses it. Also, a unique tool serial number will be not too
	bad to have once we have module tools.

	* app/tools/gimptransformtool.[ch]: changed accordingly.
2001-03-31 14:47:44 +00:00