2005-09-07 Michael Natterer <mitch@gimp.org>
* app/core/gimpchannel-combine.c (gimp_channel_combine_ellipse):
use gimp_rectangle_intersect() instead of just looking at the
passed in w,h to figure whether nothing needs to be done. While
the algorithm does nicely with an entirely out-of-image ellipse,
the channel's bounds were set to a rectangle of zero width or
height, which caused subsequent calls to gimp_channel_bounds() to
return broken bounds. Fixes bug #315417.
(gimp_channel_combine_rect)
(gimp_channel_combine_mask): use gimp_rectangle_intersect() here
too instead of the usual unclear CLAMPing on x1,y1,x2,y2.
2005-09-07 Sven Neumann <sven@gimp.org>
* app/widgets/gimperrordialog.[ch]: don't set a window icon, the
dialog should be transient anyway.
* app/dialogs/dialogs-constructors.c: changed accordingly.
* app/paint-funcs/paint-funcs-generic.h (blend_pixels): change
variables from unsigned to signed -- fixes problem described
in comment 17 of bug #163721.
2005-09-05 Sven Neumann <sven@gimp.org>
* plug-ins: Call gimp_window_set_transient_for_default_display()
for most plug-in dialogs. Not yet done are load and save dialogs
and dialogs created from language bindings.
2005-09-05 Sven Neumann <sven@gimp.org>
Address bug #307971:
* app/core/gimp-gui.[ch]
* app/display/gimpdisplay.[ch]
* app/gui/gui-vtable.c
* tools/pdbgen/pdb/display.pdb: added PDB function to obtain a
window handle on an image display.
* app/pdb/display_cmds.c
* app/pdb/internal_procs.c
* libgimp/gimpdisplay_pdb.[ch]: regenerated.
* libgimp/gimpui.[ch]: added functions to set a GtkWindow transient
to an image display.
* plug-ins/common/gauss.c: use the new function exemplarily.
* libgimp/gimp.def
* libgimp/gimpui.def: updated.
2005-09-05 Michael Natterer <mitch@gimp.org>
* app/core/gimp-edit.c: don't let named cut/copy affect the global
buffer. Fixes bug #315225. Also make "Global Buffer" translatable.
2005-09-05 Sven Neumann <sven@gimp.org>
* app/core/gimp.[ch]
* app/core/gimpimage-new.c: removed the confusing and redundant
feature of having the New Image dialog default to the size of the
global buffer. Please use Paste as New instead. Fixes bug #315106.
2005-09-05 Michael Natterer <mitch@gimp.org>
* app/actions/edit-actions.c
* app/actions/edit-commands.[ch]
* menus/image-menu.xml.in: applied modified patch from David
Gowers which adds an "edit-named-copy-visible" actions and its
menu item. Addresses bug #315130.
2005-09-04 Michael Natterer <mitch@gimp.org>
Cleaned up and fixed the order in which default tool options and
user context values are initialized, and added loading / saving of
the global user context. Fixes bug #165078.
* app/core/Makefile.am
* app/core/gimp-contexts.[ch]: new files which manage the global
contexts. Contains gimp_contexts_init/exit/load/save/clear().
* app/core/gimp.c: use the new init/exit functions instead of
implementing the stuff here.
* app/tools/gimp-tools.c: load/save/clear the user context from
here so it follows the same logic as the tool options. Reset all
tool options before loading the user context and copy the user
context's property to all tool options before loading tool
options.
* app/core/gimptoolinfo.c (gimp_tool_info_new): don't initialize
the tool options with the users context's properties. It's way too
early here and they will be overwritten later.
* app/widgets/gimpdevices.c (gimp_devices_restore): initialize all
device contexts with the user context's properties before loading
the devices and copying the active one back to the user context.
2005-09-03 Michael Natterer <mitch@gimp.org>
* app/paint/gimppaintcore.c (gimp_paint_core_get_orig_image)
(gimp_paint_core_get_orig_proj): replaced manual calculation of
the offset of a pixel in a tile (marked as /* dubious... */ for a
reason) by simply using the offset parameters of tile_data_pointer().
2005-09-03 Michael Natterer <mitch@gimp.org>
* app/base/pixel-region.[ch]: some general cleanup.
(pixel_region_init_temp_buf)
(pixel_region_init_data): new functions which initialize pixel
regions on TempBufs and on raw contiguous arrays of pixel data.
(pixel_region_configure): fixed a bug that has probably been there
forever: when processing contiguous (non-tiled) data, interpret
the original x and y coordinates of the region as offsets into
the data. Before this fix, the initial x and y were simply ignored
(by using them in a broken way), thus always forcing the upper
left corner of the region being the beginning of the passed data.
Lots of code was working around this problem by setting the
pixel_region's data pointer to the proper starting pixel of the
region in the middle the buffer.
* libgimp/gimppixelrgn.c: some general cleanup.
(gimp_pixel_rgn_configure): same fix as above. Fortunately, nobody
seems to know that libgimp pixel regions can be used on arrays of
data, just as core ones. Only two plug-ins were using this
feature, and they are antique and written by spencer and federico,
respectively. They both don't use offsets into the buffers and are
not affected by this change. It's highly unlikely that anybody out
there knows/uses this feature, so it can IMHO be safely changed.
* app/base/temp-buf.c
* app/core/gimpbuffer.c
* app/core/gimpdrawable-combine.c
* app/core/gimpdrawable-preview.c
* app/core/gimpimage-preview.c
* app/core/gimplayer.c
* app/paint/gimpbrushcore.c
* app/paint/gimpclone.c
* app/paint/gimpconvolve.c
* app/paint/gimpdodgeburn.c
* app/paint/gimppaintcore.c
* app/paint/gimpsmudge.c
* app/tools/gimpiscissorstool.c
* app/tools/gimppainttool.c: use the pixel_region_init_foo()
functions instead of initializing regions of TempBufs and raw data
manually. Removed lots of workarounds for the broken offset
handling. The changed places of code are much more readable now.
2005-09-03 Michael Natterer <mitch@gimp.org>
* app/core/gimp-edit.[ch] (gimp_edit_paste_as_new): don't create a
display here.
(gimp_edit_named_cut)
(gimp_edit_named_copy)
(gimp_edit_named_copy_visible): new functions containing named
buffer wrappers around the functions affecting the global buffer
only.
* app/actions/edit-commands.c: use the new functions instead of
implementing them here, create a display for the image returned
by paste as new.
* app/actions/buffers-commands.c
* app/widgets/gimptoolbox-dnd.c: create displays here too.
* tools/pdbgen/pdb/edit.pdb: added wrappers for paste as new and
wrappers for all the cut/copy/paste named stuff.
Fixes bug #315130. Cleaned up and de-obfuscated.
* libgimp/gimp.def: changed accordingly.
* app/pdb/edit_cmds.c
* app/pdb/internal_procs.c
* libgimp/gimpedit_pdb.[ch]: regenerated.
2005-09-02 Sven Neumann <sven@gimp.org>
* app/widgets/gimpcontainergridview.c
* app/widgets/gimpcontainertreeview.c: allow to popup menus on
empty container views using the standard Shift-F10 keybinding.
2005-09-02 Sven Neumann <sven@gimp.org>
* app/tools/gimptextoptions.c
* app/widgets/gimpwidgets-utils.[ch]: dropped the labels from text
tool options that have icons. Reduces visual clutter.
2005-09-02 Michael Natterer <mitch@gimp.org>
* tools/test-clipboard.c (test_clipboard_copy_callback): don't
quit the main loop after transferring the data to GTK, it needs a
running main loop to get the chunks tranferred to X.
2005-09-02 Sven Neumann <sven@gimp.org>
* app/dialogs/convert-dialog.c
* app/dialogs/image-merge-layers-dialog.c
* app/dialogs/layer-add-mask-dialog.c
* app/dialogs/offset-dialog.c: use verbs instead of "OK" in the
confirmative dialog button.