2003-06-26 Sven Neumann <sven@gimp.org>
* app/widgets/gimpcontainergridview.c: select items on
"button_press_event" not on "clicked". Makes the grid view behave
like the list view and fixes bug #115797.
2003-06-26 Sven Neumann <sven@gimp.org>
* app/gui/file-new-dialog.c (file_new_dialog_new): don't set the
focus on the size_entry. This change allows to accept the default
values by pressing OK. Fixes bug #115876.
2003-06-26 Simon Budig <simon@gimp.org>
* app/vectors/gimpbezierstroke.c: rewrote gimp_bezier_stroke_extend
for the case when the neighbor is not really an end point of the
stroke, but close enough to the end to still be acceptable.
* app/tools/gimpvectortool.c: Make the tool behave sanely
and more symetrically (both ends of a stroke behave basically the
same now), gimp_draw_on_handle () now prefers the anchor passed
into it via the *ret_anchor parameter over other preferred anchors.
2003-06-25 Sven Neumann <sven@gimp.org>
* app/text/gimptext-parasite.c (gimp_text_from_gdyntext_parasite):
attempt to convert text from locale encoding.
* app/vectors/gimpvectors-compat.c (gimp_vectors_compat_new):
allow paths with zero points (bug # 115955).
* plug-ins/script-fu/script-fu-server.c: if a connection to a
client is lost, invalidate file descriptors in the command queue.
Plugged a couple of memleaks.
2003-06-25 Sven Neumann <sven@gimp.org>
* app/text/gimptext-xlfd.[ch]: added convenience function
gimp_text_set_font_from_xlfd(). Improved and documented XLFD parsing.
* app/text/gimptext-parasite.c: use the new function.
2003-06-25 Simon Budig <simon@gimp.org>
* app/vectors/gimpbezierstroke.c: If an control handle gets
converted to an edge simply move it to its next anchor.
* app/tools/gimpvectortool.c: Improved interactive handling
of vectors. Still work in progress, esp. I am not sure about
the assignment of the modifier keys. Right now it is:
Drag (Anchor/Handle): Regular Movement
Shift-Click (Anchor): select multiple anchors (does not work yet)
Shift-Drag: (Handle): move opposite handle symmetrically
Ctrl-Drag (Anchor): Drag out control point
S-C-Click: (Anchor/Handle): Convert to Edge
2003-06-24 Sven Neumann <sven@gimp.org>
* app/config/gimpconfig.[ch]: added new function
gimp_config_serialize_to_fd() for the sake of completeness and
since it's a nice way to generate debugging output.
* app/text/Makefile.am
* app/text/gimptext-xlfd.[ch]: new files with routines to handle X
Logical Font Descriptions in an attempt to improve backwards
compatibility.
* app/text/gimptext-parasite.[ch]
* app/xcf/xcf-load.c: promote layers with GDynText parasite to
GimpTextLayer. Work in progress, we need to improve font matching.
2003-06-24 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcontainertreeview.c
(gimp_container_tree_view_select_item): put back the hack which
calls gtk_tree_selection_select_iter() in addition to
gtk_tree_view_set_cursor() until bug #115871 is fixed.
* app/xcf/xcf-save.c: when saving a text layer, store an extra
parasite that holds all information about the text.
* app/xcf/xcf-load.c: if a "gimp-text-layer" parasite is found and
it can be successfully deserialized to a GimpText object, convert
the layer to a text layer and remove the parasite.
* devel-docs/parasites.txt: documented the new "gimp-text-layer"
parasite.
2003-06-24 Sven Neumann <sven@gimp.org>
Added persistent storage of text layers in XCF files. We use a
parasite in order to keep the file format backwards compatible.
Fixes bug #111781.
* app/text/Makefile.am
* app/text/gimptext-parasite.[ch]: new files that hold functions
to convert a GimpText object to a GimpParasite and back.
* app/text/gimptextlayer.[ch]: added an ugly hack that allows to
convert a normal layer to a text layer.
* app/xcf/xcf-save.c: when saving a text layer, store an extra
parasite that holds all information about the text.
* app/xcf/xcf-load.c: if a "gimp-text-layer" parasite is found and
it can be successfully deserialized to a GimpText object, convert
the layer to a text layer and remove the parasite.
* app/Makefile.am: had to change linkage order.
* devel-docs/parasites.txt: documented the new "gimp-text-layer"
parasite.
* app/text/gimptext-parasite.[ch]
* app/gui/session.c (session_save): plugged minor memory leaks.
2003-06-24 Sven Neumann <sven@gimp.org>
* app/config/gimpscanner.c: store file descriptor and filename in
a private struct instead of using internals of GScanner. Should
fix problems on Win32 reported by Hans Breuer.
2003-06-24 Sven Neumann <sven@gimp.org>
* tools/pdbgen/pdb/image.pdb: changed the maximum preview
dimensions in gimp_image_get_thumbnail() to the limit implied by
the core preview system (GIMP_VIEWABLE_MAX_PREVIEW_SIZE). Fixes
bug #115464.
* libgimp/gimpimage_pdb.c
* app/pdb/image_cmds.c: regenerated.
2003-06-24 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-undo-push.c (undo_pop_image_grid)
* app/core/gimpimage.c (gimp_image_set_grid): ref/unref the grid.
* app/gui/view-commands.c (view_configure_grid_cmd_callback): set
the dialog transient for the shell, make shell->grid_dialog a
weak pointer of the grid dialog.
* app/gui/grid-dialog.c: don't set shell->grid_dialog to NULL
here, attach the grid using g_object_set_data_full() and don't
unref it explicitely. Use gimp_config_is_equal_to() instead of
gimp_config_diff().
* app/core/gimpgrid.[ch]: derive GimpGrid from GimpObject (not
GObject) allowing us to use gimp_object_get_memsize(). Added
missing copyright notice.
* app/core/gimpimage.c: only call gimp_object_get_memsize() if
gimage->grid != NULL.
* app/gui/grid-dialog.c: added mnemonics, set shell->grid_dialog
to NULL when destroyed.
* app/gui/view-commands.c (view_configure_grid_cmd_callback):
added call to gtk_window_present().
2003-06-23 Sven Neumann <sven@gimp.org>
* app/config/gimpconfig.[ch]
* app/config/gimpconfigwriter.[ch]
* app/config/gimpscanner.[ch]: added support for serializing to
and deserializing from strings. Had to do some smaller changes to
the GimpConfig API.
* app/config/test-config.c: added a simple test for the new
functions.
* app/config/gimpconfig-dump.c
* app/config/gimprc.c
* app/core/gimp-documents.c
* app/core/gimp-parasites.c
* app/core/gimp-templates.c
* app/core/gimpunits.c
* app/gui/session.c
* app/plug-in/plug-in-rc.c
* app/tools/tool_options.c
* app/widgets/gimpdevices.c: follow GimpConfig API changes.
* libgimpbase/gimpparasite.[ch]: declared the return value of
gimp_parasite_data() as gconstpointer.
This fixes bug #65198
* app/core/Makefile.am
* app/core/core-types.h:
* app/core/gimpgrid.[ch]: added new class GimpGrid.
* app/core/core-enums.[ch]: added new enum GimpGridType.
* app/core/gimpimage-guides.[ch]: removed the gimp_image_snap_*()
functions...
* app/core/gimpimage-snap.[ch]: ...and added them here since they
are no longer guide specific.
* app/core/gimpimage-undo-push.[ch]: added
gimp_image_undo_push_image_grid()
* app/display/gimpdisplayshell-handlers.c:
* app/core/gimpimage.[ch]: added grid member to _GimpImage. Added
new signal "grid_changed", added gimp_image_grid_changed(),
gimp_image_get_grid() and gimp_image_set_grid().
* app/display/gimpdisplayshell-appearance.[ch]: added
gimp_display_shell_set_show_grid(),
gimp_display_shell_get_show_grid(),
gimp_display_shell_set_snap_to_grid() and
gimp_display_shell_get_snap_to_grid().
* app/display/gimpdisplayshell-callbacks.c: added call to
gimp_display_shell_draw_grid()
* app/display/gimpdisplayshell.[ch]: added grid member to
_GimpDisplayShellVisibility, added snap_to_grid and grid_dialog
members to _GimpDisplayShell, added
gimp_display_shell_draw_grid(), modified
gimp_display_shell_snap_coords() to use the new
gimp_image_snap_*() functions.
* app/gui/image-menu.c: added grid entries to
image_menu_entries[].
* app/gui/view-commands.[ch]: added
view_configure_grid_cmd_callback(),
view_toggle_grid_cmd_callback() and
view_snap_to_grid_cmd_callback().
* app/gui/Makefile.am
* app/gui/grid-dialog.[ch]: added a grid dialog.
2003-06-23 Michael Natterer <mitch@gimp.org>
* app/plug-in/plug-in.[ch]: added separate GMainLoops for waiting
for extension_ack and for procedure_run's return value. The stack
of main loops is currently unused, it will be used for temp_proc
return values (which are currently disabled for no good reason).
Removed the boolean "recurse" and "starting_ext" states because
they are redundant now (we check for the presence of the dedicated
main loops instead).
* app/plug-in/plug-in-message.c
* app/plug-in/plug-in-progress.c
* app/plug-in/plug-in-run.c: changed accordingly.
2003-06-21 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcontainergridview.c
* app/widgets/gimpcontainertreeview.c: disable workarounds for
bugs #110737 and #108956 for GTK+ >= 2.2.2. Will remove them as
soon as we depend on 2.2.2.
* app/widgets/gimpcontainertreeview.c
(gimp_container_tree_view_select_item): disabled optimization
which didn't select an already selected iter because it broke the
fix for #108956. Cleanup.
2003-06-20 Michael Natterer <mitch@gimp.org>
* tools/pdbgen/pdb/message.pdb (message): use
plug_in_get_undo_desc() instead of duplicating its code.
* app/pdb/message_cmds.c: regenerated.
2003-06-20 Michael Natterer <mitch@gimp.org>
* app/gui/plug-in-commands.c (plug_in_run_cmd_callback): pass the
gdisp_ID to plug_in_run() again. Broke this with my last commit...
2003-06-20 Sven Neumann <sven@gimp.org>
* libgimp/gimp.c (gimp_config): fixed error messages.
* app/widgets/gimpwidgets-utils.c (gimp_message_box): use a
selectable label so you can copy from message dialogs.
2003-06-19 Michael Natterer <mitch@gimp.org>
Changed the semantics of GIMP_EXTENSION and (to some extent)
of GIMP_PLUGIN:
The old meaning of EXTENSION was "I live in the toolbox" and
PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I
am invoked interactively)". This is completely useless, since
living in the toolbox means having "<Toolbox>" in the menu_path
and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of
what type of procedure we are.
The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure,
I am invoked, do my job and finish", while GIMP_EXTENSION means
"I will install temporary procedures and I will keep running to
keep them available".
(A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the
core that it's ready to run, or the core will block waiting for
the message !!!).
* configure.in: bumped version number to 1.3.16.
* libgimpbase/gimpprotocol.h: increased protocol version number so
old extensions will refuse to load.
* app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't
blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but
look at their parameters and pass them either RUN-MODE, or
RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE.
* app/pdb/procedural_db.c: cleaned up, better error reporting,
replaced an impossible error message by g_return_if_fail()
* app/plug-in/plug-in-message.c (plug_in_handle_proc_install):
better error messages.
* app/plug-in/plug-in-params.c: allocate parameter arrays using
g_new0() so we don't have to worry about uninitialized stuff
later.
* app/plug-in/plug-in-run.c (plug_in_run): wait for
gimp_extension_ack() installation confirmation for ALL extensions,
not just for automatically started ones.
* app/plug-in/plug-ins.c: cleanup.
* libgimp/gimp.[ch]: cleaned up and API-documented massively. Made
all magic values given in the GPConfig message static and added
accessor functions for them. Added gimp_tile_width()/height().
Added new function gimp_extension_enable() which turns on
asynchronous processing of temp_proc run requests without having
to enter an endless gimp_extension_process() loop. Moved all
private functions to the end of the file. Added tons of
g_return_if_fail() all over the place. Call gimp_run_procedure2()
from gimp_run_procedure() instead of duplicating the
code. Indentation, spacing, stuff...
* libgimp/gimptile.[ch]: removed gimp_tile_width()/height().
* libgimp/gimpdrawable.c
* libgimp/gimppixelrgn.c
* libgimp/gimptile.c: use the gimp_tile_width()/height() accessor
functions.
* libgimp/gimp.def: added gimp_extension_enable.
* libgimp/gimpmenu.c: removed evil code which connected to
_readchannel manually and use gimp_extension_enable() for watching
temp_procs.
* plug-ins/helpbrowser/helpbrowser.c: removed the same evil code
here and call gimp_extension_enable(). Call gimp_extension_ack()
to let the core know that the temp_proc is installed.
* plug-ins/script-fu/script-fu.c: made all procedures except the
permanently running "extension_script_fu" ordinary GIMP_PLUGIN
procedures.
* plug-ins/common/curve_bend.c
* plug-ins/common/plugindetails.c
* plug-ins/common/screenshot.c
* plug-ins/common/uniteditor.c
* plug-ins/common/winclipboard.c
* plug-ins/dbbrowser/dbbrowser.c
* plug-ins/gfli/gfli.c
* plug-ins/twain/twain.c
* plug-ins/webbrowser/webbrowser.c
* plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN
procedures and renamed them from "extension_*" to "plug_in_*".
Random cleanups.
* app/widgets/gimphelp.c
* plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-19 Hans Breuer <hans@breuer.org>
* makefile.msc : replace the win9x specific cd ....
with the portable cd ..\..\..
* **/makefile.msc : updated
* plug-ins/xjt/xjt.c plug-ins/common/psd_save.c :
there is still no unistd.h with msvc build
2003-06-16 Michael Natterer <mitch@gimp.org>
* tools/pdbgen/pdb/brush_select.pdb (brush_args): don't fail on
brush_spacing values < 0, but behave as documented (use the
brush's own spacing).
* tools/pdbgen/pdb/brush_select.pdb
* tools/pdbgen/pdb/font_select.pdb
* tools/pdbgen/pdb/gradient_select.pdb
* tools/pdbgen/pdb/pattern_select.pdb: gtk_window_present() the
dialog on each set_popup(). This way the dialogs can be risen via
the PDB by setting the already selected object. Replaced
unreadable variable names by verbose ones.
* app/pdb/brush_select_cmds.c
* app/pdb/font_select_cmds.c
* app/pdb/gradient_select_cmds.c
* app/pdb/pattern_select_cmds.c: regenerated.
2003-06-13 Michael Natterer <mitch@gimp.org>
Cleaned up and improved the message system:
* app/core/gimp.[ch]: added "const gchar *domain" to
GimpMessageFunc (a NULL domain means the message is from the GIMP
core, everything else is a plug-in).
* app/errors.c: pass "domain == NULL" to gimp_message().
* tools/pdbgen/pdb/message.pdb: derive the message domain from the
current plug-in's menu_path (evil hack but works reasonably well).
* app/pdb/message_cmds.c: regenerated.
* app/widgets/gimpwidgets-utils.[ch] (gimp_message_box): added a
header showing the message domain and changed the dialog layout to
follow the HIG more closely.
* app/gui/error-console-dialog.[ch]: removed.
* app/widgets/gimperrorconsole.[ch]
* app/gui/error-console-commands.[ch]
* app/gui/error-console-menu.[ch]: new files containing a
re-implementation of the error console dialog.
* app/gui/Makefile.am
* app/gui/dialogs-constructors.c
* app/gui/gui.c
* app/gui/menus.c
* app/widgets/Makefile.am
* app/widgets/widgets-types.h: changed accordingly.
* app/display/gimpprogress.c: added more spacing and removed the
separator (more HIG compliant).
* plug-ins/[most plug-ins].c: Changed lots of messages and
progress strings:
- Removed plug-in names from messages since that's automatically
covered by "domain" now.
- Put all filenames in ''.
- Changed "Loading" to "Opening".
- Added "..." to all progress messages.
- Cleaned up all file open/save error messages to look the
same and include g_strerror(errno).
- Removed special casing for progress bars and *always* show them,
not only if run_mode != GIMP_RUN_NONINTERACTIVE (we can't expect
all plug-ins to do this correctly but need to hack the core to
sort out unwanted progress bars).
Unrelated:
- Cleaned up indentation, spacing, #includes, coding style and
other stuff while I was at all these files.
2003-06-13 Sven Neumann <sven@gimp.org>
* app/gui/file-save-dialog.c (file_save_ok_callback): removed
code for the slimy-easter-egg that was unveiled some time ago.
2003-06-13 Sven Neumann <sven@gimp.org>
Attempt to finally fix Smudge tool problems (bug #115057):
* app/paint-funcs/paint-funcs-generic.h (blend_pixels): added an
implementation for the non-alpha case.
* app/paint/gimpsmudge.c (gimp_smudge_start): added back code that
used to prefill the buffer if the inital area was clipped.
2003-06-12 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable.c (gimp_drawable_configure): removed the
check again because adding e.g. GRAY drawables to RGB images is
prefectly ok as long as they are channels/masks.
2003-06-12 Sven Neumann <sven@gimp.org>
* app/core/gimpdrawable.c (gimp_drawable_configure): check if the
drawable type fits to the image. This assertion would have catched
the problem below.
2003-06-11 Sven Neumann <sven@gimp.org>
* app/gui/info-window.c
* libgimpwidgets/gimpcolorscales.c
* libgimpwidgets/gimpcolorselect.c: applied some slightly modified
patches from Michael Bushey that fix rounding errors when
converting between color values in gdouble and guchar
representation (bug #109241).
* libgimpcolor/gimpcolorspace.c
* libgimpcolor/gimprgb.c: similar fixes here.
2003-06-11 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable.c (gimp_drawable_mask_bounds): added some
more g_return_if_fail() to avoid NULL pointer dereferencing.
2003-06-11 Sven Neumann <sven@gimp.org>
* app/widgets/gimptoolbox.[ch]: added a container that keeps
references to the buttons which are not added to the wrap box.
Just to make sure they are destroyed on exit.
2003-06-11 Sven Neumann <sven@gimp.org>
* etc/Makefile.am
* etc/sessionrc: added a sample sessiorc which will be used after
user installation.
* app/gui/user-install-dialog.c (tree_items): install the sample
sessionrc.
2003-06-10 Sven Neumann <sven@gimp.org>
* app/widgets/gimpwidgets-utils.[ch]: added utility function
gimp_rgb_get_gdk_color(), documented gimp_get_screen_resolution().
* app/widgets/gimppreviewrenderer.c
(gimp_preview_renderer_set_border_color)
* app/display/gimpdisplayshell-appearance.c
(gimp_display_shell_set_padding): use the new function.
2003-06-10 Sven Neumann <sven@gimp.org>
* app/gui/tools-commands.c (tools_select_cmd_callback): expects
the tool identifier as a GQuark now.
* app/gui/image-menu.c: changed accordingly. Removed code that
used to move the menu entries for the color correction tools to
the Layers menu. Added the respective menu entries by hand. Added
a menu entry for arbitrary rotations and one for Select by Color.
* app/tools/gimpbrightnesscontrasttool.c
* app/tools/gimpbycolorselecttool.c
* app/tools/gimpcolorbalancetool.c
* app/tools/gimpcolorizetool.c
* app/tools/gimpcurvestool.c
* app/tools/gimphistogramtool.c
* app/tools/gimphuesaturationtool.c
* app/tools/gimplevelstool.c
* app/tools/gimpposterizetool.c
* app/tools/gimpthresholdtool.c: register the color correction
tools in the Tools menu.
* app/tools/gimptransformtool.c: added an initialize method and
moved most initalization code from button_press to this place.
2003-06-09 Sven Neumann <sven@gimp.org>
* app/paint/gimpsmudge.c (gimp_smudge_start): now that
blend_pixels() behaves correctly, we can simply initialize the
smudge buffer with transparent pixels.
2003-06-09 Sven Neumann <sven@gimp.org>
* app/paint-funcs/paint-funcs-generic.h (blend_pixels): weight
pixels by their alpha value. Fixes the smudge tool (bug #72879).
2003-06-08 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpfontselection-dialog.c
(gimp_font_selection_dialog_new): pack the main table expanding,
not shrinking. Fixes bug #114656.
2003-06-06 Michael Natterer <mitch@gimp.org>
* app/widgets/Makefile.am
* app/widgets/gimptoolbox-dnd.[ch]: new files containing the
toolbox' drop callbacks. Exports gimp_toolbox_dnd_init().
* app/widgets/gimptoolbox.c: removed the callbacks and all the
"core/" includes they needed and call gimp_toolbox_dnd_init().
2003-06-06 Sven Neumann <sven@gimp.org>
* app/core/gimptoolinfo.[ch]: added "in_toolbox"; defaults to TRUE.
* app/tools/tool_manager.c: set "in_toolbox" to FALSE for tools
derived from GimpImageTool.
* app/widgets/gimptoolbox.c: respect the new flag when constructing
the toolbox.
2003-06-06 Sven Neumann <sven@gimp.org>
* tools/pdbgen/pdb/message.pdb: UTF-8 validate messages before
passing them to g_message().
* app/pdb/message_cmds.c
* libgimp/gimpmessage_pdb.c: regenerated.
2003-06-06 Michael Natterer <mitch@gimp.org>
* app/gui/image-menu.c
* app/gui/toolbox-menu.c: moved the convenience items which
create new docks from the "Dialogs/" level to a new
"Dialogs/Create New Dock/" sub-menu. Fixes bug #111278.
* app/gui/dialogs-commands.[ch] (dialogs_create_data_cmd_callback):
new convenience constructor callback. Factored out duplicated
code to the new dialogs_create_dock() utility function.
2003-06-06 Michael Natterer <mitch@gimp.org>
* app/gui/image-menu.c: added CW/CCW to the "Rotate" menu entries
as suggested in bug #57797. Cleaned up image_menu_update().
2003-06-06 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpitemfactory.c (gimp_item_factory_set_label):
use gtk_label_set_text_with_mnemonic() instead of just
gtk_label_set_text().
* app/gui/image-menu.c
* app/gui/toolbox-menu.c: added mnemonics for all sub-menus.
Fixes bug #106991.
* app/gui/image-menu.c: cleaned up the "Layers" menu: moved
sub-menus together. Changed the "Stack" menu's labels and
accelerators and added "Select Top/Bottom Layer" for consistency
(bound to Home/End).
* app/gui/layers-commands.[ch]: changed accordingly. Added the
new select top/bottom callbacks.
2003-06-05 Sven Neumann <sven@gimp.org>
* app/core/gimpdrawable.c (gimp_drawable_get_color_at):
* app/core/gimpimage-projection.c (gimp_image_projection_get_color_at):
use OPAQUE_OPACITY instead of 255.
* app/core/gimpimage-pick-color.[ch]: factored out code that
averages over colors so it can be used from GimpImageTool.
* app/tools/gimpimagemaptool.[ch]: derived from GimpColorTool and
added a GimpColorTool::pick implementation.
* app/tools/gimpcoloroptions.c
* app/tools/gimpcolorpickeroptions.c: add the toggle for
"sample_merged" in gimp_color_picker_options_gui().
* app/tools/gimpcolortool.c (gimp_color_tool_cursor_update): check
if the cursor is over the active drawable or if "sample_merged" is
active.
* app/tools/gimplevelstool.c: simplified since all color-picking is
now handled by the parent classes. Fixes bug #112668.
2003-06-05 Sven Neumann <sven@gimp.org>
* app/tools/gimpcoloroptions.c: changed the default radius.
* app/tools/gimpcolortool.[ch]: pass GimpColorOptions to
gimp_color_tool_enable(). Added gimp_color_tool_disable() and
gimp_color_tool_is_enabled().
* app/tools/gimpcolorpickertool.c: changed accordingly.
* app/tools/gimppainttool.[ch]: derived GimpPaintTool from
GimpColorTool and removed most color picking code.
* app/tools/gimpdodgeburntool.c (gimp_dodgeburn_tool_modifier_key)
* app/tools/gimperasertool.c (gimp_eraser_tool_modifier_key):
chain up to the parent class.
* app/tools/gimppaintbrushtool.c: purely cosmetic change.
2003-06-05 Michael Natterer <mitch@gimp.org>
* app/core/gimpchannel.c (gimp_channel_bounds): always return
channel->x1,y1,x2,y2, *not* tx1,ty1,tx2,ty2 since the latter
contain bogus values if the mask is empty. Fixes bug #114419.
* plug-ins/script-fu/scripts/unsharp-mask.scm: cleaned up
while searching the bug.
2003-06-04 Sven Neumann <sven@gimp.org>
* app/core/gimpmarshal.list: added VOID: ENUM, BOXED, INT.
* app/tools/gimpcolortool.[ch]: added a default implementation for
GimpColorTool::pick. Emit a "picked" signal when a color was
successfully picked.
* app/tools/gimpcolorpickertool.c: simplified a lot since
GimpColorTool does most of the work for us now.
2003-06-04 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell-callbacks.c
(gimp_display_shell_canvas_tool_events): undraw the cursor on
GDK_PROXIMITY_OUT. Always set shell->proximity to FALSE *before*
calling gimp_display_shell_update_cursor().
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 Ptsi).
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.
2003-05-09 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-crop.c (gimp_image_crop)
* app/core/gimpimage-resize.c (gimp_image_resize)
* app/core/gimpimage-scale.c (gimp_image_scale):
don't #include "gimpchannel.h". Moved code around so they all do
their stuff in the same order (improves readability when comparing
the functions). Use GimpItem variables instead of GimpChannel or
GimpLayer ones. Lots of cleanup.
2003-05-09 Michael Natterer <mitch@gimp.org>
* app/core/gimpitem.c: added default implementations for scale()
and resize() which just set the resulting width/height and offset
values.
* app/core/gimpdrawable.c: chain up in scale() and resize().
* app/vectors/gimpvectors.[ch]: buncha vectors changes/features:
- Removed unused "linked" and "locked" members.
- Removed "changed" signal.
- Added "freeze" and "thaw" signals and functions to emit them.
- Added "freeze_count" member so we emit only one freeze/thaw pair
even when doing nested changes.
- Added GimpItem::translate() implementation.
- Actually scale and resize the vectors in scale() and resize().
- Added undo for scale() and resize().
- Added freeze()/thaw() pairs around all modifying functions.
- Changed gimp_vectors_copy_strokes() to work as needed.
* app/core/gimpimage-resize.c
* app/core/gimpimage-scale.c: resize and scale all vectors.
Fixes bug #36491.
* app/core/gimpimage-undo-push.c (undo_pop_vectors_mod): added
freeze()/thaw() around the vectors-modifying code. Also restore
width, height and offsets.
* app/tools/gimpvectortool.c: connect to "freeze" and "thaw"
and pause()/resume() vectors drawing accordingly.
2003-05-07 Michael Natterer <mitch@gimp.org>
* app/core/gimplayer.c (gimp_layer_create_mask): when adding a
layer mask from selection, don't crash if the layer is not
entirely inside the image boundary but clip the copy_region()
accordingly. Fixes bug #112409. Added a local GimpDrawable variable
so we don't need to GIMP_DRAWABLE(layer) all the time.
2003-05-07 Michael Natterer <mitch@gimp.org>
Started to abstract item transformation so we can easily
transform multiple linked items later:
* app/core/gimpitem.[ch]: added new virtual function
GimpItem::scale() with the same signature as the former
gimp_layer_scale_lowlevel().
* app/core/gimpdrawable.c: implement scale() and do the
common parts of layer/channel scaling here.
* app/core/gimpchannel.[ch]
* app/core/gimplayer.[ch]: implement scale() for the
channel/layer specific parts of scaling.
* app/core/gimplayer.[ch]: renamed gimp_layer_scale() to
gimp_layer_scale_by_origin().
* app/vectors/gimpvectors.c: added empty scale() implementation.
* app/core/gimpimage-scale.c
* app/core/gimpimage-undo-push.c
* app/gui/layers-commands.c
* tools/pdbgen/pdb/layer.pdb: changed accordingly.
* app/pdb/layer_cmds.c: regenerated.
Unrelated:
* app/core/gimpimage-undo-push.c: fixed item rename undo to
take the size of the saved name into account. Removed old
path_undo stuff.
2003-05-05 Pedro Gimeno <pggimeno@wanadoo.es>
* app/core/gimpdrawable-blend.c: Cleanups.
(gradient_calc_linear_factor): Apply the gradient to both sides
when Repeat is set to Sawtooth Wave. Fixes bug #112106.
* app/core/gimpdrawable-transform.c
(gimp_drawable_transform_tiles_affine): Fix copy'n'paste slip in
coordinates calculation for supersampling code. Transform the
pixel centers properly. Fixes bug #10466.
* app/tools/gimpdrawtool.c (gimp_draw_tool_draw_rectangle,
gimp_draw_tool_draw_arc): Ported the fix for bug #17904 from the
STABLE branch (off-by-one when drawing the rectangle/ellipse
previews).
* app/tools/gimpeditselectiontool.c: Renamed
gimp_edit_selection_tool_snap to
gimp_edit_selection_tool_calc_coords, as it is no longer used for
snapping.
(gimp_edit_selection_tool_calc_coords): Use floor instead of
rounding. Callers changed to remove rounding, as it deals with
gdoubles directly. Thanks to Mitch for the help refining this
one. Fixes bug #17906.
2003-05-05 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell-scale.[ch]
(gimp_display_shell_scale_zoom_fraction): new utility function
which takes GimpZoomType and zooms "scalesrc" and "scaledest".
(gimp_display_shell_scale_calc_fraction): new utility function
which takes an exact double scale factor and calculates "scalesrc"
and "scaledest".
(gimp_display_shell_scale): use the first.
(gimp_display_shell_scale_fit): use the second.
* app/tools/gimpmagnifytool.[ch]: use the first to click-zoom and
the second to area-zoom. Fixes bug #112115. Removed zoom_in() and
zoom_out() utiliy functions. Removed "GimpZoomType op" from the
GimpMagnifyTool struct. Cleanup.
2003-05-05 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell.c (gimp_display_shell_snap_coords):
don't change the passed GimpCoords if we didn't snap.
2003-05-04 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpdialogfactory.c: set GDK_HINT_USER_POS for all
session managed dialogs, not only for those which already have
saved session info. This way the dialogs keep their position
acrosss hide/show within the same session, even if they have never
been used before.
* app/gui/dialogs.c: added entries for the file open/save dialogs.
Fixed some entries.
* app/gui/file-dialog-utils.[ch]
* app/gui/file-open-dialog.c
* app/gui/file-save-dialog.c: register the file dialogs with
the dialog factory.
2003-05-03 Michael Natterer <mitch@gimp.org>
* app/plug-in/plug-ins.c (plug_ins_init): Update the splash before
calling plug_in_query() and plug_in_init() (applied a modified
patch from Raphael Quinet). Fixes bug #112156.
2003-05-03 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpdockbook.[ch]: added "dockable_added",
"dockable_removed" and "dockable_reordered" signals and emit them.
* app/widgets/gimpimagedock.[ch]: implement GimpDock::book_added()
and GimpDock::book_removed(). Connect to the above signals and
update the window title as proposed in bug #111971. Idle-update
the title so subsequent changes are compressed. Fixes bug #111971.
* app/widgets/gimpdock.c: cleanup.
2003-05-02 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpdialogfactory.[ch]: added new function
gimp_dialog_factory_add_foreign() which adds a dialog that was not
created by the factory itself. Its identifier however must be
registered with the factory. Connect to all toplevel dialogs'
"configure_event" and remember the resulting window geometry so we
get session management for *all* dialogs, not only for those which
were open on exit.
* app/gui/dialogs.c: added the "File New" dialog. Added foreign
entries (without constructor) for all dialogs opened by tools.
* app/gui/dialogs-constructors.[ch]: added a constructor for
the file_new dialog.
* app/gui/file-new-dialog.[ch]: renamed file_new_dialog_create()
to file_new_dialog_new() and removed the gimage and template
paramaters. Adder new function file_new_dialog_set() to set
gimage and template after creation.
* app/gui/file-commands.c
* app/gui/templates-commands.c: changed accordingly.
* app/tools/gimpimagemaptool.[ch]
* app/tools/gimptransformtool.[ch]: added
"const gchar *shell_identifier" to the tool structs. Register the
tool dialogs using gimp_dialog_factory_add_foreign().
* app/tools/gimpbrightnesscontrasttool.c
* app/tools/gimpcolorbalancetool.c
* app/tools/gimpcurvestool.c
* app/tools/gimphuesaturationtool.c
* app/tools/gimplevelstool.c
* app/tools/gimpperspectivetool.c
* app/tools/gimpposterizetool.c
* app/tools/gimprotatetool.c
* app/tools/gimpscaletool.c
* app/tools/gimpsheartool.c
* app/tools/gimpthresholdtool.c: set "shell_identifier" so the
dialogs become session managed. Fixes bug #61091.
* app/tools/gimpcroptool.c: register the crop dialog with the
dialog factory. Fixes bug #52849.
* app/tools/gimpcolorpickertool.c: ditto.
Unrelated:
* app/tools/gimptool.c: no need to cast the return value of
g_object_new().
2003-05-02 Pedro Gimeno <pggimeno@wanadoo.es>
* app/paint/gimppaintcore-stroke.c (gimp_paint_core_stroke,
gimp_paint_core_stroke_vectors): Save brush pointer before first
stroke and restore it after. Fixes bug #102162.
* plug-ins/common/flarefx.c (FlareFX): Use
gimp_fixme_preview_do_row instead of memcpy. Fixes bug #112042 for
this plug-in.
* plug-ins/common/jigsaw.c: Several cleanups.
(jigsaw_values_changed): New function as a result of the cleanups.
(jigsaw): Use gimp_fixme_preview_do_row instead of memcpy.
Together with the fix to flarefx, fixes bug #112042.
(draw_jigsaw): Warn if passed a NULL buffer (solves the crash
reported in bug #112012).
* plug-ins/gimpressionist/orientation.c: Slightly reformatted.
(create_orientationpage): Modify orientfirst/orientlast instead of
sizefirst/sizelast in the corresponding adjustments. Fixes bug
#112061.
2003-05-01 Manish Singh <yosh@gimp.org>
* app/text/gimpfontlist.c: Query fontconfig directly for the font
list, avoiding scanning the internal fontconfig list over and over
again. There are differences in the font list that the old and new
code produce however. The new code will generate descriptions for
more fonts, and some of the styles will be different. Also, pango
font description strings aren't specific enough for all cases, so
a font name may appear more than once in the list. I'm not sure
how to solve this best, but this code is Good Enough (TM) for now.
2003-04-30 Pedro Gimeno <pggimeno@wanadoo.es>
* app/widgets/gimpgradienteditor.c (control_compress_range): Don't
try to compress the left and right ends. Fixes bug #89274.
2003-04-30 Michael Natterer <mitch@gimp.org>
* app/xcf/xcf-load.c (xcf_load_image_props): skip guides with
negative positions. Fixes warning since gimp_image_add_[hv]guide()
doesn't allow positions < 0 any more.
2003-04-29 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcontainertreeview.c
(gimp_container_tree_view_button_press): when editing an object's
name, make sure we really edit its name, not its description.
2003-04-29 Pedro Gimeno <pggimeno@wanadoo.es>
* app/paint-funcs/paint-funcs.c (shrink_line): Serialize access to
source and destination memory to reduce the chance of cache misses
when dealing with large images. Enable some assertions temporarily
to ensure that the algorithm works properly before backporting it.
2003-04-25 Pedro Gimeno <pggimeno@wanadoo.es>
* app/paint-funcs/paint-funcs.c: Some reformattings to improve
readability.
(shrink_line): Added some explanatory comments.
(border_region): Fixed wrong (though harmless) allocation bug: used
sizeof(gint16 *) where sizeof(gint16) was needed.
2003-04-17 Sven Neumann <sven@gimp.org>
* app/core/gimpimage-contiguous-region.c
(find_contiguous_region_helper): applied patch from Pedro Gimeno
that fixes bug #51883.
* plug-ins/common/bumpmap.c (bumpmap): applied patch from Pedro
Gimeno that fixes bug #52543.
2003-04-17 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-guides.c (gimp_image_add_x,y): new functions
snapping to one axis only.
(gimp_image_snap_rectangle): use them to enable snapping the
rectangle to all its corners, not just the NW and SE one.
2003-04-17 Michael Natterer <mitch@gimp.org>
* app/tools/gimptoolcontrol.[ch]: added an API to specify a
"snap_offset" and a "snap_width/height". Needed for tools which
want to snap to a rectangle and/or a position which is not the
current cursor position.
* app/display/gimpdisplayshell.[ch]: removed
gimp_display_shell_find_guide(), gimp_display_shell_snap_point()
and gimp_display_shell_snap_rectangle().
Added gimp_display_shell_snap_coords() which works on GimpCoords
and gets passed the above snap offsets.
* app/display/gimpdisplayshell-callbacks.c: use the new snap
function, using the values from GimpToolControl.
* app/tools/gimpcroptool.c: set snap offsets so the handles can be
guide-aligned after creating. Fixes bug #110957.
* app/tools/gimpeditselectiontool.c: removed snapping code (which
was broken anyway) and set appropriate snap offsets in
init_edit_selection().
2003-04-16 Michael Natterer <mitch@gimp.org>
* app/widgets/gimptemplateeditor.c (gimp_template_editor_init):
modify the focus chain so it doesn't go line-by-line, but
spinbuttons first, then the widgets right of them.
003-04-15 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcontainergridview.[ch]: added a "selected_item"
pointer to the GimpContainerGridView struct so we don't need to
remember it using g_object_[set|get]_data(). Also make sure that
the selected item doesn't get out of sight when resizing the view
and that it is always visible initially.
2003-04-15 Michael Natterer <mitch@gimp.org>
* app/plug-in/plug-ins.c (plug_ins_init): make sure all progress
bars and at 1.0. Build the list of extension procedures to start
before starting them (and don't start them while iterating the
list of procedures because the list changes if we start an
extension).
2003-04-15 Michael Natterer <mitch@gimp.org>
* app/tools/paint_options.c (gimp_paint_options_gui): use a smaller
preview size for the gradient popup than for the button.
2003-04-14 Sven Neumann <sven@gimp.org>
* tools/pdbgen/pdb/drawable.pdb
* tools/pdbgen/pdb/image.pdb: don't request viewable previews with
a width or height of 0 and don't crash if no preview is returned.
* app/pdb/drawable_cmds.c
* app/pdb/image_cmds.c
* libgimp/gimpdrawable_pdb.c: regenerated.
2003-04-14 Michael Natterer <mitch@gimp.org>
* app/tools/gimpvectortool.[ch]: made
gimp_vector_tool_clear_vectors() private. Connect to the vector's
"changed" signal (and do nothing in the callback for now...).
Alwayws set tool->gdisp in button_press(). Use for() loops to
iterate strokes. Fixed gimp_vector_tool_set_vectors() to hopefully
do the right thing in all cases now. s/ptr/list/g. Cleanup.
2003-04-14 Michael Natterer <mitch@gimp.org>
* app/vectors/gimpvectors.[ch]: made "changed" a real signal,
don't crash when iterating a NULL stroke list, cleanup.
2003-04-14 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpdockbook.c (gimp_dockbook_get_tab_widget): check
for !GIMP_IS_PREVIEW(widget), not for GTK_WIDGET_NO_WINDOW(widget)
when deciding whether to put the tab_widget in a GtkEventBox
because GimpPreview is NO_WINDOW now but still handles events.
Fixes dockable DND.
2003-04-14 Sven Neumann <sven@gimp.org>
* app/gui/preferences-dialog.c: don't try to reparent the children
of GtkInputDialog but simply pop up the dialog as provided by
GTK+. Looks ugly but shouldn't crash any longer. Fixes bug #104423.
2003-04-14 Simon Budig <simon@gimp.org>
* app/vectors/gimpstroke.[ch]
* app/vectors/gimpvectors.[ch]: Changed vectors->strokes to a
GList and removed stroke->next. Implemented stuff for duplicating
strokes. Duplicating a vector works now.
* app/tools/gimpvectortool.c: added not-yet-used function to
determine where a click has been. Refcounting stuff changed.
* app/core/gimpimage-mask-select.c
* app/paint/gimppaintcore-stroke.c: Changed accordingly.
2003-04-13 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcontainergridview.c: connect to "realize" of the
scrolled window's viewport and scroll to the correct item
(because GtkViewport is too dumb to this by itself).
* app/widgets/gimpcontainerpopup.[ch]: added a "view_type"
parameter.
* app/widgets/gimpviewablebutton.[ch]: added new function
gimp_viewable_button_set_view_type() and pass the view_type
to the GimpContainerPopup.
* app/widgets/gimptemplateeditor.c: default to GIMP_VIEW_TYPE_GRID
for the stock icon popup.
2003-04-13 Michael Natterer <mitch@gimp.org>
* app/core/gimptemplate.c (gimp_template_notify): invalidate
the preview when the stock_id changes.
* app/widgets/gimptemplateeditor.[ch]: added an optional entry
to edit the template's name.
* app/widgets/gimptemplateview.[ch]: added a "duplicate" button and
function pointers for creating templates, editing templates and
creating images from templates.
* app/gui/file-new-dialog.[ch] (file_new_dialog_create): added an
optional template parameter.
* app/gui/file-commands.c: pass template == NULL.
* app/gui/templates-menu.c: added a "Duplicate Template" menu entry.
* app/gui/templates-commands.[ch]: added the callback for the
duplicate menu item. Added "New Template" and "Edit Template"
dialogs. Added a function which opens a file_new_dialog with
a template preselected.
* app/gui/dialogs-constructors.c: let GimpTemplateView know
about the functions.
2003-04-13 Sven Neumann <sven@gimp.org>
* app/paint/gimppaintoptions.c: changed the "fade-length" and
"gradient-length" minimum values to 0.0 for compatibility with
the PDB API.
* app/paint/gimppaintcore.c (gimp_paint_core_get_color_from_gradient):
check that gradient_length > 0.0 before dividing by it.
* plug-ins/gfig/gfig.c (gfig_paint_callback): push an undo group
around the paint operations (bug #110446).
2003-04-13 Michael Natterer <mitch@gimp.org>
* app/core/gimpcontext.c (gimp_context_deserialize_property)
* app/core/gimpcontainer.c (gimp_container_deserialize): g_free()
the string returned by gimp_scanner_parse_string(). Replace
NULL object names by "".
2003-04-13 Michael Natterer <mitch@gimp.org>
* app/tools/gimpeditselectiontool.c (init_edit_selection):
g_memdup() the segments returned by gimp_image_mask_boundary().
Just caching the pointers leads to bug #22375 because the image's
mask boundary changes while we live-move stuff.
* app/tools/gimpmovetool.c (gimp_move_tool_button_press): pause
the selection when starting to move a guide, since we also resume
it when we're finished.
(both bugs tracked down by Pedro Gimeno).
2003-04-12 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcontainerpopup.[ch]
* app/widgets/gimpviewablebutton.[ch]: added "preview_size" and
"preview_border_width" parameters to the constructors and use them
when creating the popup.
* app/tools/gimptextoptions.c
* app/tools/paint_options.c
* app/widgets/gimptemplateeditor.c: changed accordingly. Create the
icon popup without borders.
2003-04-12 Michael Natterer <mitch@gimp.org>
* app/config/gimpconfig-params.h: made object properties
G_PARAM_READWRITE by default. Added flag GIMP_PARAM_AGGREGATE
which indicates that an object property is not a reference but a
real part of its owner.
* app/config/gimpconfig-deserialize.c: g_object_set_property()
object properties only if they are not GIMP_PARAM_AGGREGATE.
* app/config/gimpconfig-utils.c (gimp_config_copy_properties,
gimp_config_reset_properties): copy and reset GIMP_PARAM_AGGREGATE
object properties correctly.
* app/config/gimpconfig-serialize.c: don't call
gimp_config_writer_open/close() for properties which are handled
by a GimpConfigIface::serialize_property() implementation.
* app/core/gimpcontext.c: removed exlicit G_PARAM_WRITABLE from
object properties since that's the default now. Call
gimp_config_writer_open/close() when serializing properties.
* app/core/gimpviewable.c (gimp_viewable_get_property): use
gimp_viewable_get_stock_id().
(gimp_viewable_set_stock_id): set stock_id to NULL if the new
stock_id is the same as viewable_class->default_stock_id.
Added serialize_property() which skips stock_id serialization
if it is NULL.
* app/tools/gimptextoptions.c: made the "text" property
GIMP_PARAM_AGGREGATE. Added gimp_text_options_set_property()
(which does nothing).
* app/widgets/gimptemplateeditor.[ch]: added an optional
GimpViewableButton to change the template's icon.
* app/gui/file-new-dialog.c: create it with the icon button so it
gets some testing.
2003-04-11 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-scale.c
(gimp_display_shell_scale_dialog): fixed fnord that caused the
dialog to sometimes show a ratio of 0:0.
2003-04-11 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpdockable.[ch]: derive it from GtkBin, not from
GtkVBox. Removed "content_spacing" style property.
* app/widgets/gimpcontainerview-utils.c
* etc/gtkrc_user
* themes/Default/gtkrc: changed accordingly.
2003-04-11 Michael Natterer <mitch@gimp.org>
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimptemplateeditor.[ch]: new widget chopped out
of file-new-dialog.c
* app/gui/file-new-dialog.c: use it.
2003-04-11 Sven Neumann <sven@gimp.org>
* app/widgets/gimppreviewrenderer.c (gimp_preview_renderer_create_gc):
lookup the border color in the window's colormap.
2003-04-11 Sven Neumann <sven@gimp.org>
* app/widgets/gimppreview.[ch]
* app/widgets/gimppreviewrenderer.[ch]: moved background
functionality into the renderer. Removed some GimpPreview
functions that used to wrap GimpPreviewRenderer functionality.
* app/display/gimpdisplayshell-layer-select.c
* app/display/gimpnavigationview.c
* app/gui/dialogs-constructors.c
* app/widgets/gimpcontainergridview.c
* app/widgets/gimpcontainermenuimpl.c
* app/widgets/gimppreview-popup.c
* app/widgets/gimpselectioneditor.[ch]: changed accordingly.
2003-04-11 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpnavigationpreview.c: set the cursor on
preview->event_window, not widget->window. Use
preview->renderer->viewable, not preview->viewable.
2003-04-11 Sven Neumann <sven@gimp.org>
* app/widgets/gimppreview.[ch]: made GimpPreview a NO_WINDOW
widget that draws on the parent window. Added an INPUT_ONLY window
for events.
* app/widgets/gimpnavigationpreview.c: take the widget's
allocation into account when rendering the marker and grab the
mouse on the preview's event_window.
* app/widgets/gimppreviewrenderer.[ch]: pass GdkRectangles as const.
2003-04-10 Michael Natterer <mitch@gimp.org>
* app/gui/file-new-dialog.c: added Portrait/Landscape radio
buttons which follow the state of the width/height entered and can
be used to swap them.
2003-04-10 Sven Neumann <sven@gimp.org>
* themes/Default/images/Makefile.am
* themes/Default/images/stock-portrait-16.png
* themes/Default/images/stock-landscape-16.png: new icons by Jimmac.
* libgimpwidgets/gimpstock.[ch]: register the new icons.
* app/widgets/widgets-enums.[ch]: added new enum GimpAspectType.
2003-04-10 Michael Natterer <mitch@gimp.org>
* app/core/gimpcontext.[ch]: added gimp_context_type_to_prop_name().
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimpviewablebutton.[ch]: new widget implementing
the wheel-scrollable preview button.
* app/tools/gimptextoptions.c
* app/tools/paint_options.[ch]: removed the code implementing the
same and use GimpViewableButton.
* app/tools/tool_manager.c: added the font to the context
properties which are remembered per tool. Added an evil hack
using g_object_set_data() to pass the global_dock_factory to
tool option GUI constructors.
2003-04-09 Sven Neumann <sven@gimp.org>
* app/text/text-enums.[ch]
* app/text/gimptext.[ch]
* app/text/gimptextlayout.c: added some more text properties that
can't be accessed from the GUI yet.
2003-04-09 Michael Natterer <mitch@gimp.org>
* app/tools/gimpeditselectiontool.c
(gimp_edit_selection_tool_button_release): fixed boolean logic bug
introduced by the fix for bug #110173. Spotted by Pedro Gimeno.
2003-04-09 Sven Neumann <sven@gimp.org>
* app/gui/image-menu.c (image_menu_setup): don't try to hide the
tearoff menu item if tearoff menus are disabled in the prefs.
2003-04-09 Michael Natterer <mitch@gimp.org>
* app/file/file-save.[ch] (file_save_as): added "gboolean
set_image_clean" and call gimp_image_clean_all() only if it
was passed as TRUE.
(file_save): pass TRUE.
* app/gui/file-save-dialog.c: pass TRUE from the "Save as" and
FALSE from the "Save a Copy" dialog (bug #109464).
2003-04-09 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage.c (gimp_image_remove_channel): say
"Remove Channel" when pushing the undo, not "Remove Layer".
2003-04-09 Michael Natterer <mitch@gimp.org>
* app/tools/paint_options.[ch]: added
paint_options_container_scrolled() utility function which
wheel-scrolls a container. Use it for the brush and pattern
previews. Added a gradient preview.
* app/tools/gimpblendoptions.c: removed the gradient preview here.
* app/tools/gimptextoptions.c: use the new function to scroll
the font list.
2003-04-08 Michael Natterer <mitch@gimp.org>
* app/tools/gimpbucketfilloptions.c: removed the pattern preview...
* app/tools/paint_options.c: ...and added it here so all paint
tools can use it if needed. Added a pattern preview to the clone
tool options.
2003-04-08 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpdockable.[ch]: Added "gpointer get_tab_data" to
GimpDockableGetTabFunc and to gimp_dockable_new().
* app/gui/dialogs-constructors.c: changed accordingly. Replaced
dialogs_[brush,pattern,gradient,palette,font]_tab_func() by
dialogs_viewable_tab_func() which gets passed the GType as
get_tab_data.
2003-04-08 Michael Natterer <mitch@gimp.org>
* app/core/gimpviewable.[ch]: added vitrual function
GimpViewable::get_description() which returns the string that
should be presented to the user plus an optional tooltip with more
information. The default implementation just returns the object's
name and no tooltip.
* app/core/gimpbrush.c
* app/core/gimpbuffer.c
* app/core/gimpimage.c
* app/core/gimppalette.c
* app/core/gimppattern.c
* app/core/gimptoolinfo.c: implement get_description().
* app/core/gimpimagefile.[ch]: ditto. Renamed
gimp_imagefile_get_description() to
gimp_imagefile_get_desc_string(). Well, um, gimme a better name...
* app/gui/file-open-dialog.c: changed accordingly.
* app/file/file-utils.[ch]: renamed readXVThumb() to
file_utils_readXVThumb().
* tools/pdbgen/pdb/fileops.pdb: changed accordingly.
* app/widgets/widgets-types.h: removed GimpItemGetNameFunc typedef.
* app/widgets/gimpcontainerview-utils.[ch]: removed the the actual
get_name_funcs. They now live in the core as
GimpViewable::get_description() implementations.
* app/widgets/gimpcontainermenu.[ch]
* app/widgets/gimpcontainergridview.c
* app/widgets/gimpcontainermenuimpl.c
* app/widgets/gimpcontainertreeview.c
* app/widgets/gimpcontainerview.[ch]
* app/widgets/gimpmenuitem.[ch]
* app/widgets/gimpviewabledialog.c: removed get_name_func stuff
and use gimp_viewable_get_description().
* app/widgets/gimpcontainermenu.[ch]: added "preview_border_width"
to gimp_container_menu_set_preview_size().
* app/widgets/gimpimagedock.c: changed accordingly.
* app/pdb/fileops_cmds.c: regenerated.