2007-11-05 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcurveview.[ch]: added event handling and
completely edit the curve here.
* app/tools/gimpcurvestool.[ch]: remove all event handling and
curve editing code and only listen to curve signals.
svn path=/trunk/; revision=24060
2007-11-04 Martin Nordholts <martinn@svn.gnome.org>
Do not do shell darkening while GimpRectangleTool rectangles are
being rubber-banded.
* app/tools/gimprectangletool.c
(gimp_rectangle_tool_button_press)
(gimp_rectangle_tool_button_release): Maintain a variable keeping
track of if the rectangle is being rubber banded or not.
(gimp_rectangle_tool_update_highlight): Do not set a shell
highligt if the rectangle is being rubber-banded.
(gimp_rectangle_tool_rubber_banding_func): New helper function.
svn path=/trunk/; revision=24059
2007-11-04 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimprectangletool.c: Consistently use the name
`rect_tool' instead of `rectangle' or `rectangle_tool' for
pointers to GimpRectangleTool.
svn path=/trunk/; revision=24054
2007-11-04 Martin Nordholts <martinn@svn.gnome.org>
Put GimpRectangleTool handles on the outside of the rectangle when
it has a small width or height. Some polishing left to do but the
base functionality works nicely.
* app/tools/gimpdrawtool.[ch] (gimp_draw_tool_draw_corner): Add a
put_outside boolean parameter that if true draws the handles on
the outside of the rectangle.
* app/tools/gimprectangletool.c
(gimp_rectangle_tool_update_handle_sizes)
(gimp_rectangle_tool_coord_on_handle)
(gimp_rectangle_tool_draw): Take into account if the rectangle is
in narrow-mode or not.
svn path=/trunk/; revision=24053
2007-11-04 Michael Natterer <mitch@gimp.org>
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimpcurveview.[ch]: new GimpHistogramView subclass
which does all the curve stuff.
* app/widgets/gimphistorgramview.[ch]: removed all curve code again.
* app/tools/gimpcurvestool.c: changed accordingly.
svn path=/trunk/; revision=24051
2007-11-02 Michael Natterer <mitch@gimp.org>
* app/widgets/gimphistogramview.[ch]: added API to set the
selected point.
* app/tools/gimpcurvestool.c: use it.
svn path=/trunk/; revision=24046
2007-11-02 Michael Natterer <mitch@gimp.org>
* app/core/gimpcurve.[ch]: added API to modify free-form curves
and properties to listen to curve changes.
* app/widgets/gimphistogramview.[ch]: added everything that's
needed for rendering a curve with all its color and cursor
indicators on top of a histogram. This code will move to a
subclass soon.
* app/tools/gimpcurvestool.[ch]: removed all curve rendering here.
Also removed all explicit updating by connecting to curve signals
and updating in the callback.
svn path=/trunk/; revision=24045
2007-11-02 Michael Natterer <mitch@gimp.org>
* app/core/Makefile.am
* app/core/core-types.h
* app/core/gimpcurve-save.[ch]
* app/core/gimpcurve-load.[ch]
* app/core/gimpcurve.[ch]: new GimpData subclass which keeps a
curve as known from the curves tool. Pretty much unfinished, but
can do everything that used to be done by base/curves.c and more.
* app/base/curves.[ch]: stripped down to plain arrays of
uchar (the actual curve) and the LUT setup function. All the rest
is done by GimpCurve now.
* app/tools/gimpcurvestool.[ch]: use an array of GimpCurves
instead of the old Curves cruft. Use Curves only for the last step
of creating the LUT. Pretty much unfinished migration here too.
* tools/pdbgen/pdb/color.pdb: use a GimpCurve here too.
* app/pdb/color_cmds.c: regenerated.
svn path=/trunk/; revision=24041
2007-10-31 Michael Natterer <mitch@gimp.org>
* configure.in: depend on glib 2.14.1
* app/tools/gimpdrawtool.c
* app/vectors/gimpvectors-import.c: use g_slice_dup() instead of
g_slice_new() and memcpy().
svn path=/trunk/; revision=24014
2007-10-31 Michael Natterer <mitch@gimp.org>
* app/tools/gimprectangletool.c: some general indentation, spacing
and coding style convention paranoia cleanups.
(gimp_rectangle_tool_get_constraints): set all return values also
when bailing out early to avoid valgrind warnings about
uninitialized memory.
svn path=/trunk/; revision=24009
2007-10-30 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimprectangleselecttool.c
(gimp_rect_select_tool_round_corners_notify): Update the selection
when Rounded corners is toggled or the radius is changed as
discussed in bug #418284.
svn path=/trunk/; revision=23991
2007-10-30 Sven Neumann <sven@gimp.org>
Fix drawing of straight lines using the Shift key and a tablet
(bug #164240):
* app/tools/gimppainttool.c (gimp_paint_tool_button_press): set
use_pressure to FALSE when drawing a straight line.
* app/paint/gimppaintbrush.c (_gimp_paintbrush_motion): respect
the use_pressure flag.
svn path=/trunk/; revision=23988
2007-10-29 Sven Neumann <sven@gimp.org>
Fix bug #491272 (no cursor drawn for small brush sizes):
* app/tools/gimpbrushtool.[ch]
(gimp_brush_tool_draw_brush): don't draw the brush outline if it
becomes too small. Instead draw a small cross, but only if
"draw_fallback" was passed as TRUE.
(gimp_brush_tool_draw_brush): pass TRUE for "draw_fallback" if
cursor drawing is disabled for the paint tools.
* app/tools/gimpsourcetool.c (gimp_source_tool_draw): pass FALSE
for "draw_fallback".
* app/tools/gimpdrawtool.c (gimp_draw_tool_draw_cross_by_anchor):
draw a symmetric cross for odd handle sizes.
svn path=/trunk/; revision=23984
2007-10-26 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimprectangletool.c (struct GimpRectangleToolPrivate):
Renamed handle_[wh] to corner_handle_[wh] since that are the
appropriate names.
svn path=/trunk/; revision=23960
2007-10-26 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimprectangletool.c (gimp_rectangle_tool_oper_update):
Use new helper functions to decide if the cursor is on a
handle (or outside of the rectangle + handle bounds) to ease the
introduction of having handles on the outside of the pending
rectangle.
(gimp_rectangle_tool_coord_outside)
(gimp_rectangle_tool_coord_on_handle): New helper functions.
svn path=/trunk/; revision=23959
2007-10-26 Sven Neumann <sven@gimp.org>
Reenabled update of the histogram while doing color corrections
(bug 490182):
* app/core/gimpviewable.[ch]: added new methods preview_freeze()
and preview_thaw().
* app/core/gimpimagemap.c
(gimp_image_map_new): freeze the drawable preview.
(gimp_image_map_dispose): thaw the drawable preview.
(gimp_image_map_do): update the drawable, not the image.
* app/tools/gimpimagemaptool.c (gimp_image_map_tool_response): no
need to invalidate the drawable preview any longer.
svn path=/trunk/; revision=23956
2007-10-22 Sven Neumann <sven@gimp.org>
* app/tools/gimppaintoptions-gui.c: changed aspect ratio of the
wrap-box used for the "Pressure sensitivity" controls to make
them
fit better into the tool-options.
svn path=/trunk/; revision=23910
2007-10-22 Sven Neumann <sven@gimp.org>
* app/tools/gimpsourcetool.[ch]: don't draw the source brush
outline while selecting a new source location (bug #488839).
svn path=/trunk/; revision=23902
2007-10-17 Sven Neumann <sven@gimp.org>
* app/tools/gimpselectionoptions.c: removed a frame.
* app/tools/gimptransformoptions.c: tweaked layout to reduce
horizontal extent.
* app/widgets/gimpviewablebox.c (gradient_box_new): use an icon
for the "Reverse" check button.
svn path=/trunk/; revision=23857
2007-10-16 Michael Natterer <mitch@gimp.org>
* libgimpwidgets/gimppropwidgets.c (gimp_prop_size_entry_new):
honor the "show-pixels" and "show-percent" properties of the unit
param spec.
* app/tools/gimprectangletool.c (gimp_rectangle_tool_start): set
the image's width/height on the size entries so the percent unit
works correctly.
svn path=/trunk/; revision=23852
2007-10-16 Sven Neumann <sven@gimp.org>
* app/tools/gimpselectionoptions.c (gimp_selection_options_gui):
changed "Show interactive boundary" to "Interactive boundary".
* app/tools/gimptextoptions.c: align the color panel with the
button box below it.
svn path=/trunk/; revision=23851
2007-10-16 Sven Neumann <sven@gimp.org>
* app/tools/gimptextoptions.c (gimp_text_options_gui): changed
"Create Path from Text" to "Path from Text".
svn path=/trunk/; revision=23846
2007-10-16 Sven Neumann <sven@gimp.org>
* app/tools/gimpvectoroptions.c (gimp_vector_options_gui):
Changed "Create Selection from Path" to "Selection from Path".
svn path=/trunk/; revision=23845
2007-10-16 Michael Natterer <mitch@gimp.org>
* app/tools/gimprectangleoptions.c: redid the x, y, width and
height entries according to a mockup from peter.
svn path=/trunk/; revision=23843
2007-10-15 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimpaligntool.c (gimp_align_tool_draw): Use
gimp_vectors_bounds() instead of gimp_item_offsets|width|height()
when calculating bounding rectangle for a path. Part of a fix for
bug #486517.
svn path=/trunk/; revision=23832
2007-10-15 Michael Natterer <mitch@gimp.org>
* app/tools/gimprectangleoptions.[ch]: split the "unit" property
into "position-unit" and "size-unit" and added a unit menu to the
position widget group. UI pending further changes...
svn path=/trunk/; revision=23831
2007-10-15 Michael Natterer <mitch@gimp.org>
* app/tools/gimprectangleoptions.c (gimp_rectangle_options_gui):
moved the "Highlight" toggle down to the "Guides" combo.
svn path=/trunk/; revision=23830
2007-10-15 Michael Natterer <mitch@gimp.org>
* app/tools/gimprectangleoptions.[ch]: added the x and y size
entries to the GimpRectangleOptionPrivate struct.
* app/tools/gimprectangletool.c (gimp_rectangle_tool_start): set
the image's resolution on the x, y, width and height size entries.
svn path=/trunk/; revision=23829
2007-10-14 Michael Natterer <mitch@gimp.org>
* app/tools/gimprectangleoptions.c (gimp_rectangle_options_gui):
Reduced the Width: and Height: labels to W: and H:. Please check
and comment, we need some solution for this group of widgets
including the unit menu.
svn path=/trunk/; revision=23825
2007-10-14 Michael Natterer <mitch@gimp.org>
* app/tools/gimprectangleoptions.c (gimp_rectangle_options_gui):
enable the unit menu on the "Height" entry. Looks like crap and
needs to be changed, but the unit functionality is almost complete
now.
svn path=/trunk/; revision=23824
2007-10-14 Michael Natterer <mitch@gimp.org>
* app/tools/gimprectangleoptions.[ch]: renamed properties x0 and
y0 to x and y. Also reordered all property code to be in the same
order and added some empty lines to group the properties.
* app/tools/gimprectangletool.c: changed accordingly.
svn path=/trunk/; revision=23822
2007-10-14 Michael Natterer <mitch@gimp.org>
* libgimpwidgets/gimppropwidgets.[ch] (gimp_prop_size_entry_new):
added parameter "gboolean property_is_pixel" which indicates that
the stored property value is always in pixels and not in the
selected unit.
* app/tools/gimptextoptions.c
* app/widgets/gimpstrokeeditor.c: pass FALSE to keep the old
behavior.
* app/tools/gimprectangleoptions.c (gimp_rectangle_options_gui):
added property "fixed-unit" which is used for all fixed values
now. Perhaps we need separate units for width/height/size. Enable
the unit menu on the "Width" and "Height" size entries of the
"Fixed" section and configure them to store the value in
pixels. This was the easy part, some other widgets still need unit
support.
* app/tools/gimprectangletool.c (gimp_rectangle_tool_start): set
the image's resolution on the size entries changed above.
svn path=/trunk/; revision=23821
2007-10-14 Raphael Quinet <raphael@gimp.org>
* app/tools/gimpaligntool.[ch]: Re-wrote the cursor handling
logic, added cursor modifiers, added hints in the status bar in
order to make it easier to discover how to use the tool. Adds new
translatable strings, fixes bug #486110.
svn path=/trunk/; revision=23819
2007-10-14 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimprectangletool.c
(gimp_rectangle_tool_options_notify): When Fixed: Size/Aspect
ratio numbers are swapped and the Fixed:-rule is active, swap
width and height on any pending rectangle. Fixed bug #479999.
svn path=/trunk/; revision=23818
2007-10-13 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimprectangletool.c
(gimp_rectangle_tool_apply_aspect): Use ROUND() not round().
svn path=/trunk/; revision=23816
2007-10-13 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimprectangletool.c
(gimp_rectangle_tool_apply_aspect): Use round() when solving the
aspect ratio equations as this produces more accurate results.
svn path=/trunk/; revision=23811
2007-10-12 Michael Natterer <mitch@gimp.org>
* app/tools/gimprectangleoptions.[ch]: massively simplified the
fixed rule widget showing/hiding, fixed their spacing, make sure
they don't cause UI resizing on rule change.
svn path=/trunk/; revision=23809
2007-10-11 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell-callbacks.c
(gimp_display_shell_canvas_tool_events): if we need to
delete/create tools on button press because the active tool
doesn't support changing drawables, make sure the newly created
tool gets its focus_display and modifier states set correctly.
Fixes bug #485119. Improved disabled debug output.
* app/tools/gimptool.c: stylistic cleanup in debug output.
svn path=/trunk/; revision=23803
2007-10-10 Sven Neumann <sven@gimp.org>
* app/tools/gimprectangleoptions.c
(gimp_rectangle_options_string_current_updates): an object can
access its own private struct directly.
svn path=/trunk/; revision=23791
2007-10-09 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimprectangleoptions.[ch]: Connect a new function
gimp_rectangle_options_string_current_updates() that updates the
Fixed: Aspect entry with a 'Current' string when aspect of the
current pending rectangle is used, and sets sensitivity FALSE on
aspect ratio changing buttons when that string is shown. Prevents
the confusion mentioned in bug #479999.
A new Rectangle Options property 'use-string-current' has been
added that should be refactored away from the options object along
with references to option widgets.
* app/tools/gimprectangleselecttool.c
(gimp_rect_select_tool_update_option_defaults): Set default Fixed:
Aspect ratio to that of the pending rectangle, and always have
default Fixed: Size as 100x100.
* app/tools/gimpcroptool.c
(gimp_crop_tool_update_option_defaults): Always have default
Fixed: Size 100x100.
* libgimpwidgets/gimpnumberpairentry.[ch]
(gimp_number_pair_entry_class_init): Add a new property
'default-text' that contains text to be shown instead of numbers
when default numbers are to be shown.
(gimp_number_pair_entry_get_default_text)
(gimp_number_pair_entry_set_default_text): Getter and setter for
it.
* libgimpwidgets/gimpwidgets.def: Updated.
svn path=/trunk/; revision=23788
2007-10-08 Sven Neumann <sven@gimp.org>
* app/tools/gimpperspectiveclonetool.c: implement button_release
and stop the draw tool when in adjust mode. Fixes bug #483912.
(gimp_perspective_clone_tool_mode_notify): start the draw tool.
svn path=/trunk/; revision=23770
2007-10-06 Sven Neumann <sven@gimp.org>
* app/tools/gimpeditselectiontool.c
(gimp_edit_selection_tool_draw):
check that there are segments to draw before calling
gimp_draw_tool_draw_boundary().
svn path=/trunk/; revision=23750
2007-09-23 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimprectangleselecttool.c
(gimp_rect_select_tool_should_draw): New name for
gimp_rect_select_selection_visible() which has been changed to
always return TRUE when the tool is active, i.e. when a rectangle
is being create or resized. Better fix for bug #479426.
svn path=/trunk/; revision=23623
2007-09-23 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimprectangleselecttool.c
(gimp_rect_select_tool_draw): Only draw the rectangle when `Show
selection' is `true', with the help of a new function
gimp_rect_select_tool_selection_visible(). Fixes bug #474509.
svn path=/trunk/; revision=23621
2007-09-22 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimpcropoptions.[ch]: Add an allow-growing option.
* app/tools/gimpcroptool.c: Take the new allow-growing option into
account when setting crop rectangle constraints, and restructure
the code a bit.
(gimp_crop_tool_execute): Allow rectangles larger than the
image/layer being sent to gimp_image_crop() since that function
handles that fine. These changes fixes bug #368325.
svn path=/trunk/; revision=23616
2007-09-22 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimprectangletool.c
(gimp_rectangle_tool_set_constraint): Enforce constraints of any
pending rectangle when setting a constraint.
svn path=/trunk/; revision=23615
2007-09-13 Michael Natterer <mitch@gimp.org>
* configure.in: remove FOO_DISABLE_DEPRECATED for only glib >= 2.15
and gtk+ >= 2.13, GIMP builds fine against the 2.14 and 2.12 APIs
apart from:
* app/tools/gimpselectionoptions.c
* libgimpwidgets/gimphelpui.c: undef GTK_DISABLE_DEPRECATED because
GtkTooltips is deprecated in gtk+ 2.12.
* libgimp/gimpui.c
* plug-ins/common/pat.c: the address of an array is always
non-NULL, no need to check for that. Fixes new gcc warnings.
svn path=/trunk/; revision=23522
2007-09-02 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimprectangleselecttool.c
(gimp_rect_select_tool_update_option_defaults): New function to
update default values for Fixed: Size. This function is called to
update defaults values for Fixed: Size to that of the pending
rectangle width x height if there is one, or 100x100 otherwise.
* app/tools/gimpcroptool.c
(gimp_crop_tool_update_option_defaults): Set Fixed: Size to the
size of the pending crop rectangle, or 100x100 if there is none.
svn path=/trunk/; revision=23440
2007-09-01 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimpcroptool.c
(gimp_crop_tool_update_default_fixed_ratio_options):
Generalize the default Fixed: Aspect ratio option setting code
so that it can later be used for Fixed: Size as well, and move
it to
* app/tools/gimprectangletool.[ch]
(gimp_rectangle_tool_pending_size_set)
(gimp_rectangle_tool_constraint_size_set): and use these two new
functions instead.
svn path=/trunk/; revision=23435
2007-08-21 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimprectangletool.c
(gimp_rectangle_tool_update_with_coord): Don't adjust the
rectangle shape if it is is merely being moved.
svn path=/trunk/; revision=23343
2007-08-18 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimprectangletool.c: Don't make
GIMP_RECTANGLE_CONSTRAIN_NONE into GIMP_RECTANGLE_CONSTRAIN_IMAGE,
and restructure the code a bit in the rectagle adjusting functions
so that they can handle the _NONE constraint. The effect of this
change is that rectangle tools no longer are constrained when
using fixed-rules.
svn path=/trunk/; revision=23319
2007-08-18 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimprectangletool.c
(gimp_rectangle_tool_button_press): Clear highlight in previously
active shell when changing active shell.
svn path=/trunk/; revision=23318
2007-08-18 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimpcroptool.c (gimp_crop_tool_button_release): Call
gimp_crop_tool_update_default_fixed_ratio_options after
gimp_rectangle_tool_button_release, so that the state of the
rectangle tool is reflected when updating the default aspect.
svn path=/trunk/; revision=23317
2007-08-18 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimpcroptool.c
(gimp_crop_tool_update_default_fixed_ratio_options): Added a
'ignore_pending' boolean parameter so that the pending rectangle
can be ignored in gimp_crop_tool_execute, as it should be.
svn path=/trunk/; revision=23316
2007-08-17 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimpcroptool.c
(gimp_crop_tool_constructor): Connect to the "image-changed"
signal of GimpContext and update default aspect when image
changes (fixes bug #417166), by using
(gimp_crop_tool_update_default_fixed_ratio_options): which is a
new function that does this. This function is called whenever it
is time to update defualts.
* app/tools/gimprectangletool.[ch]: Made
gimp_rectangle_tool_get_constraint part of the rectangle tool API.
svn path=/trunk/; revision=23312
2007-08-17 Michael Natterer <mitch@gimp.org>
* app/tools/gimpperspectiveclonetool.c (motion)
* app/tools/gimpsourcetool.c (motion): don't allow to ctrl-switch
between clone and set-source mode while painting. It's totally
unclear to me why we used to allow this since it doesn't make much
sense and isn't very intuitive either. Fixes bug #467605.
svn path=/trunk/; revision=23302
2007-08-13 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimpnumberpairentry.c: use italic font if not in
user-override mode.
* app/tools/gimprectangleoptions.c: removed auto-mode icon.
* themes/Default/images/Makefile.am
* themes/Default/images/stock-auto-mode-16.png
* libgimpwidgets/gimpnumberpairentry.[ch]: removed
GIMP_STOCK_AUTO_MODE.
svn path=/trunk/; revision=23231
2007-08-13 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimprectangleoptions.c (gimp_rectangle_options_gui):
Put the auto-mode GtkImage to the right of the Aspect ratio/Size
entry instead of to the left.
svn path=/trunk/; revision=23228
2007-08-12 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimprectangleoptions.c (gimp_rectangle_options_gui):
Set a 16x16 size request on the auto-mode images.
svn path=/trunk/; revision=23227
2007-08-12 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimprectangleoptions.[ch]: Setup a
GIMP_STOCK_AUTO_MODE GtkImage to be shown in the options when
Fixed: Aspect ratio/Size entries are in auto-mode.
* themes/Default/images/Makefile.am: Added
stock-auto-mode-16.png (which is a copy of
preferences/folders-interp-16.png for now).
* libgimpwidgets/gimpstock.[ch]: Added GIMP_STOCK_AUTO_MODE.
svn path=/trunk/; revision=23224
2007-08-11 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimpcroptool.c (gimp_crop_tool_execute): Initialize
'tool' before using it.
svn path=/trunk/; revision=23210
2007-08-11 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimprectangletool.c
(gimp_rectangle_tool_update_handle_sizes): Update handle sizes
based on the shell-visible part of the rectangle.
(gimp_rectangle_tool_start, gimp_rectangle_tool_halt):
Connect/disconnect to the "scrolled" signal of the shell and
update handle sizes.
svn path=/trunk/; revision=23204
2007-08-11 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimprectangletool.c
(gimp_rectangle_tool_button_release): Halt the tool on cancel if a
rectangle has not previously been created.
svn path=/trunk/; revision=23202
2007-08-11 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimprectangletool.c
(gimp_rectangle_tool_update_highlight): Renamed from
gimp_rectangle_tool_set_highlight
(gimp_rectangle_tool_button_release): Add call to
gimp_rectangle_tool_update_highlight to keep highlight in sync
when a crop rectangle is cancelled.
svn path=/trunk/; revision=23201
2007-08-10 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimpcroptool.c (gimp_crop_tool_button_release): Set
default 'Fixed: Aspect ratio' values to the size of the pending
crop rectangle. Fixes bug #355545.
* app/tools/gimprectangletool.[ch]
(gimp_rectangle_tool_get_rectangle_size): New helper function.
svn path=/trunk/; revision=23194
2007-08-10 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimprectangleoptions.c: Added
"default-aspect-numerator", "default-aspect-denominator",
"default-fixed-size-width" and "default-fixed-size-height" as
non-serialized tool options, and "overridden-fixed-aspect" and
"overridden-fixed-size" as serialized ones.
* app/widgets/gimppropwidgets.c (gimp_prop_number_pair_entry_*):
Added support for the new GimpRectangleOptions.
svn path=/trunk/; revision=23187
2007-08-10 Martin Nordholts <martinn@svn.gnome.org>
* app/widgets/gimppropwidgets.[ch]: Merged gimp_prop_size_2d_* and
gimp_prop_aspect_ratio_* to gimp_prop_number_pair_*.
* app/tools/gimprectangleoptions.c (gimp_rectangle_options_gui):
Use the merged gimp_prop_number_pair_entry_new.
svn path=/trunk/; revision=23184
2007-08-08 Martin Nordholts <martinn@svn.gnome.org>
Renamed GimpRatioEntry to GimpNumberPairEntry, and generalized the
code a lot, so that it can be used both for 'Fixed: Aspect ratio'
and 'Fixed: Size'. Support is also added for having default values
and a 'user overrided' value mode.
* libgimpwidgets/gimpnumberpairentry.[ch]: Now contains the
rewrite and generalization of GimpRatioEntry.
(gimp_number_pair_entry_get_type)
(gimp_number_pair_entry_new)
(gimp_number_pair_entry_set_default_values)
(gimp_number_pair_entry_set_values)
(gimp_number_pair_entry_get_values): New libgimpwidget API.
* app/widgets/gimppropwidgets.[ch] (gimp_prop_size_2d_new): Added
new helper widget for setting up a GimpNumberPairEntry for the
Fixed: Size entry in the Rectangle Options.
* app/tools/gimprectangleoptions.c (gimp_rectangle_options_gui):
Use the new gimp_prop_size_2d_entry for the Fixed: Size entry.
* libgimpwidgets/gimpwidgets.def: Removed gimp_ratio_entry_* and
added gimp_number_pair_entry_*.
* libgimpwidgets/gimpwidgets.h * libgimpwidgets/gimpwidgetstypes.h
* libgimpwidgets/Makefile.am (libgimpwidgets_2_0_la_sources)
(libgimpwidgetsinclude_HEADERS): Updated accordingly.
svn path=/trunk/; revision=23154
2007-08-08 Martin Nordholts <martinn@svn.gnome.org>
* libgimpwidgets/gimpratioentry.[ch]: Migrate entry completion
code and put responsability on clients to set that up when needed.
* app/tools/gimprectangleoptions.[ch]: Setup entry completion code
manually for the GimpRatioEntry widgets by using
(gimp_rectangle_options_setup_ratio_completion)
(gimp_ratio_entry_history_select, gimp_ratio_entry_history_add):
these new functions.
svn path=/trunk/; revision=23149
2007-08-08 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimprectangleoptions.[ch]: Use separate
desired-fixed-size-width/height properties for Fixed: Size instead
of sharing properties with Fixed: Width/Height.
* app/tools/gimprectangletool.c: Use the two new properties for
Fixed: Size.
svn path=/trunk/; revision=23140
2007-08-05 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimprectangletool.c (gimp_rectangle_tool_motion): When
a new rectangle is created and Fixed: Size is used, set rectangle
function to RECT_MOVING.
svn path=/trunk/; revision=23117
2007-08-04 Martin Nordholts <martinn@svn.gnome.org>
Update rectangle tool options to bring it closer to the spec. The
major change is the use of a 'Fixed:' check box and a 'Aspect
ratio/Width/Height/Size' combo box. The check box is togglable
with Shift while rubber-banding.
* app/tools/gimprectangletool.c
(gimp_rectangle_tool_active_modifier_key): Set other side also
when Shift is released.
(gimp_rectangle_tool_update_options): Don't supress updates of
tool options on fixed width/height/size
(gimp_rectangle_tool_apply_fixed_height)
(gimp_rectangle_tool_update_with_coord)
(gimp_rectangle_tool_handle_general_clamping): Use new tool option
interface and members.
* app/tools/gimprectangleoptions.[ch]
(gimp_rectangle_options_iface_base_init)
(gimp_rectangle_options_install_properties)
(gimp_rectangle_options_(get|set)_property): Remove and add
relevant properties.
(gimp_rectangle_options_private_finalize): Unref the new widgets
used in tool options.
(gimp_rectangle_options_fixed_rule_changed): New, update tool
options depending on current option state.
(gimp_rectangle_options_gui): Modified according to change log
entry summary.
(gimp_rectangle_options_unparent_fixed_rule_widgets): New helper.
(gimp_rectangle_options_fixed_rule_active): New, clients should
use this to find out if a certain fixed-mode is active.
* app/tools/tools-enums.[ch]: Added GimpRectangleToolFixedRule.
svn path=/trunk/; revision=23114
2007-08-04 Martin Nordholts <martinn@svn.gnome.org>
Don't apply fixed aspect on pending rectangles that are not being
rubber-banded, when this is changed in the rectangle tool options.
* app/tools/gimprectangletool.c (gimp_rectangle_tool_options_notify):
Don't synthesize motion for fixed aspect ratio options changes
* app/tools/gimprectangleoptions.c (gimp_rectangle_options_gui): Removed
callback to
(gimp_rectangle_options_notify_aspect): which is not needed any more,
and hence is removed.
svn path=/trunk/; revision=23113
2007-08-02 Michael Natterer <mitch@gimp.org>
* app/tools/gimpcroptool.c (gimp_crop_tool_cursor_update): no need
to set the tool cursor here, we already do that in init() and
never change it.
* app/widgets/gimpcursor.c (gimp_cursor_new): don't show the move
cursor and the move modifier at the same time. Some small
cleanups.
svn path=/trunk/; revision=23104
2007-07-25 Michael Natterer <mitch@gimp.org>
* app/tools/gimptool.c (gimp_tool_set_active_modifier_state):
don't have the tool release ALT when the user releases CONTROL.
Fixes another stuck modifier instance and other modifier
weirdness.
svn path=/trunk/; revision=22992
2007-07-17 Sven Neumann <sven@gimp.org>
* app/core/gimptoolinfo.c (gimp_tool_info_new): use the tool-info
identifier as the name of the tool-options object.
* app/paint/gimppaintoptions.c (gimp_paint_options_new): use the
paint-info identifier as the name of the paint-options object.
* app/paint/gimp-paint.c (gimp_paint_register): added parameter check.
* app/tools/gimp-tools.c (gimp_tools_init): formatting.
svn path=/trunk/; revision=22941
2007-07-15 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimprectangletool.c (struct
_GimpRectangleToolPrivate): Added members to keep track of for
what shell scale the handle sizes were calculated. This is
necessary so that in
(gimp_rectangle_tool_control): we only update the handle sizes
when the zoom level has changed. We must test this, because the
tool is also paused/resumed when highlightning is on, and we don't
want to update handle sizes just because highlightning happends to
be on.
(gimp_rectangle_tool_scale_has_changed): Added helper function.
svn path=/trunk/; revision=22933
2007-07-14 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimprectangletool.c
(gimp_rectangle_tool_set_highlight): Check agains tool->display,
this check was lost when this function was moved out of
gimp_rectangle_tool_configure.
svn path=/trunk/; revision=22931
2007-07-14 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimprectangletool.c (gimp_rectangle_tool_control):
Also update rectangle handle sizes when canvas zoom is
changed. (Forgot that in previous commit.)
svn path=/trunk/; revision=22930
2007-07-14 Martin Nordholts <martinn@svn.gnome.org>
Made the rectangle tool handles not resize during rectangle
manipulation, as outlined in the spec, by separating highlight
updating and handle size updating calls.
* app/tools/gimprectangletool.c (gimp_rectangle_tool_configure):
Renamed to
(gimp_rectangle_tool_update_handle_sizes): and moved
gimp_rectangle_tool_set_highlight out of it. These two are now
called independantly.
svn path=/trunk/; revision=22929
2007-07-14 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimprectangletool.c (gimp_rectangle_tool_clamp_width)
(gimp_rectangle_tool_clamp_height): Fixed crash when creating a
rectangle with constraints outside of canvas bounds.
svn path=/trunk/; revision=22928
2007-07-13 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimprectangletool.c
(gimp_rectangle_tool_button_release): Don't execute selection if a
dead area is clicked.
svn path=/trunk/; revision=22927
2007-07-13 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimprectangletool.c
(gimp_rectangle_tool_active_modifier_key): Update handle sizes and
highlight area also when Ctrl is released.
svn path=/trunk/; revision=22926
2007-07-11 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimprectangletool.c: Removed bitfieldized values from
the SideToResize enum, they are irrelevant. Also renamed
HANDLE_SIZE to MAX_HANDLE_SIZE.
svn path=/trunk/; revision=22909
2007-07-08 Martin Nordholts <martinn@svn.gnome.org>
Completely rewrote logic in gimp_rectangle_tool_motion, in effect
also fixing bug #353936 and bug #398188. The general strategy now
is to have specialized functions doing one thing, and one thing
only.
The patch also makes adjusting the rectangle through the keyboard
and through the rectangle tool options follow tool options.
* app/tools/gimprectangletool.c (gimp_rectangle_tool_motion):
Completely refactored.
(gimp_rectangle_tool_active_modifier_key):
(gimp_rectangle_tool_update_options): Submit to tool options.
(gimp_rectangle_tool_apply_coord)
(gimp_rectangle_tool_clamp)
(gimp_rectangle_tool_clamp_width)
(gimp_rectangle_tool_clamp_height)
(gimp_rectangle_tool_keep_inside)
(gimp_rectangle_tool_keep_inside_horizontally)
(gimp_rectangle_tool_keep_inside_vertically)
(gimp_rectangle_tool_apply_fixed_width)
(gimp_rectangle_tool_apply_fixed_height)
(gimp_rectangle_tool_apply_aspect)
(gimp_rectangle_tool_update_with_coord)
(gimp_rectangle_tool_get_constraints)
(gimp_rectangle_tool_handle_general_clamping): The new specialized
functions.
svn path=/trunk/; revision=22903
2007-07-05 Sven Neumann <sven@gimp.org>
* app/tools/gimpdrawtool.c (gimp_draw_tool_draw_corner): changed
the highlighting of the side handles to follow changes in the
specification.
* app/tools/gimprectangletool.c (gimp_rectangle_tool_draw): cosmetics.
svn path=/trunk/; revision=22867
2007-06-30 Martin Nordholts <martinn@svn.gnome.org>
Started taking GimpRectangleTool towards the new specification.
The side handles now have the same width and height as the
corresponding corner handles, and the size of the side handles do
not span across the whole rectangle. Side handles also have a
limited mimimum size, just as corner handles.
* app/tools/gimprectangletool.c (gimp_rectangle_tool_oper_update,
gimp_rectangle_tool_draw, gimp_rectangle_tool_configure,
gimp_rectangle_tool_get_anchor): Changed accordingly.
* app/tools/gimpdrawtool.c (gimp_draw_tool_draw_corner): Changed
accordingly.
svn path=/trunk/; revision=22856
2007-06-29 Martin Nordholts <martinn@svn.gnome.org>
Made GimpRectangleTools remember where the "other side" is when
fixed-center is turned on, and reset the "other side" to that position
when fixed-center is turned off again. Fixes bug 398183.
* app/tools/gimprectangletool.c
(gimp_rectangle_tool_button_press): Remember "other side".
(gimp_rectangle_tool_active_modifier_key): When fixed-center is turned
off, reset "other side".
(gimp_rectangle_tool_get_other_side)
(gimp_rectangle_tool_get_other_side_coord)
(gimp_rectangle_tool_set_other_side_coord): New functions.
svn path=/trunk/; revision=22854
2007-06-27 Michael Natterer <mitch@gimp.org>
* app/core/gimpimagemap.c (gimp_image_map_clear)
(gimp_image_map_do): update the image, not the drawable so we
avoid constantly invalidating the drawable preview.
* app/tools/gimpimagemaptool.c (gimp_image_map_tool_response):
invalidate the drawable preview here.
* app/paint/gimppaintcore.c (gimp_paint_core_paste)
(gimp_paint_core_replace): clean up drawable offset handling code.
svn path=/trunk/; revision=22843
2007-06-27 Michael Natterer <mitch@gimp.org>
Removed useless image flushing which caused the image preview to
be updated needlessly:
* app/core/gimpimagemap.c (gimp_image_map_do): don't flush the
image when the idle rendering is completed, emit our own "flush"
signal instead just as for the incremental display updates.
* app/tools/gimpimagemaptool.c (gimp_image_map_tool_notify_preview):
when switching off the preview don't flush the image, only flush
projection and display.
svn path=/trunk/; revision=22842
2007-06-26 Sven Neumann <sven@gimp.org>
* app/tools/gimplevelstool.c: unset the active color picker when
the dialog is unmapped. Fixes bug #451272.
* app/tools/gimpimagemaptool.c: formatting.
svn path=/trunk/; revision=22838
2007-06-25 Sven Neumann <sven@gimp.org>
* configure.in: removed extra check for gthread and fold it into
the GLIB and GTK checks.
* */Makefile.am: changed accordingly.
* app/main.c (main): always call g_thread_init().
svn path=/trunk/; revision=22832
2007-06-21 Sven Neumann <sven@gimp.org>
* app/tools/gimpcurvestool.c: introduced local variables in an
attempt to make the code a little more readable.
svn path=/trunk/; revision=22814
2007-06-19 Sven Neumann <sven@gimp.org>
* app/tools/gimprectangleselectoptions.c
(gimp_rect_select_options_gui): set proper step and page
increments in the scale entry for the corner radius.
svn path=/trunk/; revision=22801
2007-06-07 Sven Neumann <sven@gimp.org>
* app/text/Makefile.am
* app/core/Makefile.am
* app/tools/Makefile.am
* app/display/Makefile.am
* app/widgets/Makefile.am
* app/base/Makefile.am
* app/paint/Makefile.am
* app/plug-in/Makefile.am
* libgimp/Makefile.am
* libgimpthumb/Makefile.am
* tools/pdbgen/Makefile.am
* libgimpwidgets/Makefile.am: applied the remaining parts of the
patch from Daniel Richard G. to fix out-of-source-tree builds
(bug #444960).
svn path=/trunk/; revision=22735
2007-05-22 Michael Natterer <mitch@gimp.org>
* app/tools/gimpmagnifyoptions.[ch]: remove "threshold" from
the options struct and added compat code in get_property().
svn path=/trunk/; revision=22579
2007-05-16 Michael Natterer <mitch@gimp.org>
* app/tools/gimpbrushtool.c (gimp_brush_tool_constructor): add a
local GimpDisplayConfig variable to improve readability.
svn path=/trunk/; revision=22514
2007-05-07 Sven Neumann <sven@gimp.org>
* app/tools/gimpbrushtool.[ch] (gimp_brush_tool_draw): moved
brush drawing code to the new function gimp_brush_tool_draw_brush().
* app/tools/gimpsourcetool.c: (gimp_source_tool_draw): draw the
brush outline at the source position (bug #435545).
svn path=/trunk/; revision=22450
2007-05-05 Sven Neumann <sven@gimp.org>
* app/base/gimplut.[ch]
* app/tools/gimpcurvestool.c
* app/tools/gimplevelstool.c: reverted the changes done for bug
#331782. See the bug report for an explanation.
svn path=/trunk/; revision=22421
2007-05-05 Mukund Sivaraman <muks@mukund.org>
* app/base/gimplut.c
* app/base/gimplut.h
* app/tools/gimpcurvestool.c
* app/tools/gimplevelstool.c: Fixed the value channel color
correction in the curves and levels tools to only modify the
value channel and not the hues. Fixes bug #331782.
svn path=/trunk/; revision=22418
2007-05-05 Michael Natterer <mitch@gimp.org>
* app/tools/gimpdrawtool.c (gimp_draw_tool_draw_boundary): fixed
off-by-one (too large) drawing of boundaries by copying the resp.
code and its obscure comment from gimpdisplayshell-selection.c
Fixes bug #416432.
svn path=/trunk/; revision=22417
2007-05-02 Sven Neumann <sven@gimp.org>
* app/core/gimppickable.[ch]: removed get_color_at() from the
GimpPickable interface. Implement the same functionality using
get_pixel_at() but with a saner API.
* app/core/gimpdrawable.c
* app/core/gimpprojection.c
* app/core/gimpimagemap.c: removed get_color_at() implementations.
* app/tools/gimpbycolorselecttool.c: adapt to API change of
gimp_pickable_get_color_at().
* app/tools/gimprectangleselecttool.c: added missing include.
svn path=/trunk/; revision=22383
2007-05-02 Sven Neumann <sven@gimp.org>
* app/tools/gimpperspectiveclonetool.c
(gimp_perspective_clone_tool_cursor_update): if we are in adjust
mode, skip the GimpBrushClass when chaining up. Fixes bug #354933.
svn path=/trunk/; revision=22379
2007-05-02 Martin Nordholts <martinn@svn.gnome.org>
When adjusting a rectangle it feels unintuitive that the center of
the rectangle when Ctrl is used lands on the corner that was used
to resize the rectangle. This commit changes the center of the
rectangle when Ctrl is used on a already-created rectangle to the
center of the rectangle when the user starts adjusting the size.
* app/tools/gimprectangletool.c (struct
_GimpRectangleToolPrivate): Added center_[xy]_on_fixed_center
members that keeps track on where the center of the rectangle
should be when the Ctrl modifier is used.
* app/tools/gimprectangletool.c: Added convenience function
gimp_rectangle_tool_get_fixed_center_coords.
* app/tools/gimprectangletool.c
(gimp_rectangle_tool_button_press): Sets the
center_[xy]_on_fixed_center members depending on whether the button
press modifies an existing rectangle or creates a new one.
* app/tools/gimprectangletool.c
(gimp_rectangle_tool_active_modifier_key): Adjusted to accomodate to
above mentioned changes.
svn path=/trunk/; revision=22374
2007-04-25 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimpscrolledpreview.c: also use the middle mouse
button for panning.
* plug-ins/common/nova.c: override the default mouse handling of
the GimpScrolledPreview and allow to reposition the center using
the left mouse button. Fixes bug #364432.
* app/tools/gimprectangletool.c: formatting.
svn path=/trunk/; revision=22319
2007-04-12 Sven Neumann <sven@gimp.org>
* app/tools/gimprectangleselecttool.c: implement
GimpTool::key_press and delegate to the rectangle tool or the
edit
selection tool. This resurrects positioning of floating
selections
with the cursor keys.
svn path=/trunk/; revision=22244
2007-03-31 Michael Natterer <mitch@gimp.org>
* app/tools/gimprectangleoptions.[ch]: made the
GimpRectangleOptionsPrivate struct public (ha ha).
(gimp_rectangle_options_gui): replaced the "Auto shrink selection"
toggle by a normal button that needs to be clicked explicitely.
* app/tools/gimprectangletool.c: access members of
GimpRectangleOptionsPrivate directly instead of reading them into
local variables using g_object_get(), this makes the code quite
more readable. Some code cleanup.
(gimp_rectangle_tool_button_release): get rid of the confusing
auto-shrink madness on button release...
(gimp_rectangle_tool_start)
(gimp_rectangle_tool_halt): ...instead, connect to the option's
auto shrink button and shrink on "clicked".
svn path=/trunk/; revision=22209
2007-03-31 Michael Natterer <mitch@gimp.org>
* app/tools/gimprectangleselecttool.c: read the "operation" member
of GimpSelectionOptions directly.
* app/tools/gimpellipseselecttool.c (gimp_ellipse_select_tool_draw):
chain up instead of calling gimp_rectangle_tool_draw() directly,
don't #include "gimprectantletool.h".
svn path=/trunk/; revision=22208
2007-03-31 Michael Natterer <mitch@gimp.org>
* app/tools/gimpcroptool.c: access the GimpCropOptions structure
directly to read the "layer_only" option (don't use g_object_get),
some code cleanup.
svn path=/trunk/; revision=22207
2007-03-30 Sven Neumann <sven@gimp.org>
* app/tools/gimprectangletool.c (gimp_rectangle_tool_draw_guides):
hardcode the result of sqrt(5).
svn path=/trunk/; revision=22196
2007-03-29 Michael Natterer <mitch@gimp.org>
* app/tools/gimptool.c (gimp_tool_check_click_distance): don't
compare the result of sqrt() with something, compare the original
value with something's square instead.
svn path=/trunk/; revision=22195
2007-03-17 Michael Natterer <mitch@gimp.org>
* app/tools/gimpvectortool.c (gimp_vector_tool_register):
register the tool with GIMP_PAINT_OPTIONS_CONTEXT_MASK and
GIMP_CONTEXT_GRADIENT_MASK so its tool options are suited
as parameter object for stroking (the stroke button in the
tool options was using default values before).
svn path=/trunk/; revision=22135
2007-03-15 Michael Natterer <mitch@gimp.org>
* app/tools/gimpaligntool.c
* app/tools/gimpcolorpickertool.c
* app/tools/gimppainttool.c
* app/tools/gimpvectortool.c: remove gimp_tool_pop_status() from
control() implementations because GimpTool does this generically now.
* app/tools/gimpblendtool.c
* app/tools/gimpselectiontool.c: remove entire control()
implementations because they were doing nothing else.
svn path=/trunk/; revision=22128
2007-03-15 Michael Natterer <mitch@gimp.org>
* app/tools/gimppaintoptions-gui.c (gimp_paint_options_gui): "adj"
is a GtkObject not a GtkWidget, also moved it to its local scope.
svn path=/trunk/; revision=22127
2007-03-15 Michael Natterer <mitch@gimp.org>
* app/tools/gimprectangletool.c (gimp_rectangle_tool_halt): check
if tool->display is there before dereferencing it (bug #418504).
(gimp_rectangle_tool_start): add "display" parameter and set
tool->display here.
(gimp_rectangle_tool_button_press): pass the display to start()
and don't set tool->display here.
svn path=/trunk/; revision=22125
2007-03-14 Michael Natterer <mitch@gimp.org>
Make the status display stuff local to GimpTool:
* app/tools/tool_manager.c (tool_manager_control_active): don't
call gimp_tool_clear_status().
* app/tools/gimptool.[ch]: make gimp_tool_clear_status() a
private function. Move call to gimp_tool_clear_status() from
real_control() to control(). Check the status_displays too in
gimp_tool_real_has_display() and gimp_tool_has_image() so the
normal mechanism of control(HALT)ing (and thus popping all
status messages) the tool on display close works.
svn path=/trunk/; revision=22124
2007-03-14 Michael Natterer <mitch@gimp.org>
Fix stuck statusbar messages when changing tools (bug #398913):
* app/tools/gimptool.[ch]: keep a list of status_displays around.
Update the list in all status push, replace and pop functions.
Added gimp_tool_clear_status() which removes the status messages
from all displays in the list. Call the function from
gimp_tool_real_control(HALT).
* app/tools/tool_manager.c (tool_manager_control_active): if we
can't call gimp_tool_control() because we have no display to pass,
still call gimp_tool_clear_status() so the messages go away from
displays the tool was only hovering.
svn path=/trunk/; revision=22123
2007-03-14 Martin Nordholts <martinn@svn.gnome.org>
Made brushes upscalable by using scale_region. Downscaling still
uses functions in app/base/brush-scale.c (because of better
performance). Parametric brushes of course recalculates masks
instead of using bitmap scaling. Fixes bug #65030.
* app/core/gimpbrush.[ch]: Added a private scale_buf method which
uses scale_region (with GIMP_INTERPOLATION_LINEAR) to scale its
masks and pixmaps. Also added public virtual method scale_size to
GimpBrush (overridden by GimpBrushGenerated) which calculates the
buffer sizes for a given brush scaled with a given scale.
* app/core/gimpbrushgenerated.c: Implemented the new scale_size
method inherited from GimpBrush, and modified
gimp_brush_generated_calc to use this helper function.
* app/tools/gimppaintoptions-gui.c (gimp_paint_options_gui): Made
the brush Scale-slider logarithmic.
* app/paint/gimppaintoptions.c (gimp_paint_options_class_init):
Changed Scale scale to [0.0, 10.0].
* app/paint/gimpbrushcore.c:
(gimp_brush_core_calc_brush_size): Refactored 'get brush size' code
to where it belongs, in GimpBrush-classes, and allowed scales
larger than 1.0.
svn path=/trunk/; revision=22113
2007-03-13 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpdialogfactory.[ch]: added new ugly function
gimp_dialog_factory_hide_dialog() which does gtk_widget_hide() and
sets the stored visibility state to GIMP_DIALOG_VISIBILITY_INVISIBLE
in order to avoid re-showing dialogs that were already insivible due
to TAB-toggling when we gtk_widget_hided them.
* app/tools/gimptransformtool.c
* app/tools/gimpimagemaptool.c: use the new function instead of
gtk_widget_hide() to hide tool dialogs. Fixes bug #414006.
svn path=/trunk/; revision=22111
2007-03-12 Michael Natterer <mitch@gimp.org>
* app/tools/gimpmagnifytool.[ch]: lots of fixes and changes:
- Request click events and use them instead of looking at the
distance the mouse travelled ourselves.
- Also zoom when the user draws a very thin rectangle or just a
line, there is no reason to treat that as click.
- Changed all calculations and stored values to double so the tool
continues to work smoothly at high zoom levels.
- Fix scale calculation when zooming out (was totally b0rk).
- Changed offset calculation when zooming out so that the current
viewport ends up within the drawn rectangle (which is the
opposite of what zooming in does).
svn path=/trunk/; revision=22105
2007-03-12 Michael Natterer <mitch@gimp.org>
* app/core/gimpbrush.[ch]
* app/core/gimpbrushgenerated.c
* app/tools/gimppaintoptions-gui.c
* app/base/brush-scale.[ch]
* app/base/temp-buf.[ch]
* app/paint/gimppaintoptions.c
* app/paint/gimpbrushcore.c: revert last commit. The patch needs
more review and it's easier to start from quare one than have
patches on top of patches.
svn path=/trunk/; revision=22101
2007-03-11 Michael Schumacher <schumaml@cvs.gnome.org>
Made brushes scalable (both up and down) by using existing
scaling routines, and also refactored some brush-code. Patch by
Martin Nordholts. Fixes bug #65030.
* app/paint/gimpbrushcore.c:
(gimp_brush_core_calc_brush_length_scale) Refactored 'get brush
size' code to where it belongs, in GimpBrush-classes, and renamed
gimp_brush_core_calc_brush_size to
gimp_brush_core_calc_brush_length_scale.
* app/paint/gimppaintoptions.c (gimp_paint_options_class_init):
Changed Scale scale to [0.0, 100.0].
* app/base/temp-buf.[ch] (mask_buf_new): Change signature to also
take a bpp parameter.
* app/base/brush-scale.[ch]: Changed brush_scale_(mask|pixmap) to
the new brush_scale_buf, which uses existing scaling routines
(scale_region) instead of dedicated down-scaling only routines.
* app/tools/gimppaintoptions-gui.c (gimp_paint_options_gui): Made
the brush Scale-slider logarithmic.
* app/core/gimpbrushgenerated.c: Implemented the new
get_scaled_size method inherited from GimpBrush, and modified
gimp_brush_generated_calc to use this helper function.
* app/core/gimpbrush.[ch]: Added public virtual method
get_scaled_size to GimpBrush, overridden by GimpBrushGenerated,
which calculates the buffer sizes for a given brush scaled with a
given scale. Also changed calls to brush_scale_(mask|pixmap) to
the new brush_scale_buf.
svn path=/trunk/; revision=22099
2007-03-10 Michael Natterer <mitch@gimp.org>
* app/tools/tools-enums.[ch] (enum GimpButtonReleaseType): added
value GIMP_BUTTON_RELEASE_NO_MOTION.
* app/tools/gimptool.[ch]: when click events are requested and the
click was too long for a "click" event, send a NO_MOTION event if
the pointer didn't move at all.
* app/tools/gimpbucketfilltool.c: treat NO_MOTION as tool
confirmation too.
* app/tools/gimpfreeselecttool.c: request click events and treat
both CLICK and NO_MOTION as tool confirmation.
* app/tools/gimprectangletool.c: ignore NO_MOTION.
svn path=/trunk/; revision=22091
2007-03-09 Michael Natterer <mitch@gimp.org>
* app/core/core-types.h: include "libgimpmath/gimpmathtypes.h"
instead of "libgimpmath/gimpmath.h".
* app/core/gimpbrush.h
* app/paint/gimppaintcore.h
* app/paint/gimpperspectiveclone.h
* app/text/gimptext.h
* app/tools/gimptransformtool.h: include gimpvector.h and
gimpmatrix.h explicitely where they are needed in public structs.
* app/*/*.c
* tools/pdbgen/pdb/paths.pdb: include "libgimpmath/gimpmath.h"
where needed.
* app/pdb/paths_cmds.c: regenerated.
svn path=/trunk/; revision=22084
2007-03-09 Raphael Quinet <raphael@gimp.org>
* app/tools/gimpblendtool.c (gimp_blend_tool_push_status): make
the new feature visible in the status bar (alas, this implies a
new translatable string).
svn path=/trunk/; revision=22078
2007-03-08 Michael Natterer <mitch@gimp.org>
* app/tools/gimpblendtool.h (struct GimpBlendTool): renamed
members and added last_x and last_y to remember the last mouse
coords.
* app/tools/gimpblendtool.c: changed accordingly. Take drawable
offset into account in button_release() and remove offset
calculations from all other places. Enabled using ALT for moving
the entire line.
svn path=/trunk/; revision=22077
2007-03-08 Michael Natterer <mitch@gimp.org>
* app/tools/gimpbucketfilltool.[ch]: request click events, removed
target_x,y struct members and button_press() implementation and
use the coords passed in button_release(). Also make sure that
a click has no effect in areas where we show the bad corsor.
svn path=/trunk/; revision=22075
2007-03-08 Sven Neumann <sven@gimp.org>
* app/tools/gimpperspectivetool.c
* app/tools/gimpscaletool.c
* app/tools/gimprotatetool.c
* app/tools/gimpfliptool.c
* app/tools/gimpsheartool.c
* app/tools/gimptransformtool.[ch]: removed shell_desc member
from
GimpTransformToolClass and just use the tool blurb instead.
svn path=/trunk/; revision=22067
2007-03-07 Sven Neumann <sven@gimp.org>
* app/tools/gimpvectoroptions.c (gimp_vector_options_gui):
describe
usage of modifiers as suggested in bug #415796.
svn path=/trunk/; revision=22065
2007-03-07 Michael Natterer <mitch@gimp.org>
Clean up fix for bug #328001:
* app/tools/gimpeditselectiontool.[ch] (process_event_queue_keys):
made private again.
(gimp_edit_selection_tool_translate): new function which has an
additional GimpTransformType parameter to determine what transform
to perform. Do all the work here, ignoring the key event's
modifier state.
(gimp_edit_selection_tool_key_press): just determine the transform
type from the key event's modifier state and call
gimp_edit_selection_tool_translate().
* app/tools/gimpmovetool.c (gimp_move_tool_key_press): removed all
code and call gimp_edit_selection_tool_translate() with
options->move_type. Moved the function to its proper place in the
file.
svn path=/trunk/; revision=22063
2007-03-06 Sven Neumann <sven@gimp.org>
Patch by Martin Nordholts. Fixes bug #328001.
* app/tools/gimpeditselectiontool.[ch]
(process_event_queue_keys):
Made process_event_queue_keys public for use of gimpmovetool.c.
Still needs to be renamed and moved to another place.
* app/tools/gimpmovetool.c (gimp_move_tool_key_press): Created
gimp_move_tool_key_press() which takes care of events that
gimp_edit_selection_tool_key_press() is not is able to
handle. Otherwise just pass key events on to that method.
svn path=/trunk/; revision=22058
2007-03-05 Michael Natterer <mitch@gimp.org>
* app/tools/gimprectangleselecttool.c
(gimp_rect_select_tool_execute): if the user clicks inside an
existing selection, initialize the rectangle tool to the entire
selection, not just to the part of it that is within the active
drawable. Also removed some dead code.
svn path=/trunk/; revision=22049
2007-03-04 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell.[ch]
* app/display/gimpdisplayshell-scale.c: only change the
remembered
last scale value if the last change occured more than a second
ago.
* app/tools/gimprectangletool.c: fixed compiler warnings.
svn path=/trunk/; revision=22040
2007-02-29 Raphael Quinet <raphael@gimp.org>
* app/tools/gimpmeasuretool.c (gimp_measure_tool_cursor_update):
don't suggest Shift when a new point cannot be added to point 0.
svn path=/trunk/; revision=22031
2007-02-28 Raphael Quinet <raphael@gimp.org>
* app/tools/gimpmeasuretool.[ch]: added status bar help messages
explaining the usage of the modifiers.
* app/tools/gimpvectortool.c (gimp_vector_tool_status_update):
suggest Ctrl for edit mode, to close the path or move handles.
* app/tools/gimpcroptool.c (gimp_crop_tool_button_release):
"press enter" should be "press Enter", as in the other tools.
svn path=/trunk/; revision=22030
2007-02-28 Sven Neumann <sven@gimp.org>
* app/tools/gimptool.c (gimp_tool_check_click_distance):
simplified callers and moved calculations out of the SQR() macro.
svn path=/trunk/; revision=22027
2007-02-28 Sven Neumann <sven@gimp.org>
* app/tools/gimprectangleselecttool.c
(gimp_rect_select_tool_rectangle_changed): don't change the
selection while the tool is active. Fixes bug #398185. Thanks to
Martin Nordholts for investigating this problem.
* app/tools/gimprectangletool.c: minor cleanup.
svn path=/trunk/; revision=22025
2007-02-28 Michael Natterer <mitch@gimp.org>
* app/tools/gimptool.c (gimp_tool_check_click_distance): need to
check the distance in screen coords, not image coords.
* app/tools/gimpmovetool.c (gimp_move_tool_button_release): forgot
two manual checks for GDK_BUTTON3_MASK.
svn path=/trunk/; revision=22024
2007-02-27 Michael Natterer <mitch@gimp.org>
* app/tools/gimptool.[ch]: clean up last commit a bit. Pass the
recorded button_press_coords to GimpTool::button_release() when a
click was detected.
svn path=/trunk/; revision=22019
2007-02-27 Michael Natterer <mitch@gimp.org>
* app/tools/gimptoolcontrol.[ch]: added "gboolean wants_click"
member and getters/setters.
* app/tools/gimptool.[ch] (struct GimpTool): added members
in_click_distance, press_coords and press_time.
(gimp_tool_button_press): if the tool wants click events, record
press_coords and press_time.
(gimp_tool_motion): check if we are still in click distance.
(gimp_tool_button_release): ditto. If we are still in click
distance, synthesize a motion event back to the recorded
press_coords and send the tool release_type = CLICK.
(gimp_tool_check_click_distance): utility function which checks
the current coords and time against the recorded ones, using
gtk-double-click-time and gtk-double-click-distance as thresholds.
* app/tools/gimpcroptool.c
* app/tools/gimprectangleselecttool.c: request click events
and handle them.
* app/tools/gimprectangletool.[ch]: handle click events. Removed
gimp_rectangle_tool_no_movement().
svn path=/trunk/; revision=22016
2007-02-27 Michael Natterer <mitch@gimp.org>
Step one towards enabling tool cancellation by other means than
mouse button 3 and towards proper "clicked" semantics.
* app/tools/tools-enums.[ch]: added enum GimpButtonReleaseType
which can be one of { NORMAL, CANCEL, CLICK } (click is curently
unused).
* app/tools/gimptool.[ch] (GimpTool::button_release): added
"release_type" parameter.
(gimp_tool_button_release): if the state contains
GDK_BUTTON3_MASK, call the tool's button_release() with CANCEL,
use NORMAL otherwise.
* app/tools/gimpaligntool.c
* app/tools/gimpblendtool.c
* app/tools/gimpbrightnesscontrasttool.c
* app/tools/gimpbucketfilltool.c
* app/tools/gimpcolortool.c
* app/tools/gimpcroptool.c
* app/tools/gimpcurvestool.c
* app/tools/gimpeditselectiontool.c
* app/tools/gimpforegroundselecttool.c
* app/tools/gimpfreeselecttool.c
* app/tools/gimpiscissorstool.c
* app/tools/gimpmagnifytool.c
* app/tools/gimpmeasuretool.c
* app/tools/gimpmovetool.c
* app/tools/gimppainttool.c
* app/tools/gimprectangleselecttool.c
* app/tools/gimprectangletool.[ch]
* app/tools/gimpregionselecttool.c
* app/tools/gimptransformtool.c
* app/tools/gimpvectortool.c (button_release): added
"release_type" parameters and get rid of own checks for
GDK_BUTTON3_MASK.
svn path=/trunk/; revision=22015
2007-02-27 Michael Natterer <mitch@gimp.org>
* app/tools/gimpblendoptions.c (gimp_blend_options_gui): set the
gradient-type and gradient-repeat combo boxes to ELLIPSIZE_END so
the blend options can be one tool icon size smaller without
scrolling horizontally.
svn path=/trunk/; revision=22014
2007-02-26 Sven Neumann <sven@gimp.org>
* app/tools/gimptransformtool.c (gimp_transform_tool_doit): queue
a redraw of the display shell instead of exposing the transform
preview. Removes annoying flicker when the tool is finished.
svn path=/trunk/; revision=22004