2003-06-04 Sven Neumann <sven@gimp.org>
* app/tools/Makefile.am
* app/tools/gimpcoloroptions.[ch]
* app/tools/gimpcolortool.[ch]: new files that implement base
classes moved out of GimpColorPickerOptions and GimpColorPickerTool.
* app/tools/gimpcolorpickeroptions.[ch]
* app/tools/gimpcolorpickertool.[ch]: derive from the new obejcts.
* app/tools/gimpimagemaptool.h
* app/tools/gimppainttool.c
* app/tools/tools-types.h: moved typedefs into the types file.
2003-06-04 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell.c (gimp_display_shell_reconnect):
call gimp_display_shell_scale_setup() instead of
gimp_display_shell_shrink_wrap() so window size, zoom factor and
scroll offsets are preserved across File->Revert if possible.
Fixes bug #114383.
2003-06-03 Sven Neumann <sven@gimp.org>
* app/text/gimptext-compat.c (text_get_extents): need to get
ascent and descent from a PangoLayoutLine. Report negative descent
so the function behaves like it used to in 1.2.
2003-06-03 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-rotate.c (gimp_image_rotate_item_offset):
fixed offset calculation for 90 and 270 degree rotations.
* app/core/gimpimage-flip.c
* app/core/gimpimage-rotate.c
* app/core/gimpimage-scale.c: increase the progress also when
transforming the selection. Makes the progress appear more
continuous. Also clened up and simplified the progress code
in all files.
* app/core/gimpimage-resize.[ch]: added a progress like in the
files above.
* app/gui/image-commands.c (image_resize_callback): changed
accordingly.
(image_scale_implement): clened up and simplified a lot.
* tools/pdbgen/pdb/image.pdb: changed accordingly.
* app/pdb/image_cmds.c: regenerated.
2003-06-02 Sven Neumann <sven@gimp.org>
* app/widgets/gimpvectorstreeview.h
* app/widgets/widgets-types.h: moved function definitions to the
widgets-types header file.
* app/gui/dialogs-constructors.c
* app/widgets/gimpselectioneditor.[ch]: added a "Selection to
Path" button as suggested in bug #112448.
2003-06-02 Michael Natterer <mitch@gimp.org>
* app/core/gimpchannel.c (gimp_channel_scale, resize): make sure
channels end up at (0, 0) after scaling and resizing.
Fixes bug #114213.
2003-06-02 Michael Natterer <mitch@gimp.org>
Implemented DISSOLVE_MODE the way it should have always been.
Fixes bug #107402.
* app/paint-funcs-generic.h (struct apply_layer_mode_struct): added
"guchar *mask" so it can be used by the layer mode.
(dissolve_pixels): take an additional "mask" parameter and
dissolve the pixels according to the *combined* opacity of the
pixel's alpha, the opacity and the mask. Removed a wrong comment
about why we call g_rand_int() x times before we start to use its
values.
(layer_dissolve_mode): pass the mask to dissolve_pixels(). No need
to call add_alpha_pixels() since we overwrite the dest buffer
entirely in disolve_pixels().
* app/paint-funcs.c (initial_sub_region, combine_sub_region):
allocate the buffer large enough for DISSOLVE (which always needs
an alpha channel). Pass the mask to the layer mode functions.
Discard opacity and mask after applying DISSOLVE since it
"consumes" all transparency.
2003-05-31 Tor Lillqvist <tml@iki.fi>
* app/gimp.sym: Remove. No gimp library uses symbols from the
gimp executable any longer, says Mitch.
* app/Makefile.am: Remove related stuff from here, too.
2003-05-31 Michael Natterer <mitch@gimp.org>
* app/tools/tools-enums.[ch]: added enum GimpTransformType which
can be one of { LAYER, SELECTION, PATH }
* app/tools/gimptransformoptions.[ch]: added a GimpTransformType
property to GimpTransformOptions. Added a GUI for the new
option.
* app/tools/gimpflipoptions.[ch]: derive it from
GimpTransformOptions and add the GUI here, too.
* app/tools/gimpfliptool.c
* app/tools/gimptransformtool.[ch]: added support for transforming
the selection. Added framework for transforming paths (still
unimplemented).
* app/tools/gimpselectionoptions.c: small cleanup.
* libgimpwidgets/gimpstock.[ch]
* themes/Default/images/Makefile.am
* themes/Default/images/stock-path-16.png
* themes/Default/images/stock-path-22.png
* themes/Default/images/stock-selection-16.png: new icons for the
new transform options buttons. Simply copied existing ones...
2003-05-30 Tor Lillqvist <tml@iki.fi>
* configure.in: As gimp uses fontconfig directly, check for it.
* app/Makefile.am: And link with it.
* app/gimp.sym: Remove dead symbols.
* libgimp/gimp.def
* libgimpwidgets/gimpwidgets.def: Move gimp_standard_help_func.
* plug-ins/xjt/xjt.c: Use _mkdir() on Win32.
2003-05-30 Sven Neumann <sven@gimp.org>
* app/tools/gimpeditselectiontool.c
(gimp_edit_selection_tool_button_release): don't stop the active
tool, the tool manager did this already when the edit-selection
tool was pushed.
2003-05-29 Michael Natterer <mitch@gimp.org>
* app/main.c (main): removed the calls to g_log_set_handler().
* app/app_procs.[ch] (app_init): added the g_log_set_handler()
calls and pass them the global Gimp instance as user_data.
Renamed app_gui_init() to app_gui_libs_init().
* app/errors.c: use the passed Gimp pointer instead of using
"the_gimp". Don't #include "app_procs.h".
* app/gui/gui.[ch]: removed gui_get_screen_resolution().
* app/widgets/gimpwidgets-utils.[ch]: added
gimp_get_screen_resolution().
* app/display/gimpdisplayshell-handlers.c
* app/display/gimpdisplayshell.c
* app/gui/preferences-dialog.c
* app/gui/user-install-dialog.c: changed accordingly.
* app/display/gimpdisplayshell.c: don't #include "gui/gui.h".
2003-05-29 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcontainertreeview.c
(gimp_container_tree_view_button_press): remove
main_column->editable_widget on each button_press_event. Should
fix more (if not all) stale editing widgets.
2003-05-28 Sven Neumann <sven@gimp.org>
* app/app_procs.[ch]: wrap gui_libs_init() so we don't need to
include gui.h from main.c
* app/main.c: changed accordingly.
* app/gui/gui.[ch]: added a GdkScreen parameter to
gui_get_screen_resolution(). Use NULL if you want the default
screen.
* app/gui/preferences-dialog.c
* app/gui/user-install-dialog.c: changed accordingly.
* app/display/gimpdisplayshell-scale.c: use the monitor resolution
stored in the GimpDisplayShell object.
* app/display/gimpdisplayshell-handlers.c
* app/display/gimpdisplayshell.c: get the monitor resolution for
the widget's GdkScreen. Set it in the realize method so it gets
changed when the image window is migrated to another screen.
2003-05-28 Michael Natterer <mitch@gimp.org>
* app/gui/image-menu.c
* app/gui/palette-editor-menu.c
* app/gui/view-commands.[ch]
* app/widgets/gimpgradienteditor.c
* app/widgets/gimppaletteeditor.[ch]: changed all places to show
zoom menu items and icons in ZOOM_OUT, ZOOM_IN order. In an attack
of consistency, also reordered all callbacks accordingly.
2003-05-28 Michael Natterer <mitch@gimp.org>
* app/display/gimpnavigationview.c: don't let the navigation
_popup_ auto-resize itself and don't allocate a minimum size
bacause that makes sense for the navigation _tab_ only. Fixes
popup size and positioning.
2003-05-27 Sven Neumann <sven@gimp.org>
* app/gui/vectors-commands.c (vectors_selection_to_vectors): don't
mark a string for translation which should never be used.
2003-05-27 Michael Natterer <mitch@gimp.org>
* app/tools/gimpfreeselecttool.[ch]
* app/tools/gimprectselecttool.[ch]: added the possibility to
<alt>+drag the whole selection preview line *while* creating the
selection. Used a modified version of
http://aeropc5.hut.fi/~mjkorhon/gimp-move-selection.patch (found
in the mailing list archives). Fixes bug #87688.
2003-05-27 Michael Natterer <mitch@gimp.org>
* app/gui/select-commands.c (select_save_cmd_callback): switch
to the "Channels" tab after adding the new channel.
Fixes bug #101970.
2003-05-26 Michael Natterer <mitch@gimp.org>
* app/base/tile-manager-private.h: added "gint ref_count" to the
TileManager struct.
* app/base/tile-manager.[ch]: replaced tile_manager_destroy()
by tile_manager_ref() and tile_manager_unref().
* app/core/gimpimage-undo-push.c: ref the tile managers stored in
the undo system and DON'T destroy them if no undo could be pushed.
Should fix the remaining crashes with undo disabled like in
bug #9350.
(!!!) Note that the tiles passed to gimp_image_undo_push_image()
and gimp_drawable_push_undo() as well as the tile managers of
drawables passed to gimp_image_undo_push_[layer|channel]_mod()
must be unref'ed by the caller now.
* app/core/gimpdrawable-transform.c (gimp_drawable_transform_paste):
don't take ownership of the passed tiles but ref them if needed.
(!!!) Callers must unref the passed tiles themselves now.
* app/core/gimpbuffer.c
* app/core/gimpdrawable-blend.c
* app/core/gimpdrawable-bucket-fill.c
* app/core/gimpdrawable-offset.c
* app/core/gimpdrawable.c
* app/core/gimpedit.c
* app/core/gimpimage-convert.c
* app/core/gimpimage-mask.c
* app/core/gimpimage-projection.c
* app/core/gimpimage.c
* app/core/gimpimagemap.c
* app/core/gimplayer-floating-sel.c
* app/core/gimplayer.c
* app/paint/gimppaintcore.c
* app/text/gimptextlayer.c
* app/tools/gimpinktool.c
* app/tools/gimpiscissorstool.c
* app/tools/gimptransformtool-undo.c
* app/tools/gimptransformtool.c: changed accordingly.
2003-05-26 Michael Natterer <mitch@gimp.org>
* app/widgets/gimppaletteeditor.[ch]
* app/gui/palette-editor-commands.[ch]
* app/gui/palette-editor-menu.c: started to clean up the palette
editor: added buttons for all menu items and menu items for all
buttons. Improved selected palette entry handling. Moved all code
to gimppaletteeditor.c and call it from the menu callbacks. Lots
of cleanup (unfinished).
2003-05-26 Pedro Gimeno <pggimeno@wanadoo.es>
* app/tools/gimpeditselectiontool.c (selection_transform_segs):
Fix off-by-one when dragging the selection. Fixes the last pending
issue of bug #17904. Use temporary variables for clamp values.
* app/display/gimpdisplayshell-selection.c
(selection_transform_segs): Perform the clamping that fixes
bug #110014 here instead of in the callers. Solves a rare case
that was not properly handled before.
(selection_render_points, selection_generate_segs): Remove the
clamping code from here.
* app/tools/gimpdrawtool.c (gimp_draw_tool_draw_rectangle): More
clampings to avoid overflow of 16-bit coordinates.
2003-05-25 Michael Natterer <mitch@gimp.org>
* libgimpwidgets/gimphelpui.[ch] (_gimp_help_init): changed again
to take no paramaters and use _gimp_standard_help_func from
gimpwidgets-private.
* libgimpwidgets/gimpwidgets-private.[ch]: removed the palette
functions from GimpWidgetVTable. Instead, pass them as
GimpGetColorFunc to gimp_widgets_init() and make them available as
_gimp_get_foreground_func and _gimp_get_background_func.
* libgimpwidgets/gimpcolorbutton.c
* libgimp/gimpui.c: changed accordingly.
* app/libgimp_glue.[ch]: removed the palette functions.
* app/gui/gui.c: added gui_get_foreground_func() and
gui_get_background_func() and pass them to gimp_widgets_init().
2003-05-25 Michael Natterer <mitch@gimp.org>
* libgimpwidgets/gimphelpui.[ch]: added a GimpHelpFunc parameter to
_gimp_help_init(). Implement gimp_standard_help_func() here and
use the function pointer passed to _gimp_help_init().
* libgimpwidgets/gimpwidgets-private.[ch]: removed
standard_help_func from GimpWidgetsVTable. Require it as paramater
to gimp_widgets_init() and pass it to _gimp_help_init().
* libgimpwidgets/gimpunitmenu.c: use gimp_standard_help_func
directly again.
* app/libgimp_glue.[ch]: removed gimp_standard_help_func().
* libgimp/Makefile.am
* libgimp/gimphelp.c: removed this file (containing
gimp_standard_help_func()).
* app/gui/gui.c: added private gimp_help_func() and pass it to
gimp_widgets_init().
* libgimp/gimpui.c: added private gimp_ui_help_func() and pass it
to gimp_widgets_init().
2003-05-24 Sven Neumann <sven@gimp.org>
* app/core/gimpimage-rotate.c (gimp_image_rotate): fixed offset of
layers and vectors after rotation (bug #113611).
2003-05-23 Sven Neumann <sven@gimp.org>
* libgimpwidgets/Makefile.am
* libgimpwidgets/gimpwidgets-private.[ch]: new files. Moved
gimp_widgets_init() here and added a vtable parameter. The vtable
has entries for all the symbols that are either provided by libgimp
or gimp itself depending on who is using the library.
* libgimpwidgets/libgimp-glue.c: removed this file that uses to
provide a Win32 only hack that is now not needed any longer.
* libgimpwidgets/gimpcolorbutton.c
* libgimpwidgets/gimphelpui.c
* libgimpwidgets/gimpsizeentry.c
* libgimpwidgets/gimpunitmenu.c
* libgimpwidgets/gimpwidgets.[ch]: don't call the offending
functions directly, but use the vtable entries. This is ugly but
the ugliness is restricted to our code. There are plans to clean
this up further... (Fixes#113410 once more.)
* app/gui/gui.c (gui_libs_init)
* libgimp/gimpui.c (gimp_ui_init): initialize libgimpwidgets with
the proper vtable.
2003-05-23 Sven Neumann <sven@gimp.org>
* app/paint/gimppaintcore.c
* app/tools/gimppainttool.c: applied a patch from Henning Makholm
<henning@makholm.net> that improves drawing of narrow straight lines
by moving the endpoints to pixel centers. Fixes bug #84145.
2003-05-23 Michael Natterer <mitch@gimp.org>
* app/gui/color-notebook.c (color_notebook_new_internal): don't
call gimp_dialog_factory_add_foreign() with a NULL dialog_factory.
* app/widgets/gimpcolorpanel.c: removed the color_notebook_active
boolean state and *always* call color_notebook_show() when the
user clicks the button. This way the notebook is automatically
deiconified or risen.
2003-05-23 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpdrawabletreeview.c
(gimp_drawable_tree_view_eye_clicked): implement <shift>+click on
the eye icon the same way it was in 1.2 (hide all other drawables
if any is visible, show them all otherwise). Fixes bug #113479.
2003-05-22 Michael Natterer <mitch@gimp.org>
* app/vectors/Makefile.am
* app/vectors/gimpvectors-compat.[ch]: new files implementing a
compatibility API for converting old XCF and PDB point arrays
to GimpVectors and vice versa.
* app/xcf/xcf-load.c
* app/xcf/xcf-save.c
* tools/pdbgen/pdb/paths.pdb: use the new functions instead of
having slightly different, but equally ugly code twice.
* app/xcf/xcf-load.c: cleaned up path loading a lot. Removed the
path_point loading utility functions.
* app/pdb/paths_cmds.c: regenerated.
* app/Makefile.am: link vectors/libappvectors.a after
xcf/libappxcf.a so the compat functions (which are not needed in
vectors/) are found. Also reverted an accidentially checked in
change to the libgimpwidgets link order.
2003-05-22 Manish Singh <yosh@gimp.org>
* tools/pdbgen/pdb/fileops.pdb: convert filename to a uri for
find_utils_find_proc.
* app/pdb/fileops_cmds.c: regenerated
2003-05-21 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable.[ch]: added GimpDrawable::alpha_changed()
signal.
* app/core/gimpimage-undo-push.c
* app/core/gimplayer.c: emit it when alpha is removed from or
added to a layer.
* app/widgets/gimpcontainertreeview.[ch]: added a
"name_attributes" column to the list store which provides a
PangoAttrList for the name column.
* app/widgets/gimplayertreeview.[ch]: connect to all layers'
"alpha_changed" and set the BG layer's name to bold.
* app/widgets/gimpdrawabletreeview.c: removed redundant assertions.
2003-05-21 Simon Budig <simon@gimp.org>
* app/core/gimpscanconvert.[ch]: Extended to be able to handle
multiple polygons in a sane way.
* app/core/gimpimage-mask-select.c: Use this to convert
multiple-stroke vectors objects to selections. Libart rocks!
* app/tools/gimpiscissorstool.c: Changed accordingly.
(The previous commit did not run cleanly)
2003-05-21 Simon Budig <simon@gimp.org>
* app/core/gimpscanconvert.[ch]: Extended to be able to handle
multiple polygons in a sane way.
* app/core/gimpimage-mask-select.c: Use this to convert
multiple-stroke vectors objects to selections. Libart rocks!
* app/tools/gimpiscissorstool.c: Changed accordingly.
2003-05-20 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-undo-push.c (undo_pop_layer_mod): call
gimp_layer_invalidate_boundary() because the layer extents may
change.
* app/core/gimpitem-linked.c: pass clip_result == TRUE when
rotating linked channels.
* app/core/gimpdrawable-transform.c: implement clip_result so
linked channels can be rotated without leaving the image in an
inconsistent state. Added utility function
gimp_drawable_transform_rotate_point().
2003-05-20 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell.[ch]
* app/display/gimpdisplayshell-callbacks.c: removed padding_gc from
the GimpDisplayShell struct. Don't draw the padding color manually.
* app/display/gimpdisplayshell-appearance.c
(gimp_display_shell_set_padding): set the canvas background color
using gdk_window_set_background().
2003-05-20 Michael Natterer <mitch@gimp.org>
* app/core/gimpchannel.c (gimp_channel_rotate): don't default to
clip_result == TRUE (unlike the other transform functions).
* app/core/gimpdrawable-transform.c
(gimp_drawable_transform_tiles_rotate): fixed offset calculation.
* app/core/gimpimage-rotate.c: change the image size *after* all items
are rotated. Adjust all items' offsets after rotation. Rotate the
resolutions too. Seems to work now and fixes bug #6101.
* app/core/gimpimage.c (gimp_image_size_changed): emit
"size_changed" on all vectors.
* app/core/gimpitem-linked.[ch]: added gimp_item_linked_rotate().
* app/gui/drawable-commands.c: flip and rotate linked items too.
* app/vectors/gimpvectors.c (gimp_vectors_rotate): fixed rotation
angles.
Unrelated:
* app/core/gimpimage-merge.c: don't #include "path.h".
2003-05-20 Sven Neumann <sven@gimp.org>
* app/core/gimpimage-flip.c: no need to include gimp-intl.h.
* app/core/gimpimage-rotate.c: change the image size if needed;
implemented rotation of guides.
* app/vectors/gimpvectors.c: implemented rotation of vectors.
2003-05-20 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-undo-push.c: remember the guide's orientation
in the guide undo. Needed for gimp_image_rotate().
2003-05-20 Sven Neumann <sven@gimp.org>
* app/core/core-enums.[ch]: added new enum GimpRotationType.
* app/core/Makefile.am
* app/core/gimpimage-rotate.[ch]: new files.
* app/core/gimpchannel.c
* app/core/gimpdrawable-transform.[ch]
* app/core/gimpdrawable.c
* app/core/gimpitem.[ch]
* app/core/gimplayer.c
* app/vectors/gimpvectors.c: added GimpItem::rotate. Still work in
progress.
* plug-ins/common/rotate.c: don't install any menu entries. The
plug-in is only kept around to provide plug_in_rotate for backward
compatibility.
* app/gui/drawable-commands.[ch]
* app/gui/image-commands.[ch]
* app/gui/image-menu.c: use the new rotate implementation and use
stock icons for the menu entries. Fixes bug #57797.
2003-05-20 Michael Natterer <mitch@gimp.org>
Some color API cleanup:
* libgimpcolor/gimpcolortypes.h: added struct GimpHSL. All values
are doubles in a [0.0..1.0] range.
* libgimpcolor/gimpcolorspace.[ch]: changed the GimpRGB <-> HSL
functions to use the new struct instead of separate hue, saturation
and lightness doubles. Note that the hue range has changed from
[0.0..360.0] to [0.0..1.0].
* app/base/colorize.c (colorize_calculate)
* plug-ins/common/AlienMap2.c (transform): changed accordingly.
2003-05-19 Michael Natterer <mitch@gimp.org>
* app/gui/image-menu.c: moved the image flip entries to the
Image->Transform submenu and added flip entries to
Layer->Transform. Cleaned up the transform submenus.
* app/gui/drawable-commands.[ch]: added
drawable_flip_cmd_callback().
* tools/pdbgen/pdb/image.pdb: added a PDB wrapper for
gimp_image_flip().
* libgimp/gimpimage_pdb.[ch]
* app/pdb/image_cmds.c
* app/pdb/internal_procs.c: regenerated.
2003-05-19 Michael Natterer <mitch@gimp.org>
* libgimpcolor/gimpcolorspace.c (gimp_hsl_to_rgb): fixed to work
like gimp_hls_to_rgb_int() (does the right thing now for the
saturation == 0 case). Some minor cleanups.
Implemented "Colorize" as suggested in bug #20509. It's not a
toggle in the "Hue/Saturation" tool dialog (which would be a gross
hack IMHO) but a separate tool. Fixes bug #20509.
* app/base/Makefile.am
* app/base/base-types.h
* app/base/colorize.[ch]: the actual mapping function lives
here. Its algorithm was taken from the "colorify" plug-in.
* app/tools/Makefile.am
* app/tools/gimpcolorizetool.[ch]: the tool.
* app/tools/tools.c: register it.
* app/gui/dialogs.c: session-manage its dialog.
* libgimpwidgets/gimpstock.[ch]
* themes/Default/images/Makefile.am
* themes/Default/images/tools/stock-tool-colorize-16.png
* themes/Default/images/tools/stock-tool-colorize-22.png: new
icons from Jimmac.
Unrelated:
* app/tools/gimpbrightnesscontrasttool.c
* app/tools/gimpcolorbalancetool.c
* app/tools/gimphuesaturationtool.c
* app/tools/gimpposterizetool.c
* app/tools/gimpthresholdtool.c: don't #include "tool_manager.h"
2003-05-19 Manish Singh <yosh@gimp.org>
* configure.in: remove glibconfig.h inline check, it hasn't worked
for a long time.
* tools/authorsgen/contributors: added George J. Carrette, author of
SIOD.
2003-05-19 Simon Budig <simon@gimp.org>
* app/vectors/gimpbezierstroke.[ch]: Implemented closed paths. Not
yet available in a sane manner via the UI. Added the last missing
line from gimp_bezier_stroke_interpolate ().
* app/tools/gimpvectortool.c: Changed accordingly
* app/vectors/gimpstroke.[ch]
* app/vectors/gimpvectors.[ch]: removed Tabs.
2003-05-19 Michael Natterer <mitch@gimp.org>
* app/xcf/xcf-load.c (xcf_load_channel): set gimage->qmask_state
to TRUE if a channel's name is "Qmask". Fixes bug #113240.
2003-05-18 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-guides.c (gimp_image_snap_rectangle): snap
correctly to the bottom and right sides of the rectangle. Also
snap to the closer guide if we snap twice on one axis.
Fixes bug #113233.
All snapping functions: use ROUND() instead of truncating the
double coords.
2003-05-18 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell-callbacks.c
(gimp_display_shell_canvas_tool_events): update the cursor on
GDK_ENTER_NOTIFY.
* app/display/gimpdisplayshell-cursor.c
(gimp_display_shell_update_cursor): argh, "0" coordinates are
*inside* the canvas.
Together fixes bug #113239.
2003-05-18 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-convert.c (gimp_image_convert): push a
colormap undo if the image was INDEXED. Fixes bug #113236.
Minor Cleanups.
2003-05-18 Michael Natterer <mitch@gimp.org>
Implemented "Flip Image". Fixes bug #23179:
* app/core/core-enums.[ch]: added GIMP_UNDO_GROUP_IMAGE_FLIP.
* app/core/Makefile.am
* app/core/gimpimage-flip.[ch]: new files implementing
gimp_image_flip().
* app/gui/image-menu.c
* app/gui/image-commands.[ch]: added it to the "Image" menu.
* themes/Default/images/Makefile.am
* themes/Default/images/stock-flip-horizontal-16.png
* themes/Default/images/stock-flip-vertical-16.png
* libgimpwidgets/gimpstock.[ch]: added icons for the new
menu items.
Bugs found while hacking the stuff above:
* app/core/gimpdrawable-transform.c (gimp_drawable_transform_paste):
only call gimp_layer_add_alpha() if the pasted tiles have alpha.
* app/core/gimpimage-undo-push.c (undo_pop_channel_mod): fixed to
do the right thing if the channel is the selection mask.
2003-05-18 Michael Natterer <mitch@gimp.org>
* app/vectors/gimpbezierstroke.[ch]
(gimp_bezier_stroke_new_from_coords): changed to expect all points
(also the first one) in "H, A, H" order. Ignore the first coord
in the array for now. Added "gboolean closed" parameter.
* app/xcf/xcf-load.c
* tools/pdbgen/pdb/paths.pdb: shuffle the legacy path point arrays
around before creating strokes so they match the new order.
* app/pdb/paths_cmds.c: regenerated.
2003-05-18 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell-dnd.[ch]
* app/display/gimpdisplayshell.c: enabled dropping of vectors to
the display to copy them between images.
2003-05-18 Michael Natterer <mitch@gimp.org>
* app/core/gimpmarshal.list: added BOOLEAN: OBJECT, POINTER.
* app/widgets/gimpcontainerview.[ch]: added a boolean return
value to GimpContainerView::select_item() which indicates if
the select operation was successful.
* app/widgets/gimpchanneltreeview.c
* app/widgets/gimpcontainereditor.c
* app/widgets/gimpcontainergridview.c
* app/widgets/gimpcontainertreeview.c
* app/widgets/gimpitemtreeview.c
* app/widgets/gimplayertreeview.c
* app/widgets/gimpvectorstreeview.c: changed accordingly.
* app/widgets/gimpdrawabletreeview.c: ditto. Removed the
tree_view's select_function because it was only constraining the
widget, not the underlying select operation. Instead, implement
GimpContainerView::select_item() and disallow anything but the
floating selection to be selected. Also re-enabled the
"floating_selection_changed" callback and explicitely set the
active item so the button states get updated. Fixes bug #112487.
2003-05-18 Michael Natterer <mitch@gimp.org>
* app/vectors/gimpvectors.[ch]: added new function
gimp_vectors_convert() which duplicates a GimpVectors for another
image.
* app/widgets/gimpvectorstreeview.c
(gimp_vectors_tree_view_class_init): use it as
GimpItemTreeView::convert_item() implementation. Enables
DND-copying of vectors between images.
2003-05-18 Michael Natterer <mitch@gimp.org>
* app/core/gimplayer.c (gimp_layer_new_from_drawable): call
gimp_item_set_image() on the new layer's mask too if it exists.
2003-05-17 Michael Natterer <mitch@gimp.org>
Fixed File->Revert, which was completely broken before:
* app/gui/file-commands.c (file_revert_confirm_callback): set the
new image on all GimpContexts which had the old image set. Unref
the new image after the displays are reconnected.
Added some paranoia code for similar future situations (the
functions below were not broken, but affected by the above bug):
* app/display/gimpdisplay-handlers.c (gimp_display_disconnect):
set gdisp->gimage to NULL before unrefing the image.
* app/widgets/gimpimagedock.c (gimp_image_dock_image_changed):
unref the gimage pointer returned by g_object_get() only if it is
non-NULL. Cleanup.
2003-05-16 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-mask.[ch] (gimp_image_mask_extract): added
"gboolean cut_image" parameter so we can float selections
without cutting them from the original drawable.
* app/gui/select-commands.c
* tools/pdbgen/pdb/selection.pdb: pass cut_image == TRUE.
* app/pdb/selection_cmds.c: regenerated.
* app/tools/tools-enums.[ch]: added SELECTION_MOVE_COPY value
to the SelectOps enum.
* app/tools/gimpselectiontool.c: use the new mode when
<ctrl>+<alt>-dragging a selction (yes, this is evil but there are
no modifiers left).
* app/tools/gimpeditselectiontool.[ch]: extended EditType enum by
EDIT_MASK_COPY_TO_LAYER_TRANSLATE and pass cut_image == FALSE if
it's passed to init_edit_selection().
* app/tools/gimpfreeselecttool.c
* app/tools/gimpfuzzyselecttool.c
* app/tools/gimprectselecttool.c: pass the new mode to
GimpEditSelectionTool.
2003-05-16 Michael Natterer <mitch@gimp.org>
* app/gui/color-notebook.[ch]: added dialog_factory and
dialog_identifier parameters to the constructors and register the
color_notebook with the passed factory as foreign dialog.
* app/widgets/gimpcolorpanel.c: changed accordingly.
* app/gui/dialogs.c
* app/gui/colormap-editor-commands.c
* app/gui/gradient-editor-commands.c
* app/gui/palette-editor-commands.c
* app/widgets/gimptoolbox-color-area.c: added session management for
the color notebooks created here.
2003-05-16 Michael Natterer <mitch@gimp.org>
* app/gui/vectors-commands.c (vectors_sel_to_vectors_cmd_callback):
call vectors_selection_to_vectors() instead of #warning about
being unimplemented.
2003-05-16 Michael Natterer <mitch@gimp.org>
* tools/pdbgen/pdb/paths.pdb: fixed some bugs and warnings in
the ported functions.
* app/pdb/paths_cmds.c: regenerated.
2003-05-16 Sven Neumann <sven@gimp.org>
* app/pdb/fileops_cmds.c
* tools/pdbgen/pdb/fileops.pdb: this change should fix
file_load_thumbnail() for images with alpha channel by blending
the resulting tempbuf on a checkerboard (bug #113033).
2003-05-15 Michael Natterer <mitch@gimp.org>
* tools/pdbgen/pdb/paths.pdb: removed PDB access to the old paths
and ported everything to GimpVectors. Note that everything except
gimp_path_set_points() is untested and that
gimp_path_get_point_at_dist() is currently unimplemented. Changed
order of the generated functions and fixed some help texts.
* tools/pdbgen/app.pl: removed $tools_eek and $paint_eek hacks
because pdb/ doesn't include stuff from tools/ any more and paint/
no longer depends on GTK+.
* app/pdb/paint_tools_cmds.c
* app/pdb/paths_cmds.c
* libgimp/gimppaths_pdb.[ch]: regenerated.
2003-05-15 Michael Natterer <mitch@gimp.org>
* app/gui/vectors-commands.[ch]: added new function
vectors_selection_to_vectors() which invokes the sel2path Plug-In.
* app/gui/dialogs-constructors.c: make the new function known to
GimpVectorTreeView.
* app/widgets/gimpvectorstreeview.[ch]: Added a "Selection to Path"
button anc call the new function.
2003-05-15 Sven Neumann <sven@gimp.org>
* app/base/temp-buf.c: added some sanity checks to temp_buf
conversion routines.
* tools/pdbgen/pdb/fileops.pdb (file_load_thumbnail_invoker): use
GimpImagefile to load a thumbnail. Only works for RGB images yet.
This adresses bug #113033.
* app/pdb/fileops_cmds.c: regenerated.
* app/file/file-utils.[ch]: removed file_utils_readXVThumb(). It
is not needed any longer since GimpImagefile also handles the
old-style .xvpics.
* plug-ins/script-fu/scripts/copy-visible.scm: fixed typo.
2003-05-15 Michael Natterer <mitch@gimp.org>
* app/xcf/xcf-save.c: cleaned up the old path saving functions
just as the old path loading ones. Don't use g_slist_foreach() but
do everything in one functions. Added error checking for path
saving.
2003-05-15 Michael Natterer <mitch@gimp.org>
* app/xcf/xcf-load.c (xcf_load_old_path): the old paths actually
*do* support multiple strokes, they are just all in one curve.
Added support for loading them as separate GimpBezierStrokes.
2003-05-15 Michael Natterer <mitch@gimp.org>
* app/vectors/gimpbezierstroke.c
(gimp_bezier_stroke_new_from_coords): actually increment the coord
index when iterating the coords array. Fixes bug #113049.
2003-05-14 Michael Natterer <mitch@gimp.org>
* app/xcf/xcf-load.c: load the old paths into new GimpVectors
objects. Old paths are still created because new vectors can't be
saved yet. Renamed all old path loading functions to
xcf_load_old_path*(). Added prototypes for them and reordered them
to match the order of the rest of the file. Changed their
signatures to match the rest of the file and indented them.
2003-05-14 Michael Natterer <mitch@gimp.org>
* app/core/Makefile.am
* app/core/gimp-utils.[ch]: new file for utility functions.
Contains gimp_rectangle_intersect() for now.
* app/core/gimpdrawable-transform.c: removed the function here.
* app/core/gimpdrawable.c (gimp_drawable_resize): use it to
determine the amount of pixels to copy between the old and new
tile managers. Removed restriction that forced the areas to
overlap by at least one pixel.
* app/core/gimpitem.c (gimp_item_real_transform): removed the
restriction here, too.
* app/core/gimplayer.c (gimp_layer_create_mask): use the new
function to decide how much to copy from the selection when
creating a mask from it.
2003-05-14 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable-transform.[ch]: changed the TileManager
variable names to "orig_tiles" and "new_tiles" in the whole file.
(gimp_drawable_transform_tiles_flip): implement "clip_result".
Enables flipping of linked channels.
2003-05-14 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpimagedock.c (gimp_image_dock_book_removed):
chain up to parent_class->book_removed(), not book_added(). Fixes
dock destruction on last book removal.
2003-05-13 Michael Natterer <mitch@gimp.org>
* app/xcf/xcf-load.c (xcf_load_channel_props)
* app/xcf/xcf-save.c (xcf_save_channel_props): store the channel's
"linked" state in the XCF. Older GIMPs will complain, but still
load the file as if the new property was not there.
2003-05-13 Michael Natterer <mitch@gimp.org>
* app/core/gimpitem.[ch]: added "gboolean clip_result" to
GimpItem::flip().
* app/vectors/gimpvectors.c
* app/tools/gimpfliptool.c: changed accordingly.
* app/core/gimpdrawable.c: implement GimpItem::flip() and
GimpItem::transform().
* app/core/gimpchannel.c
* app/core/gimplayer.c: chain up in flip() and transform() and do
only the layer/channel specific stuff here.
* app/core/gimpdrawable-transform.[ch]: fixed indentation.
(gimp_drawable_transform_tiles_flip): added "gboolean clip_result"
and warn that it is not yet implemented.
(gimp_drawable_transform_tiles_affine): when transforming a
channel set bg_color to transparent. Clip channels (but not layer
masks) only if the passed tiles have bpp == 1 (the channel is
unfloated).
(gimp_drawable_transform_affine): clip all unfloated channels.
* app/core/gimpitem-linked.[ch]: added gimp_item_linked_get_list()
utility function to avoind iterating all layers/channels/vectors
in all functions.
* app/tools/gimptransformtool.c: clip all unfloated channels.
The clipping fixes above together fix bug #112858.
2003-05-13 Sven Neumann <sven@gimp.org>
* app/plug-in/plug-in.c (plug_in_close): wait 10 ms before killing
the plug-in just like the comment says. The code used to wait 0.1 ms
only.
2003-05-12 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-handlers.c
(gimp_display_shell_invalidate_preview_handler): use a low-priority
timeout for updating the WM icon.
2003-05-12 Michael Natterer <mitch@gimp.org>
Added support for transforming linked layers, channels
and vectors. Fixes bug #86277.
* app/core/gimpdrawable-transform.[ch]
(gimp_drawable_transform_tiles_flip): added "gdouble axis" and
calculate the resulting drawable offset.
(gimp_drawable_transform_flip): calculate the axis and pass it to
the function above.
(gimp_drawable_transform_[tiles_]affine): reordered parameters.
* app/core/gimpitem.[ch]: added virtual functions GimpItem::flip()
and GimpItem::transform().
* app/core/gimpchannel.c
* app/core/gimplayer.c
* app/vectors/gimpvectors.c: implement flip() and transform().
Note that all functions always transform the whole item,
regardless of a present selection.
* app/core/Makefile.am
* app/core/gimpitem-linked.[ch]: new files containing utility
functions which translate, flip and transform all linked items.
* app/tools/gimpfliptool.c
* app/tools/gimptransformtool.c
* tools/pdbgen/pdb/layer.pdb: use the new gimp_item_linked_*()
functions to translate, flip and transform all linked items.
* tools/pdbgen/pdb/transform_tools.pdb: follow
gimp_drawable_transform_affine() API change.
* app/pdb/layer_cmds.c
* app/pdb/transform_tools_cmds.c: regenerated.
2003-05-12 Michael Natterer <mitch@gimp.org>
* app/tools/tool_manager.c (tool_manager_tool_changed): make sure
that active_tool->tool_info is non-NULL before dereferencing it.
(Spotted by Ville Pätsi).
2003-05-09 Sven Neumann <sven@gimp.org>
* app/widgets/gimpselectioneditor.[ch]: added a "Stroke Selection"
button to the selection editor as suggested in bug #112448.
2003-05-09 Michael Natterer <mitch@gimp.org>
* app/core/gimpitem.[ch]: added "gboolean push_undo" to
GimpItem::translate() and don't push and undo in
gimp_item_translate().
* app/core/gimpchannel.[ch]: removed public function
gimp_channel_translate() and implement GimpItem::translate().
* app/core/gimpimage-mask.c
* app/core/gimplayer.c: changed accordingly.
* app/vectors/gimpvectors.c: actually translate the vectors
in translate().
* app/gui/channels-commands.c (channels_new_channel_query): removed
useless call to gimp_channel_translate().
* app/tools/gimpeditselectiontool.c
* tools/pdbgen/pdb/layer.pdb: when translating a linked layer,
also translate all linked channels and vectors. Cleanup.
Note that the "linked" behaviour has changed: before this change,
moving a layer moved all linked layers unconditionally. Now,
linked layers/channels/vectors are moved *only* if the moved layer
is also linked (the linked items behave as a group now and moving
something not in the group does not affect the group).
* app/pdb/layer_cmds.c: regenerated.