2006-09-02 Michael Natterer <mitch@gimp.org>
* app/paint/gimpclone.c
* app/paint/gimpink.c: minor cosmetic cleanup merged from the
soc-2006-healing-brush branch.
2005-12-27 Michael Natterer <mitch@gimp.org>
Fixed incomplete core/ui separation of paint tools and paint
methods:
* app/core/core-enums.h
* app/core/gimpcontext.[ch]: added a "paint-info" property and API
so the current paint method can be selected without the need for
an active tool.
(gimp_context_real_set_tool): set the paint-info to
tool_info->paint_info so the paint method follows the active tool
just as the active image follows the active display.
* app/core/gimp.h (struct Gimp)
* app/core/gimppaintinfo.[ch]: added "standard_paint_info" API
and stuff to be consistent with other context object properties.
* app/paint/gimp-paint.c: set the paintbrush as
standard_paint_info.
* app/core/gimpstrokedesc.c (gimp_stroke_desc_new): removed the
hack of falling back to the paintbrush when there is no active
tool and use the active paint method instead. Fall back to the
standard paint method if there is no active one.
(nothing in the core uses the active tool any more now).
* app/widgets/gimpdeviceinfo.h: add the paint info to the
properties which are saved in devicerc.
Added identifiers (names) and stock-ids to GimpPaintInfo:
* app/core/gimppaintinfo.[ch] (gimp_paint_info_new): added
identifier and stock-id parameters.
* app/core/gimptoolinfo.c (gimp_tool_info_new): removed the hack
of setting the paint-info stock-id from the tool-info stock-id.
* app/paint/paint-types.h
* app/paint/gimp-paint.c: changed GimpPaintRegisterCallback
accordingly.
* app/tools/gimp-tools.c (gimp_tools_register): changed paint
info names accordingly.
* app/paint/*.c (gimp_*_register): pass identifier and stock-id
accordingly.
2005-03-21 Sven Neumann <sven@gimp.org>
* app/paint/gimpink.c: changed time-smoother code to use guint32
time values externally, guint64 internally. Proper fix for bug
#164272.
2005-01-14 Michael Natterer <mitch@gimp.org>
* app/core/core-enums.[ch] (enum GimpUndoType): added GIMP_UNDO_INK.
* app/paint/gimppaintcore.[ch]: added virtual function
GimpPaintCore::push_undo() and call it.
* app/paint/gimppaintcore-undo.[ch]: made it the default
implementation.
* app/paint/gimpink-blob.[ch]: added blob_duplicate().
* app/paint/gimpink.[ch]: added a "start_blob" (just like
GimpPaintCore::start_coords) which gets set whenever we start a
new stroke or line. Removed ink->lastx and ink->lasty because
they are the same as paint_core->last_coords.
* app/paint/Makefile.am
* app/paint/gimpink-undo.[ch]: new files implementing an
undo step for ink which restores the last blob used along
with the whole ink state. Fixes bug #163670.
2005-01-03 Sven Neumann <sven@gimp.org>
* app/paint/gimpink.[ch]: handle event time as guint32. That's the
type we deal with here and it avoids a crash that occured when
autoscrolling with the Ink tool.
* app/display/gimpdisplayshell-autoscroll.c: cosmetics.
2004-06-14 Michael Natterer <mitch@gimp.org>
* app/paint/gimppaintcore.[ch]: removed PRETRACE_PAINT and
POSTTRACE_PAINT from the GimpPaintCoreState enum. Removed
"gboolean traces_on_window" from GimpPaintCoreClass.
* app/paint/gimpclone.[ch]
* app/paint/gimpink.c
* app/tools/gimpclonetool.c: changed accordingly.
* app/tools/gimppainttool.c: ditto. Show the brush outline
while painting. Fixes bug #118348.
2004-05-26 Michael Natterer <mitch@gimp.org>
* app/paint/gimpink.c: restored old time/speed sensitivity
behaviour by doing nothing except figuring if we draw a straight
line in INIT_PAINT. Instead, do all the Blob creating in
MOTION_PAINT and special case the initial (null) "motion"
accordingly.
2004-05-26 Michael Natterer <mitch@gimp.org>
* app/paint/Makefile.am
* app/paint/gimpink-blob.[ch]
* app/paint/gimpink.[ch]
* app/paint/gimpinkoptions.[ch]: new files. Ported the ink tool
to be a direct GimpPaintCore subclass without any GUI.
* app/paint/gimp-paint.c: register GimpInk with the list of paint
cores.
* app/tools/Makefile.am
* app/tools/gimpinkoptions.[ch]
* app/tools/gimpinktool-blob.[ch]: removed these files.
* app/tools/gimpinkoptions-gui.[ch]: new files containing only
the GUI for GimpInkOptions.
* app/tools/gimpinktool.[ch]: reduced to some few lines which
implement a simple GimpPaintTool subclass.
* app/tools/gimp-tools.c: associate the GimpInk paint_core with
the GimpInkTool.
2004-05-04 Michael Natterer <mitch@gimp.org>
Treat FG/BG just like all other context properties:
* app/paint/gimppaintoptions.h: added GIMP_CONTEXT_FOREGROUND_MASK
and _BACKGROUND_MASK to GIMP_PAINT_OPTIONS_CONTEXT_MASK to specify
that they are used by GimpPaintOptions (automatically affects all
paint tools).
* app/tools/gimpblendtool.c
* app/tools/gimpbucketfilltool.c
* app/tools/gimpinktool.c: set FOREGROUND_MASK and BACKGROUND_MASK
manually here.
* app/tools/tool_manager.c (tool_manager_tool_changed): decide
about the globality of FG and BG at the same place where we decide
about the brush's, pattern's etc. globality, but hardcode them to
global = TRUE instead of looking at GimpConfig.
Fixes bug #141786.
2004-04-29 Michael Natterer <mitch@gimp.org>
* app/tools/gimp*tool.c (gimp_*_tool_register): stripped the menu
paths from the "menu_path". Will be renamed to "action_name" or
something soon...
* plug-ins/dbbrowser/dbbrowser.c
* plug-ins/common/plugindetails.c
* plug-ins/common/uniteditor.c: register under the new
"Extensions" placeholder.
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.
2003-10-06 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable.[ch]: added new virtual functions
GimpDrawable::get_active_components(), apply_region() and
replace_region().
* app/core/Makefile.am
* app/core/gimpdrawable-combine.[ch]: new files containing
apply_region()'s and replace_region()'s default implementation.
They are identical to the ones removed from GimpImage except that
they don't mask the selection with itself (bug #107949).
* app/core/gimpchannel.c
* app/core/gimplayer.c: implement get_active_components().
* app/core/gimpchannel.c: implement apply_region() and
replace_region() and invalidate the channel's boundary
before upchaining (bug #107949).
* app/core/gimpimage.[ch]: removed gimp_image_apply_image(),
gimp_image_replace_image() and gimp_image_get_active_components().
* app/core/gimpimage-undo-push.c (undo_pop_image): invalidate
boundary and bounds if the drawable is a channel (bug #107949).
(undo_pop_mask)
(undo_pop_channel_mod): finish previous commit :)
* app/core/gimp-edit.c
* app/core/gimpdrawable-blend.c
* app/core/gimpdrawable-bucket-fill.c
* app/core/gimpdrawable-stroke.c
* app/core/gimpimagemap.c
* app/core/gimplayer-floating-sel.c
* app/paint/gimppaintcore.c
* app/tools/gimpinktool.c: changed accordingly.
2003-09-06 Michael Natterer <mitch@gimp.org>
To optimize duplicate and/or wrong image updates away, introduced
new policy that a child object must never explicitly update or
invalidate its parent object (just like the GUI is not updated
explicitly by the core):
* app/core/gimpdrawable.[ch]: added new signal
GimpDrawable::update(). Never update or invalidate the image when
the drawable is updated or invalidated.
(gimp_drawable_set_visible): don't gimp_drawable_update() the
drawable since its pixels have not changed.
* app/core/gimpimage.[ch]: connect to the "add" and "remove"
signals of the layers and channels containers. Also connect to the
"update" and "visibility_changed" signals of all drawables in
these containers (optimizes away updates issued by drawables which
are not yet added to the image and updates of the selection
mask). Also, don't propagate updates to the image if the emitting
drawable is invisible (optimizes away updates issued by invisible
drawables).
(gimp_image_add_layer,channel)
(gimp_image_remove_layer,channel): don't update the image since
that's done by our "add" and "remove" handlers now.
(gimp_image_position_layer,channel): update just the image, not
the drawable since its pixels have not changed.
(gimp_image_real_colormap_changed)
(gimp_image_set_component_visible): always call
gimp_image_update() *and* gimp_viewable_invalidate_preview() to
get everything updated, since update and invalidate of images are
not connected.
* app/core/gimpimage-undo-push.c (undo_pop_layer,channel): don't
update the drawable since (a) its pixels don't change and (b) the
image updates itself upon adding/removing now.
(undo_pop_layer_mod): replaced gimp_image_update() by
gimp_drawable_update() (just for consistency with other similar
functions).
* app/core/gimplayer.c: connect to "update" of the layer mask and
issue updates on the layer if the mask update has any effect on
the projection.
(gimp_layer_create_mask): don't set the mask's offsets here since
they may be different when we later add the mask to the layer.
* app/core/gimplayermask.c (gimp_layer_mask_set_layer): set the
mask offsets here instead.
* app/core/gimpchannel.c (gimp_channel_translate): update the
channel even if push_undo == FALSE.
* app/paint/gimppaintcore.c (gimp_paint_core_finish)
* app/tools/gimpinktool.c (ink_finish): invalidate both the
drawable and the image preview since invalidating the drawable
doesn't invalidate the image any more.
* app/text/gimptextlayer.c (gimp_text_layer_render_now): also
update the new extents of the text layer, not only the old one.
(gimp_text_layer_render_layout): don't update the drawable since
gimp_drawable_fill() already updated it.
2003-06-28 Michael Natterer <mitch@gimp.org>
* app/core/gimpcontext.h: removed enum GimpContextPropType and
enum GimpContextPropMask.
* app/core/core-enums.[ch]: added them here.
* app/core/gimptoolinfo.[ch]: replaced "gboolean tool_context"
member by "GimpContextPropMask context_props" so each tool can
specify exactly which context properties it wants to have
persistently remembered.
* app/tools/tools-types.h: changed typedef GimpToolRegisterCallback
accordingly.
* app/tools/tool_manager.[ch] (tool_manager_register_tool): ditto.
Removed the "global_tool_context" and initialize all tool info
objects from the user_context after creation. Removed the
PAINT_OPTIONS_MASK #define and use the new context_props stored in
tool_info insted.
* app/tools/gimppainttool.h: #define the common properties of the
paint tools as GIMP_PAINT_TOOL_OPTIONS_MASK (which is OPACITY |
PAINT_MODE | BRUSH).
* app/tools/[all tools].c (gimp_*_tool_register): replaced the
"use_context" boolean by the actual mask of context properties the
tools need.
2003-05-26 Michael Natterer <mitch@gimp.org>
* app/base/tile-manager-private.h: added "gint ref_count" to the
TileManager struct.
* app/base/tile-manager.[ch]: replaced tile_manager_destroy()
by tile_manager_ref() and tile_manager_unref().
* app/core/gimpimage-undo-push.c: ref the tile managers stored in
the undo system and DON'T destroy them if no undo could be pushed.
Should fix the remaining crashes with undo disabled like in
bug #9350.
(!!!) Note that the tiles passed to gimp_image_undo_push_image()
and gimp_drawable_push_undo() as well as the tile managers of
drawables passed to gimp_image_undo_push_[layer|channel]_mod()
must be unref'ed by the caller now.
* app/core/gimpdrawable-transform.c (gimp_drawable_transform_paste):
don't take ownership of the passed tiles but ref them if needed.
(!!!) Callers must unref the passed tiles themselves now.
* app/core/gimpbuffer.c
* app/core/gimpdrawable-blend.c
* app/core/gimpdrawable-bucket-fill.c
* app/core/gimpdrawable-offset.c
* app/core/gimpdrawable.c
* app/core/gimpedit.c
* app/core/gimpimage-convert.c
* app/core/gimpimage-mask.c
* app/core/gimpimage-projection.c
* app/core/gimpimage.c
* app/core/gimpimagemap.c
* app/core/gimplayer-floating-sel.c
* app/core/gimplayer.c
* app/paint/gimppaintcore.c
* app/text/gimptextlayer.c
* app/tools/gimpinktool.c
* app/tools/gimpiscissorstool.c
* app/tools/gimptransformtool-undo.c
* app/tools/gimptransformtool.c: changed accordingly.
2003-03-25 Sven Neumann <sven@gimp.org>
* Makefile.am
* gimpintl.h: removed this header file.
* gimpmiscui.c: include libgimp-intl.h.
* gimp.c (gimp_main): call setlocale() and bind to the libgimp
textdomain so that plug-ins don't need to do that explicitely.
* libgimp/stdplugins-intl.h: added the functionality that used to
live in gimpintl.h and removed the libgimp related stuff. Got rid
of the INIT_I18N_UI() macro.
* plug-ins/*/*.c: removed all occurances of INIT_I18N_UI().
Plug-ins simply call INIT_I18N() once in their run() function.
* plug-ins/script-fu/script-fu-intl.h: added the functionality
that used to live in gimpintl.h and removed the libgimp related
stuff.
* app/Makefile.am
* app/gimp-intl.h: new file that defines the gettext macros for
the GIMP core.
* app/*/*.c: include gimp-intl.h instead of libgimp/gimpintl.h.
* plug-ins/script-fu/scripts/test-sphere.scm: fixed typos.
2003-02-08 Michael Natterer <mitch@gimp.org>
* app/config/gimpconfig-serialize.c (gimp_config_serialize_property):
the virtual serialize_property() returning FALSE doesn't mean the
serialization failed but that the function didn't handle the
property, so don't error but continue with the default
implementation. Print newlines after properties only if
indent_level == 0.
* app/gui/tool-options-dialog.c: added tool options saving/loading
as quickly hacked proof-of-concept.
* app/paint/paint-enums.[ch]: added enum GimpInkBlobType.
* app/tools/gimpinkoptions.[ch]: ported to object properties,
cleanup.
* app/tools/gimpinktool.c: changed accordingly.
2003-01-05 Manish Singh <yosh@gimp.org>
* many files in app, modules and libgimp*: cleanup, removed unecessary
G_OBJECT() casts. Should do the same for plug-ins, when more of them
get undeprecated.
2002-11-30 Michael Natterer <mitch@gimp.org>
* app/display/gimpnavigationview.c: no need to include "appenv.h"
* app/tools/gimpinktool.c: pass InkOptions as user_data to the
ink_type_update() callback so we don't need to get them from
"the_gimp". Removed inclusion of "app_procs.h".
2002-11-27 Michael Natterer <mitch@gimp.org>
* app/paint/gimpairbrush.[ch]
* app/paint/gimpclone.[ch]
* app/paint/gimpconvolve.[ch]
* app/paint/gimpdodgeburn.[ch]
* app/paint/gimperaser.[ch]
* app/paint/gimppaintoptions.[ch]
* app/paint/gimpsmudge.[ch]: it's hard to paint without a context
to get color, brush etc. from. Added "context" parameters to
all paint options constructors.
* tools/pdbgen/pdb/paint_tools.pdb: pass gimp_get_current_context()
to the constructors. Fixes bug #99557.
* app/pdb/paint_tools_cmds.c: regenerated.
* app/tools/gimpairbrushtool.c
* app/tools/gimpblendtool.c
* app/tools/gimpbucketfilltool.c
* app/tools/gimpclonetool.c
* app/tools/gimpconvolvetool.c
* app/tools/gimpdodgeburntool.c
* app/tools/gimperasertool.c
* app/tools/gimpinktool.c
* app/tools/gimpsmudgetool.c: changed accordingly.
* app/tools/paint_options.c: ditto. Don't set
paint_options->context here because we also need it in the
no-interface case above.
2002-10-15 Sven Neumann <sven@gimp.org>
* app/tools/gimpinktool.c: using gtk_image_new_from_pixmap() feels
kinda lame. Draw the ink blob directly in an expose handler instead.
2002-10-15 Dave Neary <bolsh@gimp.org>
* app/tools/gimpinktool.c
* app/tools/gimptexttool.c: Remooved warnings by
including string.h, and changing from gtk_pixmap_new()
to gtk_image_new_from_pixmap().
2002-06-06 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable.[ch]: renamed gimp_drawable_apply_image()
to gimp_drawable_push_undo() because that's what it actually does.
* app/image_map.c
* app/core/gimpdrawable-offset.c
* app/core/gimpimage-mask.c
* app/core/gimpimage.c
* app/core/gimplayer.c
* app/paint/gimppaintcore.c
* app/tools/gimpinktool.c: changed accordingly. Removed redundant
comments because it's now obvious what the function does from
looking at its name.
* app/core/gimpdrawable.[ch]
* app/core/gimpimage.h: renamed "gboolean undo" parameters to
"gboolean push_undo".
2002-05-08 Michael Natterer <mitch@gimp.org>
Started to get rid of the gdisplays_foo() functions in
app/display/gimpdisplay-foreach.[ch]. Work in progress...
* app/core/gimp.[ch]: added the display list to the Gimp object
(as a GimpList of GimpObjects). This way we get more independent
from whether there is GUI or not, as gimp->displays will simply
be an empty list for the --no-interface case.
* app/display/gimpdisplay.[ch]: Removed the global "display_list"
and "display_num" variables. Use gimp->displays instead.
* app/display/gimpdisplay-foreach.[ch]: renamed most functions
from gdisplays_foo() to gimp_displays_foo() and pass them a Gimp
pointer.
* app/core/gimpimage.[ch]: added a "flush" signal.
* app/display/gimpdisplay-handlers.c: connect to "flush" and call
gimp_display_flush() in the callback.
* tools/pdbgen/pdb/display.pdb: use gimp_displays_flush(gimp)
here and only here.
* app/pdb/display_cmds.c: regenerated.
* app/app_procs.c
* app/gui/gui.c
* app/gui/preferences-dialog.c:
s/gdislays_foo()/gimp_displays_foo(gimp)/
* app/image_map.c
* app/undo_history.c
* app/display/gimpdisplayshell-callbacks.c
* app/display/gimpdisplayshell-dnd.c
* app/display/gimpdisplayshell-layer-select.c
* app/display/gimpdisplayshell-scale.c
* app/gui/channels-commands.c
* app/gui/colormap-editor-commands.c
* app/gui/convert-dialog.c
* app/gui/drawable-commands.c
* app/gui/edit-commands.c
* app/gui/file-commands.c
* app/gui/image-commands.c
* app/gui/layers-commands.c
* app/gui/offset-dialog.c
* app/gui/qmask-commands.c
* app/gui/select-commands.c
* app/gui/vectors-commands.c
* app/paint/gimpairbrush.c
* app/tools/gimpbezierselecttool.c
* app/tools/gimpblendtool.c
* app/tools/gimpbrightnesscontrasttool.c
* app/tools/gimpbucketfilltool.c
* app/tools/gimpbycolorselecttool.c
* app/tools/gimpcolorbalancetool.c
* app/tools/gimpcurvestool.c
* app/tools/gimpeditselectiontool.c
* app/tools/gimpfreeselecttool.c
* app/tools/gimpfuzzyselecttool.c
* app/tools/gimphuesaturationtool.c
* app/tools/gimpinktool.c
* app/tools/gimpiscissorstool.c
* app/tools/gimplevelstool.c
* app/tools/gimpmeasuretool.c
* app/tools/gimpmovetool.c
* app/tools/gimppainttool.c
* app/tools/gimpposterizetool.c
* app/tools/gimprectselecttool.c
* app/tools/gimptexttool.c
* app/tools/gimpthresholdtool.c
* app/tools/gimptransformtool.c
* app/tools/gimpvectortool.c
* app/widgets/gimpbufferview.c
* app/widgets/gimpchannellistview.c
* app/widgets/gimpcomponentlistitem.c
* app/widgets/gimpdocumentview.c
* app/widgets/gimpdrawablelistitem.c
* app/widgets/gimpdrawablelistview.c
* app/widgets/gimpimageview.c
* app/widgets/gimpitemlistitem.c
* app/widgets/gimpitemlistview.c
* app/widgets/gimplayerlistitem.c
* app/widgets/gimplayerlistview.c
* app/widgets/gimpvectorslistview.c: replaced gdisplays_flush()
with calls to gimp_image_flush(gimage). Removed inclusion of
"display/gimpdisplay-foreach.h" from most files.