2008-03-19 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplay.[ch]: add gimp_display_empty()/fill()
which turns it into an empty display and back.
* app/display/gimpdisplayshell.[ch]: add same api here.
* app/display/gimpdisplayshell-close.c
* app/gui/gui-vtable.c: use the new functions instead of having
the code here.
* app/display/gimpdisplayshell-selection.c
(gimp_display_shell_selection_control): stop the timeout and free
the segments when this function is called on an empty display.
svn path=/trunk/; revision=25124
2008-03-19 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-title.c: changed to only append
GIMP_ACRONYM in the window title and not affect the status-bar.
svn path=/trunk/; revision=25120
2008-03-19 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell.[ch]
* app/display/gimpdisplayshell-scale.[ch]: moved
gimp_display_shell_set_initial_scale() to gimpdisplayshell-scale.c.
* app/display/gimpdisplayoptions.c: reverted last change, we want
to keep the status-bar around.
svn path=/trunk/; revision=25119
2008-03-19 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell.[ch]
(gimp_display_shell_set_initial_scale): factored out this function
which calculates the zoom factor for new images. Also returns the
size of the canvas for that zoom factor.
* app/gui/gui-vtable.c (gui_display_create): use it to set the
initial scale of images loaded into the empty display, but don't
set the display's size yet.
svn path=/trunk/; revision=25118
2008-03-19 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayoptions.c
(gimp_display_options_no_image_class_init): hide the status-bar,
at least for now.
svn path=/trunk/; revision=25117
2008-03-19 Sven Neumann <sven@gimp.org>
* app/widgets/gimpdockable.c
* app/widgets/gimpwidgets-utils.[ch]: moved utility function for
setting attributes on a PangoLayout out of gimpdockable.c.
* app/display/gimpcanvas.c (gimp_canvas_draw_drop_zone): use a
bold font and paint the layout with transparency.
svn path=/trunk/; revision=25116
2008-03-19 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell.c (gimp_display_shell_update_icon):
deal with NULL image and unset the icon.
* app/display/gimpdisplay.c (gimp_display_set_image): unset the
icon when no image is set.
* app/display/gimpdisplayshell-title.c
(gimp_display_shell_format_title): use GIMP_NAME as the window
title when no image is set. Append GIMP_ACRONYM otherwise.
svn path=/trunk/; revision=25115
2008-03-18 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayoptions.[ch]: add new options object
for the "no image" display appearance.
* app/display/gimpdisplayshell.[ch]: keep one of them around.
* app/display/gimpdisplayshell-appearance.[ch]: use the options
object when the display is empty. Add guards against no image
to some functions. Add gimp_display_shell_appearance_update()
which sets all options according to the current display state
(normal, fullscreen, no image).
* app/actions/view-actions.c: don't allow to configure the GUI
of the empty display.
* app/display/gimpdisplayshell-callbacks.c: use the new appearance
update function instead of doing it all here.
* app/display/gimpdisplayshell-close.c
* app/gui/gui-vtable.c: update the appearance when clearing or
filling the display.
* app/display/gimpdisplayshell-selection.c: forgot some guards
against empty displays.
svn path=/trunk/; revision=25114
2008-03-18 Michael Natterer <mitch@gimp.org>
First draft of the "no image open" window, which is implemented as
a display without image (a view with NULL model). Didn't change
the display's appearance yet so I can first make sure the display
without image works properly in all details before hiding these
details.
* app/core/gimp-gui.[ch]: add "gimp" parameter to display_create()
and allow "image" to be NULL.
* app/core/gimpcontext.c (gimp_context_real_set_display): a
display's image can be NULL now.
* app/display/gimpdisplay.[ch]: add Gimp and GimpDisplayConfig
members. Add Gimp parameter to gimp_display_shell_new(). Changed
gimp_display_reconnect() to gimp_display_set_image() and allow to
set a NULL image.
* app/gui/gui-vtable.c (gui_display_create): if there is a single
display without an image, call gimp_display_set_image() on that
display instead of creating a new one.
* app/display/gimpdisplayshell-close.c: if the last display is
closed, don't close it but make it empty. Factored out that code
to gimp_display_shell_really_close().
* app/display/gimpdisplayshell-dnd.c: when dropping uris on an
empty display, open the first one into that display and the other
ones as layers of the newly opened image. This is consistent with
dropping on an existing image but maybe needs some discussion.
* app/display/gimpdisplayshell-callbacks.c: bail out early in the
tool event callback so tools never have to deal with empty
displays. In expose(), draw the drop zone on the empty display.
* app/display/gimpdisplayshell-title.c: set the empty display's
title to "Gimp - Drop Files".
* app/display/gimpdisplay-foreach.c
* app/display/gimpdisplay-handlers.c
* app/display/gimpdisplayshell-appearance.c
* app/display/gimpdisplayshell-autoscroll.c
* app/display/gimpdisplayshell-callbacks.c
* app/display/gimpdisplayshell-cursor.c
* app/display/gimpdisplayshell-dnd.c
* app/display/gimpdisplayshell-draw.c
* app/display/gimpdisplayshell-filter-dialog.c
* app/display/gimpdisplayshell-handlers.c
* app/display/gimpdisplayshell-layer-select.c
* app/display/gimpdisplayshell-preview.c
* app/display/gimpdisplayshell-render.c
* app/display/gimpdisplayshell-scale.c
* app/display/gimpdisplayshell-scroll.c
* app/display/gimpdisplayshell-selection.c
* app/display/gimpdisplayshell-title.c
* app/display/gimpdisplayshell.c
* app/display/gimpnavigationeditor.c
* app/display/gimpstatusbar.c: use display->gimp and
display->config instead of going via the image. Guard against
empty displays in some few places (most places can't be
called). Where needed, use the canvas' dimensions instead of the
image's dimensions so scroll offsets and scrollbars still have
sane values instead of the last image's ones.
* app/actions/actions.c (action_data_get_gimp)
(action_data_get_context): use display->gimp instead of
display->image->gimp.
* app/actions/edit-commands.c (edit_paste_cmd_callback): redirect
to "paste as new" if there is an empty display.
* app/actions/tools-commands.c (tools_select_cmd_callback): don't
initialize the new tool on an empty display.
* app/actions/view-actions.c (view_actions_update): changed lots
of sensitivity settings to be insensitive when there is no image
(instead of no display).
* app/actions/view-commands.c: use the display's config object
instead of gimp's.
svn path=/trunk/; revision=25113
2008-03-18 Michael Natterer <mitch@gimp.org>
* app/display/gimpcanvas.[ch]: add gimp_canvas_draw_drop_zone()
which simply renders a big "Drop Here" on the canvas. Replaced
Gimp member and construct property by GimpDisplayConfig.
* app/display/gimpdisplayshell.c (gimp_display_shell_new): changed
accordingly.
svn path=/trunk/; revision=25112
2008-03-11 Michael Natterer <mitch@gimp.org>
* app/core/gimpbrushgenerated.c: reorder and rename local
functions and prototypes to be consistent with other objects. Misc
minor cleanup.
svn path=/trunk/; revision=25083
2008-03-10 Sven Neumann <sven@gimp.org>
* app/widgets/gimpdockable.[ch]
* app/widgets/gimpdockbook.c: moved code for the drag widget to
GimpDockable. Use semi-bold text for the drag widget also.
svn path=/trunk/; revision=25082
2008-03-10 Michael Natterer <mitch@gimp.org>
* app/vectors/gimpanchor.c (gimp_anchor_copy): use g_slice_dup()
instead of copying the struct contents manually.
svn path=/trunk/; revision=25080
2008-03-09 Michael Natterer <mitch@gimp.org>
Fix mishandling of the "antialias" GParamSpec. Fixes bug #521069:
* app/tools/gimpselectionoptions.c: remove
gimp_selection_options_reset() which used to set the default for
"antialias" depending on the tool type (which is impossible since
the antialias GParamSpec only exists once, and not once for each
subclass).
* app/tools/gimpforegroundselectoptions.c: override the antialias
property here and default to FALSE.
svn path=/trunk/; revision=25077
2008-03-09 Michael Natterer <mitch@gimp.org>
* app/tools/gimprectangleselecttool.[ch]
* app/tools/gimprectangleselectoptions.[ch]
* app/tools/gimpellipseselecttool.[ch]
* app/tools/gimp-tools.c: s/Rect/Rectangle/ and s/rect/rectangle/
in types and function names.
svn path=/trunk/; revision=25076
2008-03-09 Michael Natterer <mitch@gimp.org>
* app/tools/Makefile.am
* app/tools/gimpiscissorsoptions.[ch]
* app/tools/gimpregionselectoptions.[ch]: new options classes.
* app/tools/gimpselectionoptions.[ch]: remove the options here.
Also remove some leftover rectangle options cruft that is in its
own files since long ago.
* app/tools/gimpbycolorselecttool.c
* app/tools/gimpfuzzyselecttool.c
* app/tools/gimpiscissorstool.[ch]
* app/tools/gimpregionselecttool.[ch]
* app/widgets/gimpselectioneditor.c: changed accordingly.
svn path=/trunk/; revision=25071
2008-03-09 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimprectangletool.c
(gimp_rectangle_tool_setup_snap_offsets): Make the GimpCoords used
for snap calculations depend on the precision mode of the
rectangle. This gives a more pleasant experience when resizing and
moving the rectangle with image zoom factor larger than 100%.
svn path=/trunk/; revision=25068
2008-03-08 Sven Neumann <sven@gimp.org>
Experimental attempt to gain a little more horizontal space for
the tool options:
* app/widgets/gimptooloptionseditor.c: removed the shadow from
the
viewport and the border from the vbox.
* app/widgets/gimpdockable.c: use a semibold label for the
title.
svn path=/trunk/; revision=25065
2008-03-08 Sven Neumann <sven@gimp.org>
* app/tools/gimpflipoptions.c
* app/tools/gimpmoveoptions.c
* app/tools/gimpselectionoptions.c
* app/tools/gimptransformoptions.c: don't add the label into the
stock box, use an extra hbox with 2 pixels spacing.
svn path=/trunk/; revision=25064
2008-03-08 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimppolygonselecttool.c: Don't draw the handle for a
vertex while it is being moved.
svn path=/trunk/; revision=25063
2008-03-08 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimprectangletool.c: Added TODO on how to improve the
code by changing the way the rectangle is represented internally.
svn path=/trunk/; revision=25062
2008-03-06 Michael Natterer <mitch@gimp.org>
* app/pdb/gimppdb-utils.[ch]: add gimp_pdb_get_vectors_stroke()
which is a replacement for gimp_vectors_stroke_get_by_ID() and
sets an error message if the stroke doesn't exist.
* tools/pdbgen/pdb/vectors.pdb: use it.
* app/pdb/vectors_cmds.c: regenerated.
svn path=/trunk/; revision=25051
2008-03-06 Sven Neumann <sven@gimp.org>
* app/actions/tools-actions.c
* app/actions/tools-commands.[ch]
* app/tools/gimptransformtool.c: allow to control the preview
opacity by actions (defaults to < to > keys).
svn path=/trunk/; revision=25050
2008-03-06 Sven Neumann <sven@gimp.org>
* app/tools/gimptransformtool.c
* app/tools/gimptransformoptions.[ch]
* app/display/gimpdisplayshell-preview.c: take the preview opacity
from the transform tool options. Based on a patch from Tom Lechner.
Closes bug #520690.
svn path=/trunk/; revision=25049
2008-03-06 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-preview.c: don't do the blending
here, just apply the opacity on the pixbuf's alpha channel.
svn path=/trunk/; revision=25048
2008-03-05 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-preview.c: applied a modified and
further optimized version of the patch from Tom Lechner as
attached to bug #167926. This makes the transform preview take
the layer opacity into account. Needs some more work...
svn path=/trunk/; revision=25038
2008-03-05 Sven Neumann <sven@gimp.org>
* app/tools/gimptransformtool.[ch]: applied some unrelated
cleanups from a patch from Tom Lechner (from bug #167926).
svn path=/trunk/; revision=25037
2008-03-05 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell.h: changed PROJ_ROUND() macros to
use RINT() so they work correctly with negative numbers.
* app/tools/gimpdrawtool.c
(gimp_draw_tool_draw_line)
(gimp_draw_tool_draw_dashed_line)
(gimp_draw_tool_draw_rectangle)
(gimp_draw_tool_draw_arc)
(gimp_draw_tool_draw_boundary): use floating-point coordinate
transform functions again. These functions were changed to use
integer transform functions in 2004 (!!) which broke sub-pixel
precision drawing for stuff like straight-line and blend tool
and also sub-pixel drawing of the brush outline.
Should be backported to 2.4 after it has shown no ill effects in
trunk.
svn path=/trunk/; revision=25036
2008-03-04 Sven Neumann <sven@gimp.org>
* app/actions/edit-commands.c (edit_copy_visible_cmd_callback)
(edit_cut_cmd_callback): added statusbar messages informing the
user that pixels have been transferred to the clipboard.
svn path=/trunk/; revision=25035
2008-03-04 Sven Neumann <sven@gimp.org>
* app/core/gimpdrawable-transform.c
(gimp_drawable_transform_cut):
clear the selection after cutting it as gimp_selection_extract()
doesn't do this for us any longer. See bug #510534.
svn path=/trunk/; revision=25034
2008-03-02 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-callbacks.c
* app/display/gimpdisplayshell-coords.c
(gimp_display_shell_eval_event): applied slightly modified patch
from Alexia Death as attached to bug #508639.
svn path=/trunk/; revision=25006
2008-03-01 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimppolygonselecttool.c
(gimp_polygon_select_tool_draw): Only draw the grabbed point, not
all points. Drawing all points adds unnecessary clutter to the
user interface.
(gimp_polygon_select_tool_select_closest_point): Handle drawing of
grabbed points.
svn path=/trunk/; revision=25004
2008-02-28 Michael Natterer <mitch@gimp.org>
* app/core/gimpcurve.[ch]: get rid of fixed-size arrays and
allocate the points and curve arrays dynamically. Added "n-points"
and "n-samples" CONSTRUCT_ONLY properties. Renamed member "curve"
to "samples". Lots of code changes to work with dynamic limits
rather than 17 and 256.
* app/core/gimpdrawable-curves.c
* app/gegl/gimpcurvesconfig.c
* app/tools/gimpcurvestool.c
* app/widgets/gimpcurveview.c: changed accordingly.
svn path=/trunk/; revision=24995
2008-02-27 Sven Neumann <sven@gimp.org>
* app/core/gimpdrawable-transform.c (gimp_drawable_transform_affine):
pass the direction parameter down to
gimp_drawable_transform_tiles_affine() instead of hardcoding it to
GIMP_TRANSFORM_FORWARD. Fixes bug #518910.
svn path=/trunk/; revision=24990
2008-02-27 Sven Neumann <sven@gimp.org>
* app/gui/gui-vtable.c (gui_display_create): added a sanity
check
which might help to catch the problem reported in bug #518905.
svn path=/trunk/; revision=24989
2008-02-26 Sven Neumann <sven@gimp.org>
* app/Makefile.am (gimp_2_5_LDFLAGS): don't assume that global
AM_LDFLAGS and per-target LD_FLAGS would sum up and explicitly
add
AM_LDFLAGS to gimp_2_5_LDFLAGS.
svn path=/trunk/; revision=24987
2008-02-26 Michael Natterer <mitch@gimp.org>
* app/tools/gimppolygonselecttool.c: draw handles at the corners
and use the MOVE cursor modifier when we are moving them. Fix draw
tool pause/resume in button_press() plus some minor cleanup.
svn path=/trunk/; revision=24985
2008-02-26 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell-transform.[ch]
(gimp_display_shell_transform_points)
* app/tools/gimpdrawtool.[ch] (gimp_draw_tool_draw_lines): take
arrays of GimpVector2 instead of arrays of gdouble to represent
the input points.
* app/display/gimpdisplayshell-draw.c
* app/tools/gimppolygonselecttool.c
* app/tools/gimpfreeselecttool.c: don't cast the GimpVector2 arrays
to double arrays when passing them to above functions.
* app/tools/gimpiscissorstool.c: create a temporary GimpVector2
array instead of a temporary gdouble array.
svn path=/trunk/; revision=24979
2008-02-26 Michael Natterer <mitch@gimp.org>
* app/tools/gimppolygonselecttool.c: rename member num_points to
n_points and various small cleanups all over the place.
svn path=/trunk/; revision=24978
2008-02-26 Sven Neumann <sven@gimp.org>
* app/version.c (gimp_show_library_version): made the library
version information easier to translate.
svn path=/trunk/; revision=24975