2004-08-11 Michael Natterer <mitch@gimp.org>
* app/core/gimp-gui.[ch]: added "display_ID" to gimp_new_progress().
* app/gui/gui-vtable.c: changed accordingly.
* app/plug-in/plug-in-progress.[ch]: reenabled showing the
progress in a particular display.
2004-08-11 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable-blend.c
* app/core/gimpprogress.c: some progress cleanup.
* app/display/gimpstatusbar.c (gimp_statusbar_progress_start): no
need to warn if there is already a progress active, just silently
return NULL as all other GimpProgressInterface implementors.
* app/plug-in/plug-in-progress.c: several progress fixes.
It's still a mess.
* plug-ins/common/url.c: don't show progress depending on
run_mode. Run the actual file plug-in with the same run_mode we
were invoked with.
2004-08-10 Michael Natterer <mitch@gimp.org>
Redid the whole internal progress stuff: don't pass around
progress_callback and progress_data; instead, provide a
pointer to a GimpProgressInterface which can be implemented
by a variety of backends.
Addresses (but not yet fixes) bugs #6010, #97266 and #135185.
* app/display/Makefile.am
* app/display/gimpprogress.[ch]: removed the old progress hack.
* app/core/Makefile.am
* app/core/core-types.h
* app/core/gimpprogress.[ch]: implement GimpProgressInterface.
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimpprogressdialog.[ch]: the standalone progress
dialog as widget implementing GimpProgressInterface.
* app/display/gimpdisplay.c
* app/display/gimpstatusbar.[ch]
* app/widgets/gimpfiledialog.[ch]
* app/widgets/gimpthumbbox.[ch]: added GimpProgressInterface
implementation to these classes.
* app/core/gimp-gui.[ch]
* app/gui/gui-vtable.c: replaced the old progress vtable entries
by two new to create and destroy a GimpProgressDialog in case
no other progress is available.
* app/pdb/procedural_db.[ch]
* app/plug-in/plug-in-run.[ch]
* tools/pdbgen/app.pl: pass a GimpProgress to all PDB wrappers and
all plug-ins.
* app/plug-in/plug-in.[ch]
* app/plug-in/plug-ins.c
* app/plug-in/plug-in-message.c
* app/plug-in/plug-in-progress.c: handle the case there the
plug-in was crated with a progress as well as the case where it
wasn't.
* app/app_procs.c
* app/batch.c
* app/xcf/xcf.c
* app/file/file-open.[ch]
* app/file/file-save.[ch]
* app/widgets/gimphelp.c
* app/widgets/gimpbrushselect.c
* app/widgets/gimpfontselect.c
* app/widgets/gimpgradientselect.c
* app/widgets/gimppaletteselect.c
* app/widgets/gimppatternselect.c: changed accordingly.
* app/core/gimpimagefile.[ch]
* app/display/gimpdisplayshell-dnd.c
* app/gui/file-open-dialog.c
* app/gui/file-open-location-dialog.c
* app/gui/file-save-dialog.c
* app/widgets/gimplayertreeview.c
* app/widgets/gimptoolbox-dnd.c: pass a GimpProgress to all file
related functions. Embed the progress in the file dialog where
possible.
* app/core/gimpdrawable-blend.[ch]
* app/core/gimpdrawable-transform.[ch]
* app/core/gimpimage-convert.[ch]
* app/core/gimpimage-flip.[ch]
* app/core/gimpimage-resize.[ch]
* app/core/gimpimage-rotate.[ch]
* app/core/gimpimage-scale.[ch]
* app/core/gimpitem-linked.[ch]
* app/core/gimpitem.[ch]
* app/core/gimpchannel.c
* app/core/gimpdrawable.c
* app/core/gimplayer.c
* app/core/gimpselection.c
* app/vectors/gimpvectors.c: replaced callback/data by GimpProgress.
* app/tools/gimpblendtool.c
* app/tools/gimptransformtool.c
* app/gui/convert-dialog.c
* app/actions/documents-commands.c
* app/actions/file-commands.c
* app/actions/image-commands.c
* app/actions/layers-commands.c
* app/actions/plug-in-commands.c
* app/actions/vectors-commands.c
* tools/pdbgen/pdb/convert.pdb
* tools/pdbgen/pdb/edit.pdb
* tools/pdbgen/pdb/image.pdb
* tools/pdbgen/pdb/layer.pdb: changed callers accordingly.
* app/pdb/*_cmds.c: regenerated.
2004-08-09 Michael Natterer <mitch@gimp.org>
Applied (slightly modified) patch from Shlomi Fish which adds a
progress bar to the RGB -> INDEXED conversion. Fixes bug #145274
(and shows that we really really need a GimpProgressInterface in
the core to give progress users full access to the progress API)
* app/core/gimpimage-convert.[ch]: added special
GimpImageConvertProgress function typedef to cope with the
different stages of converting. Support passing such a callback &
data to gimp_image_convert() and update the progress accordingly.
* app/gui/convert-dialog.[ch]: added a convert progress callback
and pass it to gimp_image_convert().
* app/actions/image-commands.c
* tools/pdbgen/pdb/convert.pdb: changed accordingly.
* app/pdb/convert_cmds.c: regenerated.
2004-08-04 Simon Budig <simon@gimp.org>
* app/core/gimpbrushgenerated.c: Enhanced the range of the hardness
parameter to make more soft brushes possible. Please note that this
makes existing generated brushes look more soft. But since people
apparently rarely use more than one or two generated brushes and
these get changed frequently I guess it should be OK.
2004-08-04 Michael Natterer <mitch@gimp.org>
Allow URI drops from apps linked against GLib < 2.4.4 to GIMP
linked against GLib >= 2.4.5. Fixes bug #148140.
* app/core/gimp-utils.[ch]: added gimp_check_glib_version().
* app/widgets/gimpselectiondata.c: added runtime check for GLib
versions that encode file:// URIs correctly (>= 2.4.5). For older
(broken) GLibs, leave the code path as is, for newer (fixed) ones,
perform an additional check if the dropped URI is in the (broken)
escaped-UTF-8 format and convert it to local filename encoding.
* app/gui/gui.c: warn the user that non-ASCII filenames can't
be used when linked against GLib 2.4.4.
2004-08-04 Michael Natterer <mitch@gimp.org>
* app/core/gimp.[ch]: changed member "ProcRecord last_plug_in" to
PlugInProcDef last_plug_in". Added function
gimp_set_last_plug_in() and signal Gimp::last-plug-in-changed.
* app/actions/plug-in-commands.c
* app/plug-in/plug-in-run.c: changed accordingly.
* app/actions/plug-in-actions.c: factored out updating of the
"Reshow Last" and "Rerun Last" actions to a private function.
Connect each "plug-in" action group to Gimp::last-plug-in-changed
and update the actions' label and sensitivity in the
callback. Fixes bug #149139.
2004-08-03 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-undo.[ch] (gimp_image_undo_can_compress):
new function which checks if undo compression is possible:
(1) is the image dirty? Fixes bug #148853.
(2) is redo stack empty?
(3) do both the passed undo object_type and undo_type
match the top undo item?
Consistently name the GType and GimpUndoType passed to undo
functions "object_type" and "undo_type" to avoid confusion.
* app/actions/layers-commands.c
* app/tools/gimpeditselectiontool.c
* app/tools/gimptexttool.c
* app/widgets/gimpitemtreeview.c
* app/widgets/gimplayertreeview.c: use the new utility function
instead of checking the above conditions manually.
2004-08-03 Michael Natterer <mitch@gimp.org>
* app/core/gimpbrushgenerated.c (gimp_brush_generated_load): don't
leak the brush's name if parsing the shape fails.
(gimp_brush_generated_dirty): shut up bogus compiler warnings
about uninitialized variables.
2004-08-02 Simon Budig <simon@gimp.org>
* app/widgets/gimpbrusheditor.c: Fixed brush spacing for brushes
with >= 2 spikes. Spotted by Joao S. O. Bueno.
Fixes bug #149099.
2004-07-31 Hans Breuer <hans@breuer.org>
* app/display/makefile.msc app/widgets/makefile.msc : build
but *dont link* display-enums.obj, widget-enums.obj and
gimpdisplayoptions.obj. They must be in the dll
* app/makefile.msc : build gimp.exe and gimp-console.exe both
using the same gimp-core.dll
* app/gimpcore.def : new file, exports for gimp-core.dll
* app/Makefile.am : added to EXTRA_DIST
* cursors/makefile.msc : new file to create gimp-tool-cursors.h
* cursors/Makefile.am : added to EXTRA_DIST
* **/makefile.msc : updated
* app/main.c app/app_procs.c : moved code to close the console
from the former to the later. It only is to be used if The Gimp
is not build as console app.
* plug-ins/gfig/gfig.c : dont gimp_drawable_detach() the same
drawable twice
* plug-ins/gfig-dialog.c() : added a g_return_if_fail() to avoid
crashing on File/Import
2004-08-01 Simon Budig <simon@gimp.org>
* app/core/core-enums.h
* app/core/gimpbrushgenerated.[ch]: Implement three different
brush shapes for generated brushes.
* app/core/gimpbrush.c: changed accordingly.
* app/core/core-enums.c: regenerated.
* app/widgets/gimpbrusheditor.[ch]: Add toggles for the shape.
* themes/Default/images/stock-brush-generated-*-16.png: New stock
icons for the brush shapes.
* themes/Default/images/Makefile.am
* libgimpwidgets/gimpstock.[ch]: changed accordingly
untabified the files touched.
2004-07-29 Michael Natterer <mitch@gimp.org>
Replaced the concept of having a boolean indicating if an undo
step dirties the image by a bitfield indicating which parts
of the image are dirtied:
* app/core/core-enums.[ch]: reordered two values in enum
GimpUndoType, added GIMP_DIRTY_IMAGE_SIZE to enum GimpDirtyMask.
The values of GimpDirtyMask are still questionable and will
probably change...
* app/core/gimpimage.[ch]: removed signal "undo_start" and added
a GimpDirtyMask parameter to the "dirty" and "clean" signals.
* app/core/gimpimage-undo.[ch] (gimp_image_undo_push): replaced
"gboolean dirties_image" by "GimpDirtyMask dirty_mask" and pass
it to gimp_image_dirty().
(gimp_image_undo_group_start): added *ugly* code which tries to
figure GimpDirtyMask from the group's GimpUndoType and store it in
the GimpUndoGroup. Call gimp_image_dirty() instead of the removed
gimp_image_undo_start(). This means the undo group now dirties the
image just like one of its undo steps, but that's no problem since
undoing cleans it in the same way.
* app/core/gimpundo.[ch]: s/dirties_image/dirty_mask/g
(gimp_undo_pop): emit clean/dirty signals *before* performing the
actual undo step so listeners can detach from the image before it
is changed by undo.
* app/core/gimpimage-undo-push.c (gimp_image_undo_push_*): pass a
GimpDirtyMask instead of TRUE/FALSE to gimp_image_undo_push().
* app/core/gimpimagemap.[ch]: removed "gboolean interactive"
because it makes no sense to use GimpImageMap noninteractively.
Don't freeze()/thaw() undo while the image_map is active which
fixes many ways of trashing the image's undo state but probably
introduces new ways of doing evil things.
* app/display/gimpdisplay-foreach.c
* app/display/gimpdisplayshell-handlers.c: changed according
to the GimpImage::clean()/dirty() signal changes. Small fixes
in the quit dialog's dirty image container.
* app/tools/gimptoolcontrol.[ch]: added member and API to
set/get the dirty_mask.
* app/tools/gimpcroptool.c
* app/tools/gimpimagemaptool.c
* app/tools/gimpiscissorstool.c
* app/tools/gimptexttool.c
* app/tools/gimptransformtool.c: whenever setting "preserve" to
FALSE, also set a "dirty_mask" which specifies on which image
changes the tool wants to be canceled.
* app/tools/tool_manager.c: removed "undo_start" connection and
connect to both "dirty" *and* "clean" to check if the active_tool
needs to be canceled. Cancel the tool only if the dirty_mask
passed in the signal has common bits with the tool's dirty_mask.
Fixes bug #109561 and probably opens some new ones...
2004-07-29 Sven Neumann <sven@gimp.org>
* app/core/core-enums.h: removed enums GimpImageType and
GimpImageBaseType ...
* libgimpbase/gimpbaseenums.h: ... and added them here. Also moved
all enums from gimpbasetypes.h to this new file.
* libgimpbase/Makefile.am
* tools/pdbgen/Makefile.am: changed accordingly.
* app/core/core-enums.c
* libgimp/gimpenums.h
* libgimpbase/gimpbaseenums.c
* tools/pdbgen/enums.pl: regenerated.
* libgimpbase/gimpparasite.c
* libgimpbase/gimpprotocol.c
* libgimp/gimp.c: include <glib-object.h>
* libgimpbase/gimpbasetypes.[ch]: added API to set and get a
translation domain on a GType. This is used for translatable enum
values.
* libgimpbase/gimputils.[ch]: added API to retrieve the translated
name for an enum value.
* app/widgets/gimpenumstore.c
* app/widgets/gimpenumwidgets.c: use the new API in libgimpbase.
2004-07-29 Dave Neary <bolsh@gimp.org>
* app/core/gimpdrawable-transform.c: Stop signed ints overflowing
while getting the mean by replacing (a + b) / 2 with a / 2 + b / 2.
Fixes bug #128594 for drawables less than 32K wide.
2004-07-28 Michael Natterer <mitch@gimp.org>
* app/core/core-enums.h: added still unused flags type
GimpDirtyMask.
* app/base/Makefile.am
* app/core/Makefile.am
* app/display/Makefile.am
* app/paint/Makefile.am
* app/text/Makefile.am
* app/tools/Makefile.am
* app/widgets/Makefile.am
* libgimpthumb/Makefile.am: changed calls to gimp-mkenums to
support GTypeFlags and to make the value arrays private to the
get_type() functions.
* app/base/base-enums.c
* app/core/core-enums.c
* app/display/display-enums.c
* app/paint/paint-enums.c
* app/text/text-enums.c
* app/tools/tools-enums.c
* app/widgets/widgets-enums.c: regenerated.
2004-07-27 Sven Neumann <sven@gimp.org>
* libgimpbase/Makefile.am
* libgimpbase/gimpbase.h
* libgimpbase/gimpbase.def
* libgimpbase/gimpmemsize.[ch]: added new files with memsize
related functions (moved here from gimputil.c) and
GIMP_TYPE_MEMSIZE (moved here from app/config/gimpconfig-types.[ch]).
* libgimpbase/gimputils.[ch]: removed gimp_memsize_to_string() here.
* libgimpbase/gimpunit.[ch]: added GIMP_TYPE_UNIT (moved here from
app/config/gimpconfig-types.[ch]).
* libgimpbase/gimpbase-private.c
* libgimp/gimptile.c
* libgimp/gimpunitcache.c
* plug-ins/help/domain.c
* app/xcf/xcf-read.c: need to include glib-object.h.
* plug-ins/common/uniteditor.c: use GIMP_TYPE_UNIT.
* app/config/gimpconfig-types.[ch]: removed code that lives in
libgimpbase now.
* app/config/gimpconfig-deserialize.c: changed accordingly.
* app/config/gimpbaseconfig.c
* app/config/gimpdisplayconfig.c
* app/core/gimpcontext.c
* app/gui/grid-dialog.c
* app/tools/gimpcolortool.c
* app/widgets/gimpaction.c
* app/widgets/gimpunitstore.c: no need to include gimpconfig-types.h
any longer.
2004-07-27 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage.c (gimp_image_finalize): remove the image
from the image hash table and set its "gimp" pointer to NULL
*after* all layers, channels, vectors and the selection are
finalized; otherwise these items have no chance of removing
themselves from the item hash table (because image->gimp is
already NULL). Spotted by pgimeno and nomis.
(should be backported after it got some testing)
2004-07-26 Michael Natterer <mitch@gimp.org>
* app/core/gimpdatafactory.h: added "gboolean writable" to the
GimpDataFactoryLoaderEntry struct. Return a GList* instead of
GimpData* from GimpDataLoadFunc so it's possible to load more than
one data object from one file.
* app/core/gimpdatafactory.c (gimp_data_factory_load_data):
changed accordingly: add all items of the returned lists to the
data factory. Make the data object writable only if it's in the
writable path *and* its loader entry says it's a writable format
*and* the returned list contains exactly one element.
* app/core/gimp.c (gimp_real_initialize): declare all loader
entries as writable where we have code to read and write exactly
one object per file; all others are not writable.
* app/core/gimpbrush.[ch]
* app/core/gimpbrushgenerated.[ch]
* app/core/gimpbrushpipe.[ch]
* app/core/gimpgradient-load.[ch]
* app/core/gimppalette.[ch]
* app/core/gimppattern.[ch] (all load functions): return a list
containing the loaded object instead of the object itself.
2004-07-23 Sven Neumann <sven@gimp.org>
* app/core/gimpgradient-load.c (svg_parser_end_element): fixed
handling of the last gradient segment and did some code cleanup.
2004-07-23 Sven Neumann <sven@gimp.org>
* libgimpcolor/test-color-parser.c: added more test samples.
* libgimpcolor/gimprgb-parse.c: fixed a bug that I found with the
new tests.
* app/core/gimpgradient-load.c: changed SVG parser to handle
gradients that are defined more deeply in the SVG hierarchy. Added
a simplistic CSS style parser to deal with gradient definitions
that use CSS to define the gradient stop properties (closes bug
#148127).
2004-07-23 Sven Neumann <sven@gimp.org>
* app/core/gimpdatafactory.c: some newlines to improve error
messages.
* app/core/gimpgradient-load.c (gimp_gradient_load_svg): fixed
error handling.
2004-07-22 Sven Neumann <sven@gimp.org>
* libgimpcolor/gimprgb-parse.c
* libgimpcolor/gimprgb.h: use a signed integer to pass the string
length to the new parser functions. The API explicitely asks for
-1 to be passed...
* app/core/gimp.c
* app/core/gimpgradient-load.[ch]
* app/core/gimpgradient.h: added preliminary support for loading
simple SVG gradients (see bug #148127). Be careful with this new
feature; editing the loaded gradient will cause the SVG file to be
overwritten! Work in progress...
2004-07-21 Michael Natterer <mitch@gimp.org>
* app/core/gimpmarshal.list
* app/widgets/gimpcellrendereraccel.[ch]: added "gboolean delete"
parameter to the GimpCellRendererAccel::accel_edited() signal.
* app/widgets/gimpactionview.c: distinguish between deletion of an
accelerator and the user entering an invalid accelerator.
2004-07-21 Michael Natterer <mitch@gimp.org>
* app/core/gimpmarshal.list
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimpcellrendereraccel.[ch]: new cell renderer
which displays an accelerator and allows to edit it (ripped
out of libegg and modified).
* app/widgets/gimpactionview.c: use the new renderer and connect
to its "accel-edited" signal (its callback is one huge mess that
needs to be cleaned up). Added ugly hack to work around GTK+ API
limitation that seems to prevent implementing a shortcut editor in
a sane way.
* app/actions/file-actions.c
* app/actions/image-actions.c
* app/actions/tools-actions.c: added ugly hacks here, too.
* app/gui/preferences-dialog.c: relaced Cancel/Ok in the shortcut
editor by Close.
2004-07-19 Sven Neumann <sven@gimp.org>
* app/core/gimpchannel-combine.c (gimp_channel_combine_ellipse):
moved variable declarations to the scope they are being used in,
removed trailing whitespace, minor cleanups.
2004-07-19 Michael Natterer <mitch@gimp.org>
* libgimpbase/gimpwin32-io.h: added copyright header, added
#defines for access(), F_OK, R_OK and X_OK.
* app/core/gimpdata.c: include the above instead of defining
the workarounds here.
* app/base/tile-swap.c
* app/config/gimpconfig-dump.c
* libgimpthumb/gimpthumb-utils.c
* libgimpthumb/gimpthumbnail.c: for consistency, #include
gimpwin32-io.h with "" instead of <>.
2004-07-19 Michael Natterer <mitch@gimp.org>
* app/core/gimpchannel-combine.c (gimp_channel_combine_ellipse):
comments not intended for gtk-doc must not start with '/**'.
2004-07-19 Michael Natterer <mitch@gimp.org>
* app/config/config-types.h: removed GimpConfigInterface typedef,
added comments to typedefs which don't belong here.
* app/config/gimpconfig.h: added GimpConfigInterface typedef.
* app/core/core-types.h
* app/display/display-types.h: added commented out typedefs for
types that live in config-types.h for obscure reasons.
* app/core/core-types.h: reordered stuff to match the order in the
API docs (makes keeping stuff in sync much easier).
2004-07-16 Sven Neumann <sven@gimp.org>
* app/core/gimpdata.c:
* app/display/gimpcanvas.c:
* app/display/gimpdisplayshell.c
* app/display/gimpdisplayshell-transform.c: corrected API
documentation, removed trailing whitespace.
Please do always build the documentation if you add or change any
gtk-doc comments.
2004-07-15 Michael Natterer <mitch@gimp.org>
* app/core/gimpviewable.[ch]: corrected API docs and fixed
function parameter names to silent gtk-doc warnings.
2004-07-15 Michael Natterer <mitch@gimp.org>
* app/actions/file-commands.h: reordered to match the .c file.
* app/core/gimpitem.c
* app/vectors/gimpvectors-import.c: fixed API docs.
2004-07-14 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage.c: added properties "gimp", "id", "width",
"height" and "base-type". Moved all code from gimp_image_new()
to GObject::constructor().
* app/core/gimpimage-convert.c
* app/core/gimpimage-crop.c
* app/core/gimpimage-resize.c
* app/core/gimpimage-rotate.c
* app/core/gimpimage-scale.c
* app/core/gimpimage-undo-push.c: set "width", "height" and
"base-type" with g_object_set() so "notify" is emitted on the
properties.
* app/core/gimpimage-undo.c (gimp_image_undo_pop_stack):
freeze/thaw property notifications around undoing/redoing so they
are not emitted in the middle of the undo operation.
2004-07-14 Michael Natterer <mitch@gimp.org>
* app/core/Makefile.am
* app/core/core-types.h
* app/core/gimppickable.[ch]: new interface which has
get_image_type(), get_tiles() and get_color_at() methods.
* app/core/gimpdrawable.[ch]
* app/core/gimpimagemap.[ch]
* app/core/gimpprojection.[ch]: implement GimpPickableInterface
and removed public get_colot_at() functions.
* app/core/gimpimage-pick-color.[ch]: removed typedef
GimpImagePickColorFunc and gimp_image_pick_color_by_func(). Use
gimp_pickable_pick_color() instead.
* app/core/gimpimage-contiguous-region.c
* app/core/gimpimage-crop.c
* app/gui/info-window.c
* app/paint/gimpconvolve.c
* app/paint/gimpsmudge.c
* app/tools/gimpbycolorselecttool.c
* app/tools/gimpimagemaptool.c
* app/widgets/gimpselectioneditor.c: use GimpPickable functions
instead of the various get_color_at() functions. Simplifies code
which has a "sample_merged" boolean. Various cleanups.
2004-07-13 Sven Neumann <sven@gimp.org>
* app/core/gimp-utils.[ch]: added new function
gimp_g_value_get_memsize() that attempts to calculate the memory
requirements for a GValue.
* app/text/gimptextundo.c (gimp_text_undo_get_memsize): use the
new function to obtain a better estimate for the size of the text
undo.
2004-07-12 Michael Natterer <mitch@gimp.org>
* app/text/gimptextundo.[ch]: removed member "guint time"...
* app/core/gimpundo.[ch]: ...and added it here.
* app/tools/gimptexttool.c (gimp_text_tool_apply): changed
accordingly. Reordered undo compression code to look like other
pieces of code which do undo compression.
2004-07-12 Michael Natterer <mitch@gimp.org>
* app/core/gimpundo.[ch]
* app/core/gimpitemundo.[ch]
* app/text/gimptextundo.[ch]: removed all _new() functions and
added properties and GObject::constructor() implementations
instead.
* app/core/gimpimage-undo.[ch] (gimp_image_undo_push): added
"GType undo_gtype" parameter and allow to pass name-value pairs as
"...". Une the new GParameter utility functions to construct the
appropriate undo step with g_object_newv().
(gimp_image_undo_push_item): removed.
(gimp_image_undo_push_undo): removed. Merged its code back into
gimp_image_undo_push(), where it originally came from.
* app/core/gimpimage-undo-push.c
* app/core/gimpundostack.c
* app/paint/gimppaintcore-undo.c
* app/tools/gimptransformtool-undo.c
* app/widgets/gimpundoeditor.c: changed accordingly.
2004-07-12 Michael Natterer <mitch@gimp.org>
* app/core/Makefile.am
* app/core/gimp-gui.[ch]: new files defining a GimpGui vtable
struct and contianing all the vtable wrapper functions. Reordered
and renamed some functions for consistency.
* app/core/gimp.[ch]: removed all the vtable code.
* app/gui/gui-vtable.c: changed accordingly.
2004-07-11 Hans Breuer <hans@breuer.org>
* **/makefile.msc : updated
app/actions/makefile.msc app/menus/makefile.msc : (new files)
app/actions/Makefile.msc app/menus/Makefile.am : added to EXTRA_DIST
* libgimpbase/gimputils.c libgimpwidgets/gimpmemsizeentry.c
app/widgets/gimppropwidgets.c : bumped compiler version check,
msvc6 still can't cast from unsigned __int64 to double
* app/actions/debug-actions.c : only use debug_*_callback
and thus debug_action if ENABLE_DEBUG_MENU
* app/core/gimpalette-import.c : added gimpwin32-io.h
* plug-ins/common/convmatrix.c : s/snprintf/g_snprintf/
* plug-ins/common/screenshot.c : make it compile with msvc,
but still no win32 specific implementation ...
2004-07-11 Michael Natterer <mitch@gimp.org>
* app/core/gimp-utils.[ch] (gimp_parameters_append)
(gimp_parameters_append_valist)
(gimp_parameters_free): new utility functions which create and
destroy GParameter arrays for g_object_newv().
* app/gui/gui-vtable.c (gui_pdb_dialog_new): use them.
2004-07-10 Michael Natterer <mitch@gimp.org>
Removed any remaining GUI dependency from the PDB wrappers:
* app/core/gimp.[ch]: added vtable entries for the display and
help stuff.
* app/widgets/gimphelp.[ch]: renamed gimp_help() to
gimp_help_show().
* app/gui/gui-vtable.c: implement the new display and help vtable
entries.
* tools/pdbgen/pdb.pl
* tools/pdbgen/pdb/display.pdb
* tools/pdbgen/pdb/help.pdb: use the new functions of the Gimp
object instead of using stuff from display/ and widgets/.
* tools/pdbgen/app.pl: removed bad hacks which enabled including
stuff from gui/, display/ and widgets/.
* app/Makefile.am: link widgets-enums.o, display-enums.o and
gimpdisplayoptions.o into the gimp-console binary because they are
needed for the config system and don't depend on any GUI stuff.
* app/pdb/Makefile.am: s/GTK_CFLAGS/GDK_PIXBUF_CFLAGS/
* app/pdb/display_cmds.c
* app/pdb/help_cmds.c: regenerated.
2004-07-07 Sven Neumann <sven@gimp.org>
* app/core/gimplayer.c (gimp_layer_new_from_tiles): add an alpha
channel if the src tile-manager doesn't have one. Warn on
unsupported type conversions instead of silently doing the wrong
thing. Fixes bug #145482.
* app/core/gimpbuffer.c: cosmetics.
2004-07-07 Michael Natterer <mitch@gimp.org>
Made the undo system robust against the currently pushed undo
being too large according to prefs settings. Fixes bug #145379.
* app/core/gimpimage-undo.[ch] (gimp_image_undo_push_undo)
(gimp_image_undo_group_end): emit "undo-event" *before* calling
gimp_image_undo_free_space() so the undo history doesn't try to
remove an item that has never been added.
(gimp_image_undo_push_undo): added boolean return value indicating
if the undo could be pushed (FALSE means the undo was to large
and was discarded right away).
(gimp_image_undo_push_item): return NULL if the above returned
FALSE.
* app/core/gimpimage-undo-push.c (gimp_image_undo_push_text_layer):
changed accordingly.
2004-07-05 Michael Natterer <mitch@gimp.org>
* tools/pdbgen/Makefile.am (enum_headers): don't scan
app/paint-funcs/paint-funcs-types.h for enums.
* app/paint-funcs/paint-funcs-types.h: removed /*< pdb-skip >*/
* app/core/core-types.h: reordered opaque typedefs to somehow
match the categories in the comments.
2004-07-05 Michael Natterer <mitch@gimp.org>
* app/core/core-types.h: #define MIN and MAX values for
GimpCoords.pressure, .tilt and .wheel.
* app/display/gimpdisplayshell-callbacks.c
(gimp_display_shell_get_event_coords)
(gimp_display_shell_get_device_coords): use the #defines instead
of hardcoded magic values when CLAMP()ing event or device values.
2004-07-05 Sven Neumann <sven@gimp.org>
* app/core/gimpdata.[ch] (gimp_data_create_filename): Removed the
basename parameter and use the object name instead. Convert it to
the filesystem encoding.
* app/core/gimpdatafactory.c: changed accordingly.
2004-07-05 Michael Natterer <mitch@gimp.org>
* app/core/gimpchannel.[ch]: added signal "color-changed" and emit
it in gimp_channel_set_color() and gimp_channel_set_opacity().
* app/core/gimpimage-qmask.[ch]: added new functions
gimp_image_set,get_qmask_color().
* app/core/gimpimage.[ch]: install a "color-changed" handler on
gimage->channels and update gimage->qmask_color when the qmask's
color changes. Fixes bug #145361.
* app/actions/qmask-commands.c: use the new qmask color API.
2004-07-04 Tor Lillqvist <tml@iki.fi>
* app/core/gimpdrawable-equalize.c (gimp_drawable_equalize): Drop
a couple of unused variables.
* libgimpmodule/gimpmodule.def: Add gimp_module_register_enum.
2004-07-03 Michael Natterer <mitch@gimp.org>
* app/core/gimpcontext.[ch]: added context->serialize_props mask
which enables specifying exactly which properties will be
serialized. Also fixes a bug that prevented undefined properties
from being serialized, breaking tool_options and device status
serialization.
* app/core/gimptoolinfo.c (gimp_tool_info_new): make only the
properties in the tool_info->context_props mask serializable, also
configure/initialize tool_info->tool_options.
* app/tools/gimp-tools.c (gimp_tools_register): removed
tool_options initialization that is now done in
gimp_tool_info_new().
* app/widgets/gimpdeviceinfo.c: make only the properties in
GIMP_DEVICE_INFO_CONTEXT_MASK serializable.
* app/widgets/gimpdevicestatus.c: add the device table to its
parent container again. Fixes "missing" devices.
* app/core/gimptooloptions.c
* app/widgets/gimpdevices.c: cleanup / code review.
2004-07-02 Sven Neumann <sven@gimp.org>
* app/gui/Makefile.am
* app/gui/clipboard.[ch]: new files implementing a clipboard for
image data based on GDK_SELECTION_CLIPBOARD (bug #133247).
* app/actions/edit-actions.c
* app/actions/edit-commands.c: use the new clipboard API.
* app/gui/gui.c: initialize and shutdown the clipboard.
* app/core/gimpbuffer.c: cosmetics.
* app/actions/actions.c
* app/menus/menus.c: added sanity checks to exit functions.
* app/display/gimpdisplayshell-dnd.[ch]: let
gimp_display_shell_drop_svg() take a guchar * buffer.
* app/widgets/gimpselectiondata.c (gimp_selection_data_get_pixbuf):
fixed the implementation.
2004-06-30 Michael Natterer <mitch@gimp.org>
* app/plug-in/plug-ins.[ch] (plug_ins_init): added a GimpContext
parameter and use it to start plug-ins.
* app/core/gimp.c (gimp_real_restore): pass the user context.
Restores script-fu's access to the global FG, FG, brush, ...
2004-06-30 Michael Natterer <mitch@gimp.org>
Fixed a 1.2 -> 2.0 regression that was forgotten:
* app/widgets/widgets-enums.[ch]: added enum GimpColorPickState
which can be one of { NEW, UPDATE }.
* app/widgets/gimppaletteeditor.[ch]: changed #if 0'ed function
gimp_palette_editor_update_color() to
gimp_palette_editor_pick_color() and restored the functionality of
creating/updating colors via this API
Changed button_press handler to only edit the color on double
click if it's really a double click on the same color.
Fixes bug #141381.
* app/tools/gimpcolorpickeroptions.[ch]: added boolean property
"add-to-palette" and a GUI for it.
* app/core/gimpmarshal.list
* app/tools/gimpcolortool.[ch]: added a GimpColorPickState
parameter to the "color_picked" signal. Pass NEW on button_press
and UPDATE on motion.
* app/tools/gimpcurvestool.c (gimp_curves_tool_color_picked)
* app/tools/gimplevelstool.c (gimp_levels_tool_color_picked)
* app/tools/gimppainttool.c (gimp_paint_tool_color_picked):
changed accordingly
* app/tools/gimpcolorpickertool.c (gimp_color_picker_tool_picked):
If "add-to-palette" is TRUE, get the palette editor and call
gimp_palette_editor_pick_color().
2004-06-30 Michael Natterer <mitch@gimp.org>
* app/core/gimppalette.[ch] (gimp_palette_add_entry): take
const GimpRGB* instead of just GimpRGB*.
Converted tabs to spaces.
2004-06-25 Michael Natterer <mitch@gimp.org>
* app/core/gimpbrushgenerated.[ch]: reordered parameters and
members to be consistent with other places where generated
brushes are used. Check for errors when loading a brush and
utf8-validate its name. Cleanup.
* app/core/gimpbrush.c
* app/core/gimpbrushpipe.c: cleanup.
2004-06-25 Michael Natterer <mitch@gimp.org>
* app/core/gimpbrushgenerated.c: added properties for all brush
parameters.
* app/widgets/gimpbrusheditor.c: listen to property changes of the
edited brush and update the scales accordingly.
2004-06-19 Sven Neumann <sven@gimp.org>
Applied a patch from Geert Jordaens that implements the
GtkStatusbar functionality in GimpStatusbar so that we can redo it
in order to fix bug #120175:
* app/core/gimpmarshal.list: added VOID: UINT, STRING.
* app/display/gimpstatusbar.[ch]: copied GtkStatusbar code.
* app/display/gimpdisplayshell.c: changed accordingly.
2004-06-17 Michael Natterer <mitch@gimp.org>
* app/core/gimp-utils.[ch]: added gimp_boolean_handled_accum().
* app/core/gimp.c
* app/widgets/gimpcontrollerinfo.c: use it.
2004-06-17 Michael Natterer <mitch@gimp.org>
* app/core/gimpcontainer.c (gimp_container_deserialize): add newly
created children to the container *after* deserializing them so
GimpContainer::add() callbacks get the already deserialized
object.
* app/widgets/gimpcontrollers.c: connect to "add" and "remove" of
the controller list and remember / clear the wheel controller when
it appears / disappears.
2004-06-17 Philip Lafleur <plafleur@cvs.gnome.org>
* app/core/gimpdrawable-transform.c (gimp_drawable_transform_tiles_affine):
Make transforms (most notably perspective transforms) conform exactly
to specified edges. Includes a patch by David Gowers. Fixes bug #144352.
2004-06-16 Michael Natterer <mitch@gimp.org>
* libgimpwidgets/gimpcontroller.[ch]: added #define
GIMP_CONTROLLER_PARAM_SERIALIZE. Made all properties serializable.
* modules/controller_linux_input.c: made "device-name"
serializable.
* app/config/gimpconfig-params.h: added macro
GIMP_CONFIG_INSTALL_PROP_POINTER() which needs to be handled
by custom (de)serialize_property() implementations.
* app/config/gimpconfig-deserialize.c
* app/config/gimpconfig-serialize.c: made object (de)serialization
work for object properties which are *not* GIMP_PARAM_AGGREGATE.
Write/parse the exact type of the object to create to enable this.
* app/core/gimpmarshal.list: new marshaller for GimpControllerInfo.
* app/widgets/gimpcontrollerinfo.[ch]: implement GimpConfigInterface
and add "controller" and "mapping" properties. Add "event-mapped"
signal which carries the action_name.
* app/widgets/gimpcontrollers.c: removed all deserialization code
and simply (de)serialize the controller container. Install a
container handler for "event-mapped" and do the action_name ->
action mapping in the callback.
* etc/controllerrc: regenerated with new syntax. Delete your old one!
2004-06-15 Philip Lafleur <plafleur@cvs.gnome.org>
* app/core/gimpdrawable-transform.c (gimp_drawable_transform_tiles_affine):
Don't round texture coordinates when not using interpolation. Fixes
bug #144352 for the nearest neighbor case only.
2004-06-14 Sven Neumann <sven@gimp.org>
* app/core/gimpdrawable-transform.c: declared
gimp_drawable_transform_cubic() as inline function. Makes
sample_cubic() run about 10% faster and causes a 7% speedup on
cubic transformations.
* app/paint-funcs/paint-funcs.c (border_region): avoid an
unnecessary memory allocation.
2004-06-13 Sven Neumann <sven@gimp.org>
* app/paint-funcs/paint-funcs.[ch] (shapeburst_region): added
progress callback.
* app/core/gimpdrawable-blend.c: show a progress while calculating
the Shapeburst. Not perfect but better than not showing any
progress at all.
2004-06-13 Sven Neumann <sven@gimp.org>
* app/core/gimppalette.c (gimp_palette_load): don't use the rather
inefficient gimp_palette_add_entry() when loading a palette.
2004-06-13 Michael Natterer <mitch@gimp.org>
* app/core/gimpdata.[ch]: added "gint freeze_count" and
gimp_data_freeze()/thaw() functions. Emit "dirty" only if
freeze_count either is 0 or drops to 0.
* app/core/gimpbrushgenerated.[ch]
* app/core/gimpgradient.[ch]: removed freeze/thaw stuff that
was duplicated in these two subclasses and use the new
GimpData API instead.
* app/widgets/gimpbrusheditor.c
* app/widgets/gimpgradienteditor.c: changed accordingly.
2004-06-07 Michael Natterer <mitch@gimp.org>
* app/core/gimplayer.c (gimp_layer_set_tiles): don't set
layer->mask's offsets. It is wrong because GimpDrawable::set_tiles()
is a lowlevel function which is used by stuff like scale and
resize which keep the mask in sync explicitely and don't expect it
to be moved in the middle of chaining up. Fixes bug #143860.
2004-06-03 Sven Neumann <sven@gimp.org>
* app/core/gimpdatafactory.c (gimp_data_factory_load_data):
removed commented-out message.
* app/core/gimppattern.[ch]: fixed handling of errors and PNG
comments in new pattern loader. Renamed functions for consistency
with other data loaders.
* app/core/gimp.c: changed accordingly.
2004-06-03 Dave Neary <bolsh@gimp.org>
* app/core/gimp.c:
* app/core/gimpdatafactory.c:
* app/core/gimppattern.[ch]: Add support for GdkPixbuf patterns,
so now all of png, jpex, pnm, xbm, bmp, gif, ico, pcx, ras, tga,
xpm and tiff can be used for patterns.
2004-06-01 Sven Neumann <sven@gimp.org>
* tools/pdbgen/pdb/image.pdb
* app/pdb/image_cmds.c
* app/core/gimpimage.[ch]: reverted changes I did to the image
unit earlier. As in 2.0, it will continue to not accept pixels.
This makes the PDB API and the XCF format compatible again and
fixes bug #142961 (and to some extent bug #137704).
* app/core/Makefile.am
* app/core/gimpimage-unit.[ch]: removed these files. The
convenience accessors defined here aren't commonly used any
longer.
* app/display/gimpdisplay.[ch]
* app/display/gimpdisplayshell.[ch]: added a unit parameter to
gimp_display_new(). Made "unit" and "scale" properties of
GimpDisplayShell.
* app/actions/image-commands.c
* app/actions/images-commands.c
* app/actions/layers-commands.c
* app/actions/select-commands.c
* app/actions/view-commands.c
* app/core/gimp-edit.c
* app/core/gimp.[ch]
* app/core/gimptemplate.c
* app/display/gimpdisplayshell-handlers.c
* app/display/gimpdisplayshell-scale.c
* app/display/gimpdisplayshell-title.c
* app/display/gimpstatusbar.c
* app/file/file-open.c
* app/gui/gui-vtable.c
* app/gui/info-window.c
* app/gui/offset-dialog.c
* app/gui/resize-dialog.[ch]
* app/pdb/display_cmds.c
* app/tools/gimpcroptool.c
* app/tools/gimpmeasuretool.c
* app/tools/gimppainttool.c
* app/tools/gimprectselecttool.c
* app/tools/gimprotatetool.c
* app/tools/gimpscaletool.c
* app/vectors/gimpvectors-export.c
* app/widgets/gimptoolbox-dnd.c
* tools/pdbgen/pdb/display.pdb: changed accordingly. Use the
display unit where the image unit was used before.
2004-06-01 Michael Natterer <mitch@gimp.org>
* app/core/gimpdatafactory.[ch]: added new function
gimp_data_factory_data_delete().
* app/actions/data-commands.c (data_delete_callback): use it.
* tools/pdbgen/pdb/gradients.pdb: applied (slightly modified)
patch from Shlomi Fish which adds PDB wrappers to create, delete,
duplicate and rename gradients.
* app/pdb/gradients_cmds.c
* app/pdb/internal_procs.c
* libgimp/gimpgradients_pdb.[ch]: regenerated.
2004-06-01 Michael Natterer <mitch@gimp.org>
* app/core/core-enums.h: renamed the values of the
GimpGradientSegment* enums from GIMP_GRAD_* to
GIMP_GRADIENT_SEGMENT_* because they are exported now.
* app/core/gimp-gradients.c
* app/core/gimpgradient.c
* app/actions/gradient-editor-actions.c: changed accordingly.
* libgimp/gimpenums.h
* plug-ins/pygimp/gimpenums.py
* plug-ins/script-fu/script-fu-constants.c
* tools/pdbgen/enums.pl: regenerated.
2004-05-31 Michael Natterer <mitch@gimp.org>
* app/core/core-enums.h
* app/core/gimpgradient.[ch]
* app/pdb/Makefile.am
* app/widgets/gimpgradienteditor.c
* tools/pdbgen/Makefile.am
* tools/pdbgen/groups.pl
* tools/pdbgen/pdb/gradient_edit.pdb: applied a patch from Shlomi
Fish that adds lots of gradient edit functions to
gimpgradient.[ch] and makes them available through the PDB.
Fixes bug #129675 and bug #129678.
Did some cleanups / enhancments to the patch:
* app/core/gimpgradient.[ch]: changed the naming scheme of the new
functions and changed old functions to match the new scheme.
Introduce a "freeze_count" and public freeze()/thaw() API which
enables subsequent gradient changes without "dirty" being emitted
all the time. Added GimpGradient parameters to all functions
which modify the gradient.
* app/widgets/gimpgradienteditor.c: use the new freeze/thaw
stuff to keep the gradient from updating when not in
"Instant Update" mode.
* app/actions/gradient-editor-commands.c: removed all gradient
editing code and call the new core functions.
* libgimp/Makefile.am
* tools/pdbgen/pdb/gradient_edit.pdb: changed the namespace of all
added functions. Generate libgimp wrappers for them..
* app/pdb/gradient_edit_cmds.c
* app/pdb/internal_procs.c
* libgimp/gimp_pdb.h
* libgimp/gimpenums.h
* libgimp/gimpgradientedit_pdb.[ch]
* plug-ins/pygimp/gimpenums.py
* plug-ins/script-fu/script-fu-constants.c
* tools/pdbgen/enums.pl: (re)generated.
2004-05-26 Sven Neumann <sven@gimp.org>
* app/core/core-enums.[ch]: shorter names for the gradient types
to reduce the width of the blend tool options.
2004-05-24 Michael Natterer <mitch@gimp.org>
* app/vectors/Makefile.am
* app/vectors/gimpcoordmath.[ch]: removed...
* app/core/Makefile.am
* app/core/gimpcoords.[ch]: ...and added without the "bezier"
namespace.
* app/vectors/gimpbezierstroke.c: changed accordingly.
* app/Makefile.am: force it to link gimpcoords.o
2004-05-24 Michael Natterer <mitch@gimp.org>
* app/config/gimpconfigwriter.c
* app/core/gimpstrokeoptions.c
* app/widgets/gimpactiongroup.c
* app/widgets/gimpcolorframe.h
* app/widgets/gimpcolorpanel.h
* app/widgets/gimpcontainerview.[ch]
* app/widgets/gimptooldialog.h
* app/widgets/gimpuimanager.c
* app/widgets/widgets-types.h: fixed various small issues I
stumbled across when updating the API reference for app/.
2004-05-24 Sven Neumann <sven@gimp.org>
* app/core/gimptoolinfo.[ch]: derive GimpToolInfo from
GimpViewable, it doesn't make sense for it to be a GimpData.
* app/widgets/gimptooloptionseditor.c
(gimp_tool_options_editor_get_title): do not append " Options" to
the tool name. Fixes bug #142280.
2004-05-24 Michael Natterer <mitch@gimp.org>
Long overdue core container cleanup:
* app/core/gimplist.[ch]: added "unique-names" and "sort-func"
properties and merged the resp. code from GimpDataList into
GimpList. Removed "policy" parameters from gimp_list_new() and
added "unique_names". Added new constructor gimp_list_new_weak().
Made public function gimp_list_uniquefy_name() private.
* app/core/Makefile.am
* app/core/core-types.h
* app/core/gimpdatalist.[ch]: removed. Its functionality is
entirely in GimpList now.
* app/core/gimpdata.[ch]: added gimp_data_name_compare() which
used to live in GimpDataList.
* app/core/gimp.c
* app/core/gimpdatafactory.c
* app/core/gimpimage.c
* app/core/gimptoolinfo.c
* app/core/gimpundostack.c
* app/paint/gimp-paint.c
* app/tools/gimp-tools.c
* app/widgets/gimpdevices.c
* app/widgets/gimptemplateeditor.c
* app/widgets/gimpundoeditor.c: changed list creation accordingly.
Made gimp->templates, gimp->named_buffers, tool_info->presets and
the image's lists of layers, channels and vectors automatically
ensure unique names.
* app/widgets/gimptemplateview.c
* app/actions/file-commands.c
* app/actions/templates-commands.c
* app/actions/tool-options-commands.c: removed calls to
gimp_list_uniquefy_name().
* app/core/gimpitem.c: removed major insanity where the items
themselves where ensuring their unique names. Bah!
* app/core/gimplayer.c (gimp_layer_name_changed): chain up
conditionally.
* app/core/gimplayermask.c (gimp_layer_mask_name_changed): removed
because there is no need any more to keep the parent
implementation from being invoked.
2004-05-18 Michael Natterer <mitch@gimp.org>
Allow plug-ins to register menu icons. Fixes bug #120500.
* app/core/core-enums.[ch]: added enum GimpIconType which can
be one of { STOCK_ID, IMAGE_FILE, INLINE_PIXBUF }.
* app/config/gimpconfigwriter.[ch] (gimp_config_writer_data)
* app/config/gimpscanner.[ch] (gimp_scanner_parse_data): new
functions which write/parse raw binary data. Needed for storing
inline pixbufs in pluginrc.
* app/config/gimpconfigwriter.[ch] (gimp_config_writer_identifier):
new function which writes out an unquoted and unescaped string.
* app/plug-in/plug-in-proc.[ch] (struct PlugInProcDef): added
new members "icon_type", "icon_data_length" and "icon_data".
Reordered members so file_proc specific stuff is at the end.
(plug_in_proc_def_get_stock_id)
(plug_in_proc_def_get_pixbuf): new functions to access the
procedure's icon.
* app/plug-in/plug-in-rc.c: save/restore the registered icons.
* app/actions/file-dialog-actions.c
* app/actions/plug-in-actions.c: set the action's stock ID from
the procedure's stock ID.
* app/widgets/gimppluginaction.c
(gimp_plug_in_action_connect_proxy): if the procedure provides a
pixbuf, set it as icon for the menu item.
* app/menus/file-dialog-menu.[ch]
* app/menus/file-open-menu.c
* app/menus/file-save-menu.c
* app/xcf/xcf.c: changed accordingly.
* tools/pdbgen/pdb/plug_in.pdb (plugin_icon_register): new PDB
function which can be called during query().
* tools/pdbgen/enums.pl
* app/pdb/internal_procs.c
* app/pdb/plug_in_cmds.c
* libgimp/gimpenums.h
* libgimp/gimpplugin_pdb.c
* libgimp/gimpplugin_pdb.h
* plug-ins/pygimp/gimpenums.py
* plug-ins/script-fu/script-fu-constants.c: regenerated.
* plug-ins/common/plugindetails.c
* plug-ins/common/uniteditor.c
* plug-ins/print/print.c: register stock_id icons.
* plug-ins/common/screenshot.c: register an inline_pixbuf icon for
testing purposes (used emblem-camera.png from gnome-icon-theme).
* app/actions/dialogs-actions.c
* app/actions/file-actions.c: unrelated: added some more icons
to menu items.
2004-05-18 Michael Natterer <mitch@gimp.org>
* app/core/gimptoolinfo.c: made the "visible" property serializable.
* app/tools/gimp-tools.c: store the tools' order and visibility
in a new config file called "toolrc".
2004-05-17 Sven Neumann <sven@gimp.org>
* app/core/gimpimage.c (gimp_image_init): initialize the image
unit to GIMP_UNIT_PIXEL.
* app/pdb/image_cmds.c
* tools/pdbgen/pdb/image.pdb: allow GIMP_UNIT_PIXEL to be used
in the gimp_image_set_unit() PDB call.
2004-05-14 Sven Neumann <sven@gimp.org>
* tools/pdbgen/pdb/fileops.pdb: added new PDB function
gimp_register_file_handler_mime() that allows to associate a MIME
type with a file procecdurre.
* app/pdb/fileops_cmds.c
* app/pdb/internal_procs.c
* libgimp/gimpfileops_pdb.[ch]: regenerated.
* app/plug-in/plug-in-proc.[ch]
* app/plug-in/plug-in-rc.c
* app/plug-in/plug-ins.[ch]: store a mimetype with file procedures.
* app/actions/file-commands.c
* app/core/gimpdocumentlist.[ch]
* app/core/gimpimagefile.[ch]
* app/file/file-open.[ch]
* app/file/file-save.c: set the thumbnail's mimetype from the file
procedure used to load/save the image.
* app/xcf/xcf.c
* plug-ins/bmp/bmp.c
* plug-ins/common/csource.c
* plug-ins/common/dicom.c
* plug-ins/common/gif.c
* plug-ins/common/gifload.c
* plug-ins/common/jpeg.c
* plug-ins/common/mng.c
* plug-ins/common/png.c
* plug-ins/common/postscript.c
* plug-ins/common/psd.c
* plug-ins/common/psd_save.c
* plug-ins/common/sunras.c
* plug-ins/common/svg.c
* plug-ins/common/tga.c
* plug-ins/common/tiff.c
* plug-ins/common/wmf.c
* plug-ins/common/xbm.c
* plug-ins/common/xpm.c
* plug-ins/common/xwd.c
* plug-ins/faxg3/faxg3.c
* plug-ins/winicon/main.c: register a mimetype, set a translatable
action name (taken from shared-mime-info) and register to the <Load>
and <Save> menus using gimp_plugin_menu_register().
2004-05-13 Michael Natterer <mitch@gimp.org>
* app/core/gimpcontainer.c (gimp_container_add_handler): don't
try to lookup detailed "notify::foo" signal specs.
2004-05-13 Michael Natterer <mitch@gimp.org>
Added GimpViewable infrastructure which enables migrating from
TempBuf to GdkPixbuf for both providing and getting previews:
* app/core/gimpviewable.[ch]: added new virtual functions
GimpViewable::get_pixbuf() and GimpViewable::get_new_pixbuf()
which are implemented exactly as get_preview() and
get_new_preview() except that get_new_pixbuf() has a default
implementation which creates the pixbuf from a TempBuf.
Renamed public functions _get_preview_pixbuf() and
_get_new_preview_pixbuf() to _get_pixbuf() and _get_new_pixbuf().
Added gimp_viewable_get_dummy_pixbuf() and use it from
gimp_viewable_get_dummy_preview().
* app/core/gimpimagefile.c (gimp_imagefile_save_thumb)
* app/display/gimpdisplayshell.c (gimp_display_shell_update_icon)
* app/gui/resize-dialog.c (resize_dialog_new): changed accordingly.
2004-05-10 Michael Natterer <mitch@gimp.org>
Started making the toolbox configurable.
Addresses bug #105764. Not finished yet.
* app/core/gimptoolinfo.[ch]: renamed "in_toolbox" to "visible"
and made it a GObject property.
* app/tools/gimp-tools.[ch]: added new function
gimp_tools_get_default_order() which returns a GList of tool
identifiers.
* app/actions/tools-actions.c
* app/actions/tools-commands.[ch]: added actions & callbacks for
toggling the "visible" boolean and for resetting all tools.
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimptoolview.[ch]: new widget which allows to
toggle a tool's visibility and to reorder the tools.
* app/widgets/gimptoolbox.[ch]: removed member "GtkWidget *trash"
and pack all tool buttons into the same wrap box. Connect to
"reoder" of the tool container and to "notify::visible" of all
tool infos and update the toolbox accordingly.
* app/gui/dialogs-constructors.c: create a GimpToolView for the
tools list/grid.
* app/menus/menus.c: register a <Tools> menu for the dialog above.
* menus/Makefile.am
* menus/tools-menu.xml: added the menu.
2004-05-07 Sven Neumann <sven@gimp.org>
* app/core/gimpimage-colormap.[ch]: added a const qualifier.
Changed how the image unit and dot-for-dot mode is handled. Might
break things and certainly needs more changes (mainly in tools):
* app/core/gimptemplate.c: allow GIMP_UNIT_PIXEL as image unit.
* app/display/gimpdisplayshell-handlers.c
* app/display/gimpdisplayshell-scale.c
* app/display/gimpdisplayshell-title.c
* app/display/gimpstatusbar.c: always use the image unit for the
rulers and to display lengths.
* app/widgets/gimptemplateeditor.c: redone GimpTemplateEditor
based on a dialog mockup from Jimmac and Tigert.
* app/core/core-enums.[ch]: changed some descriptions used by the
template editor.
2004-05-06 Sven Neumann <sven@gimp.org>
* app/core/gimpdrawable-preview.c
* app/core/gimpimage-projection.c: added sanity so we don't just
plain crash when an indexed image doesn't have a colormap.
* plug-ins/common/png.c: keep at least one entry in the colormap.
Fixes bug #142029.
2004-05-04 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage.c (gimp_image_undo_freeze,thaw): emit the
"undo-freeze" and "undo-thaw" signals only on the first freeze and
last thaw, not on any of them.
* app/widgets/gimphelp-ids.h: added GIMP_HELP_EDIT_UNDO_CLEAR.
* app/widgets/gimpundoeditor.[ch]: added a "Clear Undo History"
button. Fixes bug #136300.
Also don't attach to the image's undo stack if the image's undo is
disabled and set the buttons' sensitivity accordingly. Should fix
all kinds of unpredictable undo history brokenness.
2004-04-29 Michael Natterer <mitch@gimp.org>
Switch from GtkItemFactory to GtkUIManager. The migration is
almost complete, still stuff missing/incomplete, definitely added
a bunch of new bugs...
* app/actions/*-commands.[ch]: converted all callback from
GtkItemFactory callbacks to GtkAction callbacks.
* app/actions/debug-actions.c
* app/actions/gradient-editor-actions.c
* app/actions/help-actions.c
* app/actions/plug-in-actions.c
* app/actions/qmask-actions.c
* app/actions/tool-options-actions.c: various fixes.
* app/display/gimpdisplay.[ch]
* app/display/gimpdisplayshell-appearance.[ch]
* app/display/gimpdisplayshell-callbacks.c
* app/display/gimpdisplayshell.[ch]: move everything from
GtkItemFactory to GtkUIManager.
* app/gui/dialogs.[ch]: added new function dialogs_get_toolbox().
Needed because the action callbacks don't have a widget parameter
and sometimes we need a parent window for showing dialogs.
* app/gui/Makefile.am
* app/gui/brushes-menu.[ch]
* app/gui/buffers-menu.[ch]
* app/gui/channels-menu.[ch]
* app/gui/colormap-editor-menu.[ch]
* app/gui/dialogs-menu.[ch]
* app/gui/documents-menu.[ch]
* app/gui/error-console-menu.[ch]
* app/gui/fonts-menu.[ch]
* app/gui/gradient-editor-menu.[ch]
* app/gui/gradients-menu.[ch]
* app/gui/images-menu.[ch]
* app/gui/layers-menu.[ch]
* app/gui/palette-editor-menu.[ch]
* app/gui/palettes-menu.[ch]
* app/gui/patterns-menu.[ch]
* app/gui/qmask-menu.[ch]
* app/gui/templates-menu.[ch]
* app/gui/vectors-menu.[ch]: removed these files.
* app/gui/gui.c: create a global UI manager for the image popup
menu and the toolbox menubar.
* app/gui/menus.[ch]: removed all GtkItemFactory code.
* app/gui/image-menu.[ch]
* app/gui/toolbox-menu.[ch]: removed everything except the trivial
setup_funcs.
* app/gui/file-open-menu.c
* app/gui/file-save-menu.c
* app/gui/tool-options-menu.c: don't use the macros from menus.h
any more, they are gone.
* app/gui/gui-vtable.c
* app/gui/plug-in-menus.[ch]: create/destroy the dynamic plug-in
menu entries.
* app/tools/gimpimagemaptool.c: s/gimp_item_factory_update/
gimp_ui_manager_update/g
* app/widgets/gimpuimanager.[ch]: added API to get an action
group by name.
* app/widgets/gimpmenufactory.c: don't choke on the item_factory
entries being NULL.
* app/widgets/gimpactiongroup.c: make sure booleans set using
g_object_set() only have TRUE or FALSE values.
* app/widgets/gimpcolormapeditor.c
* app/widgets/gimpcomponenteditor.c
* app/widgets/gimpcontainereditor.[ch]
* app/widgets/gimpcontainergridview.c
* app/widgets/gimpcontainertreeview.c
* app/widgets/gimpdockable.[ch]
* app/widgets/gimpdocked.[ch]
* app/widgets/gimpeditor.[ch]
* app/widgets/gimperrorconsole.c
* app/widgets/gimpgradienteditor.c
* app/widgets/gimpitemtreeview.c
* app/widgets/gimppaletteeditor.c
* app/widgets/gimptoolbox.c
* app/widgets/gimptooloptionseditor.c: removed all GtkItemFactory
code and enable the #if 0'ed UI manager stuff.
* menus/gradient-editor-menu.xml: fixed typos.
* menus/image-menu.xml: duplicate everything so we have both
an image menubar and an image popup menu. Badly cries for an
XSL processor.
* menus/toolbox-menu.xml: added an "Extensions" placeholder.
2004-04-26 Michael Natterer <mitch@gimp.org>
* app/core/gimp.[ch]: removed "locale_domain" and "help_domain"
parameters from GimpMenusCreateFunc.
* app/plug-in/plug-ins.c (plug_ins_temp_proc_def_add)
* app/actions/plug-in-actions.[ch] (plug_in_actions_add_proc_def):
changed accordingly.
* app/widgets/gimpactiongroup.[ch]: remember all created action
groups is a hash table in GimpActionGroupClass. Added
gimp_action_groups_from_name() which returns a GList of all groups
with the given name.
* app/actions/plug-in-actions.[ch] (plug_in_actions_setup):
removed the tree sorting code. Actions don't need to be ordered
alphabetically.
(plug_in_actions_update): copied & ported plug_in_menus_update().
* app/gui/gui-vtable.c (gui_menus_create,delete_entry):
dynamically add/remove plug-in actions in all "plug-in" action
groups.
2004-04-25 Michael Natterer <mitch@gimp.org>
* app/core/gimp.[ch]: changed GimpMenusDeleteFunc to take
a PlugInProcDef* instead of a const gchar*.
* app/plug-in/plug-ins.c
* app/gui/gui-vtable.c
* app/gui/plug-in-menus.[ch]: changed accordingly.
2004-04-22 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpuimanager.[ch]: remember and ref the created
widgets. Added gimp_ui_manager_ui_popup() which pops up a GtkMenu
with a custom GimpMenuPositionFunc and a GtkDestroyNotify which is
called on popdown.
* app/widgets/gimpmenufactory.c (gimp_menu_factory_finalize):
don't forget to free the list of managed UIs.
* app/widgets/gimpdockable.[ch]
* app/widgets/gimpdockbook.[ch]
* app/widgets/gimpdocked.[ch]
* app/widgets/gimpeditor.[ch]: added GimpUIManager stuff parallel
to the to-be-removed GtkItemFactory stuff.
* app/widgets/gimpcolormapeditor.c
* app/widgets/gimpcomponenteditor.c
* app/widgets/gimpcontainereditor.c
* app/widgets/gimpcontainergridview.c
* app/widgets/gimpcontainertreeview.c
* app/widgets/gimperrorconsole.c
* app/widgets/gimpgradienteditor.c
* app/widgets/gimpitemtreeview.c
* app/widgets/gimppaletteeditor.c
* app/widgets/gimptooloptionseditor.c: changed accordingly and added
#if 0'ed code which actually uses all the UI managers.
* app/display/gimpdisplay.c
* app/display/gimpdisplayshell.c
* app/gui/gui-vtable.c: disabled some gimp_ui_manager_update()
calls because they were invoking toggle and radio callbacks
which still have the wrong signature.
2004-04-21 Michael Natterer <mitch@gimp.org>
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimpuimanager.[ch]: new GtkUIManager subclass. Adds
API to update all action groups and knows which UIs it can create
from which XML files.
* app/widgets/gimpmenufactory.[ch]: register the XML file
basenames along with path of their toplevel menus. Create
GimpUIManagers instead of GtkUIManagers and register the
XML files and menu paths with them.
* app/gui/menus.c: register all XML files and their toplevel
menu paths.
* app/widgets/gimpeditor.[ch]: also create a GimpUIManager when
creating the GtkItemFactory. Added "const gchar *ui_identifier"
parameter to gimp_editor_create_menu().
* app/widgets/gimpcontainereditor.[ch]
* app/widgets/gimpdataeditor.[ch]
* app/widgets/gimpdatafactoryview.[ch]
* app/widgets/gimpitemtreeview.[ch]: added "ui_identifier"
parameters to all constructors.
* app/widgets/gimpbrusheditor.c
* app/widgets/gimpbrushfactoryview.c
* app/widgets/gimpbufferview.c
* app/widgets/gimpcolormapeditor.c
* app/widgets/gimpcomponenteditor.c
* app/widgets/gimpcontainerpopup.c
* app/widgets/gimpdocumentview.c
* app/widgets/gimperrorconsole.c
* app/widgets/gimpfontview.c
* app/widgets/gimpgradienteditor.c
* app/widgets/gimpimageview.c
* app/widgets/gimppaletteeditor.c
* app/widgets/gimppatternfactoryview.c
* app/widgets/gimptemplateview.c
* app/widgets/gimptooloptionseditor.c
* app/gui/dialogs-constructors.c
* app/gui/gradient-select.c
* app/gui/palette-select.c
* app/gui/pattern-select.c: pass UI identifiers to the changed
functions above.
* app/display/gimpdisplayshell.[ch]: added a GimpUIManager for
the menubar (menubar creating code still commented out).
* app/display/gimpdisplay.c
* app/gui/gui-vtable.c: update the ui manager.
2004-04-19 Michael Natterer <mitch@gimp.org>
More GtkAction stuff (still unused):
* configure.in: added new directories menus/ and app/actions/
* Makefile.am: build menus/
* menus/.cvsignore
* menus/Makefile.am
* menus/*-menu.xml: new files: XML menu descriptions for each menu
which is now defined in gui/*-menu.c.
* app/widgets/widgets-types.h: some typedefs for GimpActionGroup.
* app/widgets/gimpactiongroup.[ch]: added a "Gimp" construct-only
property. Added APIs to set actions visible/sensitive/active
and an unimplemented stub for setting the action's color.
* app/Makefile.am: build actions/ and link libappactions.a
* app/actions/.cvsignore
* app/actions/Makefile.am
* app/actions/*-actions.[ch]: new files: GtkActions for each
*-commands.c file in gui/. Ported all "update" functions from the
*-menu.c files.
(everything completely unused, untested and partly #if 0'ed)
* app/core/gimpimage.[ch]: for reasons of (action-) symmetry, added
API to raise/lower channels/vectors to top/bottom.
* app/gui/channels-commands.[ch]
* app/gui/vectors-commands.[ch]: added callbacks for the new
to top/bottom functions.
* app/gui/Makefile.am
* app/gui/dockable-commands.[ch]: new files split out of
dialogs-commands.[ch].
* app/gui/dialogs-commands.[ch]
* app/gui/dialogs-menu.c: changed accordingly.
* app/gui/edit-commands.[ch]: added edit_paste_into_cmd_callback()
and remove usage of "guint action".
* app/gui/image-menu.c: changed accordingly.
* app/gui/palette-editor-commands.[ch]: split
+palette_editor_new_color_cmd_callback() into separate callbacks
for adding from FG and BG.
* app/gui/palette-editor-menu.c: changed accordingly.
2004-04-15 Michael Natterer <mitch@gimp.org>
* app/core/gimplayermask.c (gimp_layer_mask_class_init): set
translate_desc to "Move Layer Mask".
* app/tools/gimpeditselectiontool.c: take the undo desc
from the moved item's class instead of duplicating all
strings here.
2004-04-15 Sven Neumann <sven@gimp.org>
* app/core/gimppalette-import.[ch]
* app/gui/palette-import-dialog.c: added palette import from RIFF
palette files based on a patch from ÃRDI Gergõ (bug #129788).
2004-04-15 Michael Natterer <mitch@gimp.org>
* app/core/gimpitem.[ch]: added "const gchar *stroke_desc" to
the GimpItemClass struct and always push an undo group
around GimpItem::stroke().
* app/core/gimpchannel.c
* app/core/gimpselection.c
* app/vectors/gimpvectors.c: set the stroke_desc accordingly
and don't push undo groups.
* app/text/gimptextlayer.c (gimp_text_layer_class_init): set
all of GimpItemClass' undo_descs.
* app/text/gimptextlayer-transform.c: don't push undo groups here.
2004-04-15 Michael Natterer <mitch@gimp.org>
Context cleanup continued:
* app/core/gimpitem.[ch]: added context parameter to
GimpItem::stroke().
* app/core/gimpchannel.c (gimp_channel_stroke)
* app/vectors/gimpvectors.c (gimp_vectors_stroke): use it to get
default values from instead of gimp_get_user_context().
* app/core/gimpselection.c
* app/gui/stroke-dialog.c
* tools/pdbgen/pdb/edit.pdb
* tools/pdbgen/pdb/paths.pdb: changed accordingly.
* app/pdb/edit_cmds.c
* app/pdb/paths_cmds.c: regenerated.
* app/plug-in/plug-in.[ch]: added GimpContext member to the PlugIn
struct. Added context parameter to plug_in_new(),
plug_in_call_query() and plug_in_call_init().
* app/plug-in/plug-in-run.[ch]: added context parameters to
plug_in_run() and plug_in_repeat().
* app/gui/plug-in-commands.c
* app/gui/vectors-commands.c
* app/pdb/procedural_db.c
* app/widgets/gimphelp.c: pass a context to plug_in_run() and
plug_in_repeat().
* app/plug-in/plug-in-message.c (plug_in_handle_proc_run): call
procedures with the plug-in's context.
* app/plug-in/plug-ins.c: use a temporary context for running the
plug-ins' query() and init() functions. Use the same context for
running automatic extensions. This temporarily separates the main
Script-Fu extension from the user context (i.e. scripts have no
way of setting/getting the global FG, BG, brush etc.).
2004-04-13 Sven Neumann <sven@gimp.org>
* app/core/gimp-utils.[ch] (gimp_get_default_language): added a
category parameter to make this function more flexible.
* app/text/gimptext.c: changed accordingly.
* app/widgets/gimphelp.c (gimp_help): localize the help pages
according to the value of LC_MESSAGES. Fixes bug #139917.
2004-04-13 Michael Natterer <mitch@gimp.org>
Moved the calls to floating_sel_relax()/rigor() from various
places to two single spots in the core where they are actually
needed. Fixes bug #138356 (which was caused by the projection
being triggered in the middle of changing the floating selection's
size or the size of the drawable it is attached to). This commit
effectively removes floating selection fiddling from the core's
public API.
* app/core/gimpdrawable.[ch] (gimp_drawable_has_floating_sel): new
function which returns TRUE if there is a floating selection
attached to the drawable.
* app/core/gimpdrawable.c (gimp_drawable_translate)
(gimp_drawable_set_tiles_full): if the drawable *has* a floating
selection, relax/rigor it before/after modifying the drawable.
* app/core/gimplayer.c (gimp_layer_translate)
(gimp_layer_set_tiles): if the layer *is* the floating selection,
relax/rigor it before/after modifying it.
* app/core/gimpdrawable-transform.c
* app/core/gimpimage-convert.c
* app/core/gimpimage-crop.c
* app/core/gimpimage-flip.c
* app/core/gimpimage-resize.c
* app/core/gimpimage-rotate.c
* app/core/gimpimage-scale.c
* app/gui/layers-commands.c
* app/tools/gimpeditselectiontool.c
* tools/pdbgen/pdb/layer.pdb: removed calls to
floating_sel_rigor()/relax() all over the place. Also removed
lots of undo groups which are obsolete now.
* app/pdb/layer_cmds.c: regenerated.
2004-04-13 Michael Natterer <mitch@gimp.org>
GimpItem undo group cleanup in preparation of fixing bug #138356:
* app/core/core-enums.[c]: renamed LAYER_SCALE and LAYER_RESIZE
undo groups to ITEM_SCALE and ITEM_RESIZE.
* app/core/gimpitem.[ch]: always push undo groups around
GimpItem::translate(), scale(), resize(), flip(), rotate() and
transform(). Added the resp. undo_desc strings to GimpItemClass.
* app/core/gimpchannel.[ch]
* app/core/gimpdrawable.[ch]
* app/core/gimplayer.c: removed all undo groups from
implementations of the above methods. Removed the undo_desc
strings which were moved to GimpItemClass.
* app/core/gimpimage-crop.c
* app/core/gimpselection.c
* app/gui/layers-commands.c
* app/vectors/gimpvectors.c
* tools/pdbgen/pdb/layer.pdb: changed accordingly.
* app/pdb/layer_cmds.c: regenerated.
2004-04-03 Sven Neumann <sven@gimp.org>
* app/text/gimptextlayer.c (gimp_text_layer_new): create the
initial text layer with a size of 1 x 1 since tile_manager_new()
does not any longer accept 0 x 0.
* app/core/gimpdrawable.c (gimp_drawable_configure): check that
width and height are > 0.
2004-04-01 Michael Natterer <mitch@gimp.org>
* app/core/core-enums.[ch] (enum GimpUndoType): added undo type
GIMP_UNDO_TEXT_LAYER_MODIFIED and undo group types
GIMP_UNDO_GROUP_DRAWABLE and GIMP_UNDO_GROUP_DRAWABLE_MOD.
* app/core/gimpimage-undo-push.[ch]: added new new function
gimp_image_undo_push_text_layer_modified() which makes
modifications of the text_layer's "modified" boolean undoable.
* app/core/gimpdrawable.[ch]: added new virtual function
GimpDrawable::push_undo() and moved the actual undo pushing into
the default implementation gimp_drawable_real_push_undo().
* app/text/gimptextlayer.c (gimp_text_layer_push_undo): new
function. Pushes the text_layer's modified state to the undo stack
after upchaining and sets modified to TRUE.
(gimp_text_layer_set_tiles): ditto.
(gimp_lext_layer_apply_region)
(gimp_text_layer_replace_region): removed because their default
implementations already call gimp_drawable_push_undo().
(gimp_text_layer_swap_pixels): removed because swap_pixels() is
used by undo only and doesn't need to care about the text_layer's
modified state.
(gimp_text_layer_render): don't set modified to FALSE here because
we can't push an undo step here.
(gimp_text_layer_set): push the modified state to the undo stack
and set it to FALSE here. Also push the layer's tiles if the
layer was modified.
* app/tools/gimptexttool.c (gimp_text_tool_apply): push "modified"
to the undo stack and set it to FALSE here, too.
Fixes bug #137767.
2004-03-31 Michael Natterer <mitch@gimp.org>
* app/core/gimp-transform-utils.c
(gimp_transform_matrix_perspective): make sure 0.0/0.0 results
in 1.0, not NaN.
* app/core/gimpdrawable-transform.c
(gimp_drawable_transform_tiles_affine): instead of returning NULL
if the transformation shrinks the tiles completely away, return at
least the pixel (or the row or column of pixels) which best covers
the sub-pixel area of the transform result:
- Changed rounding of the transformed coordinates from RINT()
to floor()/ceil() so we don't cut off sub-pixel portions of the
transform result.
- Force the minimal size if the changed rounding didn't help.
Fixes bug #138117.
Also added paranoia code which falls back to clip_result if the
passed matrix produces NaN coordinates (copied the FINITE() macro
from image_cmds.c).
2004-03-29 Michael Natterer <mitch@gimp.org>
* app/core/core-enums.h (enum GimpUndoType): added new group
GIMP_UNDO_GROUP_FS_REMOVE.
* app/core/gimplayer-floating-sel.c (floating_sel_remove): push an
undo group. Fixes undo corruption spotted by Pedro Gimeno.
2004-03-28 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-undo-push.c (undo_pop_layer): when re-adding
a layer with mask, don't forget to set layer->mask->removed to FALSE.
2004-03-28 Michael Natterer <mitch@gimp.org>
* app/core/gimpitem.[ch]: added "gboolean removed" to the GimpItem
struct. Defaults to FALSE. Set it to TRUE in gimp_item_removed().
Added public function gimp_item_is_removed().
* app/core/gimpimage-undo-push.c (undo_pop_layer)
(undo_pop_layer_mask) (undo_pop_channel) (undo_pop_vectors):
set it to FALSE manually when re-adding something from the
undo stack.
* tools/pdbgen/app.pl
* tools/pdbgen/pdb.pl: don't allow any operation on items which
are removed from the image (and exist on the undo stack only).
Fixes bug #138311.
* app/pdb/channel_cmds.c
* app/pdb/color_cmds.c
* app/pdb/drawable_cmds.c
* app/pdb/edit_cmds.c
* app/pdb/floating_sel_cmds.c
* app/pdb/image_cmds.c
* app/pdb/layer_cmds.c
* app/pdb/paint_tools_cmds.c
* app/pdb/parasite_cmds.c
* app/pdb/selection_cmds.c
* app/pdb/selection_tools_cmds.c
* app/pdb/transform_tools_cmds.c: regenerated.
2004-03-26 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable-transform.c
(gimp_drawable_transform_tiles_affine): return NULL tiles if the
matrix would transform the drawable into nothing. Fixes the
core-crashing part of bug #138117 and makes the script fail
with an execution error.
2004-03-23 Michael Natterer <mitch@gimp.org>
The floating_sel code is really from the stone age:
* app/core/gimplayer-floating-sel.c (floating_sel_attach): call
gimp_image_floating_sel() once and work on the return value
instead of accessing gimage->floating_sel directly twice and
calling gimp_image_floating_sel() for the thrid access.
* app/core/gimpimage.c (gimp_image_floating_sel): no need to
return NULL if gimage->floating_sel is NULL, just always return
gimage->floating_sel.
2004-03-22 Sven Neumann <sven@gimp.org>
* app/core/gimplayer-floating-sel.c (floating_sel_attach): don't
do a type-checking cast on an object that was released a few lines
above. Fixes bug #137957.
2004-03-21 Sven Neumann <sven@gimp.org>
* app/core/gimpundo.[ch]: added gimp_undo_type_to_name() a similar
function used to live in gimpimage-undo.[ch].
* app/core/gimpitemundo.c (gimp_item_undo_new): allow NULL as name
and generate it from the undo_type then.
* app/core/gimpimage-undo.[ch]: added gimp_image_undo_push_undu(),
new function that allows to push an undo on the image.
* app/text/Makefile.am
* app/text/text-types.h
* app/text/gimptextundo.[ch]: added GimpTextUndo, derived from
GimpItemUndo.
* app/core/gimpimage-undo-push.c (gimp_image_undo_push_text_layer):
use the new code and simply push a text undo here.
* app/tools/gimptexttool.c: compress text undos by peeking at the
undo stack. Fixes bug #137766.
2004-03-20 Sven Neumann <sven@gimp.org>
* app/tools/gimptexttool.c (gimp_text_tool_create_vectors): don't
take the image from tool->gdisp, this might be a NULL pointer.
* app/core/gimpimage-undo-push.c: removed debugging output.
2004-03-20 Sven Neumann <sven@gimp.org>
* app/widgets/gimppropwidgets.c (gimp_prop_size_entry_callback):
avoid to set the unit property with every size change; only set it
if it actually changed.
* app/core/gimpimage-undo-push.c (gimp_image_undo_push_text_layer):
allow to pass a GParamSpec that identifies a single text property
to be changed. In this case, don't store a GimpText object on the
undo stack but only the changed value.
* app/tools/gimptexttool.c: use the new undo feature to reduce the
memory footprint of text undo for the common case.
* app/text/gimptextlayer.c: changed accordingly.
2004-03-20 Simon Budig <simon@gimp.org>
* app/core/gimpimage-qmask.c: Applied slightly modified patch
from Sven. When the quickmask has a floating selection, anchor
it before loading the selection and deleting the qmask channel.
Fixes bug #137170.
2004-03-20 Simon Budig <simon@gimp.org>
* app/core/gimpundo.[ch]: Make it possible to refresh the preview
of an undo step.
* app/tools/gimpeditselectiontool.c
* app/widgets/gimpitemtreeview.c
* app/widgets/gimplayertreeview.c: refresh the preview when
compressing undos. This ensures that the last preview in the undo
history always reflects the current state of the image.
2004-03-20 Sven Neumann <sven@gimp.org>
* app/core/gimpimage-undo-push.c (undo_pop_text_layer): don't
exchange the text_layer's text object but sync it with the text
object from the undo step.
* app/text/gimptextlayer.c (gimp_text_layer_set): in case the
layer has a mask, push an undo group around the text modifications.
* app/tools/gimptexttool.c (gimp_text_tool_idle_apply): push a
text layer undo before applying the text changes.
2004-03-17 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable-transform.c
(gimp_drawable_transform_paste): push the undo group around all
operations, not just around some of them. Pulled common code
out of the if() { } else { } construct. Cleanup.
2004-03-17 Simon Budig <simon@gimp.org>
* app/gui/plug-in-menus.c: Sort the plugin menu entries with
the mnemonics stripped. Avoids weird ordering in the "C" and
"POSIX" locales.
* app/widgets/gimpitemtreeview.c: make a simple click on the
"New" Button use defaults and use shift-click for the new-dialog
invocation.
Some more useless button cleanup:
* app/widgets/gimpdatafactoryview.c: only create an Edit button
when the edit_function is set.
* app/core/gimp.c: don't set an edit func for the patterns.
* app/gui/patterns-menu.c: Don't create the "New", "Edit" and
"Duplicate" Menu entries for the patterns.
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimppatternfactoryview.[ch]: New widget:
gimp_pattern_factory_view. Necessary to be able to hide the
"duplicate" button...
* app/gui/dialogs-constructors.c: Use it.
2004-03-17 Sven Neumann <sven@gimp.org>
Changes for help i18n in the core, the rest will take place in the
help plug-in:
* app/text/gimptext.[ch]: removed gimp_text_get_default_language()
* app/core/gimp-utils.[ch]: ... and added it here as
gimp_get_default_language().
* app/config/gimprc-blurbs.h
* app/config/gimpdisplayconfig.[ch]: added property "help-locales".
* app/widgets/gimphelp.c: use the new property and pass it to the
help plug-in.
* app/core/gimpselection.c (gimp_selection_invalidate_boundary):
removed unused variable.
2004-03-16 Michael Natterer <mitch@gimp.org>
* app/core/gimplist.c (gimp_list_dispose): removed this function.
It was removing all items without freezing the container first,
which caused excessive signal handler activity in GimpContext.
Cleaned up the whole file a bit.
* app/core/gimpcontainer.c (gimp_container_dispose): call
gimp_container_clear() which does the right thing and e.g. speeds
up quitting significantly when gimp->documents is huge.
Reported by Jimmac.
2004-03-15 Michael Natterer <mitch@gimp.org>
* app/core/core-enums.[ch] (enum GimpUndoType): replaced
GIMP_UNDO_LAYER_MOD and GIMP_UNDO_CHANNEL_MOD by
GIMP_UNDO_DRAWABLE_MOD.
* app/core/gimpimage-undo-push.[ch]: ditto: replaced
gimp_image_undo_push_layer_mod() and
gimp_image_undo_push_channel_mod() by
gimp_image_undo_push_drawable_mod().
* app/core/gimpdrawable.[ch]: added undo_desc strings for "resize"
and "scale" to the GimpDrawableClass struct.
(gimp_drawable_scale)
(gimp_drawable_resize): pass push_undo = TRUE to
gimp_drawable_set_tiles_full() and use the undo_desc from the
class.
(gimp_drawable_real_set_tiles): push a GIMP_UNDO_DRAWABLE_MOD here...
* app/core/gimpchannel.c
* app/core/gimplayer.c: ...and don't push undos in
GimpItem::scale(), GimpItem::resize(), GimpDrawable::set_tiles().
* app/core/gimpchannel.c: Removed even more bounds_known = FALSE
assignments from functions which already call
gimp_drawable_set_tiles().
2004-03-15 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable.c (gimp_drawable_set_tiles_full): emit
"update" signals from the drawable before and after setting tiles
and offsets.
* app/core/gimpdrawable-offset.c (gimp_drawable_offset)
* app/core/gimpdrawable-transform.c (gimp_drawable_transform_paste)
* app/core/gimpimage-undo-push.c (undo_pop_layer_mod, _channel_mod)
* app/text/gimptextlayer.c (gimp_text_layer_render)
* app/tools/gimptransformtool.c (gimp_transform_tool_doit):
removed calls to gimp_drawable_update().
* app/core/gimpdrawable-offset.c (gimp_drawable_offset): don't
push an undo step before calling gimp_drawable_set_tiles()
but simply pass push_undo == TRUE and the undo_desc.
2004-03-15 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable.[ch]: added "offset_x" and "offset_y"
parameters to GimpDrawable::set_tiles().
(gimp_drawable_set_tiles): removed the "GimpImageType" parameter.
(gimp_drawable_set_tiles_full): new function adding type, offset_x
and offset_y parameters.
(gimp_drawable_real_set_tiles): set the drawable's offsets from
the offset parameters and its size from the passed TileManager's
size. Emit "size_changed" accordingly.
* app/core/gimpchannel.c
* app/core/gimpdrawable-offset.c
* app/core/gimpdrawable-transform.c
* app/core/gimpimage-convert.c
* app/core/gimpimage-undo-push.c
* app/core/gimplayer.c
* app/text/gimptextlayer.c
* app/tools/gimptransformtool.c: changed accordingly: removed
calls to gimp_viewable_size_changed() and all sorts of hackish
assignments of the drawable's width/height/offset_x/offset_y
properties.
2004-03-15 Michael Natterer <mitch@gimp.org>
* app/text/gimptextlayer.c (gimp_text_layer_render): don't call
gimp_image_flush().
* app/tools/gimpxttool.c (gimp_text_tool_apply): call it here
instead.
Now that we have a common place that exchanges drawable->tiles,
we can abstract away boundary invalidation for this operation:
* app/core/gimpdrawable.c (gimp_drawable_real_set_tiles):
call gimp_drawable_invalidate_boundary() before setting
the new tiles.
* app/core/gimpchannel.c (gimp_channel_set_tiles)
* app/core/gimpdrawable-transform.c (gimp_drawable_transform_paste)
* app/core/gimpimage-undo-push.c (undo_pop_layer_mod)
* app/core/gimplayer.c (gimp_layer_scale) (gimp_layer_resize)
(gimp_layer_flip) (gimp_layer_rotate) (gimp_layer_transform)
* app/text/gimptextlayer.c (gimp_text_layer_render): removed
calls to gimp_drawable_invalidate_boundary() from all functions
which finally call gimp_drawable_real_set_tiles().
* app/tools/gimptransformtool.c (gimp_transform_tool_doit): no
need to set channel->bounds_known to FALSE, because
gimp_drawable_set_tiles() already did this.
2004-03-15 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage.[ch]: added "gboolean alpha_changed" to
GimpImageFlushAccumulator. Install an "alpha_changed" handler
on gimage->layers and set flush_accum.alpha_changed = TRUE
whenever the image's *only* layer changed its alpha.
* app/core/gimpimage-undo-push.c (undo_pop_layer_mod)
* app/core/gimplayer.c (gimp_layer_add_alpha): removed
explicit calls to gimp_image_alpha_changed().
2004-03-15 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable.c (gimp_drawable_real_set_tiles): emit
"alpha_changed" if the drawable got/lost an alpha channel by
setting the new tiles.
* app/core/gimpimage-undo-push.c (undo_pop_layer_mod)
* app/core/gimplayer.c (gimp_layer_add_alpha): removed explicit
calls to gimp_drawable_alpha_changed().
2004-03-15 Michael Natterer <mitch@gimp.org>
Closer to text layer undo:
* app/core/gimpchannel.c (gimp_channel_set_tiles): invalidate the
channel's boundary and bounds.
* app/text/gimptextlayer.c: implement GimpDrawable::swap_pixels()
and set text_layer->modified = TRUE after upchaining.
(gimp_text_layer_render): use gimp_drawable_set_tiles() and
set text_layer->modified = FALSE afterwards.
* app/core/gimpimage-undo-push.c: cleaned up variable declarations
and initializations.
(undo_pop_layer_mod)
(undo_pop_channel_mod): use gimp_channel_set_tiles() instead of
touching drawable->tiles manually. Now all pixel manipulation
(at least on layers) should be virtualized and can be detected by
the text layer.
2004-03-15 Michael Natterer <mitch@gimp.org>
Prepare the undo system for proper text layer undo:
* app/core/core-enums.[ch] (enum GimpUndoType): replaced
GIMP_UNDO_IMAGE and GIMP_UNDO_IMAGE_MOD by GIMP_UNDO_DRAWABLE.
* app/core/gimpimage-undo-push.[ch]: ditto: replaced
gimp_image_undo_push_image() and gimp_image_undo_push_image_mod()
by gimp_image_undo_push_drawable() which *always* expects to get a
TileManager passed. Also added g_return_if_fail()s to check if the
passed in tile manager follows the semantics of the "sparse"
boolean.
(undo_pop_drawable): removed all code and call the new
gimp_drawable_swap_pixels() instead (see below).
* app/core/gimpdrawable.[ch] (gimp_drawable_push_undo): if tiles
are NULL, create a copy of the area here and always pass tiles to
gimp_image_undo_push_drawable(). Added lots of g_return_if_fail()
here too.
Added new vitrual function GimpDrawable::swap_pixels() which
does what undo_pop_drawable() did.
* app/core/gimpchannel.c: implement swap_pixels() and invalidate
the channel's bounds and boundary.
2004-03-15 Simon Budig <simon@gimp.org>
* app/core/gimpimage.[ch]
* app/core/gimpimage-undo.c: renamed gimage->freeze_count
to gimage->undo_freeze_count (more explicit).
* app/file/file-open.c: Ensure that the undo system is enabled
after loading an image (to protect against broken loaders).
2004-03-14 Simon Budig <simon@gimp.org>
* app/core/gimpimage.[ch]
* app/core/gimpimage-undo.c: introduced a freeze counter, so
that undo_freeze(); undo_freeze(); undo_thaw(); no longer
results in an thawed undo stack.
Fixes Bug #124176.
This might reveal other places in the code where
gimp_image_undo_freeze/thaw or gimp_image_undo_disable/enable
were used in an inconsistent (not-paired) manner.
* app/file/file-open.c: e.g. here, where _enable was called on
the new image. The intention was to free a potential undo stack,
so now call gimp_image_undo_free() instead.
2004-03-14 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable-offset.c (gimp_drawable_offset)
* app/core/gimpdrawable.c (gimp_drawable_scale) (gimp_drawable_resize)
* app/core/gimplayer.c (gimp_layer_convert) (gimp_layer_add_alpha):
use gimp_drawable_set_tiles() instead of fiddling with
drawable->tiles, ->bytes etc. manually.
2004-03-13 Sven Neumann <sven@gimp.org>
* app/core/gimpdrawable-blend.c (gradient_calc_shapeburst_*):
applied a patch from Pedro Gimeno that fixes the crash reported in
bug #136219.
2004-03-13 Michael Natterer <mitch@gimp.org>
Completed the fix for bug #136702:
* app/core/gimpitem.[ch]: added "gboolean supersample" and
"gint recursion_level" to GimpItem::transform().
* app/core/gimpitem-linked.[ch] (gimp_item_linked_transform): ditto.
* app/core/gimpdrawable-transform.[ch]: added "recursion_level"
parameters and removed the RECURSION_LEVEL #define.
* app/core/gimpchannel.c
* app/core/gimpdrawable.c
* app/core/gimplayer.c
* app/vectors/gimpvectors.c: changed accordingly.
* app/tools/gimptransformoptions.[ch]: added new property
"recursion_level" which is not serializable and has no GUI. Pretty
useless, but it's IMHO better to hardcode the default value here
than in gimpdrawable-transform.c
* app/tools/gimptransformtool.c: changed accordingly.
* tools/pdbgen/pdb/transform_tools.pdb: hardcode "recursion_level"
to 3.
* app/pdb/transform_tools_cmds.c: regenerated.
2004-03-13 Sven Neumann <sven@gimp.org>
* app/core/gimpdrawable.[ch]: added new virtual function
GimpDrawable::set_tiles().
* app/core/gimpchannel.c
* app/core/gimplayer.c: push an undo before chaining up in
set_tiles().
* app/core/gimpdrawable-transform.c
* app/core/gimpimage-convert.c
* app/tools/gimptransformtool.c: use gimp_drawable_set_tiles()
instead of fiddling with the drawable's tile manager directly.
2004-03-13 Raphael Quinet <quinet@gamers.org>
* app/tools/gimptransformoptions.[ch]: added new "supersample"
property to GimpTransformOptions and added corresponding check
button in the option dialog for the transform tools.
* app/core/gimpdrawable-transform.[ch],
* app/core/gimpdrawable.c,
* app/tools/gimptransformtool.c: new "gboolean supersample"
parameter added to gimp_drawable_transform_tiles_affine() and
gimp_drawable_transform_affine().
* tools/pdbgen/pdb/transform_tools.pdb: ditto. For the PDB calls,
the supersample parameter is set to FALSE for "rotate" and "shear"
and set to TRUE for "perspective", "scale" and "transform_2d".
* app/pdb/transform_tools_cmds.c: regenerated.
The new "supersample" option lets the user decide if the
transformations should use supersampling (RECURSION_LEVEL 3) or
not. This fixes both bug #136702 and bug #109817. Hopefully for
good, this time.
2004-03-12 Raphael Quinet <quinet@gamers.org>
* app/core/gimpdrawable-transform.c (RECURSION_LEVEL): Set to 0 in
order to avoid nasty blurring effects. Fixes bug #136702, but
re-opens bug #109817. This is the best compromise for 2.0.
Later, we will have to make the supersampling optional as
suggested in the original patch to bug #109817.
2004-03-11 Sven Neumann <sven@gimp.org>
* app/config/gimpconfig-utils.c: made gimp_config_sync() and
gimp_config_connect() also work on objects of different types.
Properties with the same name and the same type are synced /
connected.
* app/core/gimpcontext.[ch]: added convenience functions to get/set
the font by name.
* app/tools/gimptextoptions.[ch]: don't hold a GimpText object
that duplicates properties like font and color which are in
GimpContext already. Instead added all text properties that are
controlled from the text tool options. Handling of the foreground
color is somewhat broken and needs a GimpContext wizard (Mitch!).
* app/text/gimptext.c: blurbs are not any longer needed now that
the property widgets are created from the GimpTextOptions.
* app/tools/gimptexttool.c: changed accordingly.
* app/widgets/gimptexteditor.[ch]: use an internal GtkTextBuffer
and emit "text-changed" when it changes.
2004-03-07 Michael Natterer <mitch@gimp.org>
* app/core/gimp-edit.c (gimp_edit_extract): fixed bug added when
factoring out gimp_edit_extract(): check if tile_manager_crop()
cropped away the whole TileManager before making a GimpBuffer from
it.
2004-03-07 Sven Neumann <sven@gimp.org>
Made size of undo previews configurable. Not dynamic for now, but
at least not hardcoded any longer. Fixes bug #119905:
* app/config/gimpcoreconfig.[ch]
* app/config/gimprc-blurbs.h: added "undo-preview-size" property.
* app/core/gimpundo.[ch]: use the new property instead of a
hardcoded value.
* app/widgets/gimpundoeditor.[ch]: added a "preview-size"
construct property.
* app/gui/dialogs-constructors.c: changed accordingly.
* app/gui/preferences-dialog.c: added a widget to control the undo
preview size.
2004-03-03 Sven Neumann <sven@gimp.org>
* app/core/gimpimagefile.c (gimp_imagefile_get_new_preview):
let GdkPixbuf scale the thumbnail. It does a nicer job than
temp_buf_scale().
2004-03-03 Michael Natterer <mitch@gimp.org>
* libgimpthumb/gimpthumb-utils.[ch] (gimp_thumb_file_test):
return the "errno" of a failed stat() call.
* libgimpthumb/gimpthumbnail.[ch]: added member
"image_not_found_errno" which contains the errno as returned by
gimp_thumb_file_test() if thumbnail->image_state is
GIMP_THUMB_STATE_NOT_FOUND.
* app/core/gimpimagefile.c (gimp_imagefile_get_desc_string): display
the real error as specified by thumbnail->image_not_found_errno
instead of just "Could not open".
2004-02-28 Michael Natterer <mitch@gimp.org>
* app/core/gimplayer.c (gimp_layer_apply_mask): when deleting the
mask, use "Delete Layer Mask" instead of "Apply Layer Mask" as
undo description.
2004-02-27 Sven Neumann <sven@gimp.org>
* app/core/gimpimagefile.c (gimp_imagefile_save_thumb): peek the
image to make sure that mtime and filesize are written correctly.
2004-02-25 Michael Natterer <mitch@gimp.org>
Changed libgimpthumb API in a way that will make GtkFileChooser
integration possible without doing major hacks:
* libgimpthumb/gimpthumb-enums.h: added GimpThumbFileType enum
and extended GimpThumbState enum.
* libgimpthumb/gimpthumb-utils.[ch]: return GimpThumbFileType
instead of gboolean from gimp_thumb_file_test().
* libgimpthumb/gimpthumbnail.c
* app/core/gimpimagefile.c: changed accordingly (the icons
used for REMOTE, FOLDER and SPECIAL need to be changed).
2004-02-23 Michael Natterer <mitch@gimp.org>
* app/core/core-types.h: added #defines for GimpCoords' default
pressure, tilt and wheel values.
* app/display/gimpdisplayshell-callbacks.c
* app/paint/gimppaintcore-stroke.c
* app/text/gimptext-vectors.c
* tools/pdbgen/pdb/paint_tools.pdb: use them. Fixes lots more
buggy default values for tilt (in fact all of them were wrong).
* app/pdb/paint_tools_cmds.c: regenerated.
2004-02-23 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-snap.[ch]: return the snapped coordinates as
gdouble, not gint because we must not round the unsnapped axis
if only one axis snapped.
* app/display/gimpdisplayshell.[ch] (gimp_display_shell_snap_coords):
changed accordingly. Added boolean return value indicating "snapped".
* app/display/gimpdisplayshell-cursor.[ch]
(gimp_display_shell_update_cursor): take both display_x and _x and
(possibly snapped) image_x and _y. Use the snapped values for the
statusbar and the unsnapped ones for updating the info_window.
* app/display/gimpdisplayshell-callbacks.c
(gimp_display_shell_canvas_tool_events): applied modified patch
from Simon Budig which moves guide/grid snapping out of the
button_press/motion/button_release handlers and *always* snaps
the image_coords if the active_tool wants them to be snapped.
Makes sure that e.g. the brush preview is drawn at the right
place and fixes bug #134284.
Also pass both display_coords and image_coords to
gimp_display_shell_update_cursor().
2004-02-19 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-qmask.c (gimp_image_get_qmask): new function
which returns the image's QMask.
* app/core/gimpimage.c (gimp_image_channel_name_changed)
* app/gui/qmask-commands.c (qmask_query_response): use it.
2004-02-19 Michael Natterer <mitch@gimp.org>
* app/core/gimp.[ch]: added new signal "buffer_changed" and new
function gimp_set_global_buffer() which emits it when the global
buffer changes.
* app/core/gimp-edit.c (gimp_edit_extract): use it instead
of fiddling with gimp->global_buffer manually.
* app/gui/image-menu.c: connect to "buffer_changed" and set the
"Paste" menu entries sensitive. Fixes bug #134752.
(image_menu_update): changed accordingly. Also changed a lot of
buggy SET_SENSITIVE() lines which made menu items which work fine
on any drawable insensitive when there were no layers (instead
of no drawable).
* app/gui/edit-commands.c: added new macro return_if_new_drawable()
and use it instead of return_if_no_image() so we don't run
into assertions if there is no active drawable.
(cut,copy_named_buffer_callback): unfortunately had to introduce
two new translated messages about not being able to cut/copy when
there is no active drawable.
2004-02-18 Sven Neumann <sven@gimp.org>
* tile-cache.c
* tile-private.h
* tile.[ch]: removed trailing whitespace, added some newlines,
let tile_is_valid() return a gboolean instead of a gint.
* app/core/gimpimage-projection.c
* app/core/gimpimage-undo-push.c
* app/paint/gimppaintcore.c
* app/tools/gimpinktool.c: use the return value from tile_is_valid()
as a boolean.
2004-02-18 Michael Natterer <mitch@gimp.org>
Some code review:
* app/config/gimpconfig-deserialize.c
* app/config/gimpconfig-serialize.c: removed obsolete code which
made sure serialize_property()/deserialize_property() are only
called for properties of the correct class. We do it the right way
for quite a while now and clear the inherited function pointers in
gimp_config_iface_base_init().
* app/config/gimprc.c (gimp_rc_dispose): don't forget to chain up.
* app/base/gimplut.c
* app/base/lut-funcs.c
* app/config/gimpconfig-deserialize.c
* app/config/gimpconfig-serialize.c
* app/config/gimpconfig-types.c
* app/config/gimprc.c
* app/core/gimp-modules.c
* app/core/gimpbrush.c
* app/core/gimpcontainer.c
* app/core/gimpdocumentlist.c
* app/core/gimpitem.c
* app/gui/about-dialog.c
* app/gui/color-notebook.c
* app/gui/gui.c
* app/gui/tips-dialog.c
* app/paint/gimppaintcore.c
* app/paint-funcs/paint-funcs.c
* app/widgets/gimpcolorpanel.c
* app/widgets/gimpcontainergridview.c
* app/widgets/gimpcontainermenuimpl.c
* app/widgets/gimpselectioneditor.c: removed I/O includes from
files which don't use lowlevel APIs any more. Also removes
a whole bunch of G_OS_WIN32 special casing. Removed trailing
whitespace. Misc tiny cleanups.
2004-02-17 Michael Natterer <mitch@gimp.org>
* app/core/gimpviewable.c (gimp_viewable_calc_preview_size): argh,
take the resolution into account if "dot_for_dot" is FALSE, not
TRUE.
2004-02-17 Sven Neumann <sven@gimp.org>
* app/core/gimpimage-scale.c (gimp_image_scale_check): exclude the
size of the undo stacks so that the memory size is comparable with
the value displayed in the "New Image" dialog. Fixes bug #134512.
2004-02-17 Sven Neumann <sven@gimp.org>
* libgimpbase/gimpprotocol.[ch]: changed wm_name to app_name in
the GimpConfig struct; increased GIMP_PROTOCOL_VERSION.
* app/plug-in/plug-in-run.c (plug_in_run): pass the return value
of g_get_application_name() to the plug-ins.
* libgimp/gimp.[ch]: removed function gimp_wm_name(). Set the
plug-in's application name if an app_name is passed in the config
message.
* libgimp/gimpui.c: removed usage of gimp_wm_name(); it was wrong
to do it this way and caused all plug-ins claim to be the gimp-1.3
executable in their error messages.
* libgimp/gimp.def: removed symbol gimp_wm_name.
* configure.in: reset gimp_binary_age and gimp_interface_age.
* app/core/gimpimage.c (gimp_image_name_changed): removed unused
variable.
2004-02-17 Michael Natterer <mitch@gimp.org>
Make sure each GimpItem emits "removed" when it is removed from
the image so dialogs have a chance to close themselves:
* app/core/gimplayer.c (gimp_layer_apply_mask): emit "removed"
from the mask.
(gimp_layer_removed): new function which emits "removed" from
the layer's mask when the layer gets removed from the image.
* app/core/gimpimage.c (gimp_image_dispose): emit "removed"
from all layers, channels and vectors.
* app/gui/layers-commands.c (layers_scale_layer_query)
(layers_resize_layer_query): removed recently added connections to
"removed" because GimpViewableDialog does this automatically.
2004-02-15 Michael Natterer <mitch@gimp.org>
* app/core/gimpdata.c (gimp_data_init): using
FOO_GET_CLASS(instance) in a GInstanceInitFunc doesn't work
because during instance init, the object's class is always set to
be the class of the currently called init function. Use the second
parameter of GInstanceInitFunc instead, which is the instance's
real class. Fixes bug #134274.
2004-02-14 Michael Natterer <mitch@gimp.org>
Fixed lots of QuickMask brokenness by letting the image adjust
its qmask_state automatically:
* app/core/gimpimage-qmask.h: #define GIMP_IMAGE_QMASK_NAME "Qmask".
Use the define in all files below.
* app/core/gimpimage.[ch]: split gimp_image_drawable_add,_remove()
into separate handlers for layers and channels. Added a
"name_changed" handler for all channels. In the channel "add",
"remove" and "name_changed" handlers, check if it was a channel
named "Qmask" that was added, removed or renamed and call
gimp_image_set_qmask_state() accordingly.
* app/core/core-enums.[ch]
* app/core/gimpimage-undo-push.[ch]
* app/core/gimpundo.c: removed all Qmask undo code because the image
does the right thing without undo interaction now.
* app/core/gimpimage-qmask.c (gimp_image_set_qmask_state): set
gimage->qmask_state early so we can return early when called
recursively. Removed calls to gimp_image_undo_push_image_qmask().
Returned "removed" callback (it was utterly broken the way it was
implemented).
* app/display/gimpdisplayshell-callbacks.c
(gimp_display_shell_qmask_toggled): check if the image's
qmask state needs to be changed before changing it.
* app/xcf/xcf-load.c (xcf_load_channel): removed code which
recognized the qmask. GimpImage does this automatically now.
* app/gui/qmask-commands.c: cleanup.
* app/widgets/gimpimagedock.c (gimp_image_dock_constructor):
destroy the "/Select/By Color" and "/Select/Toggle QuickMask" menu
items.
* app/widgets/image-menu.c (image_menu_update): changed accordingly.
2004-02-13 Manish Singh <yosh@gimp.org>
* app/base/temp-buf.c (temp_buf_get_memsize)
* core/gimpviewable.c (gimp_viewable_get_memsize): Add some casts
to gsize for ints to prevent overflows.
* app/base/tile-manager.c (tile_manager_get_memsize): Same as above,
except cast to gint64.
2004-02-13 Simon Budig <simon@gimp.org>
* app/core/gimpimage-guides.[ch]: make a similar fix as in my
last commit for snapping the guides.
* app/tools/gimpmovetool.c: use the fixed version.
2004-02-13 Simon Budig <simon@gimp.org>
* app/core/gimpimage-snap.[ch]: make the snapping width a
parameter of the snapping functions.
* app/display/gimpdisplayshell.c: make sure that the snapping
width always is 5 pixels in the view coordinates.
Fixes bug #134285
2004-02-13 Michael Natterer <mitch@gimp.org>
Fixed GimpData's default "writable" and "deletable" behaviour:
* app/core/gimpdata.c (gimp_data_init): default to writable and
deletable == TRUE (something that has no filename was never loaded
from disk and can't be undeletable or read-only).
Fixes bug #134274.
* app/core/gimpdata.[ch]: added new function
gimp_data_make_internal() which frees the filename and sets the
data's flags accordingly.
* app/core/gimp-gradients.c (gimp_gradients_add_gradient)
* app/core/gimpbrush.c (gimp_brush_get_standard)
* app/core/gimpgradient.c (gimp_gradient_get_standard)
* app/core/gimppalette.c (gimp_palette_get_standard)
* app/core/gimppattern.c (gimp_pattern_get_standard): use the
new function for internal data objects.
* app/core/gimpdata.c (gimp_data_save, gimp_data_delete_from_disk)
* app/core/gimpdatafactory.c (gimp_data_factory_save_single):
bail out with g_return_if_fail() is the data is not writable
or deletable.
* app/widgets/gimpdataeditor.c
* app/widgets/gimpdatafactoryview.c: changed accordingly.
2004-02-12 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-convert.c (gimp_image_convert): call
gimp_image_colormap_changed() after installing the colormap.
* app/tools/gimphistogramoptions.h: fixed typedef of
GimpHistogramOptionsClass.
2004-02-12 Michael Natterer <mitch@gimp.org>
Make sure that non-indexed images never have a colormap.
Fixes bug #121033.
* app/core/gimpimage-colormap.c (gimp_image_set_colormap): set
image->cmap to NULL when called with a NULL colormap.
* app/core/gimpimage-undo-push.c: made colormap undo/redo aware
of NULL colormaps.
* app/core/gimpimage-convert.c (gimp_image_convert): remove the
colormap using gimp_image_set_colormap() instead of freeing it
manually.
* app/widgets/gimpcolormapeditor.c: always check if the image
is INDEXED *and* has a colormap before accessing the colormap.
(need this new check because the fixed behaviour of colormap undo
produces undo groups which, when being popped, make the image have
no colormap while still being INDEXED in the small time frame
between the emission of "colormap_changed" and "mode_changed").
2004-02-10 Sven Neumann <sven@gimp.org>
* themes/Default/images/Makefile.am (CORE_IMAGES): use the
question stock icon instead of the warning one.
* app/core/gimpviewable.c (gimp_viewable_get_dummy_preview):
return a question icon as dummy preview.
2004-02-10 Michael Natterer <mitch@gimp.org>
* app/core/gimpviewable.[ch]: added new function
gimp_viewable_get_dummy_preview() which currently returns a
completely white and opaque TempBuf of the requested size. Added
this useless function because this is the place where to implement
a nicer preview if someone volunteers.
* tools/pdbgen/pdb/drawable.pdb
* tools/pdbgen/pdb/image.pdb: use the new function if
gimp->config->layer_previews is FALSE instead of returning no
preview at all. Fixes bug #112012.
Cleaned up the preview functions a bit and raised
the limit for drawable previews from 128x128 to 256x256.
* app/pdb/drawable_cmds.c
* app/pdb/image_cmds.c
* libgimp/gimpdrawable_pdb.c: regenerated.
2004-02-07 Hans Breuer <hans@breuer.org>
* gimpdefs.msc : new file to keep common definitions for the msc build
* **/makefile.msc : use common defintions, e.g. GIMP_VER
* Makefile.am : add the former to EXTRA_DIST
2004-02-07 Pedro Gimeno <pggimeno@wanadoo.es>
* app/core/gimpimage-convert.c (median_cut_pass2_no_dither_rgb):
Corrected position for alpha_pix in the case of grayscale images
with custom or mono palette and no dither. Fixes bug #133642.
(median_cut_pass2_fixed_dither_rgb): Ditto for fixed dither
(Positioned Color Dither).
2004-02-05 Michael Natterer <mitch@gimp.org>
Disallow editing of data objects which have no save functionality.
Also fixed the misassumption that "deletable" is always equal to
"writable". Fixes bug #133456.
* app/core/gimpdata.[ch]: added a "deletable" property which is
always equal to "writable" except when the data class does not
implement GimpData::save() (then deletable may be TRUE but
writable is always FALSE).
* app/gui/brushes-menu.c
* app/gui/gradients-menu.c
* app/gui/palettes-menu.c
* app/gui/patterns-menu.c
* app/widgets/gimpdatafactoryview.c: look at data->deletable when
setting the sensitivity of the "Delete" buttons and menu items.
* app/widgets/gimpdatafactoryview.c
(gimp_data_factory_view_tree_name_edited): rename the data
only if it's writable and restore the old name otherwise.
* app/widgets/gimpdataeditor.c: no need to look at data->internal
for figuring if the data is editable, data->editable is enough.
All files above: s/writeable/writable/g
* app/widgets/gimpbrusheditor.c (gimp_brush_editor_set_data):
simplified.
2004-02-05 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-crop.c: removed trailing whitespace.
* app/gui/debug-commands.[ch]
* app/gui/toolbox-menu.c: renamed ENABLE_DEBUG_ENTRIES to
ENABLE_DEBUG_MENU and #define it to be equal to GIMP_UNSTABLE.
2004-02-01 Michael Natterer <mitch@gimp.org>
Disallow to rename the layer mask. Instead, always name the mask
"<layer name> mask". Fixes bug #133112 along with some other
unreported ones.
* app/core/gimpitem.[ch]: added a boolean return value indicating
success to GimpItem::rename().
(gimp_item_real_rename): push an undo step only if the item is
attached.
* app/core/gimplayer.c (gimp_layer_rename): refuse renaming if
the layer is a floating selection floated from a channel
(renaming a layer's floating selection makes a new layer out
of the floating selection).
(gimp_layer_duplicate): use gimp_layer_add_mask() to attach the
mask's duplicate. Fixes mask refcount brokenness for duplicated
layer masks.
(gimp_layer_name_changed): new function. Automatically renames the
layer mask when the layer's name changes.
* app/core/gimplayermask.c (gimp_layer_mask_rename): new function
which refuses renaming.
(gimp_layer_mask_name_changed): skip the unique name voodoo
GimpItem does by not chaining up.
(gimp_layer_mask_set_layer): change the mask's name whenever it is
attached to a layer.
* app/text/gimptextlayer.c (gimp_text_layer_rename): fiddle with
text_layer->auto_rename only if renaming was successful.
* app/widgets/gimpitemtreeview.c (gimp_item_tree_view_name_edited):
restore the old name if renaming failed.
* tools/pdbgen/pdb/drawable.pdb (set_name): return an execution
error if renaming failed.
* app/pdb/drawable_cmds.c: regenerated.
2004-01-31 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-convert.[ch]: use gboolean instead of gint
for "alpha_dither" and "remove_dups" in all public and private
functions. Properly prototyped private functions. Minor cleanup.
* app/gui/convert-dialog.c: pass FALSE instead of 0.
* tools/pdbgen/pdb/convert.pdb: ditto. Also cleaned up a bit: use
generated checks and documentation for enums, removed duplicate
check for enum range (spotted by Kevin Cozens).
* app/pdb/convert_cmds.c
* libgimp/gimpconvert_pdb.c: regenerated.
2004-01-29 Simon Budig <simon@gimp.org>
* app/display/gimpdisplayshell.[ch]: Store the zoom factor as
float, not as a ratio.
* app/display/gimpdisplayshell-scale.[ch]: change the API to
expose the Float instead a weirdly encoded integer. Implement
functions to get a ratio from the scale factor. Implement a set
as presets as discussed on the mailinglist. Changed Zoom->Other
dialog to enable entering a float.
* app/display/gimpdisplayshell-title.c
* app/display/gimpnavigationview.c
* app/gui/image-menu.c
* app/gui/info-window.c
* app/tools/gimpmagnifytool.c: changed accordingly.
* app/core/gimp.[ch]
* app/display/gimpdisplay.[ch]
* app/gui/gui-vtable.c
* app/widgets/widgets-enums.h: Made the various display-creating
functions accept a float for the scale. Introduce a new
GimpZoomType: GIMP_ZOOM_TO. Generally adjust the API to use
floats instead of weird integers.
* app/core/gimp-edit.c
* app/core/gimptemplate.c
* app/display/gimpdisplayshell-callbacks.c
* app/file/file-open.c
* app/gui/image-commands.c
* app/gui/view-commands.[ch]
* tools/pdbgen/pdb/display.pdb
* app/widgets/gimpimageview.c
* app/widgets/gimptoolbox-dnd.c: changed accordingly
* app/pdb/display_cmds.c: regenerated
2004-01-29 Michael Natterer <mitch@gimp.org>
* app/core/gimpcontext.[ch]: removed the last artefact of context
signal handling from 1.2:
GimpContext used to connect to e.g. the current brush's
"invalidate_preview" and "name_changed" signals and emitted
"brush_changed" when the callback was invoked. This was needed to
make 1.2 work, but is conceptually broken with the real model <->
view approach implemented in the current code.
This change also optimizes things quite a bit because lots of
signal emissions are saved.
Added utility function which finds a container's current object
after a freeze/thaw.
* app/widgets/gimpcontainerview.[ch]: added new virtual function
GimpContainerView::rename_item(). Connect to "name_changed" of the
corrent container's children and invoke rename_item() accordingly.
* app/widgets/gimpcontainertreeview.[ch]: removed name_changed
handler and implement GimpContainerView::rename_item().
* app/widgets/gimpcontainergridview.c: ditto. the grid view was
still relying on the removed GimpContext behaviour for updating
the label showing the sleected item's name.
2004-01-29 Michael Natterer <mitch@gimp.org>
GimpData code review:
* app/core/gimpdata.c (gimp_data_init): default to
writable = FALSE and dirty = TRUE.
* app/core/gimpbrushgenerated.[ch]: added "const gchar *name" to
gimp_brush_generated_new().
* app/core/gimpbrush.c
* app/core/gimpbrushgenerated.c
* app/core/gimpbrushpipe.c
* app/core/gimpgradient.c
* app/core/gimppalette.c
* app/core/gimppattern.c: set all standard datas to clean and
internal, check for g_path_is_absolute() in all load functions,
pass the data's name as construct property to g_object_new()
instead of calling gimp_object_set_name() after creation, fixed
some UTF-8 handling, spacing, indentation, coding style, general
cleanup.
2004-01-28 Michael Natterer <mitch@gimp.org>
Added infrastructure to make sure we don't write to the global
brush, pattern etc. directories. Needed to make this configurable
because we can't rely on the global directories being read-only,
having certain names or being otherwise detectable at runtime in a
sane way. Fixes bug #132214.
* libgimpbase/gimpdatafiles.[ch]: added "const gchar *dirname" to
the GimpDataFileData struct so callbacks don't need to call
g_path_get_dirname() for each file.
* libgimpwidgets/gimpfileentry.c: made it work with non UTF-8
encoded filenames.
* libgimpwidgets/gimppatheditor.[ch]: ditto. Added GUI and API for
setting/getting a second "writable_path". The widget makes sure
that the writable_path is always a subset of the path.
* app/config/gimpconfig-utils.[ch]: added new function
gimp_config_build_writable_path().
* app/config/gimpcoreconfig.[ch]: added separate properties for
the writable brush, pattern, gradient, palette and font paths.
* app/config/gimprc-blurbs.h: added (still empty) blurbs for the
new properties.
* app/core/gimpdata.[ch] (gimp_data_set_filename): added parameter
"gboolean writable". Set data->writable to FALSE by default. If
"writable" is passed as TRUE, still check if we can write to the
file before setting data->writable to TRUE.
(gimp_data_create_filename): changed "data_path" parameter to
"dest_dir" and assume dest_dir is writable.
(gimp_data_duplicate): set data->dirty to TRUE to make sure
duplicated things will be saved.
* app/core/gimpbrush.c
* app/core/gimpbrushgenerated.c
* app/core/gimpbrushpipe.c
* app/core/gimpgradient.c
* app/core/gimppalette.c
* app/core/gimppattern.c: don't set the data's filename and don't
touch data->dirty in the _load() functions because that's done by
the data factory now. Don't touch data->dirty in the _duplicate()
functions because that's done by gimp_data_duplicate() itself now.
* app/core/gimpdatafactory.[ch] (gimp_data_factory_new): added
"writable_property_name" and remember it.
Added utility function gimp_data_factory_get_save_dir() which
determines the directory to save new datas to.
Added public function gimp_data_factory_data_save_single() which
saves a single data object.
Make sure new things get saved to the first writable directory
as specified in preferences.
* app/core/gimp.c (gimp_real_initialize): pass the writable_paths'
property names to gimp_data_factory_new().
* app/widgets/gimpdataeditor.c (gimp_data_editor_save_dirty): use
gimp_data_factory_data_save_single() instead of implementing
saving here.
* app/widgets/gimppropwidgets.[ch] (gimp_prop_path_editor_new):
added "const gchar *writable_property_name" parameter (can be
NULL).
Added the needed callbacks to handle the writable_path and made
the path_editor and file_entry code aware of non UTF-8 filename
encodings. Some general cleanup.
* app/gui/preferences-dialog.c: changed accordingly.
2004-01-28 Simon Budig <simon@gimp.org>
Argh, this is getting silly.
* app/core/gimpscanconvert.c: Fix dumb bug I introduced
while fixing bug #132036. Instead of always closing a
polyline to the first point of the vpath close to the
first point of the current polyline
I'll close#132036 for the third time now, feel free to
reopen it when bugs appear...
2004-01-27 Michael Natterer <mitch@gimp.org>
* themes/Default/images/Makefile.am
* themes/Default/images/stock-layer-mask-16.png
* themes/Default/images/stock-layer-mask-24.png
* themes/Default/images/stock-layer-mask-32.png
* themes/Default/images/stock-layer-mask-48.png
* themes/Default/images/stock-selection-border-16.png
* libgimpwidgets/gimpstock.[ch]: added forgotten layer mask and
new "border selection" icons from Jimmac (-32 and -48 ones to be
updated, they are currently copies of the channel icons).
* app/core/gimplayermask.c (gimp_layer_mask_class_init)
* app/gui/image-menu.c (image_menu_entries): use them.
2004-01-26 Simon Budig <simon@gimp.org>
* app/core/gimpscanconvert.c: use the modern libart way
to uncross/rewind a libart SVP. This time really fixes
bug #132036 (please test it though...).
2004-01-26 Michael Natterer <mitch@gimp.org>
* plug-ins/script-fu/scripts/unsharp-mask.scm: add the layer to
the image before pasting to it. Fixes bug #132504.
Fixed the underlying problem: make it impossible to attach
floating selections to drawables which are not currently part of
the image's layer or channel stacks.
Also cleaned up image <-> floating_sel interaction:
* app/core/gimplayer-floating-sel.[ch] (floating_sel_attach):
added assertion that the drawable is part of the image (see below).
Don't call gimp_image_floating_selection_changed(), it's emitted
by gimp_image_add_layer() now.
(floating_sel_remove)
(floating_sel_anchor): don't emit "floating_selection_changed",
it's emitted by gimp_image_remove_layer() now.
(floating_sel_anchor): removed the fix for bug #132162 because
gimp_image_remove_layer() behaves correctly now (see below).
Renamed floating_sel_reset() to floating_sel_activate_drawable().
Added g_return_if_fail() all over the place.
* app/core/gimpimage.[ch]: added new function gimp_image_owns_item()
which return TRUE if the passed item is part of the image.
(gimp_image_add_layer): emit "floating_selection_changed" here if
needed.
(gimp_image_remove_layer): emit "floating_selection_changed" if
needed, don't try to activate a layer if we called
floating_sel_activate_drawable().
This is the real fix for bug #132162.
* app/core/gimpimage-undo-push.c (undo_pop_layer): apply the same
fixes as to gimp_image_add,remove_layer(). Don't call
gimp_drawable_invalidate_preview() on the previously active layer
because that's done by gimp_image_set_active_layer() now.
* app/xcf/xcf-load.c: remember the "floating_sel_drawable" in the
XcfInfo struct and attach it *after* all layers and channels are
loaded to avoid attaching the floating selection to an
out-of-image drawable.
* app/core/gimp-edit.c (gimp_edit_paste)
* app/core/gimpdrawable-transform.c (gimp_drawable_transform_affine,
gimp_drawable_transform_flip, gimp_drawable_transform_rotate)
* app/core/gimpselection.c (gimp_selection_float)
* app/text/gimptext-compat.c (text_render): added checks for
gimp_image_owns_item() in all functions which can produce
floating selections.
* tools/pdbgen/pdb/edit.pdb
* tools/pdbgen/pdb/floating_sel.pdb
* tools/pdbgen/pdb/selection.pdb
* tools/pdbgen/pdb/text_tool.pdb
* tools/pdbgen/pdb/transform_tools.pdb: added checks for
gimp_item_owns_image() and return an execution error if invoked
with a drawable which is not part of the image.
* app/pdb/edit_cmds.c
* app/pdb/floating_sel_cmds.c
* app/pdb/selection_cmds.c
* app/pdb/text_tool_cmds.c
* app/pdb/transform_tools_cmds.c: regenerated.
2004-01-26 Manish Singh <yosh@gimp.org>
* app/core/gimpdrawable-blend.c (gradient_fill_region): use memcpy
instead of casted assignment for storing HSV values in rbd.fg/bg,
for C99 aliasing compliance.
* app/xcf/xcf-load.c (xcf_load_layer_mask): use a GimpChannel *
explictly for xcf_load_channel_props, for the above reason.
* app/xcf/xcf-save.c (xcf_save_prop): use a temporary guint32 for
saving property types, for the above reason.
* app/core/gimpparasitelist.c (gimp_parasite_list_deserialize): plug
a memory leak, since data is copied on parasite creation.
2004-01-23 Michael Natterer <mitch@gimp.org>
* app/app_procs.c
* app/errors.c
* app/main.c
* app/config/gimpconfigwriter.c
* app/core/gimpdata.c
* app/core/gimpdatafactory.c
* app/gui/user-install-dialog.c
* app/plug-in/plug-ins.c
* app/vectors/gimpvectors-import.c: some more gimp_filename_to_utf8().
* libgimp/gimp.c
* libgimpmodule/gimpmodule.c
* libgimpmodule/gimpmoduledb.c: use it here, too, now that is in
libgimpbase.
2004-01-22 Michael Natterer <mitch@gimp.org>
* app/core/gimplayer-floating-sel.c (floating_sel_anchor):
explicitly activate the drawable the floating selection was
attached to (function was relying on implicit voodoo that
happened 1.2). Fixes bug #132162.
2004-01-22 Michael Natterer <mitch@gimp.org>
* app/core/gimpitem.[ch]: added "gboolean use_default_values"
to GimpItem::stroke().
* app/core/gimpselection.c: changed accordingly.
* app/core/gimpchannel.c
* app/vectors/gimpvectors.c: if use_default_values is TRUE, don't
use the GimpPaintOptions passed in the GimpPaintInfo, but create a
new one.
* app/gui/stroke-dialog.c: pass FALSE so the values as set in the
tool options are used.
* tools/pdbgen/pdb/edit.pdb
* tools/pdbgen/pdb/paths.pdb: pass TRUE so tool options settings
don't affect PDB stroke calls. Fixes part 2 of bug #132145.
* app/pdb/edit_cmds.c
* app/pdb/paths_cmds.c: regenerated.
2004-01-21 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable-transform.c: use RINT() instead of ROUND()
to calculate the coordinates of the transformed tiles to avoid
off-by-one errors when affine-transforming, flipping and rotating
drawables with negative offsets.
Fixes the off-by-one part of bug #132089.
2004-01-21 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable-transform.c (gimp_drawable_transform_paste):
call gimp_drawable_invalidate_boundary() because the drawable's
size may have changed. Fixes bug #132077. Removed call to
floating_sel_invalidate() which is now redundant.
2004-01-21 Simon Budig <simon@gimp.org>
* app/core/gimpscanconvert.c: removed the call to
art_vpath_perturb, since it apparently is responsible for the
artefacts described in bug #132036. I don't really understand
why these artefacts were happening in the first place, because
in theory art_vpath_perturb should not do any harm.
Also properly close closed polygons.
Hopefully fixes#132036, please test this.
2004-01-19 Sven Neumann <sven@gimp.org>
* app/*/*.c: include "libgimpbase/gimpbase.h" where needed; removed
now unnecessary inclusions of "file/file-utils.h".
2004-01-19 Sven Neumann <sven@gimp.org>
* app/file/file-utils.[ch]: removed file_utils_filename_to_utf8() ...
* libgimpbase/gimputils.[ch]: ... and added it here as
gimp_filename_to_utf8(). Added some docs that promise less than
the current implementation holds so that we can change the
implementation later.
* app/*/*.c: use gimp_filename_to_utf8() where
file_utils_filenames_to_utf8() has been used before.
* libgimpbase/gimpbase.def: changed accordingly.
* configure.in: reset GIMP_INTERFACE_AGE.
2004-01-18 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage.c (gimp_image_add_layer,remove_layer): in the
spirit of the fix for bug #131721 below, don't try to figure
manually if "alpha_changed" needs to be emitted but simply compare
the old and new values of gimp_image_has_alpha().
* app/gui/preferences-dialog.c (prefs_dialog_new): follow
"foo-window-type" -> "foo-window-hint" change.
2004-01-18 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage.[ch] (gimp_image_get_color): also return the
color's alpha byte if it has alpha, not only the converted RGB
values. Return OPAQUE_OPACITY for drawables without alpha.
Fixes bug #131706.
* app/core/gimpdrawable.c (gimp_drawable_get_color_at)
* app/core/gimpimage-contiguous-region.c
(gimp_image_contiguous_region_by_color)
* app/core/gimpimage-projection.c (gimp_image_projection_get_color_at)
* app/core/gimpimagemap.c (gimp_image_map_get_color_at)
* app/paint/gimpclone.c (gimp_clone_line_image): removed separate
handling of the alpha byte from all users of gimp_image_get_color().
2004-01-18 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage.c (gimp_image_set_active_layer): don't allow
to select anything but the floating selection. Fixes bug #128025.
(gimp_image_set_active_layer,channel,vectors): allow to pass NULL
to unselect the active item. Removed the silly feature that
passing some random item of another image would select the first
item in the list (was unused anyway).
(gimp_image_unset_active_channel): use gimp_image_set_active_channel()
now that it accepts NULL.
(gimp_image_add_layer,channel,vectors): cleaned up / simplified.
(gimp_image_remove_layer,channel,vectors): cleanup,
simplification, use gimp_image_set_active_layer,channel,vectors()
now that they accept NULL, make sure the item next to the removed
item becomes the active one (and not the first in the list, which
was a severe usability problem in the dialogs).
* app/core/gimpimage-undo-push.c (undo_pop_layer,channel): pass
NULL to the set_active functions, cleanup.
* app/core/gimpimage-duplicate.c: attach the floating selection
before setting the active layer. Code relied on broken
gimp_image_set_active_layer() behaviour before.
* app/core/gimplayer-floating-sel.c: no need to set
gimage->floating_sel before calling gimp_image_add_layer(). The
weird GUI mentioned in the comment existed in 1.2 only.
* app/display/gimpdisplayshell-layer-select.c (layer_select_advance):
don't assume that setting the active_layer always succeeds.
* tools/pdbgen/pdb/image.pdb: behave as the documentation says
and return an execution error if setting the active layer or
channel failed.
Unrelated:
* tools/pdbgen/pdb/image.pdb
* tools/pdbgen/pdb/layer.pdb: removed leftover cruft from the old
guchar based color API.
* tools/pdbgen/pdb/channel.pdb: simplified code which handles the
channel's color.
* app/pdb/channel_cmds.c
* app/pdb/image_cmds.c: regenerated.
2004-01-18 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-undo-push.c (undo_pop_layer): removed broken
code which tried to figure manually whether "alpha_changed" should
be emitted. Instead, simply compare the return values of
gimp_image_has_alpha() before and after adding/removing the
layer. Fixes bug #131721.