2008-11-04 Sven Neumann <sven@gimp.org>
* app/text/Makefile.am
* app/text/gimptext-private.h: removed this header file.
* app/text/gimptextlayout.[ch]: added getters to access the
resolution, text and PangoLayout.
* app/text/gimptextlayout-render.c
* app/tools/gimptexttool.c: use the new getters instead of
poking
into the GimpTextLayout struct.
svn path=/trunk/; revision=27543
2008-11-03 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable.[ch] (gimp_drawable_set_tiles): add
"GimpImageType type" parameter because there are only a few calls
to this function which (can easily pass the current type); however
most calls to gimp_drawable_set_tiles_full() were just using the
function because of the type argument and passed in the item's
current offsets (which means peeking into the item struct or using
temp variables).
* app/core/gimpdrawable-offset.c (gimp_drawable_offset)
* app/text/gimptextlayer.c (gimp_text_layer_render)
* app/tools/gimptransformtool.c (gimp_transform_tool_doit): pass
the type to set_tiles().
* app/core/gimpchannel.c (gimp_channel_convert)
* app/core/gimpimage-convert.c (gimp_image_convert)
* app/core/gimplayer.c (gimp_layer_convert,add_alpha,flatten):
change calls to set_tiles_full() into set_tiles() because the
offset doesn't change.
svn path=/trunk/; revision=27535
2008-11-03 Michael Natterer <mitch@gimp.org>
Bug 559015 – Move tool gives bad information about px moved
* app/tools/gimpeditselectiontool.c (gimp_edit_selection_tool_init):
set cursor precision to PIXEL_BORDER because that's what the move
tool snaps to.
Unrelated: set CENTER_CROSS_SIZE to an odd number so it's drawn
symmetrically.
svn path=/trunk/; revision=27533
2008-11-02 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage.[ch]: add new functions
gimp_image_get_layer_iter(), channel_iter() and vectors_iter()
which return the GList inside the resp. GimpList.
* app/actions/channels-actions.c
* app/actions/layers-actions.c
* app/actions/vectors-actions.c
* app/core/gimpimage-convert.c
* app/core/gimpimage-crop.c
* app/core/gimpimage-duplicate.c
* app/core/gimpimage-flip.c
* app/core/gimpimage-item-list.c
* app/core/gimpimage-merge.c
* app/core/gimpimage-resize.c
* app/core/gimpimage-rotate.c
* app/core/gimpimage-scale.c
* app/core/gimpimage.c
* app/core/gimpimage.h
* app/core/gimpprojection-construct.c
* app/display/gimpdisplayshell-draw.c
* app/file/file-open.c
* app/tools/gimpaligntool.c
* app/tools/gimpdrawtool.c
* app/vectors/gimpvectors-compat.c
* app/vectors/gimpvectors-export.c
* app/widgets/gimplayertreeview.c
* app/xcf/xcf-save.c
* tools/pdbgen/pdb/image.pdb: use the new functions instead of
peeking both into the image and the list. Remove inclusions of
"gimplist.h" or change them into "gimpcontainer.h" if needed.
* app/pdb/image-cmds.c: regenerated.
svn path=/trunk/; revision=27524
2008-11-01 Michael Natterer <mitch@gimp.org>
* app/tools/gimprectangletool.c
(gimp_rectangle_tool_cursor_update): set the MOVE cursor when we
are in MOVING mode.
* app/tools/gimptexttool.[ch]: remove members x1,x2,y1,y2 and use
the rectangle tool's bounding box for creating the text layer (x2
and y2) were unused anyway. Add boolean member "moving". Implement
oper_update() and set the tool to moving mode when ALT is pressed.
Changed button_press(), button_release() and motion() accordingly.
Some more cleanup and removal of comented out code.
svn path=/trunk/; revision=27519
* app/gegl/gimpoperation*.c: Prefix the GIMP GEGL operations with
"gimp:" instead of "gimp-" so we follow the GEGL prefix style and
better serialize to XML.
* app/tools/gimp*tool.c
* app/core/gimpdrawable-*.c
* app/core/gimpdrawable.c
* app/core/gimpimagemap.c
* app/core/gimpprojection.c: Changed accordingly.
svn path=/trunk/; revision=27512
2008-10-31 Michael Natterer <mitch@gimp.org>
* app/tools/gimptexttool.c (gimp_text_tool_key_press): bail out
when the passed display is != tool->display. Makes the keyboard
work in other displays while the text tools is active.
svn path=/trunk/; revision=27498
2008-10-31 Michael Natterer <mitch@gimp.org>
* app/tools/gimpdrawtool.[ch]: add gimp_draw_tool_draw_text_cursor()
which draws a properly transformed cursor that always has the same
line width.
* app/tools/gimptexttool.c (gimp_text_tool_draw): use it instead
of drawing a cursor here that is broken at anything but 1:1 zoom.
svn path=/trunk/; revision=27497
2008-10-31 Michael Natterer <mitch@gimp.org>
* app/tools/gimptexttool.c (gimp_text_tool_key_press): bail out
instead of crashing if the tool has no display.
(gimp_text_tool_draw)
(gimp_text_tool_draw_preedit)
(gimp_text_tool_draw_selection)
(gimp_text_tool_xy_to_offset): need to adjust all drawing and
event coordinates by a possible negative offset between logical
rectangle and ink rectangle (if the ink rectangle is larger than
the logical one).
* app/display/gimpdisplayshell-callbacks.c
(gimp_display_shell_canvas_tool_events): continue normally if
tool_manager_key_press_active() returns FALSE.
svn path=/trunk/; revision=27484
2008-10-30 Michael Natterer <mitch@gimp.org>
* app/tools/gimptexttool.c: remove lots of unused variables,
apparently my builds were without proper warnings for some time.
Some formatting cleanup and code reordering.
* app/actions/text-tool-actions.c
* menus/text-tool-menu.xml: rename "text-tool-input-methods"
to "text-tool-input-methods-menu".
svn path=/trunk/; revision=27482
2008-10-29 Sven Neumann <sven@gimp.org>
Bug 558451 – Cannot build GIMP using Sun CC on Solaris 2.8
* app/pdb/gimp-pdb-compat.c
* app/gegl/gimpoperationtilesink.c
* app/gegl/gimpoperationtilesource.c
* app/tools/gimpgegltool.c: applied patches from Eric Lamarque
fixing the build using Sun CC on Solaris.
svn path=/trunk/; revision=27467
* app/tools/gimpmagnifytool.c (gimp_magnify_tool_button_release):
When zooming with a click, use gimp_display_shell_scale() instead
of local zoom logic.
svn path=/trunk/; revision=27452
2008-10-28 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpwidgets-utils.[ch]: added "gboolean below" to
gimp_enum_radio_frame_add() and gimp_enum_radio_box_add() and
place the widget right of the radio button unless "below" is TRUE.
* app/dialogs/convert-dialog.c
* app/dialogs/layer-add-mask-dialog.c
* app/tools/gimpbucketfilloptions.c
* app/tools/gimpclonetool.c
* app/tools/gimpperspectiveclonetool.c
* app/widgets/gimpfilleditor.c: pass TRUE so everything stays as-is.
svn path=/trunk/; revision=27450
2008-10-27 Michael Natterer <mitch@gimp.org>
* app/tools/gimptexttool.c: some minor cleanups.
(gimp_text_tool_draw): draw a cursor of two pixels width which is
between glyphs so it is visible both at the left and the right
border or the rectangle. Also make it look a little more
cursor-like.
svn path=/trunk/; revision=27446
2008-10-27 Michael Natterer <mitch@gimp.org>
* menus/text-tool-menu.xml
* app/actions/text-tool-actions.c
* app/actions/text-tool-commands.[ch]: add "Text along Path" to the
text tool context menu.
* app/tools/gimptextoptions.[ch]: remove the text along path
button here.
* app/tools/gimptexttool.c: changed accordingly.
* app/tools/gimptexttool.[ch]: move public functions together,
move all virtual function implementations together and put them in
order, made the text along path function public, factor out
gimp_text_tool_xy_to_offset() instead of duplicaing this code
three times, remove gimp_rectangle_tool_frame_item() because it
doesn't belong here.
* app/tools/gimprectangletool.[ch]: add
gimp_rectangle_tool_frame_item() here. Enselic, please process ;)
svn path=/trunk/; revision=27444
2008-10-27 Michael Natterer <mitch@gimp.org>
* app/tools/gimptexttool.c (gimp_text_tool_key_press): take the
layout line's x coordinate into account so the stuff works for
right-aligned or centered text.
svn path=/trunk/; revision=27440
2008-10-27 Michael Natterer <mitch@gimp.org>
* app/tools/gimptexttool.c (gimp_text_tool_key_press): argh, need
to speak in byte offsets not character offsets. Do so and avoid
getting the buffer's text on each keystroke just to do the
char/byte conversion. Will use the same method for all the other
places which do similar things.
(gimp_text_tool_connect): minor cleanup.
svn path=/trunk/; revision=27439
2008-10-27 Sven Neumann <sven@gimp.org>
* libgimpbase/gimpbaseenums.[ch]: added new enum
GimpTextHintStyle.
* libgimp/gimpenums.c.tail
* tools/pdbgen/enums.pl: regenerated.
* app/text/gimptext.[ch]: added new property "hint-style".
Removed
"autohint" property and mapped the boolean property "hinting" to
the new enum property "hint-style".
* app/text/gimptextlayout-render.c
(gimp_text_layout_render_flags):
use "hint-style".
* app/tools/gimptextoptions.[ch]: changed tool options
accordingly.
* tools/pdbgen/pdb/text_layer.pdb: deprecated the "hinting" API
and introduced getters and setters for "hint-style".
* app/pdb/text-layer-cmds.c
* app/pdb/internal-procs.c
* libgimp/gimptextlayer_pdb.[ch]: regenerated.
svn path=/trunk/; revision=27432
2008-10-27 Michael Natterer <mitch@gimp.org>
* app/tools/gimpdrawtool.[ch]: add gimp_draw_tool_set_clip_rect()
which transforms the passed in GdkRectangle before setting it
on the canvas.
* app/tools/gimptexttool.c (gimp_text_tool_draw): use it instead
of gimp_canvas_set_clip_rect().
svn path=/trunk/; revision=27431
2008-10-27 Michael Natterer <mitch@gimp.org>
* app/tools/gimptexttool.h: add integer x_pos member to remember
the x cursor position when moving up and down across shorter
lines.
* app/tools/gimptexttool.c (gimp_text_tool_key_press): implement
moving the cursor up and down. The x_pos probably needs to be
reset in a few more places but it seems to work pretty nicely
already.
svn path=/trunk/; revision=27430
2008-10-26 Michael Natterer <mitch@gimp.org>
* app/tools/gimptexttool.c: some formatting cleanup.
* app/tools/gimprectangletool.c: add one space.
* app/actions/text-tool-actions.c: look at GDK_SELECTION_CLIPBOARD,
not PRIMARY, to set the sensitivity of "Paste".
svn path=/trunk/; revision=27424
2008-10-26 Michael Natterer <mitch@gimp.org>
* app/tools/gimptexttool.[ch]: some general formatting cleanup.
(gimp_text_tool_key_press): implement ctrl-moving the cursor by
words, handle Delete.
(gimp_text_tool_delete_text): add boolean "backspace" parameter
and delete forward when it's FALSE.
* app/actions/text-tool-commands.c: pass an arbitrary TRUE to
gimp_text_tool_delete_text() (it's not used because when called
from here, there is always a selection).
svn path=/trunk/; revision=27423
2008-10-26 Michael Natterer <mitch@gimp.org>
Merge on-canvas GSoC project:
* configure.in: check for pangocairo.
* app/Makefile.am
* app/text/Makefile.am: add its CFLAGS and LIBS.
* app/text/gimptext-bitmap.[ch]
* app/text/gimptext-private.h
* app/text/gimptext-vectors.[ch]
* app/text/gimptextlayer.c
* app/text/gimptextlayout-render.c
* app/text/gimptextlayout.c: port to pangocairo.
* menus/Makefile.am
* menus/text-tool-menu.xml
* app/menus/menus.c
* app/actions/Makefile.am
* app/actions/actions.c
* app/actions/text-tool-actions.[ch]
* app/actions/text-tool-commands.[ch]: add a context menu for the
text tool similar to GtkEntry's context menu.
* app/tools/gimprectangletool.[ch]: add "narrow-mode" property.
* app/tools/gimptextoptions.[ch]
* app/widgets/gimptexteditor.[ch]: take a text buffer for the
standalone text editor window instead of creating one internally.
* app/tools/gimptexttool.[ch]: all the new wonderful on-canvas
text editing logic. Wheee!
svn path=/trunk/; revision=27419
2008-10-26 Michael Natterer <mitch@gimp.org>
Add some infrastructure for the on-canvas text editing GSoC
project:
* app/tools/gimptoolcontrol.[ch]: add boolean wants_all_key_events
member and API to set and get it.
* app/tools/gimptool.[ch]: add GimpTool::get_popup() which returns
the tool's context menu if it has one, or NULL otherwise.
* app/tools/tool_manager.[ch]: add tool_manager_get_popup_active()
wrapper.
* app/display/gimpdisplayshell-callbacks.c: check if the tool has
a popup menu and show it instead of the usual right-click menu.
Also call the tool's key_press() unconditionally if it wants all
key events, but this code needs more thinking.
svn path=/trunk/; revision=27416
2008-10-21 Sven Neumann <sven@gimp.org>
* app/tools/gimpgegltool.c (gimp_gegl_tool_dialog): for the
combo-box, strip known prefixes from the GEGL operation names
and
use icons instead.
svn path=/trunk/; revision=27350
2008-10-15 Michael Natterer <mitch@gimp.org>
* app/tools/gimpgegltool.c (gimp_gegl_tool_operation_blacklisted):
add the gegl: prefix here too.
(gimp_gegl_tool_get_config): canonicalize the type name of the
created config class or we crash.
svn path=/trunk/; revision=27286
2008-10-10 Michael Natterer <mitch@gimp.org>
* app/tools/gimpmovetool.c (gimp_move_tool_button_release): flush
the image after setting active items back from temporarily
selected ones. Fixes menu item sensitivity.
svn path=/trunk/; revision=27209
2008-10-09 Michael Natterer <mitch@gimp.org>
Add GEGL_CFLAGS and #includes as if gimpdrawable.h and gimpimage.h
had a GEGL dependency (they will have in the next commit, but I
wanted to keep the commit separate).
* app/dialogs/Makefile.am
* app/file/Makefile.am
* app/gui/Makefile.am
* app/menus/Makefile.am
* app/paint/Makefile.am
* app/plug-in/Makefile.am
* app/text/Makefile.am
* app/vectors/Makefile.am
* app/widgets/Makefile.am
* app/xcf/Makefile.am: add GEGL_CFLAGS.
* app/actions/*.c
* app/core/*.c
* app/dialogs/*.c
* app/display/*.c
* app/file/*.c
* app/gui/*.c
* app/menus/*.c
* app/paint/*.c
* app/pdb/gimppdb-utils.c
* app/pdb/gimpprocedure.c
* app/plug-in/*.c
* app/text/*.c
* app/tools/*.c
* app/vectors/*.c
* app/widgets/*.c
* app/xcf/*.c: add <gegl.h> or replace <glib-object.h> by <gegl.h>
to all files which include a drawable subclass or gimpimage.h
* tools/pdbgen/app.pl: include <gegl.h> instead of <glib-object.h>
in all generated files.
* app/pdb/*-cmds.c: regenerated.
* data/images/gimp-splash.png: the goat is still sleeping.
By Aurore Derriennic.
svn path=/trunk/; revision=27202
2008-10-09 Michael Natterer <mitch@gimp.org>
Remove the last code duplication from the undo system (or if not
the last then at least the most ugly):
* app/core/gimpimage.[ch] (gimp_image_add_layer,channel,vectors):
add "gboolean push_undo" parameter and add the item without
touching undo if it's TRUE. Changed assertions from
g_object_is_floating() to !gimp_item_is_attached() so they also
take items from the undo stack and not only newly created ones.
(gimp_image_remove_layer,channel,vectors): add "push_undo"
parameter here too. Also add a "new_active" parameter where an
optional new active item can be passed.
(gimp_image_remove_layer,channel): these functions must not be
called with push_undo=FALSE and a floating selection attached to
the layer/channel. This can't currently happen; added warnings in
case other code is changed and makes it happen anyway.
* app/core/gimpchannelundo.c
* app/core/gimplayerundo.c
* app/vectors/gimpvectorsundo.c: use above functions to add/remove
items instead of duplicating (parts of) their code. Pass
push_undo=FALSE and the previously active item to the remove()
functions.
* app/actions/channels-commands.c
* app/actions/edit-commands.c
* app/actions/layers-commands.c
* app/actions/vectors-commands.c
* app/core/gimp-edit.c
* app/core/gimpchannelundo.c
* app/core/gimpimage-crop.c
* app/core/gimpimage-duplicate.c
* app/core/gimpimage-merge.c
* app/core/gimpimage-quick-mask.c
* app/core/gimpimage-scale.c
* app/core/gimplayer-floating-sel.c
* app/core/gimplayerundo.c
* app/core/gimpselection.c
* app/core/gimptemplate.c
* app/display/gimpdisplayshell-dnd.c
* app/text/gimptext-compat.c
* app/tools/gimptexttool.c
* app/tools/gimpvectortool.c
* app/vectors/gimpvectors-import.c
* app/vectors/gimpvectorsundo.c
* app/widgets/gimpchanneltreeview.c
* app/widgets/gimpitemtreeview.[ch]
* app/widgets/gimplayertreeview.c
* app/widgets/gimptoolbox-dnd.c
* app/widgets/gimpvectorstreeview.c
* app/xcf/xcf-load.c
* tools/pdbgen/pdb/image.pdb
* tools/pdbgen/pdb/paths.pdb: changed accordingly (pass TRUE
unless it's a new image like when loading and XCF file).
* app/pdb/image-cmds.c
* app/pdb/paths-cmds.c: regenerated.
svn path=/trunk/; revision=27200
2008-10-09 Michael Natterer <mitch@gimp.org>
Bug 134956 – Curves tool doesn't save free curves
* app/core/gimpmarshal.list
* app/widgets/gimpsettingsbox.[ch]: add signal "file-dialog-setup"
and emit it when the export/import file chooser is fully
constructed. Callbacks can then do additional things to the
dialog, like adding custom buttons.
* app/tools/gimpcurvestool.h
* app/tools/gimplevelstool.h: add boolean member
"export_old_format".
* app/tools/gimpcurvestool.c
* app/tools/gimplevelstool.c (gimp_*_tool_dialog): connect to
the settings box' "file-dialog-setup".
(gimp_*_tool_export_setup): new callback which adds a toggle to
the file choosers that allows to export to the old format.
Default saving the new format, we defaulted to the old one before.
(gimp_*_tool_settings_export): check the "export_old_format"
boolean and only save the cruft format if it is TRUE; chain up
otherwise, which generically saves the new format.
* app/tools/gimplevelstool.c (gimp_levels_tool_settings_import):
add the same file format detection code as in the curves tool
so it transparently loads old and new levels files.
svn path=/trunk/; revision=27194
2008-10-02 Sven Neumann <sven@gimp.org>
* app/tools/gimpgegltool.c
(gimp_gegl_tool_operation_blacklisted):
add "text" to the list of blacklisted operations.
svn path=/trunk/; revision=27114
2008-09-30 Michael Natterer <mitch@gimp.org>
* app/tools/gimpimagemaptool.[ch]: keep a "default_config" object
around and use it to reset the tool if it exists.
(gimp_image_map_tool_edit_as): set the default_config on the new
tool so "reset" goes back to the values the tool was started with.
* app/tools/gimpcolorbalencetool.c (gimp_color_balance_tool_reset)
* app/tools/gimpcurvestool.c (gimp_curves_tool_reset)
* app/tools/gimphuesaturationtool.c (gimp_hue_saturation_tool_reset)
* app/tools/gimplevelstool.c (gimp_levels_tool_reset): use the
default config to reset the tool here too if it exists.
svn path=/trunk/; revision=27090
deselects selection
* app/tools/gimprectangleselecttool.c
(gimp_rectangle_select_tool_execute): Be more intuitive when
clicking outside the current selection for the selection modes Add
and Subtract. More specifically, don't alter the selection mask at
all.
svn path=/trunk/; revision=27048
* app/tools/gimprectangleselecttool.c: Added new utility function
gimp_rectangle_select_tool_get_operation(), and started using it.
svn path=/trunk/; revision=27047
2008-09-08 Michael Natterer <mitch@gimp.org>
Bug 551306 – Color picker for text tool does not show selected
palette
* app/tools/gimptexttool.c (gimp_text_tool_register): add
GIMP_CONTEXT_PALETTE_MASK to the tool option's context mask so the
color popup's palette follows the globally selected palette.
svn path=/trunk/; revision=26899
2008-09-05 Sven Neumann <sven@gimp.org>
* app/tools/gimpgegltool.c: blacklist "color-convert" and all
GIMP
operations.
svn path=/trunk/; revision=26879
2008-09-05 Sven Neumann <sven@gimp.org>
* app/tools/gimpgegltool.c: added a blacklist of operations that
should not be shown. We may want to add more operations here.
svn path=/trunk/; revision=26878
2008-09-05 Michael Natterer <mitch@gimp.org>
Bug 550983 – The size displayed in the status bar isn't correct
* app/tools/gimprectangletool.c: use the right precision when
pushing the rectangle's size as coordinates to the statusbar.
svn path=/trunk/; revision=26872
2008-09-04 Sven Neumann <sven@gimp.org>
* app/tools/gimptransformtool.c
(gimp_transform_tool_initialize):
expose the preview when the tool is initialized. Fixes missing
redraws when the tool is selected from the menus (bug #550911).
(gimp_transform_tool_motion): expose the preview after
recalculating the transformation matrix.
svn path=/trunk/; revision=26868
2008-08-27 Sven Neumann <sven@gimp.org>
* app/tools/gimptransformtool.c: moved hiding the dialog from
gimp_transform_tool_real_transform() to
gimp_transform_tool_doit().
Delay undrawing the preview in doit() until the transformation
is
done. This removes the annoying flicker at the end.
svn path=/trunk/; revision=26789
2008-08-27 Sven Neumann <sven@gimp.org>
* app/tools/gimptransformtool.c
(gimp_transform_tool_real_transform):
hide the tool dialog before starting to perform the
transformation.
svn path=/trunk/; revision=26787
2008-08-26 Michael Natterer <mitch@gimp.org>
* app/tools/gimppaintoptions-gui.c (gimp_paint_options_gui): don't
hardcode the attach coords for the fixed containing the dynamics
labels but use the table's real width instead. Fixes broken table
layout in the airbrush options.
svn path=/trunk/; revision=26771
2008-08-24 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimplevelstool.c (gimp_levels_tool_dialog): Set
page_size for the Ouput/Input Levels lower/upper adjustments to 0
to adapt to new and more correct value clamping in GTK+.
svn path=/trunk/; revision=26743
2008-08-21 Michael Natterer <mitch@gimp.org>
* app/tools/gimpforegroundselecttool.c
(gimp_foreground_select_tool_init): set precision back to
PIXEL_CENTER because it's set to SUBPIXEL by the parent class.
svn path=/trunk/; revision=26687
2008-08-20 Michael Natterer <mitch@gimp.org>
Bug 496772 – Position shown in the statusbar needs more
precision (for some tools)
* app/display/display-enums.[ch]: add enum GimpCursorPrecision
which can be one of { PIXEL_CENTER, PIXEL_BORDER, SUBPIXEL }.
* app/display/gimpdisplayshell-cursor.[ch]: add "precision"
parameter to gimp_display_shell_update_cursor() and pass it
on to the statusbar.
* app/display/gimpstatusbar.[ch]: add "precision" parameters to
the cursor coordinates APIs, offset the passed coords accordingly
and display them with one decimal point if SUBPIXEL is requested
and the display's unit is PIXEL. Keep a second floating-point
format string around at any time.
* app/tools/gimptoolcontrol.[ch]: add a "precision" member and API
so tools can configure the precision they need. Defalt to
PIXEL_CENTER since that's right for almost all tools.
* app/display/gimpdisplayshell-callbacks.c: pass the tool's
precision to gimp_display_shell_update_cursor().
* app/tools/gimptool.[ch]: add "precision" parameter to
gimp_tool_push_status_coords() and pass it on to the statusbar.
* app/tools/gimpaligntool.c
* app/tools/gimpblendtool.c
* app/tools/gimpcolortool.c
* app/tools/gimpcroptool.c
* app/tools/gimpeditselectiontool.c
* app/tools/gimpfliptool.c
* app/tools/gimpfreeselecttool.c
* app/tools/gimpmovetool.c
* app/tools/gimppainttool.c
* app/tools/gimpperspectiveclonetool.c
* app/tools/gimprectangleselecttool.c
* app/tools/gimprectangletool.c
* app/tools/gimptransformtool.c
* app/tools/gimpvectortool.c: set precision in init() where
needed. Adjust the precision in the fly when needed, e.g. while
moving guides or when toggling hard-edge on paint tools. Also pass
an appropriate precision to gimp_tool_push_status_coords(), which
is not always the tool's precision as used for cursor display.
svn path=/trunk/; revision=26681
2008-08-20 Michael Natterer <mitch@gimp.org>
* app/paint/gimpperspectiveclone.[ch]: make
gimp_perspective_clone_get_matrix() static and add
gimp_perspective_clone_set_transform().
* app/tools/gimpperspectiveclonetool.c
(gimp_perspective_clone_tool_mode_notify): use above set_transform()
API instead of poking into the object.
(gimp_perspective_clone_tool_constructor): call
gimp_perspective_clone_tool_mode_notify() to set up things instead
of duplicating code.
svn path=/trunk/; revision=26673
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-07-27 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimprectangletool.c
(gimp_rectangle_tool_synthesize_motion): Bail out if there is no
pending rectangle to synthesize a motion on. Fixes bug #544181.
svn path=/trunk/; revision=26322
2008-07-22 Michael Natterer <mitch@gimp.org>
* app/tools/gimpcolortool.c: set scroll_lock to TRUE while moving
or creating sample points so the image doesn't scroll while a new
sample point is dragged from the rulers and sample points can be
deleted by dragging them out of image without scrolling at the
same time.
svn path=/trunk/; revision=26276
2008-07-22 Sven Neumann <sven@gimp.org>
* app/tools/gimpvectortool.c: only use the position from the
event
coordinates when creating or modifying strokes. Initialize all
other GimpCoords fields with default values.
svn path=/trunk/; revision=26275
2008-07-21 Sven Neumann <sven@gimp.org>
* app/tools/gimpdrawtool.c (gimp_draw_tool_on_vectors_handle):
plugged a not so small memory leak.
svn path=/trunk/; revision=26260
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-09 Sven Neumann <sven@gimp.org>
* app/tools/gimppainttool.c (gimp_paint_tool_motion): don't
paint
while the Shift key is pressed for line drawing (bug #529434).
svn path=/trunk/; revision=26090
2008-07-07 Sven Neumann <sven@gimp.org>
* app/tools/gimppaintoptions-gui.c (tool_has_size_dynamics):
check
for tools derived from GimpPaintBrushTool just as we do in
tool_has_opacity_dynamics().
(tool_has_hardness_dynamics): enable hardness dynamics for the
eraser tool (bug #541691).
svn path=/trunk/; revision=26083
2008-07-05 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimprectangletool.c:
* app/tools/gimpeditselectiontool.c: Mark the center of
rectangles/bounding rectangles so that it is easier to predict and
see where snapping occurs. Completes the fix for bug #527659.
svn path=/trunk/; revision=26065
2008-06-29 Michael Natterer <mitch@gimp.org>
* app/tools/gimpgegltool.c (gimp_gegl_tool_dialog): remove size
group code because the size group doesn't exist if there is no
settings box.
svn path=/trunk/; revision=26020
2008-06-27 Michael Natterer <mitch@gimp.org>
* app/tools/gimppaintoptions-gui.c (gimp_paint_options_gui): swap
the angles of the dynamics matrix' labels in RTL and LTR mode so
the beginning of the words are aligned and on bottom.
svn path=/trunk/; revision=25995
2008-06-25 Michael Natterer <mitch@gimp.org>
* app/core/gimpmarshal.list: add marshaller BOOLEAN__STRING for
the change below.
* app/widgets/gimpsettingsbox.[ch]: add the import/export dialogs
here. Add a bunch of parameters to new() to be used by the
dialogs, they are not properties yet. Changed import() and
export() signals to pass the selected filename and return a
boolean indicating success.
* app/tools/gimpimagemaptool-settings.c: remove the dialog code
here and connect the import/export functions directly to above
GimpSettingsBox signals.
* app/tools/gimpimagemaptool.[ch]: remove file dialog member.
svn path=/trunk/; revision=25991
2008-06-25 Michael Natterer <mitch@gimp.org>
* app/tools/gimpcurvestool.c (gimp_curves_tool_settings_import):
parse the first line of the file manually and detect whether we
are importing an old curves file or a GimpConfig one.
svn path=/trunk/; revision=25988
2008-06-23 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimpfreeselecttool.c
(gimp_free_select_tool_modifier_key): Make switching selection
mode through modifier keys work again.
svn path=/trunk/; revision=25978
2008-06-21 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimpfreeselecttool.c
(gimp_free_select_tool_update_motion): When applying angle
constraints on the first segment vertex, base on the last segment
vertex rather than not applying any constraint at all.
svn path=/trunk/; revision=25972
2008-06-20 Martin Nordholts <martinn@svn.gnome.org>
Make angle constraints with the Free Select Tool by using Ctrl
work also when moving vertices, not only when creating new ones.
* app/tools/gimpfreeselecttool.c
(gimp_free_select_tool_active_modifier_key): Implement.
(gimp_free_select_tool_update_motion): Put motion logic here so we
can apply it from both _motion and _active_modifier_key.
(gimp_free_select_tool_modifier_key): Ignore key presses from
another display.
svn path=/trunk/; revision=25969
* app/tools/gimpfreeselecttool.c: Don't alloc/free
saved_points_(lower|higher)_segment on each move, instead realloc
on demand and free on tool destruction, just as we do e.g. for
points.
svn path=/trunk/; revision=25968
2008-06-20 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimpfreeselecttool.c: Remove
n_saved_points_(lower|higher)_segment, we don't need them.
svn path=/trunk/; revision=25967
2008-06-13 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimprectangletool.c (gimp_rectangle_tool_motion):
Correct the improved display of the rectangle ratio.
svn path=/trunk/; revision=25946
2008-06-13 Sven Neumann <sven@gimp.org>
* app/tools/gimptextoptions.c (gimp_text_options_class_init):
we need to define the 'highlight' property here as well.
svn path=/trunk/; revision=25945
2008-06-13 Michael Natterer <mitch@gimp.org>
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimpsettingsbox.[ch]: new widget containing the
combo and menu button for the image map tool settings plus most of
their logic. Has "import" and "export" signals that might go away
if I figure a way to nicely abstract that. Contains some minor
bugfixes and cosmetic improvements compared to the old code.
* app/tools/gimpimagemaptool.[ch]
* app/tools/gimpimagemaptool-settings.[ch]: changed accordingly,
mostly removal of lots of code that is now in the widget.
svn path=/trunk/; revision=25943
2008-06-12 Sven Neumann <sven@gimp.org>
* app/tools/gimprectangletool.c (gimp_rectangle_tool_motion):
try to make the display of the aspect ratio somewhat more
obvious.
svn path=/trunk/; revision=25937
2008-06-04 Sven Neumann <sven@gimp.org>
* app/tools/gimpcropoptions.c
* app/tools/gimprectangleoptions.c
* app/tools/gimprectangleselectoptions.c: fixed handling of the
"highlight" property that needs different default values for the
Crop and Rectangle Select tools (bug #536582).
svn path=/trunk/; revision=25890
2008-06-03 Sven Neumann <sven@gimp.org>
* app/widgets/widgets-enums.[ch]: changed descriptions for
GimpHistogramScale enum.
* app/tools/gimpimagemaptool.[ch]
* app/tools/gimpimagemaptool-settings.c: added a GtkSizeGroup for
aligning with the "Presets" label. Added an accessor for the
dialog's vbox.
* app/tools/gimpbrightnesscontrasttool.c
* app/tools/gimpcolorbalancetool.c
* app/tools/gimpcolorizetool.c
* app/tools/gimpcurvestool.c
* app/tools/gimpdesaturatetool.c
* app/tools/gimpgegltool.c
* app/tools/gimphuesaturationtool.c
* app/tools/gimplevelstool.c
* app/tools/gimpposterizetool.c
* app/tools/gimpthresholdtool.c: use the new accessor. Minor
dialog cleanups in a few places.
svn path=/trunk/; revision=25884
2008-05-31 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimprotatetool.c (gimp_rotate_tool_key_press):
Implemented this function to support rotating with arrow keys. See
bug #387779.
svn path=/trunk/; revision=25873
2008-05-30 Martin Nordholts <martinn@svn.gnome.org>
Made moving the selection mask in the varoius ways automatically
commit any pending rectangle/ellipse selection. Fixes bug #349340.
* app/tools/gimprectangleselecttool.c
(gimp_rectangle_select_tool_oper_update): Don't disable support
for moving the selection mask.
(gimp_rectangle_select_tool_button_press): Handle delegation to
the selection tool.
(gimp_rectangle_select_tool_delegate_button_press): New helper
function.
(gimp_rectangle_select_tool_execute): Guard against NULL
tool->display:s.
svn path=/trunk/; revision=25872
2008-05-29 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimprectangletool.c (gimp_rectangle_tool_motion): Also
show the plain aspect ratio in the status bar along with the
rectangle size information.
svn path=/trunk/; revision=25847
2008-05-27 Michael Natterer <mitch@gimp.org>
* app/tools/gimppaintoptions-gui.c: don't add the gradient box for
the blend tool. Clean up the code by moving the checks for the
tool type out of the utility functions into the main
gimp_paint_options_gui() function.
* app/tools/gimpblendoptions.c: add the gradient box here.
svn path=/trunk/; revision=25826
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-26 Michael Natterer <mitch@gimp.org>
* app/paint/gimppaintoptions.[ch]: replace the identical
GimpPressureOptions, GimpVelocityOptions and GimpRandomOptions
struct by a single GimpDynamicOptions struct.
* app/tools/gimppaintoptions-gui.c: don't pass the various
sub-structs to the _options_gui() function because they are not
needed.
svn path=/trunk/; revision=25814
2008-05-25 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimpfreeselecttool.c
(gimp_free_select_tool_prepare_for_move)
(gimp_free_select_tool_revert_to_saved_state)
(gimp_free_select_tool_move_segment_vertex_to): Handle the special
case when there is only one point, so that moving segment vertices
works even if there only is one.
svn path=/trunk/; revision=25798
2008-05-25 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimpfreeselecttool.c: For completeness, comment on
some uncommented instance-private variables.
svn path=/trunk/; revision=25797
2008-05-25 Martin Nordholts <martinn@svn.gnome.org>
Added support for supressing handles by holding Shift in the Free
Select Tool so that new segments can be created where handles
would otherwise obstruct.
* app/tools/gimpfreeselecttool.c
(gimp_free_select_tool_handle_segment_selection): Renamed, and
only select segment vertices if handles are not supressed.
(gimp_free_select_tool_modifier_key): Make Shift toggle supressing
handles.
(gimp_free_select_tool_draw): Don't draw the handles if they are
supressed.
(gimp_free_select_tool_should_close): Only accept distance from
start point as a reason to close the polygon if the handles are
not supressed.
svn path=/trunk/; revision=25795
2008-05-25 Martin Nordholts <martinn@svn.gnome.org>
Added support for double-clicking in the Free Select Tool. A
double-click will commit the selection.
* app/tools/gimpfreeselecttool.c
(gimp_free_select_tool_get_double_click_info): Helper function to
retrive GTK+ double-click settings.
(gimp_free_select_tool_should_close): Take double-clicking into
account.
(gimp_free_select_tool_revert_to_saved_state): Bail out if needed.
(gimp_free_select_tool_button_release): Pass on time when
clicking.
(gimp_free_select_tool_handle_click): Pass time to this function,
and modify it to handle double-clicks.
svn path=/trunk/; revision=25794
2008-05-25 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimpfreeselecttool.c
(gimp_free_select_tool_handle_click): A click might have slightly
adjusted the points, so revert before doing the selection.
(gimp_free_select_tool_revert_to_saved_state): Move definition up
a bit.
svn path=/trunk/; revision=25792
2008-05-25 Martin Nordholts <martinn@svn.gnome.org>
Make moving selection mask/pixels within the selection work for
the Free Select Tool, as well as interaction with any resulting
floating selection.
* app/tools/gimpfreeselecttool.c
(gimp_free_select_tool_handle_click): Handle floating selections.
(gimp_free_select_tool_status_update): Show the inital
instructions until there are 3 or more segment vertices, rather
than 3 or more points.
(gimp_free_select_tool_oper_update): When there is no active tool,
show selection tool status bar help messages instead of the tool
specific ones.
(gimp_free_select_tool_delegate_button_press): New helper function
to decide wether to delgate operation to the selection tool.
(gimp_free_select_tool_button_press): Handle delegation to the
selection tool.
svn path=/trunk/; revision=25791
2008-05-24 Michael Natterer <mitch@gimp.org>
* app/tools/gimppaintoptions-gui.c: fix dynamics grid label
positions for RTL mode by attaching the fixed to the table *after*
the toggle buttons (eek). See comment in the code.
svn path=/trunk/; revision=25790
2008-05-24 Martin Nordholts <martinn@svn.gnome.org>
Kill the Polygon Select Tool. The Free Select Tool now provides a
superset of the old Polygon Select Tool functionality. We still
keep the tool icons etc around though, they might come in useful
in the future.
* app/tools/gimppolygonselecttool.[ch]: Removed.
* app/tools/Makefile.am: Removed gimppolygonselecttool.[ch].
* app/tools/gimp-tools.c (gimp_tools_init): Don't register the
Polygon Select Tool.
* app/widgets/gimphelp-ids.h: Remove
GIMP_HELP_TOOL_POLYGON_SELECT.
svn path=/trunk/; revision=25783
2008-05-23 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimpfreeselecttool.c
(gimp_free_select_tool_draw): Draw handles within HANDLE_SIZE * 7
distance from cursor instead of only showing the hovered handle.
(gimp_free_select_tool_oper_update): Remember last coordinates
given here, so we can do above calculations.
svn path=/trunk/; revision=25782
2008-05-23 Michael Natterer <mitch@gimp.org>
* app/tools/gimppaintoptions-gui.c: left-align the labels in the
new dynamics matrix. Add some code for RTL layout that doesn't
work properly yet.
svn path=/trunk/; revision=25772
2008-05-22 Michael Natterer <mitch@gimp.org>
* app/paint/gimppaintoptions.[ch]: replace the pressure-expanded,
velocity-expanded and random-expanded properties by a single
dynamics-expanded property.
* app/tools/gimppaintoptions-gui.c: pack the toggle matrix into an
expander, some cleanup.
svn path=/trunk/; revision=25765
2008-05-22 Michael Natterer <mitch@gimp.org>
* app/tools/gimppaintoptions-gui.c: revert accidential change of
all occurences of "hardness" to "pressure" in strings and function
names.
svn path=/trunk/; revision=25764
2008-05-22 Michael Natterer <mitch@gimp.org>
* app/tools/gimppaintoptions-gui.c: factor out a utility function
that creates a dynamics check button.
svn path=/trunk/; revision=25763
2008-05-22 Michael Natterer <mitch@gimp.org>
* app/tools/gimppaintoptions-gui.c: first version of a matrix of
toggles for the dynamics parameters instead of three expanders.
svn path=/trunk/; revision=25762
2008-05-22 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimpfreeselecttool.c: Base a start of a new segment on
the pending point, and enable 15 degree constraints on the pending
point when Ctrl is being held down.
svn path=/trunk/; revision=25761
2008-05-22 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimpfreeselecttool.[ch]
* app/tools/gimpforegroundselecttool.c: Fix that some
gimp_free_select_tool_-functions had the wrong name.
svn path=/trunk/; revision=25759
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