1. 07 Jan, 2019 3 commits
    • Jehan's avatar
      app: make layer picking a generic modifier of the shell. · 4c337353
      Jehan authored
      Instead of having layer picking only on paint tools with alt-click, make
      it available everywhere with alt-middle click. Moving through layers is
      also a way to navigate an image, so it actually makes sense to be with
      other modifiers (panning, zooming, rotating), while making the feature
      more generic (this is definitely useful whatever the selected tool).
      4c337353
    • Jehan's avatar
      app: alt-click to pick a layer will loop through candidate layers. · 90e9eb3f
      Jehan authored
      If you click on a zone filled in several visible layers, you don't
      necessarily want the top layer. You may want one below. With this
      change, as long as you hold alt, you will loop through all candidate
      layers from top to bottom (then looping back top when reaching the
      bottom).
      In a first alt-click, you will always end up to the top candidate.
      90e9eb3f
    • Jehan's avatar
      app: allow picking layer in paint tools on alt-click. · 3b59e6f6
      Jehan authored
      When working with a lot of layers, it is common to have to switch easily
      between layers. And having to go back to the layer list is annoying and
      also sometimes not practical at all when you can't find easily the right
      layer. This is a first step in an experiment for such a feature, worked
      together with Aryeom as advisor (and originator of the feature idea).
      For now I apply this only to paint tools, though we are considering
      having it as a generic modifier too, working whatever the tool. Yet we
      wouldn't be able to use alt-left click (as it is used already in some
      tools).
      How it works is simply that in any paint tool, alt-click allows to
      switch to the topmost layer having a visible pixel at the clicked
      position.
      3b59e6f6
  2. 15 Jul, 2018 1 commit
    • Michael Natterer's avatar
      app: rename enum GimpColorPickMode to GimpColorPickTarget · b140b283
      Michael Natterer authored
      This is just some preparation for fixing issue #1805, but actually
      "target" is a much better name so I went the full way and also changed
      GUI labels and the color picker tool options config property
      accordingly.
      
      If anyone notices at all, how horrible is it to lose your saved pick
      target...
      b140b283
  3. 11 Jul, 2018 1 commit
  4. 08 Jun, 2018 1 commit
    • Ell's avatar
      app: in GimpPaintTool, sync brush-outline coords while painting · 5c17d2a4
      Ell authored
      Add GimpPaintTool::paint_[xy] members, and periodically assign the
      paint core's current coords to them in
      gimp_paint_tool_paint_timeout(), while the main thread and the
      paint thread are synchronized, during painting.
      
      In gimp_paint_tool_draw(), fetch the current coords for the brush
      outline from the above members during painting, instead of directly
      from the paint core, to avoid a race condition with the paint
      thread, so that we always use the correct coordinates at the time
      the paint buffer was flushed back to the drawable.
      5c17d2a4
  5. 07 May, 2018 1 commit
    • Ell's avatar
      app: warn when alpha-only painting has no effect · 1910ff8b
      Ell authored
      Add a GimpPaintTool::is_alpha_only() virtual function, which
      subclasses can override to indicate whether painting only affects
      the alpha channel (assuming FALSE by default).  Override the
      function in Gimp{PaintBrush,Ink,Clone}Tool, returning TRUE when the
      current paint mode only affects the alpha (as per
      gimp_layer_mode_is_alpha_only(); see the previous commit,) and in
      GimpEraserTool, returning TRUE when the target drawable has an
      alpha channel.
      
      When the function returns TRUE, and the target drawable doesn't
      have an alpha channel, or the alpha channel is locked, show a BAD
      cursor modifier, and raise an appropriate warning when attempting
      to paint.
      1910ff8b
  6. 16 Apr, 2018 1 commit
    • Ell's avatar
      app: reorganize gimppainttool-paint, to allow use by subclasses · e02a339e
      Ell authored
      We'd like subclasses of GimpPaintTool to be able to issue paint
      commands to the tool's paint-core (in particular, see the next
      commit.)  Since paint commands should be executed on the paint
      thread, the subclasses must not call the paint-core functions
      directly, but should rather let gimppainttool-paint issue the
      commands on their behalf.
      
      Reorgainze gimppainttool-paint to make it usable for this purpose
      by subclasses.  In particular, add
      gimp_paint_tool_paint_core_paint() and
      gimp_paint_tool_paint_core_interpolate(), which call the
      corresponding paint-core functions on the paint thread.
      
      Additionally, rename the {start,end,flush}_paint() virtual
      functions of GimpPaintTool to paint_{start,end,flush}(), and rename
      gimp_paint_tool_is_painting() to gimp_paint_tool_paint_is_active(),
      so that all the gimppainttool-paint-related stuff are grouped under
      the same namespace.
      e02a339e
  7. 14 Apr, 2018 1 commit
    • Ell's avatar
      Bug 795257 - Segmentation fault crash using the clone tool · 45c172a8
      Ell authored
      Commit f5cb1fed, which performed
      brush outline generation in GimpPaintTool in synchrony with the
      paint thread, wasn't enough, since GimpSourceTool could still call
      gimp_brush_tool_create_outline() directly during its
      GimpDrawTool::draw() method, leading to the same race condition
      when executed concurrently with the paint thread.
      
      Partially revert the above commit, so that outline generation is
      handled as before, as far as GimpPaintTool is concenered.  Instead,
      add GimpPaintTool::{start,end,flush}_paint() virtual functions; the
      first two are called when starting/ending painting using the paint
      thread, while the third is called during the display-update
      timeout, while the main thread and the paint thread are
      synchronized.  This allows subclasses to perform non-thread-safe
      actions while the threads are synchronized.
      
      Override these functions in GimpBrushTool, and cache the brush
      boundary in the flush() function.  Use the cached boundary in
      gimp_brush_tool_create_outline() while painting, to avoid the above
      race condition, both when this function is called through
      GimpPaintTool, and through GimpSourceTool.
      45c172a8
  8. 09 Apr, 2018 3 commits
    • Ell's avatar
      Bug 795081 - Crash when using a brush combined with a dynamics · f5cb1fed
      Ell authored
      In GimpPaintTool, brush outline generation took place during
      gimp_paint_tool_draw() even while painting.  This function is run
      concurrently with the paint thread.  When using dynamics, this
      introduced a race conidition between updating the brush mask in the
      paint thread, and updating the brush boundary in the main thread.
      
      Move brush outline generation during painting to
      gimppainttool-paint.c, and perform it in the display-update
      timeout, while the main thread and the paint thread are
      synchronized.
      f5cb1fed
    • Ell's avatar
      app: remove option for paint tools to opt out of a separate thread · e98506b0
      Ell authored
      After last commit, all paint tools work correctly with a separate
      paint thread, so we can remove the option for specific paint tools
      to opt out.  Particularly, GimpMybrushTool now uses a separate
      paint thread too.
      
      Note that the separate paint thread can still be disabled through
      the GIMP_NO_PAINT_THREAD environment variable.
      e98506b0
    • Ell's avatar
      app: reorganize gimppaintool-paint · 2ae16ca6
      Ell authored
      Reorganize/clean up gimppainttool-paint.  In particular, move all
      paint-core interaction during painting to gimppainttool-paint.c, so
      that we can have more control over what's going on; specifically,
      enter the drawable into paint mode *before* starting the paint
      core, so that it picks up the correct buffer.  This fixes painting
      with the paint thread using GimpApplicator, and enables us to use
      the paint thread with GimpMybrushTool.
      2ae16ca6
  9. 08 Apr, 2018 1 commit
    • Ell's avatar
      app: move painting to a separate thread · 8e7a3429
      Ell authored
      Add gimppainttool-paint.[ch], which takes care of painting during
      motion events in GimpPaintTool.  Perform the actual painting in a
      separate thread, so that display updates, which can have a
      significant synchronization overhead, don't stall painting.
      
      Allow specific paint tools to opt-out of a separate paint thread,
      and avoid it in GimpMybrushTool, since it doesn't seem to work.
      
      The separate paint thread can be explicitly disabled by setting the
      GIMP_NO_PAINT_THREAD environment variable.
      8e7a3429
  10. 17 Oct, 2015 1 commit
    • Michael Natterer's avatar
      app: get rid of hardcoding GDK_SHIFT_MASK in tools/ · 7ec04e4a
      Michael Natterer authored
      gimp_suggest_modifiers(): change "shift_format" and "control_format"
      parameters to "extend_selection_format" and "toggle_behavior_format",
      which fixes the longstanding problem that the function did the right
      thing only by accident.
      
      tools: use gimp_get_extend_selection_mask() instead of GDK_SHIFT_MASK
      which is not 100% semantically correct in all cases, but at least a
      step in the right direction to make the tool modifiers easier to
      improve.
      7ec04e4a
  11. 18 Nov, 2014 1 commit
    • Alexia Death's avatar
      app: separate fallback cursor from primary indicator cursor · 59364ea7
      Alexia Death authored
      Separate fallback use of a cursor from using a plain size
      indicator cursor. Ink tool uses a plain circle as primary
      drawing indicator instead of outline, totally different
      use than a fallback, when brush is too small to be drawn.
      
      Conflicts:
      	app/tools/gimppainttool.c
      59364ea7
  12. 12 Apr, 2014 2 commits
  13. 09 Apr, 2014 1 commit
  14. 04 Apr, 2011 1 commit
  15. 17 Jan, 2009 1 commit
    • Michael Natterer's avatar
      Change licence to GPLv3 (and to LGPLv3 for libgimp). · d9b5207a
      Michael Natterer authored
      2009-01-17  Michael Natterer  <mitch@gimp.org>
      
      	* all files with a GPL header and all COPYING files:
      
      	Change licence to GPLv3 (and to LGPLv3 for libgimp).
      
      	Cleaned up some copyright headers and regenerated the parsers in
      	the ImageMap plugin.
      
      
      svn path=/trunk/; revision=27913
      d9b5207a
  16. 09 Dec, 2006 1 commit
  17. 13 Sep, 2006 1 commit
  18. 05 Sep, 2006 1 commit
    • Michael Natterer's avatar
      added gimp_tool_get_options() so tools don't need to incude · 6c7f0c68
      Michael Natterer authored
      2006-09-05  Michael Natterer  <mitch@gimp.org>
      
      	* app/tools/gimptool.[ch]: added gimp_tool_get_options() so tools
      	don't need to incude "core/gimptoolinfo.h" just to get to
      	their options.
      
      	* app/tools/gimp*tool.h: added macros GIMP_FOO_TOOL_GET_OPTIONS()
      	which return specific tool options types and do all casting
      	themselves.
      
      	* app/tools/*.c: use the new macros and don't include
      	"core/gimptoolinfo.h" in most files.
      
      	* app/tools/gimpcolorpickertool.c (gimp_color_picker_tool_register):
      	make it use the parent context's FG and BG.
      
      	* app/tools/gimpcolortool.c (gimp_color_tool_real_picked): set the
      	color on the tool's options, not on the user context.
      6c7f0c68
  19. 15 Aug, 2006 1 commit
    • Michael Natterer's avatar
      app/tools/Makefile.am app/tools/tools-types.h new GimpPaintTool subclass · 269ab384
      Michael Natterer authored
      2006-08-15  Michael Natterer  <mitch@gimp.org>
      
      	* app/tools/Makefile.am
      	* app/tools/tools-types.h
      	* app/tools/gimpbrushtool.[ch]: new GimpPaintTool subclass which
      	completely handles brush outline drawing.
      
      	* app/tools/gimppainttool.[ch]: removed all brush stuff here.
      
      	* app/tools/gimpclonetool.[ch]
      	* app/tools/gimpconvolvetool.[ch]
      	* app/tools/gimpdodgeburntool.[ch]
      	* app/tools/gimperasertool.[ch]
      	* app/tools/gimppaintbrushtool.[ch]
      	* app/tools/gimpsmudgetool.[ch]: derive from GimpBrushTool.
      
      	* app/tools/gimpinktool.c: removed now obsolete cursor_update()
      	implementation.
      269ab384
  20. 01 Aug, 2006 1 commit
    • Raphael Quinet's avatar
      app/widgets/gimpwidgets-utils.h New utility function to build status bar · a54a6b16
      Raphael Quinet authored
      2006-08-02  Raphael Quinet  <raphael@gimp.org>
      
      	* app/widgets/gimpwidgets-utils.h
      	* app/widgets/gimpwidgets-utils.c (gimp_suggest_modifiers):
      	New utility function to build status bar messages while allowing
      	dynamic names for the modifiers.
      
      	* app/tools/gimppainttool.h
      	* app/tools/gimppainttool.c: Added new members to the class in
      	order to allow paint tools to set different status messages for
      	the normal case or when drawing a line.
      
      	* app/tools/gimpclonetool.c
      	* app/tools/gimpconvolvetool.c
      	* app/tools/gimpdodgeburntool.c
      	* app/tools/gimperasertool.c
      	* app/tools/gimpsmudgetool.c: Use the new functions to set
      	appropriate messages in the status bar.  Still work in progress,
      	partial fix for bug #124040.
      
      	* app/tools/gimpvectortool.c: Use gimp_suggest_modifiers().
      a54a6b16
  21. 07 May, 2005 1 commit
    • Sven Neumann's avatar
      app/tools/gimppainttool.[ch] unified tool and paint-tool statusbar APIs. · 27042a7b
      Sven Neumann authored
      2005-05-07  Sven Neumann  <sven@gimp.org>
      
      	* app/tools/gimppainttool.[ch]
      	* app/tools/gimptool.[ch]: unified tool and paint-tool statusbar APIs.
      
      	* app/tools/gimpblendtool.c
      	* app/tools/gimpclonetool.c
      	* app/tools/gimpcolortool.c
      	* app/tools/gimpcroptool.c
      	* app/tools/gimpeditselectiontool.c
      	* app/tools/gimpfuzzyselecttool.c
      	* app/tools/gimpmeasuretool.c
      	* app/tools/gimpmovetool.c
      	* app/tools/gimpnewrectselecttool.c
      	* app/tools/gimprectangletool.c
      	* app/tools/gimprectselecttool.c
      	* app/tools/gimpvectortool.c: changed accordingly.
      
      	* app/tools/gimpselectiontool.c: give more hints in the statusbar.
      	Some of the selection tools should probably override these.
      27042a7b
  22. 04 Apr, 2005 1 commit
  23. 04 Jun, 2004 1 commit
    • Michael Natterer's avatar
      cursors/Makefile.am cursors/cursor-none.png new empty cursor images. · 714d63fc
      Michael Natterer authored
      2004-06-05  Michael Natterer  <mitch@gimp.org>
      
      	* cursors/Makefile.am
      	* cursors/cursor-none.png
      	* cursors/xbm/cursor-none.xbm: new empty cursor images.
      
      	* app/config/gimpdisplayconfig.[ch]
      	* app/config/gimprc-blurbs.h
      	* app/widgets/widgets-enums.h
      	* app/widgets/gimpcursor.c
      	* app/display/gimpdisplayshell-cursor.c
      	* app/tools/gimppainttool.[ch]
      	* app/tools/gimpinktool.c
      	* app/gui/preferences-dialog.c: applied patches from Philip
      	Lafleur which implement hiding the cursor completely for paint
      	tools. Changed the name of the config option from
      	"hide-paint-tool-cursor" to "show-paint-tool-cursor" and default
      	to TRUE because this needs the brush outline being visible while
      	painting to be really usable. Fixes bug #132163.
      
      	* app/widgets/widgets-enums.h: renamed all GimpCursorType and
      	GimpToolCursorType enum values to GIMP_CURSOR_* and
      	GIMP_TOOL_CURSOR_*.
      
      	* app/widgets/gimpcursor.c
      	* app/display/gimpdisplayshell-callbacks.c
      	* app/display/gimpdisplayshell-cursor.c
      	* app/tools/gimp*tool.c; changed accordingly.
      714d63fc
  24. 25 Oct, 2003 1 commit
    • Sven Neumann's avatar
      added GIMP_COLOR_PICK_MODE_NONE to the GimpColorPickMode enum. · 190a68b9
      Sven Neumann authored
      2003-10-25  Sven Neumann  <sven@gimp.org>
      
      	* app/tools/tools-enums.[ch]: added GIMP_COLOR_PICK_MODE_NONE to
      	the GimpColorPickMode enum.
      
      	* app/tools/gimpcolorpickeroptions.[ch]: removed "update-toolbox"
      	property; the new enum value serves this role better.
      
      	* app/tools/gimpcolorpickertool.c: handle the new enum value.
      
      	* app/tools/gimpcolortool.c: default to GIMP_COLOR_PICK_MODE_NONE.
      	Don't set a cursor modifier for this value. Fixes tool cursor for
      	levels and curves tools.
      
      	* app/tools/gimppainttool.[ch]: added a function to conveniently
      	enable the color picker and set the pick mode at the same time.
      
      	* app/tools/gimpairbrushtool.c
      	* app/tools/gimppaintbrushtool.c
      	* app/tools/gimppenciltool.c
      	* app/tools/gimpsmudgetool.c: use the new function.
      
      	* app/tools/gimperasertool.c: enabled color picking in the eraser
      	tool but set the mode to GIMP_COLOR_PICK_MODE_BACKGROUND.
      190a68b9
  25. 30 Aug, 2003 1 commit
    • Michael Natterer's avatar
      made "tool-info" a G_PARAM_CONSTRUCT_ONLY property. · c049f82e
      Michael Natterer authored
      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.
      c049f82e
  26. 19 Aug, 2003 1 commit
    • Michael Natterer's avatar
      app/config/gimpdisplayconfig.[ch] added "gboolean show_brush_outline". · e9e98af6
      Michael Natterer authored
      2003-08-19  Michael Natterer  <mitch@gimp.org>
      
      	* app/config/gimpdisplayconfig.[ch]
      	* app/config/gimprc-blurbs.h: added "gboolean show_brush_outline".
      
      	* app/gui/preferences-dialog.c (prefs_dialog_new): added it to the
      	"Pointer Movement Feedback" frame.
      
      	* app/tools/gimppainttool.[ch]: connect to
      	"notify::show-brush-outline" and toggle brush outline display
      	accordingly. Fixes bug #120084.
      e9e98af6
  27. 24 Jul, 2003 1 commit
    • Michael Natterer's avatar
      removed the brush outline members since we have no chance to really cache · 827c3f37
      Michael Natterer authored
      2003-07-24  Michael Natterer  <mitch@gimp.org>
      
      	* app/tools/gimppainttool.[ch]: removed the brush outline members
      	since we have no chance to really cache them without duplicating
      	GimpPaintCore's brush change notification code.
      
      	* app/paint/gimppaintcore.[ch]: added the outline here and really
      	cache it this time. The paint_core doesn't create or use the
      	outline but frees and NULLifies it whenever the brush changes.
      827c3f37
  28. 10 Jul, 2003 1 commit
    • Michael Natterer's avatar
      removed gimp_display_shell_transform_boundary() again... · 84e73fa4
      Michael Natterer authored
      2003-07-10  Michael Natterer  <mitch@gimp.org>
      
      	* app/display/gimpdisplayshell-transform.[ch]: removed
      	gimp_display_shell_transform_boundary() again...
      
      	* app/tools/gimpdrawtool.[ch]: ...and added as
      	gimp_draw_tool_draw_boundary(). Removed the GimpDrawToolState enum
      	and the "draw_state" member since they were redundant. Cleanup.
      
      	* app/tools/gimpeditselectiontool.c: changed accordingly.
      
      	* app/tools/gimppainttool.[ch]: added a brush preview so we
      	finally see where we will paint. Fixes bug #32498. Cleanup.
      
      	* app/tools/tool_manager.c: also look at draw_tool->gdisp, not
      	only at tool->gdisp when deciding whether the active tool has to
      	be suspended/resumed/halted. Fixes a couple of fnords with the
      	line preview and the new brush preview.
      
      	* app/tools/gimpcolortool.c: minor cleanup.
      84e73fa4
  29. 29 Jun, 2003 1 commit
    • Michael Natterer's avatar
      Getting rid of some legacy filenames: · 8dd2e807
      Michael Natterer authored
      2003-06-29  Michael Natterer  <mitch@gimp.org>
      
      	Getting rid of some legacy filenames:
      
      	* app/core/Makefile.am
      	* app/core/gimptooloptions.[ch]: new files.
      
      	* app/paint/gimppaintoptions.h: changed #include accordingly.
      	#define GIMP_PAINT_OPTIONS_CONTEXT_MASK here.
      
      	* app/tools/paint_options.[ch]
      	* app/tools/tool_options.[ch]: removed these files.
      
      	* app/tools/gimppaintoptions-gui.[ch]
      	* app/tools/gimptooloptions-gui.[ch]: new files.
      
      	* app/tools/gimppainttool.h: removed GIMP_PAINT_TOOL_OPTIONS_MASK
      	define again.
      
      	* app/tools/Makefile.am
      	* app/tools/gimpairbrushtool.c
      	* app/tools/gimpblendoptions.c
      	* app/tools/gimpbucketfilloptions.c
      	* app/tools/gimpclonetool.c
      	* app/tools/gimpcoloroptions.[ch]
      	* app/tools/gimpconvolvetool.c
      	* app/tools/gimpcropoptions.[ch]
      	* app/tools/gimpdodgeburntool.c
      	* app/tools/gimperasertool.c
      	* app/tools/gimpflipoptions.[ch]
      	* app/tools/gimpinkoptions.c
      	* app/tools/gimpmagnifyoptions.[ch]
      	* app/tools/gimpmeasureoptions.[ch]
      	* app/tools/gimpmoveoptions.[ch]
      	* app/tools/gimppaintbrushtool.c
      	* app/tools/gimppenciltool.c
      	* app/tools/gimpselectionoptions.[ch]
      	* app/tools/gimpsmudgetool.c
      	* app/tools/gimptextoptions.[ch]
      	* app/tools/gimptransformoptions.[ch]
      	* app/tools/tool_manager.c
      	* app/gui/tool-options-dialog.c: changed accordingly.
      
      	* app/tools/tools.c: moved the vector tool before iscissors.
      8dd2e807
  30. 28 Jun, 2003 1 commit
    • Michael Natterer's avatar
      removed enum GimpContextPropType and enum GimpContextPropMask. · e14e158e
      Michael Natterer authored
      2003-06-28  Michael Natterer  <mitch@gimp.org>
      
      	* app/core/gimpcontext.h: removed enum GimpContextPropType and
      	enum GimpContextPropMask.
      
      	* app/core/core-enums.[ch]: added them here.
      
      	* app/core/gimptoolinfo.[ch]: replaced "gboolean tool_context"
      	member by "GimpContextPropMask context_props" so each tool can
      	specify exactly which context properties it wants to have
      	persistently remembered.
      
      	* app/tools/tools-types.h: changed typedef GimpToolRegisterCallback
      	accordingly.
      
      	* app/tools/tool_manager.[ch] (tool_manager_register_tool): ditto.
      
      	Removed the "global_tool_context" and initialize all tool info
      	objects from the user_context after creation. Removed the
      	PAINT_OPTIONS_MASK #define and use the new context_props stored in
      	tool_info insted.
      
      	* app/tools/gimppainttool.h: #define the common properties of the
      	paint tools as GIMP_PAINT_TOOL_OPTIONS_MASK (which is OPACITY |
      	PAINT_MODE | BRUSH).
      
      	* app/tools/[all tools].c (gimp_*_tool_register): replaced the
      	"use_context" boolean by the actual mask of context properties the
      	tools need.
      e14e158e
  31. 05 Jun, 2003 1 commit
    • Sven Neumann's avatar
      changed the default radius. · 21b4aba9
      Sven Neumann authored
      2003-06-05  Sven Neumann  <sven@gimp.org>
      
      	* app/tools/gimpcoloroptions.c: changed the default radius.
      
      	* app/tools/gimpcolortool.[ch]: pass GimpColorOptions to
      	gimp_color_tool_enable(). Added gimp_color_tool_disable() and
      	gimp_color_tool_is_enabled().
      
      	* app/tools/gimpcolorpickertool.c: changed accordingly.
      
      	* app/tools/gimppainttool.[ch]: derived GimpPaintTool from
      	GimpColorTool and removed most color picking code.
      
      	* app/tools/gimpdodgeburntool.c (gimp_dodgeburn_tool_modifier_key)
      	* app/tools/gimperasertool.c (gimp_eraser_tool_modifier_key):
      	chain up to the parent class.
      
      	* app/tools/gimppaintbrushtool.c: purely cosmetic change.
      21b4aba9
  32. 15 Feb, 2002 1 commit
    • Michael Natterer's avatar
      added back the handler which invalidates the display_title on dirty/clean. · 72284d38
      Michael Natterer authored
      2002-02-15  Michael Natterer  <mitch@gimp.org>
      
      	* app/display/gimpdisplayshell-handlers.c: added back the handler
      	which invalidates the display_title on dirty/clean. Removing it
      	was simply wrong.
      
      	* app/display/gimpdisplayshell-scale.c: don't call
      	gimp_display_shell_update_title() directly but set
      	shell->title_dirty to TRUE before calling gdisplays_flush().
      
      	* app/paint/gimppaintcore.[ch]: added gimp_paint_core_constrain()
      	which does the "snap to 15 degrees" stuff formerly done in
      	GimpPaintTool. Call gimp_brush_select_brush() in
      	gimp_paint_core_paint() if paint_state == MOTION, not in several
      	other places.  Reordered functions, added some comments and
      	documentation.
      
      	* app/paint/gimpairbrush.c
      	* app/paint/gimpclone.c
      	* app/paint/gimpconvolve.c
      	* app/paint/gimpdodgeburn.c
      	* app/paint/gimperaser.c
      	* app/paint/gimppaintbrush.c
      	* app/paint/gimppencil.c
      	* app/paint/gimpsmudge.c:
      	s/CORE_CAN_HANDLE_CHANGING_BRUSH/CORE_HANDLES_CHANGING_BRUSH/g,
      	minor cleanup.
      
      	* app/pdb/pdb-types.h: include "paint/paint-types.h"
      
      	* app/tools/gimppainttool.[ch]: use gimp_paint_core_constrain(),
      	removed paint_tool->state because it's not needed any more,
      	lots of cleanup.
      
      	* tools/pdbgen/app.pl: another eeky special case for "paint/".
      
      	* tools/pdbgen/pdb/paint_tools.pdb: include stuff from "paint/",
      	not "tools/".
      
      	* app/pdb/paint_tools_cmds.c: regenerated.
      72284d38
  33. 14 Feb, 2002 1 commit
    • Michael Natterer's avatar
      Core/UI separation for the paint tools: · dca988f7
      Michael Natterer authored
      2002-02-14  Michael Natterer  <mitch@gimp.org>
      
      	Core/UI separation for the paint tools:
      
      	* configure.in
      	* app/Makefile.am
      	* app/paint/.cvsignore
      	* app/paint/Makefile.am: added new directory for the paint methods
      	without GUI and tools around them.
      
      	* app/paint/paint-types.h: typedefs for this module.
      
      	* app/paint/gimppaintcore-kernels.h
      	* app/paint/gimppaintcore.[ch]: the general paint logic taken
      	from GimpPaintTool.
      
      	* app/paint/gimpairbrush.[ch]
      	* app/paint/gimpclone.[ch]
      	* app/paint/gimpconvolve.[ch]
      	* app/paint/gimpdodgeburn.[ch]
      	* app/paint/gimperaser.[ch]
      	* app/paint/gimppaintbrush.[ch]
      	* app/paint/gimppencil.[ch]
      	* app/paint/gimpsmudge.[ch]: subclasses of GimpPaintCore,
      	implementing their own paint() methods.  Needs more hacking
      	to get the GtkWidget pointers out of the options structs.
      
      	* app/tools/gimppainttool_kernels.h: removed.
      
      	* app/tools/tools-types.h: removed the paint tool enums.
      
      	* app/tools/gimpairbrushtool.[ch]
      	* app/tools/gimpclonetool.[ch]
      	* app/tools/gimpconvolvetool.[ch]
      	* app/tools/gimpdodgeburntool.[ch]
      	* app/tools/gimperasertool.[ch]
      	* app/tools/gimppaintbrushtool.[ch]
      	* app/tools/gimppainttool.[ch]
      	* app/tools/gimppenciltool.[ch]
      	* app/tools/gimpsmudgetool.[ch]: all paint tools are pure GUI
      	things now.  PaintOptions and friends still need to be chopped up
      	though...
      
      	* app/undo.c: changed PaintUndo to GimpPaintCoreUndo, some minor
      	cleanup.
      
      	* tools/kernelgen.c: changed accordingly.
      
      	* tools/pdbgen/Makefile.am: scan paint/paint-types.h for enums.
      
      	* tools/pdbgen/pdb/paint_tools.pdb: hardcode "success = FALSE" for
      	all paint PDB wrappers.  The non-gui stuff is completely broken.
      	More commits to come...
      
      	* app/pdb/paint_tools_cmds.c
      	* tools/pdbgen/enums.pl: regenerated.
      dca988f7
  34. 13 Feb, 2002 1 commit
    • Michael Natterer's avatar
      moved all global variables into the GimpPaintTool structure so they have a · dac875d3
      Michael Natterer authored
      2002-02-13  Michael Natterer  <mitch@gimp.org>
      
      	* app/tools/gimppainttool.[ch]: moved all global variables into
      	the GimpPaintTool structure so they have a proper lifecycle and
      	it's easier to move them to the upcoming GimpPaintCore (??)
      	object.
      
      	* app/tools/gimppainttool_kernels.h
      	* tools/kernelgen.c: s/SUBSAMPLE/KERNEL_SUBSAMPLE/
      dac875d3
  35. 04 Feb, 2002 1 commit
    • Michael Natterer's avatar
      added fields for both the tool's toggled and untoggled GdkCursorType, · 989d80e7
      Michael Natterer authored
      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...
      989d80e7