2008-08-13 Martin Nordholts <martinn@svn.gnome.org>
* app/display/gimpdisplayshell-scale.c
(gimp_display_shell_scale_get_zoom_focus): New function
responsible for deciding what viewport coordinate to focus on when
zooming in and out.
svn path=/trunk/; revision=26532
2008-08-13 Martin Nordholts <martinn@svn.gnome.org>
* app/display/gimpdisplayshell-scale.[ch]
(gimp_display_shell_scale_to): Make this a private function
because we want to be in full control over what pixel to focus on
when zooming in and out.
* app/display/gimpdisplayshell-callbacks.c
(gimp_display_shell_canvas_tool_events): Use
gimp_display_shell_scale() here instead of
gimp_display_shell_scale_to(). We figure out (and can override if
we wish) the coordinates that were previously passed explicitly.
svn path=/trunk/; revision=26531
2008-08-13 Martin Nordholts <martinn@svn.gnome.org>
* app/display/gimpdisplayshell-scale.c
(gimp_display_shell_scale_image_is_within_viewport): New function.
* app/display/gimpdisplayshell.c (gimp_display_shell_new): When
the zoom button is toggled, implicitly do a View -> Fit Image in
Window if the (scaled) image is within the viewport.
svn path=/trunk/; revision=26529
2008-08-12 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell.c (gimp_display_shell_empty):
removed calls to scale the image and to update the scrollbars
and
rulers. Doesn't seem to make sense in an empty display and it
causes a crash.
svn path=/trunk/; revision=26518
2008-08-10 Martin Nordholts <martinn@svn.gnome.org>
* app/display/gimpdisplayshell-callbacks.c
(gimp_display_shell_canvas_size_allocate): If the image fits
within the display shell canvas on a given axis, center the image
on that axis. This behaviour will certainly require a few tweaks
but let's see how this feels. Feedback welcome.
svn path=/trunk/; revision=26489
2008-08-10 Martin Nordholts <martinn@svn.gnome.org>
* app/display/gimpdisplayshell.c (gimp_display_shell_fill): Recent
refactorings seems to have made the centering hack obsolete so use
gimp_display_shell_scroll_center_image_on_next_size_allocate()
instead.
svn path=/trunk/; revision=26488
2008-08-10 Martin Nordholts <martinn@svn.gnome.org>
* app/display/gimpdisplayshell.c (gimp_display_shell_shrink_wrap):
Always center the image after a wrap. I can't think of a case when
that shouldn't happen.
* app/display/gimpdisplayshell-handlers.c
(gimp_display_shell_size_changed_detailed_handler): Centering
occurs implicitly after wrapping now, no need to do it explicitly.
* app/display/gimpdisplayshell-scroll.c
(gimp_display_shell_scroll_center_image): Handle the no-image
case.
svn path=/trunk/; revision=26487
2008-08-10 Martin Nordholts <martinn@svn.gnome.org>
* app/display/gimpdisplayshell-scroll.[ch]
(gimp_display_shell_scroll_set_offset): New low level function for
setting display shell offset.
(gimp_display_shell_scroll_center_image)
* app/display/gimpdisplayshell-handlers.c
(gimp_display_shell_size_changed_detailed_handler): Use it instead
of gimp_display_shell_scale_by_values().
svn path=/trunk/; revision=26486
2008-08-10 Martin Nordholts <martinn@svn.gnome.org>
* app/display/gimpdisplayshell-scale.c
(gimp_display_shell_scale_handle_zoom_revert): Move the
zoom-revert updating logic into this new helper function so that
we can update zoom-revert from other places.
svn path=/trunk/; revision=26485
2008-08-10 Martin Nordholts <martinn@svn.gnome.org>
* app/display/gimpdisplayshell-scale.[ch]:
Rename gimp_display_shell_scale_setup() to
gimp_display_shell_update_scrollbars_and_rulers(), because that's
exactly what that function does.
* app/display/gimpdisplayshell.c
* app/display/gimpdisplayshell-scroll.c
* app/display/gimpdisplayshell-handlers.c
* app/display/gimpdisplayshell-callbacks.c: Adapt to new name.
svn path=/trunk/; revision=26484
2008-08-10 Martin Nordholts <martinn@svn.gnome.org>
* app/display/gimpdisplayshell-scroll.[ch]: It makes more sense
for gimp_display_shell_get_scaled_image_size() to be moved from
here to
* app/display/gimpdisplayshell-draw.[ch]: here, and rename it to
gimp_display_shell_draw_get_scaled_image_size().
* app/display/gimpdisplayshell.c: Adapt to name change.
svn path=/trunk/; revision=26479
2008-08-10 Martin Nordholts <martinn@svn.gnome.org>
* app/display/gimpdisplayshell-draw.[ch]
* app/display/gimpdisplayshell-render.[ch]
* app/display/gimpdisplayshell-transform.[ch]
* app/display/gimpdisplayshell-appearance.[ch]: Sprinkle as many
const qualifiers we can without any implementation changes.
svn path=/trunk/; revision=26477
2008-08-10 Martin Nordholts <martinn@svn.gnome.org>
* app/display/gimpdisplayshell-scroll.[ch]: gimp_display_shell_ ->
gimp_display_shell_scroll_ for functions that are scroll
related. Also did some other minor renamings.
* app/display/gimpnavigationeditor.c
* app/display/gimpdisplayshell-draw.c
* app/display/gimpdisplayshell-scale.c
* app/display/gimpdisplayshell-render.c
* app/display/gimpdisplayshell-transform.c
* app/display/gimpdisplayshell-callbacks.c: Adapt to the name
changes.
svn path=/trunk/; revision=26476
2008-08-10 Martin Nordholts <martinn@svn.gnome.org>
* app/display/gimpdisplayshell-scroll.c
(gimp_display_shell_scroll_center_image): There is no need for
special casing depending on image size relative to viewport size.
svn path=/trunk/; revision=26471
2008-08-10 Martin Nordholts <martinn@svn.gnome.org>
Put functions to center the image in the display shell where they
belong, and give them proper names.
* app/display/gimpdisplayshell-scale.[ch]: Get rid of functions
and use the new names.
* app/display/gimpdisplayshell-scroll.[ch]: Put the functions here
and call them gimp_display_shell_scroll_center_image() and
gimp_display_shell_scroll_center_image_on_next_size_allocate().
* app/display/gimpdisplayshell.c:
* app/display/gimpdisplayshell-handlers.c: Use the new names.
svn path=/trunk/; revision=26470
2008-08-06 Martin Nordholts <martinn@svn.gnome.org>
* app/display/gimpdisplayshell-scale.c
(gimp_display_shell_center_image): The operation of centering the
image in the display shell has by itself nothing to do with
resizing the display shell window.
svn path=/trunk/; revision=26404
2008-08-05 Martin Nordholts <martinn@svn.gnome.org>
* app/display/gimpdisplayshell-scale.c (gimp_display_shell_scale):
Only center on the mouse pointer when zooming if it is within the
canvas.
svn path=/trunk/; revision=26396
2008-08-05 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell-scroll.[ch]
* app/display/gimpdisplayshell-draw.c
* app/display/gimpdisplayshell-scale.c
* app/display/gimpdisplayshell-transform.c: get rid of the "image"
part in all instances of "scaled_image_viewport_offset", we call
it simply "viewport" in all other places and it makes the code
more readable.
svn path=/trunk/; revision=26395
2008-08-05 Martin Nordholts <martinn@svn.gnome.org>
* app/display/gimpdisplayshell-scale.c
(gimp_display_shell_scale_setup): Don't setup scrollbar step
increment here.
* app/display/gimpdisplayshell-scroll.c
(gimp_display_shell_setup_hscrollbar_with_value)
(gimp_display_shell_setup_vscrollbar_with_value): Setup scrollbar
step increment here and make sure that a step always scrolls at
least a display shell pixel.
svn path=/trunk/; revision=26390
2008-08-05 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell-callbacks.c: move update_range
callbacks where they belong and make them static.
svn path=/trunk/; revision=26379
2008-08-05 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-draw.c
(gimp_display_shell_draw_guide):
draw the guide all across the canvas, not limiting it to the
image.
* app/tools/gimpdrawtool.[ch]: added new function
gimp_draw_tool_draw_guide_line().
* app/tools/gimpmovetool.c (gimp_move_tool_draw): use it.
svn path=/trunk/; revision=26375
2008-08-04 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage.[ch] (GimpImage::size-changed-detailed):
change double to int in signal parameters.
Remove gimp_image_emit_size_changed_signals() and call
gimp_viewable_size_changed() in size-changed-detailed's default
handler.
* app/core/gimpimageundo.[ch]
* app/core/gimpimage-undo-push.[ch]: change double to int in
previous-origin related code.
* app/core/gimpimage-undo.c
* app/core/gimpimage-scale.c
* app/core/gimpimage-crop.c
* app/core/gimpimage-rotate.c
* app/core/gimpimage-resize.c: call gimp_image_size_changed_detailed()
instead of the removed gimp_image_emit_size_changed_signals()
* app/display/gimpdisplayshell-scroll.[ch]: remove
gimp_display_shell_handle_size_changed_detailed() because it
handles both scrolling and scaling and doesn't belong here.
* app/display/gimpdisplayshell-handlers.c: moved its code back to
gimp_display_shell_size_changed_detailed_handler() and follow the
double -> int change above.
svn path=/trunk/; revision=26367
2008-08-03 Martin Nordholts <martinn@svn.gnome.org>
* app/display/gimpdisplayshell.c (gimp_display_shell_new): Center
the image after connecting to it. This is required if the image we
connect to is smaller than the initial canvas size.
svn path=/trunk/; revision=26356
2008-08-03 Martin Nordholts <martinn@svn.gnome.org>
Further work for completing bug #362915 that makes changes to the
image size (e.g when cropping) be much more nicely handled by
display shell.
* app/core/gimpimage.[ch]: Add new signal
GimpImage::size-changed-detailed that is emited whenever
GimpViewable::size-changed is. The new signal provides additional
information, namely the previous origin relative to the current
origin. Cliens choose what specific signal to listen to depending
on how much info they need.
* app/display/gimpdisplayshell-handlers.c: Connect to
GimpImage::size-changed-detailed instead of
GimpViewable::size-changed since the shell wants information about
the previous image origin.
(gimp_display_shell_resolution_changed_handler): Use
gimp_display_shell_scale_resize() instead to avoid display
garbage.
* app/display/gimpdisplayshell-scale.[ch]: Add new utility
function gimp_display_shell_center_image_on_next_size_allocate().
* app/display/gimpdisplayshell-scroll.[ch]
(gimp_display_shell_handle_size_changed_detailed): New function
that replaces logic in gimp_display_shell_handle_size_changed and
that takes previous-origin of the image into account and adjusts
the offset so that the image content that remains doesn't move. If
the window is resized on image resize, just center the image
afterwards.
* app/core/gimpimage-undo-push.[ch]
(gimp_image_undo_push_image_size): Add previous-origin paremeters.
* app/core/gimpimageundo.[ch]: Add and manage previous-origin
properties so that the display shell offset can be appropriately
adjusted also when undoing.
* app/core/gimpundo.h
* app/core/gimpimage-undo.c: Add previous_origin members to the
undo accumulator and emit that information when the size of the
image changes due to the undo.
* app/core/gimpimage-crop.c (gimp_image_crop)
* app/core/gimpimage-scale.c (gimp_image_scale)
* app/core/gimpimage-rotate.c (gimp_image_rotate)
* app/core/gimpimage-resize.c (gimp_image_resize_with_layers):
Supply information about the previous-origin of the image to the
size-changed signals and the undo system.
svn path=/trunk/; revision=26354
2008-07-19 Martin Nordholts <martinn@svn.gnome.org>
* app/widgets/gimpnavigationview.[ch]: Don't expose implementation
details and extend the interface with trivial new functions.
* app/display/gimpnavigationeditor.c
(gimp_navigation_editor_popup): Use the new interface instead of
directly accessing the members of the navigation view.
svn path=/trunk/; revision=26236
2008-07-18 Sven Neumann <sven@gimp.org>
* app/core/core-types.h: removed delta_time, delta_x, delta_y,
distance and random from the GimpCoords struct. These don't need
to be kept here and they can't be properly interpolated.
* app/core/gimpcoords.c: changed accordingly.
* app/xcf/xcf-load.c (xcf_load_vector): the size of the
GimpCoords
struct changed.
* app/display/gimpdisplayshell.[ch] (struct _GimpDisplayShell):
added some members to store values from the last event that are
needed in gimp_display_shell_eval_event() and which are not any
longer part of GimpCoords.
* app/display/gimpdisplayshell-coords.c
(gimp_display_shell_eval_event): changed accordingly.
* app/paint/gimppaintoptions.c: calculate a random number when
one
is needed.
* app/paint/gimpbrushcore.c (gimp_brush_core_interpolate):
GimpCoords doesn't have a "random" field any longer.
svn path=/trunk/; revision=26232
2008-07-14 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-scale.c
(gimp_display_shell_scale_setup): added some line breaks to
improve readability.
svn path=/trunk/; revision=26187
2008-07-13 Martin Nordholts <martinn@svn.gnome.org>
* app/display/gimpdisplayshell-scale.[ch]
(gimp_display_shell_center_image): Allow to choose what axes to
center on.
(gimp_display_shell_scale_fill)
(gimp_display_shell_scale_fit_in): Explicitly center on both axes.
* app/display/gimpdisplayshell.c (gimp_display_shell_fill): Center
the image in the filled display shell. Rather hackish, but seems
to work fine.
svn path=/trunk/; revision=26185
2008-07-13 Martin Nordholts <martinn@svn.gnome.org>
* app/display/gimpdisplayshell-scale.c
(gimp_display_shell_center_image): New function.
(gimp_display_shell_scale_fill)
(gimp_display_shell_scale_fit_in): Center the image at the end.
svn path=/trunk/; revision=26176
2008-07-13 Martin Nordholts <martinn@svn.gnome.org>
* app/display/gimpdisplayshell-scroll.c
(gimp_display_shell_setup_hscrollbar_with_value)
(gimp_display_shell_setup_vscrollbar_with_value): Use
gimp_display_shell_get_scaled_image_size() instead of inaccurately
calculate that information locally.
svn path=/trunk/; revision=26175
2008-07-13 Martin Nordholts <martinn@svn.gnome.org>
* app/display/gimpnavigationeditor.c
(gimp_navigation_editor_popup): BORDER_PEN_WIDTH is a normal
constant, no need for voodoo.
svn path=/trunk/; revision=26170
2008-07-13 Martin Nordholts <martinn@svn.gnome.org>
* app/display/gimpdisplayshell-scroll.[ch]
(gimp_display_shell_get_scaled_image_size): New function that
contains logic previously kept in gimp_display_shell_draw_area().
* app/display/gimpdisplayshell-draw.c
(gimp_display_shell_draw_area): Use the new function.
svn path=/trunk/; revision=26168
2008-07-13 Martin Nordholts <martinn@svn.gnome.org>
* app/display/gimpdisplayshell.c (gimp_display_shell_fill): Don't
ask gimp_display_shell_set_initial_scale() for display size, we
don't care anyway.
svn path=/trunk/; revision=26167
2008-07-12 Martin Nordholts <martinn@svn.gnome.org>
The following change is conceptually based on a patch by
Alexia Death and implements the core functionality for
bug #362915.
* app/display/gimpdisplayshell-scroll.[ch]
(gimp_display_shell_scroll_clamp_offsets): Clamp the offsets in
such a way that allows to scroll beyond the image border.
(gimp_display_shell_setup_hscrollbar_with_value)
(gimp_display_shell_setup_vscrollbar_with_value): Put common
scrollbar range setup code here.
* app/display/gimpdisplayshell-scale.c
(gimp_display_shell_scale_setup): Use above helper functions for
setting up scrollbar range.
* app/display/gimpdisplayshell-callbacks.c: Handle adjustment of
the scrollbar range when they are about to change value.
* app/display/gimpdisplayshell.c: Always keep the scrollbar
steppers sensitive to user input.
svn path=/trunk/; revision=26166
2008-07-12 Martin Nordholts <martinn@svn.gnome.org>
* app/display/gimpdisplayshell-scroll.c:
Replace gimp_display_shell_scroll() with
gimp_display_shell_center_around_image_coordinate() since that is
easier to map to something sensible when we allow to scroll beyond
image border.
* app/display/gimpnavigationeditor.c
(gimp_navigation_editor_marker_changed): Adapt to the new
interface.
svn path=/trunk/; revision=26162
2008-07-12 Martin Nordholts <martinn@svn.gnome.org>
* app/core/gimpmarshal.list: Added
VOID__DOUBLE_DOUBLE_DOUBLE_DOUBLE marshaller.
* app/widgets/gimpnavigationview.c: Make the "marker-changed"
signal also pass the marker width and height as parameters.
* app/display/gimpnavigationeditor.c: Updated accordingly.
svn path=/trunk/; revision=26160
2008-07-12 Martin Nordholts <martinn@svn.gnome.org>
* app/display/gimpdisplayshell-scale.c
(gimp_display_shell_scale_setup): The scrollbars should be setup
using the new offset, not the old counterpart.
svn path=/trunk/; revision=26154
2008-07-12 Martin Nordholts <martinn@svn.gnome.org>
* app/display/gimpdisplayshell-scale.c
(gimp_display_shell_scale_setup): Renamed the variables sx and sy
to sw and sh.
svn path=/trunk/; revision=26148
2008-07-12 Martin Nordholts <martinn@svn.gnome.org>
* app/display/gimpdisplayshell.c: Kill disp_[xy]offset! We now
keep store that information by using negative values in
offset_[xy].
* app/display/gimpdisplayshell-scroll.[ch]
(gimp_display_shell_scroll_clamp_offsets)
(gimp_display_shell_get_scaled_image_viewport_offset): Adjust
accordingly to preserve current behaviour.
(gimp_display_shell_get_disp_offset): New function to get the old
disp_[xy]offset based on the new offset_[xy].
(gimp_display_shell_get_render_start_offset): New function to get
th old offset_[xy] based on the new offset_[xy].
* app/display/gimpdisplayshell-draw.c
* app/display/gimpdisplayshell-scale.c
* app/display/gimpdisplayshell-render.c: Get rid of
disp_[xy]offset and use
gimp_display_shell_get_render_start_offset() and
gimp_display_shell_get_disp_offset() instead.
svn path=/trunk/; revision=26146
2008-07-11 Martin Nordholts <martinn@svn.gnome.org>
* app/display/gimpdisplayshell-scale.c
(gimp_display_shell_scale_setup): Restructure the way the rulers
are setup, partly by making use of the new nifty
gimp_display_shell_get_scaled_image_viewport_offset().
svn path=/trunk/; revision=26143
2008-07-11 Martin Nordholts <martinn@svn.gnome.org>
* app/display/gimpdisplayshell-transform.c
(gimp_display_shell_transform_xy_f)
(gimp_display_shell_untransform_xy_f): We can use
gimp_display_shell_get_scaled_image_viewport_offset() here
* app/display/gimpdisplayshell-scroll.c
(gimp_display_shell_get_scaled_viewport): and here.
svn path=/trunk/; revision=26141
2008-07-11 Martin Nordholts <martinn@svn.gnome.org>
* app/display/gimpdisplayshell-scroll.c
(gimp_display_shell_get_scaled_image_viewport_offset): New
function to replace any occurance of
shell->disp_[xy]offset - shell->offset_[xy]
that is just an implementation specific way of saying the same
thing.
* app/display/gimpdisplayshell-draw.c
* app/display/gimpdisplayshell-transform.c: Make the code less
implementation dependant by using the new function.
svn path=/trunk/; revision=26137
2008-07-11 Martin Nordholts <martinn@svn.gnome.org>
* app/display/gimpdisplayshell-scroll.[ch]
(gimp_display_shell_get_viewport): Extend the interface with this
function.
* app/display/gimpnavigationeditor.c
(gimp_navigation_editor_update_marker): Use it here.
svn path=/trunk/; revision=26114
2008-07-10 Martin Nordholts <martinn@svn.gnome.org>
* app/display/gimpdisplayshell-scroll.c
(gimp_display_shell_get_scaled_viewport): Extend the interface
with this function
* app/tools/gimprectangletool.c
(gimp_rectangle_tool_update_handle_sizes): Forget anything we knew
about how to interpret the icky GimpDisplayShell offset variables
svn path=/trunk/; revision=26111
2008-07-10 Martin Nordholts <martinn@svn.gnome.org>
* app/display/gimpdisplayshell-scroll.[ch]: Make
gimp_display_shell_scroll() a sane public interface for scrolling
and call the old version gimp_display_shell_scroll_private()
* app/display/gimpnavigationeditor.c: Adapt to the saner version
of gimp_display_shell_scroll()
* app/display/gimpdisplayshell-callbacks.c:
* app/display/gimpdisplayshell-autoscroll.c: Use the private
version of gimp_display_shell_scroll()
* app/display/Makefile.am: Added gimpdisplayshell-private.h
svn path=/trunk/; revision=26110
2008-07-10 Martin Nordholts <martinn@svn.gnome.org>
* app/display/gimpdisplayshell-scroll.[ch]: The return value of
gimp_display_shell_scroll() is not used anywhere, make it void.
svn path=/trunk/; revision=26109
2008-07-10 Sven Neumann <sven@sven-sun.berlin.jpk.com>
* app/display/gimpdisplayshell-progress.c
(gimp_display_shell_progress_message): swallow informational
messages if there aren't handled by the statusbar.
svn path=/trunk/; revision=26101
2008-07-09 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-close.c (gimp_display_shell_close):
if a save dialog is active for this image, then don't allow to
close it. Fixes bug #511965.
svn path=/trunk/; revision=26095
2008-07-09 Sven Neumann <sven@gimp.org>
* app/display/gimpstatusbar.c (gimp_statusbar_progress_message):
don't accept a progress message if the status bar is already
showing a temporary message.
svn path=/trunk/; revision=26094
2008-07-05 Martin Nordholts <martinn@svn.gnome.org>
* app/display/gimpdisplayshell-scroll.c
(gimp_display_shell_scroll_clamp_offsets): Renamed the variales sx
and sy to sw and sh.
svn path=/trunk/; revision=26070
2008-07-03 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-callbacks.c
(gimp_display_shell_events): don't use Escape to quit full-screen
mode, it collides with tools using the Escape key (bug #539949).
svn path=/trunk/; revision=26049
2008-05-29 Sven Neumann <sven@gimp.org>
* app/display/gimpscalecombobox.c (gimp_scale_combo_box_init):
unset the entry's frame instead of reducing the inner border.
svn path=/trunk/; revision=25858
2008-05-28 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-scale.c
(gimp_display_shell_scale_setup): set the display unit on the ruler.
* libgimpwidgets/gimphruler.c (gimp_hruler_draw_ticks)
* libgimpwidgets/gimpvruler.c (gimp_vruler_draw_ticks): hack around
to get nicer subdivisions for rulers showing pixels.
svn path=/trunk/; revision=25839
2008-05-27 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell-coords.c: revert velocity limit to
1.0, this part of the patch shouldn't have been applied.
svn path=/trunk/; revision=25824
2008-05-26 Sven Neumann <sven@gimp.org>
* libgimpwidgets/Makefile.am
* libgimpwidgets/gimpwidgets.h
* libgimpwidgets/gimpwidgetstypes.h
* libgimpwidgets/gimpruler.[ch]
* libgimpwidgets/gimphruler.[ch]
* libgimpwidgets/gimpvruler.[ch]: added ruler widgets. These are
mostly copied from GTK+ and work as a drop-in replacement for
GtkRuler and friends.
* libgimpwidgets/gimpwidgets.def: updated.
* app/display/gimpdisplayshell.c
* app/display/gimpdisplayshell-scale.c
* app/dialogs/resolution-calibrate-dialog.c
* plug-ins/imagemap/imap_preview.c
* plug-ins/gfig/gfig-preview.c: use the GimpRuler widgets.
svn path=/trunk/; revision=25820
2008-05-26 Michael Natterer <mitch@gimp.org>
Applied modified patch from Alexia Death. Addresses bug #534770:
* app/paint/gimppaintoptions.[ch]: add properties for scaling
the effects of pressure, velocity and hardness and honor them
in the various get_dynamic_foo() functions.
(gimp_paint_options_get_dynamic_size): look at
pressure_options->size again, that code got lost in one of the
earlier patches.
* app/tools/gimppaintoptions-gui.c: add GimpScaleButtons to the
table for the new properties.
* app/display/gimpdisplayshell-coords.c: don't let "velocity"
reach 1.0, use 0.9999 instead.
svn path=/trunk/; revision=25816
2008-05-22 Michael Natterer <mitch@gimp.org>
Applied slightly modified and fixed patch from Alexia Death which
adds a "random" axis to the paint dynamics and fixes some issues
in the previous paint dynamics commits. Fixes bug #529431.
* app/core/core-types.h: add a "random" axis to GimpCoords.
* app/display/gimpdisplayshell-coords.c: set it to a random value.
* app/display/gimpdisplayshell-callbacks.c: on button_press,
use the dynamics from the last motion event to avoid blotches
at the beginning of paint strokes.
* app/paint/gimppaintoptions.[ch]: add random properties the same
way we do pressure and velocity. Add get_dynamic_size(),
get_dynamic_color() and get_dynamic_hardness() functions which
look at all dynamic parameters of the passed coords.
* app/tools/gimppaintoptions-gui.c: add gui for the random options.
* app/paint/gimpbrushcore.[ch]: remove calc_brush_scale() and use
gimp_paint_options_get_dynamic_size_instead().
Add "dynamic_hardness" parameters to paste_canvas(),
replace_canvas() and get_brush_mask().
* app/paint/gimpairbrushoptions.c
* app/paint/gimpclone.c
* app/paint/gimpconvolve.c
* app/paint/gimpdodgeburn.c
* app/paint/gimperaser.c
* app/paint/gimpheal.c
* app/paint/gimppaintbrush.c
* app/paint/gimpsmudge.c: calculate the dynamic hardness and pass
it to above brush core functions. Use the get_dynamic_color() to
calculate the gradient color.
svn path=/trunk/; revision=25758
2008-05-16 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayoptions.c: disable rulers by default as
suggested by Peter. Please give feedback.
svn path=/trunk/; revision=25675
2008-05-10 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-callbacks.c
(gimp_display_shell_events)
(gimp_display_shell_canvas_tool_events):
don't reserve Delete for use by tools. Fixes bug #532116.
* app/tools/gimpimagemaptool.c
* app/tools/gimptransformtool.c: don't use Delete (you can still
use the Backspace key to achieve the same).
svn path=/trunk/; revision=25607
2008-05-10 Michael Natterer <mitch@gimp.org>
Applied modified patch from Alexia Death which adds velocity
support to paint tools in the spirit of the pressure support we
already have. Fixes bug #529431.
* app/display/gimpdisplayshell-coords.c
(gimp_display_shell_eval_event): tweak velocity calculation to
work in screen coordinates.
* app/paint/gimppaintoptions.[ch]: add velocity options in the
same way as there are pressure options. Add utility functions
which return dynamic opatity and dynamic rate according to the the
option's settings and some GimpCoords' pressure and velocity.
* app/tools/gimppaintoptions-gui.c: add GUI for the velocity
options.
* app/paint/gimpbrushcore.h: remove PRESSURE_SCALE define, it's
now in gimppaintoptions.h.
* app/paint/gimpbrushcore.c (gimp_brush_core_interpolate):
inerpolate velocity too.
(gimp_brush_core_calc_brush_scale): take velocity into account.
(gimp_brush_core_get_brush_mask): always pressurize the mask in
the GIMP_BRUSH_PRESSURE because there always is velocity (unlike
pressure which is only there on tablets).
* app/paint/gimpairbrush.c
* app/paint/gimpclone.c
* app/paint/gimpconvolve.c
* app/paint/gimpdodgeburn.c
* app/paint/gimperaser.c
* app/paint/gimpheal.c
* app/paint/gimppaintbrush.c
* app/paint/gimpsmudge.c: get opacity and rate from the new paint
options utility functions which take both pressure and velocity
into account.
* app/paint/gimppaintbrush.c: take velocity into account when
calculating the gradient color offset.
* app/paint/gimpairbrush.c: do some additional fiddling with
velocity in the asynchronous airbrush timeout.
* app/paint/gimpairbrushoptions.c: override the velocity-size
property and have it default to FALSE.
svn path=/trunk/; revision=25604
2008-05-08 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell-callbacks.c
(gimp_display_shell_events): don't call gtk_widget_grab_focus() here.
(gimp_display_shell_canvas_tool_events): call it here instead and
add comments about how BUTTON_PRESS and FOCUS_IN interact.
Also return TRUE from BUTTON_PRESS, BUTTON_RELEASE and
MOTION_NOTIFY.
svn path=/trunk/; revision=25590
2008-05-08 Sven Neumann <sven@gimp.org>
* app/display/gimpscalecombobox.c (gimp_scale_combo_box_init):
removed the entry's inner border to save some precious space in
the status-bar.
svn path=/trunk/; revision=25588
2008-05-08 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-callbacks.c
(gimp_display_shell_events): move the focus to the canvas on
button-press events.
* app/widgets/gimpwindow.c (gimp_window_key_press_event):
removed
a use of G_UNLIKELY() that is somewhat bogus here.
svn path=/trunk/; revision=25587
2008-05-05 Sven Neumann <sven@gimp.org>
* app/tools/gimppainttool.c
* app/display/gimpdisplayshell-coords.c: applied patch from
Alexia
Death which changes the maximum smoothing for paint tools to
more
conservative default and adds velocity dependent smooth
suppression.
svn path=/trunk/; revision=25564
2008-04-30 Sven Neumann <sven@gimp.org>
* app/display/gimpscalecombobox.c
(gimp_scale_combo_box_entry_key_press): also handle the Tab keys
and call the "activate" handler when Tab is pressed.
svn path=/trunk/; revision=25553
2008-04-30 Sven Neumann <sven@gimp.org>
* app/display/gimpscalecombobox.c: install a "key-press-event"
handler and reset the entry when the Escape key is pressed.
svn path=/trunk/; revision=25552
2008-04-29 Sven Neumann <sven@gimp.org>
* app/display/gimpscalecombobox.[ch]: added signal
"entry-activated".
* app/display/gimpstatusbar.c (gimp_statusbar_new): connect to
the
new signal and move the focus to the canvas.
* app/display/gimpdisplayshell.c (gimp_display_shell_new):
comment.
svn path=/trunk/; revision=25549
2008-04-28 Sven Neumann <sven@gimp.org>
* app/display/gimpscalecombobox.c: keep the current scale value,
beep and reset the entry when the user input cannot be parsed.
Also changed the input parser to interpret a single number as a
percentage.
svn path=/trunk/; revision=25547
2008-04-28 Sven Neumann <sven@gimp.org>
* app/display/gimpscalecombobox.[ch]: derive from
GtkComboBoxEntry.
Needs some more work with respect to input validation and focus
handling...
svn path=/trunk/; revision=25542
2008-04-28 Sven Neumann <sven@gimp.org>
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimpwindow.[ch]: added GimpWindow class and moved
key-press-event handler from GimpDock to this class.
* app/widgets/gimpdock.[ch]:
* app/display/gimpdisplayshell.[ch]: derive from GimpWindow.
svn path=/trunk/; revision=25541
2008-04-22 Sven Neumann <sven@gimp.org>
* app/display/gimpstatusbar.c (gimp_statusbar_frame_size_request):
take vertical padding into account to avoid resizing the statusbar.
svn path=/trunk/; revision=25512
2008-04-16 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell-coords.c
(gimp_display_shell_eval_event): remove local "inertia" variable
and simply modify the passed "inertia_factor" when needed.
svn path=/trunk/; revision=25494
2008-04-15 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell-coords.c
(gimp_display_shell_eval_event): fix calculation of filter
distance, it was missing a 1 / zoom_factor. Moved variables to
local scope. Remove resundant thistime variable. Turned const
gdouble into a #define.
svn path=/trunk/; revision=25490
2008-04-14 Sven Neumann <sven@gimp.org>
* app/display/gimpstatusbar.c: introduced a #define for the spacing
between the icon and the statusbar label.
svn path=/trunk/; revision=25484
2008-04-14 Sven Neumann <sven@gimp.org>
* app/display/gimpstatusbar.[ch]: rewritten the code that draws
the icon in the statusbar label. The new code gives nicer
spacing.
svn path=/trunk/; revision=25481
2008-04-14 Sven Neumann <sven@gimp.org>
* app/display/gimpstatusbar.[ch]: added stock-id parameters to
all
statusbar setters.
* app/display/gimpdisplayshell-title.c: pass NULL as stock-id.
* app/tools/gimptool.c: pass the tool icon to the statusbar.
* app/tools/gimpeditselectiontool.c
(gimp_edit_selection_tool_start):
inherit the tool-info from the parent tool.
svn path=/trunk/; revision=25477
2008-04-13 Sven Neumann <sven@gimp.org>
* app/widgets/gimpunitcombobox.c: added "label-scale" style
property.
* app/display/gimpscalecombobox.[ch]: ditto. Also removed the
support for extra action items.
* app/display/gimpstatusbar.c: changed accordingly.
* themes/Default/gtkrc
* themes/Small/gtkrc: use a smaller font for the combo-box
labels
in the statusbar.
svn path=/trunk/; revision=25475
2008-04-11 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell-appearance.c
(gimp_display_shell_appearance_update): don't show the status
bar's resize grip in fullscreen mode.
svn path=/trunk/; revision=25465
2008-04-10 Sven Neumann <sven@gimp.org>
* app/display/gimpstatusbar.[ch]
(gimp_statusbar_progress_message):
improved the check if the message can be shown in the statusbar.
Do not show messages that don't fit into the given space.
* app/gui/gui-message.c (gui_message_error_dialog): if there's
already an error dialog associated with a progress, then use it.
svn path=/trunk/; revision=25461
2008-04-07 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-callbacks.c
* app/display/gimpdisplayshell-coords.[ch]
* app/tools/gimppainttool.c
* app/tools/gimptool.[ch]: applied patch from Alexia Death as
attached to bug #508639. This change makes the smoothing depend on
the active tool.
svn path=/trunk/; revision=25392
2008-04-07 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplay-handlers.c (gimp_display_saved_handler):
use gimp_statusbar_push_temp() directly instead of going through
gimp_message(). Use the GTK_STOCK_SAVE icon for the statusbar
message.
svn path=/trunk/; revision=25388
2008-04-05 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplay.[ch]: added new function
gimp_display_close() which decides if gimp_display_delete() or
gimp_display_empty() needs to be called.
* app/display/gimpdisplay-foreach.[ch]: added new function
gimp_displays_close() and removed the 'do_quit' parameter from
gimp_displays_delete().
* app/gui/gui.c (gui_exit_callback): changed accordingly.
* app/display/gimpdisplayshell-close.c: removed
gimp_display_shell_really_close() and call gimp_display_close()
instead.
* app/display/gimpdisplayshell.c (gimp_display_shell_empty):
moved
code to update the ui managers here.
* app/actions/file-commands.c (file_save_cmd_callback)
(file_close_cmd_callback)
* app/dialogs/file-save-dialog.c (file_save_dialog_response)
* app/dialogs/quit-dialog.c (quit_close_all_dialog_response):
close displays instead of deleting them.
* app/gui/gui-vtable.c (gui_display_delete): call
gimp_display_close().
svn path=/trunk/; revision=25377
2008-04-01 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-title.c
(gimp_display_shell_update_title_idle): no need to translate the
empty string.
svn path=/trunk/; revision=25328
2008-03-30 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell.c
(gimp_display_shell_scale_changed):
never set the dest_inc and src_dec variables to zero.
svn path=/trunk/; revision=25313
2008-03-30 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-cursor.[ch]: added new function
gimp_display_shell_unset_cursor().
(gimp_display_shell_real_set_cursor): deal with cursor_type -1
and
change the cursor to the default desktop cursor. Fixes warnings
on
image load.
* app/display/gimpdisplayshell.c (gimp_display_shell_empty):
use gimp_display_shell_unset_cursor().
svn path=/trunk/; revision=25312
2008-03-27 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-dnd.c
(gimp_display_shell_drop_uri_list): don't flush if there's no image.
(gimp_display_shell_dnd_flush): use gtk_window_present() instead of
gdk_window_focus().
svn path=/trunk/; revision=25261
2008-03-27 Sven Neumann <sven@gimp.org>
* app/display/gimpstatusbar.c: use a button with icon for the
progress cancel button.
svn path=/trunk/; revision=25260
2008-03-27 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell.c (gimp_display_shell_style_set):
added an arbitrary number to the minimum height.
svn path=/trunk/; revision=25259
2008-03-27 Sven Neumann <sven@gimp.org>
* app/display/gimpstatusbar.c: make sure that the statusbar frame
requests enough space to hold it's children, also the invisible ones.
* app/display/gimpdisplayshell.c (gimp_display_shell_style_set):
don't add 1 pixel here, this spacing is gone.
svn path=/trunk/; revision=25258
2008-03-27 Sven Neumann <sven@gimp.org>
* app/display/gimpstatusbar.[ch]: derive GimpStatusbar from
GtkStatusbar. Use the normal statusbar label for statusbar
messages and only show the progressbar when progress is active.
* app/display/gimpdisplayshell.c (gimp_display_shell_new): removed
spacing from the main vertical box.
svn path=/trunk/; revision=25257
2008-03-26 Sven Neumann <sven@gimp.org>
* app/widgets/gimpcairo-wilber.c: include a better Wilber path,
thanks to Jimmac.
* app/display/gimpcanvas.c (gimp_canvas_draw_drop_zone): undid
scaling "fix", instead take the offset into account. Draw with
transparency.
svn path=/trunk/; revision=25246
2008-03-26 Sven Neumann <sven@gimp.org>
* app/widgets/Makefile.am
* app/widgets/gimpcairo-wilber.[ch]: new files that renders a
Wilber image as a Cairo path. Or at least it is supposed to do
this at some point...
* app/display/gimpcanvas.c (gimp_canvas_draw_drop_zone): use the
scalable Wilber path. Needs more work...
svn path=/trunk/; revision=25244
2008-03-26 Michael Natterer <mitch@gimp.org>
* app/display/gimpcanvas.[ch]: improve wilber scaling and remove
the drop zone layout.
* app/display/gimpdisplayshell.c: add a tooltip instead.
svn path=/trunk/; revision=25241
2008-03-26 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell-callbacks.c
(gimp_display_shell_canvas_realize): don't set an initial cursor
so we get the desktop default cursor after starting GIMP.
svn path=/trunk/; revision=25240
2008-03-26 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-icon.[ch]
* app/display/gimpdisplayshell-handlers.c: moved more icon code to
its new home.
svn path=/trunk/; revision=25233
2008-03-25 Sven Neumann <sven@gimp.org>
* app/display/gimpstatusbar.[ch]: added gimp_statusbar_peek(), a
method to access the contents of the statusbar.
* app/display/gimpdisplayshell.c
(gimp_display_shell_window_state_event): when the iconfied state
changes, call gimp_display_shell_progress_window_state_changed().
* app/display/gimpdisplayshell-progress.[ch]: when the image
window is iconified, display the progress message in the window
title so that it appears in the task bar.
* app/menus/plug-in-menus.c: formatting.
svn path=/trunk/; revision=25224
2008-03-25 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell-callbacks.[ch]: remove the window
state callback here...
* app/display/gimpdisplayshell.c: ...add it here and turn it into
a GtkWidget::window_state_event() implementation instead of a
signal callback.
svn path=/trunk/; revision=25223
2008-03-25 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-callbacks.[ch]:
* app/display/gimpdisplayshell.c (gimp_display_shell_init): moved
handling of window state events to a separate callback.
svn path=/trunk/; revision=25221
2008-03-25 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell.c (gimp_display_shell_style_set):
fix to work without menubar, don't reset GDK_HINT_USER_POS.
svn path=/trunk/; revision=25217
2008-03-25 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell.c (gimp_display_shell_new): center
the empty image window on first startup.
svn path=/trunk/; revision=25214
2008-03-23 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell.c (gimp_display_shell_new): use the
right GimpDisplayOptions to set the initial visibility of the
shell's widgets.
svn path=/trunk/; revision=25183
2008-03-23 Michael Natterer <mitch@gimp.org>
* app/display/gimpstatusbar.c: implement GtkWidget::size_request()
and also consider the children which can be invisible when the
display is empty.
* app/display/gimpdisplayshell.c (gimp_display_shell_style_set):
set the minimum height of the display to menubar + statusbar
height.
svn path=/trunk/; revision=25182
2008-03-23 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell-scale.c
(gimp_display_shell_scale_resize): always need to fully expose the
canvas now that "redisplay" was removed.
svn path=/trunk/; revision=25179
2008-03-23 Michael Natterer <mitch@gimp.org>
Never shrink the empty display when filling it, only grow:
* app/display/gimpdisplayshell.[ch]
* app/display/gimpdisplayshell-scale.[ch]: add "gboolean
grow_only" parameters to shrink_wrap() APIs which restricts
resizing of the window to growing.
* app/display/gimpdisplayshell-scale.[ch]
(gimp_displaY_shell_scale_resize): remove boolean "redisplay"
parameter because is was always passed as TRUE. Add boolean
"grow_only" instead and pass it on to shrink_wrap()
* app/actions/view-commands.c
* app/display/gimpdisplayshell-handlers.c: pass grow_only = FALSE.
* app/display/gimpdisplayshell.c (gimp_display_shell_idle_fill):
pass grow_only = TRUE.
svn path=/trunk/; revision=25178
2008-03-23 Michael Natterer <mitch@gimp.org>
* app/dialogs/dialogs.[ch]: added a dialog factory for displays
and register "gimp-no-image-window" with it.
* app/display/gimpdisplay.[ch]: add a GimpDialogFactory parameter
to gimp_display_new() and pass it on to gimp_display_shell_new().
* app/display/gimpdisplayshell.[ch]: keep the passed
GimpDialogFactory around. When the shell becomes empty, add it to
the dialog factory and resize it to the remembered size; when it
becomes non-empty, remove it from the dialog factory again.
* app/gui/gui-vtable.c: pass the display dialog factory to
gimp_display_new().
svn path=/trunk/; revision=25177
2008-03-21 Sven Neumann <sven@gimp.org>
* app/display/gimpcanvas.c (gimp_canvas_draw_drop_zone): tweaked
opacity calculation so that the opacity is only increased with
smaller font sizes.
svn path=/trunk/; revision=25166