2006-05-30 Michael Natterer <mitch@gimp.org>
Honor active components when pasting. Fixes bug #150845:
* app/core/gimplayer-floating-sel.c (floating_sel_composite):
don't temporarily set all image components to active while
compositing.
* app/core/gimpimage.c (gimp_image_set_component_active):
relax()/rigor() the floating selection around setting the "active"
flag. Also make sure the projection is updated correctly.
2006-05-29 Sven Neumann <sven@gimp.org>
* app/core/gimpbrushgenerated.c (gimp_brush_generated_load): don't
choke on brush files with empty names (bug #343140).
(gimp_brush_generated_save): warn about brushes with empty names.
2006-05-28 Michael Natterer <mitch@gimp.org>
* app/core/gimppalette-import.[ch]: added support for extracting
colors from the selected pixels only.
* app/dialogs/palette-import-dialog.c: added "Sample merged" and
"Selected Pixels only" toggles. Fixes bug #316212. Cleaned up the
code quite a bit.
2006-05-24 Michael Natterer <mitch@gimp.org>
* app/core/gimpcontext.c (gimp_context_tool_list_thaw): the
default tool is the paintbrush, not rect select.
* app/tools/gimp-tools.c (gimp_tools_register): attach the default
visibility state to the tool_info.
* app/actions/tools-commands.c (tools_reset_cmd_callback): use the
attached boolean instead of reimplementing the default visibility
logic.
2006-05-23 Michael Natterer <mitch@gimp.org>
Fix for bug #333156:
* app/paint-funcs/paint-funcs-types.h (enum CombinationMode):
added value COMBINE_INTEN_A_INDEXED.
* app/paint-funcs/paint-funcs.c
(combine_inten_a_and_indexed_pixels): new function which
implements the new CombinationMode.
(combine_sub_region)
(combine_regions): added the needed bits to call the new function.
* app/core/gimpprojection-construct.c (project_indexed): added
mask PixelRegion parameter since that's supported by paint-funcs
now, replaced g_warning() about unimplemented combine type
by call to combine_regions(..., COMBINE_INTEN_A_INDEXED).
(gimp_projection_construct_layers): pass the mask to
project_indexed() and removed comments about not supporting it.
2006-05-23 Karine Delvare <edhel@gimp.org>
* app/core/gimpcontext.c
* app/tools/gimp-tools.c
* app/tools/gimpnewrectselecttool.c
* app/tools/gimprectselecttool.c
* app/widgets/gimptoolbox.c
* menus/image-menu.xml.in: replace old rect select by new in the
toolbox.
2006-05-23 Sven Neumann <sven@gimp.org>
It makes more sense to have GimpData::dirty indicate a name change
than to invalidate the previews whenever the name changes.
* app/core/gimpdata.c: call gimp_object_name_changed() from
gimp_data_real_dirty() instead of implementing
GimpObject::name-changed and calling gimp_data_dirty() from there.
* app/core/gimpbrushclipboard.c
* app/core/gimppalette.c
* app/core/gimppatternclipboard.c: call gimp_data_dirty() in place
of gimp_object_name_changed().
* app/core/gimpbrushgenerated.c (gimp_brush_generated_dirty):
chain up unconditionally.
2006-05-21 Michael Natterer <mitch@gimp.org>
* app/core/Makefile.am
* app/core/gimpimage-item-list.[ch]: new files with functions to
translate, flip, rotate, transform and align a list of items
inside an undo group.
(gimp_image_item_list_get_list): returns a list of items matching
any combination of GimpItemTypeMask and GimpItemSet.
* app/core/gimpitem.[ch]: added new function gimp_item_is_in_set().
* app/core/gimpitem-linked.[ch]: use the new functions. Removed
gimp_item_linked_get_list().
* app/tools/gimpeditselectiontool.c: use
gimp_image_item_list_get_list() instead of
gimp_item_linked_get_list().
* app/core/gimpimage-resize.c
* app/tools/gimpaligntool.c: use the new functions instead of
creating and iterating the lists manually.
2006-05-18 Sven Neumann <sven@gimp.org>
* app/core/gimpparamspecs-desc.c: use the enum's name instead of
the nick, strip the "GIMP_" prefix and canonicalize it.
2006-05-18 Sven Neumann <sven@gimp.org>
* tools/pdbgen/app.pl
* tools/pdbgen/lib.pl: removed code that used to fiddles with
the
argument descriptions.
* tools/pdbgen/pdb/*.pdb: removed %%desc%% placeholder, added
some
missing argument descriptions.
* app/pdb/*_cmds.c
* libgimp/gimpdrawabletransform_pdb.c
* libgimp/gimpfloatingsel_pdb.c
* libgimp/gimpgradient_pdb.c
* libgimp/gimppainttools_pdb.c: regenerated.
* app/core/Makefile.am
* app/core/gimpparamspecs-desc.[ch] (gimp_param_spec_get_desc):
new function that creates a parameter description for the PDB.
* app/pdb/gimppdb-query.c
* app/pdb/procedural_db_cmds.c: use the new function to create
the
descriptions on the fly.
2006-05-17 Michael Natterer <mitch@gimp.org>
* app/core/gimpbrushclipboard.c
(gimp_brush_clipboard_buffer_changed)
* app/core/gimppatternclipboard.c
(gimp_pattern_clipboard_buffer_changed): limit the size of
clipboard brushes and patterns to 512x512 pixels to prevent OOM
conditions when copying from huge drawables.
2006-05-17 Michael Natterer <mitch@gimp.org>
* app/core/gimpbrushclipboard.c
(gimp_brush_clipboard_buffer_changed)
* app/core/gimppatternclipboard.c
(gimp_pattern_clipboard_buffer_changed): remove calls to
gimp_data_dirty() because the emission of "name-changed" takes
care of that.
2006-05-17 Sven Neumann <sven@gimp.org>
* app/core/gimpbrushclipboard.c
(gimp_brush_clipboard_buffer_changed)
* app/core/gimppatternclipboard.c
(gimp_pattern_clipboard_buffer_changed): emit "name-changed" so that
the description is being updated.
2006-05-17 Michael Natterer <mitch@gimp.org>
* app/core/gimp.c (gimp_real_initialize): add a clipboard pattern
to the pattern factory (forgot to commit this file).
2006-05-16 Michael Natterer <mitch@gimp.org>
* app/core/Makefile.am
* app/core/core-types.h
* app/core/gimppatternclipboard.[ch]: new GimpPattern subclass
that auto-updates its contents from gimp->global_buffer.
* app/core/gimp.c (gimp_real_initialize): add a clipboard pattern
to the pattern factory.
* app/widgets/gimpaction.c (gimp_action_set_proxy): replace the
GimpView by a new one if the viewable type changes, instead of
running into a warning (didn't happen before because this is only
used for imagefiles and patterns, which didn't have subclasses).
2006-05-16 Michael Natterer <mitch@gimp.org>
* app/paint-funcs/paint-funcs-generic.h
* app/paint-funcs/paint-funcs.[ch]: implement copy_color() and
copy_color_pixels() which copy only the color bytes into a dest
that has one byte less than src. Renamed component_pixels() to
copy_component_pixels().
* app/core/Makefile.am
* app/core/core-types.h
* app/core/gimpbrushclipboard.[ch]: new GimpBrush subclass that
auto-updates its contents from gimp->global_buffer.
* app/core/gimp.c (gimp_real_initialize): add a clipboard brush to
the brush factory. Fixes bug #111082.
2006-05-16 Sven Neumann <sven@gimp.org>
* app/app_procs.c (app_run): indentation.
* app/core/gimp.c (gimp_real_initialize)
* app/plug-in/gimppluginmanager.c (gimp_plug_in_manager_restore):
moved a call to status_callback() to the plug-in manager.
2006-05-14 Michael Natterer <mitch@gimp.org>
Allow to initialize a new layer mask with any of the image's
channels. Fixes bug #310207.
* libgimpbase/gimpbaseenums.h (enum GimpAddMaskType): added
value GIMP_ADD_CHANNEL_MASK.
* libgimpbase/gimpbaseenums.c
* tools/pdbgen/enums.pl: regenerated.
* app/core/gimplayer.[ch] (gimp_layer_create_mask): added
GimpChannel* parameter. Hacked the GIMP_ADD_SELECTION_MASK code a
bit so it can handle GIMP_ADD_CHANNEL_MASK too. Cleaned up the
function a bit.
* app/dialogs/layer-add-mask-dialog.[ch]: added a menu of the
image's channels.
* app/actions/layers-commands.c (layers_add_mask_response): pass
the channel selected in the menu to gimp_layer_create_mask().
* tools/pdbgen/pdb/layer.pdb (layer_create_mask): use the image's
active channel when GIMP_ADD_CHANNEL_MASK is passed. Fail if there
is no active channel.
* app/pdb/layer_cmds.c: regenerated.
2006-05-13 Michael Natterer <mitch@gimp.org>
* app/core/gimplayer.c (gimp_layer_transform): add an alpha
channel if the layer has none and interpolation is requested.
Works around bug #315048, the real fix would be to implement
interpolation on layers without alpha.
2006-05-13 Hans Breuer <hans@breuer.org>
* **/makefile.msc app/gimpcore.def : updated
* app/core/gimp-util.c : dont include "config/gimpbaseconfig.c", it
gives an redefinition error with msvc. Instead include
config/gimpbaseconfig.h and libgimpconfig/gimpconfig-path.h
* plug-ins/common/psd_save.c : fix c99isms (declarations only at the
start of a block)
2006-05-09 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage.c (gimp_image_new)
* app/core/gimpitem.c (gimp_item_configure)
* app/display/gimpdisplay.c (gimp_display_new): make sure IDs wrap
correctly at G_MAXINT and skip IDs which are currently in use.
It makes no sense to treat gimp->image_table and gimp->images
differently, since they keep the same set of images. And it makes
no sense to treat gimp->displays and gimp->images differently.
Moved all container adding into the objects' constructors:
* app/core/gimp.c (gimp_create_image): don't add the new image
to gimp->images here...
* app/core/gimpimage.c (gimp_image_constructor): ...but here.
* app/core/gimp-gui.c (gimp_create_display): don't add the new
display to gimp->displays here...
* app/display/gimpdisplay.c (gimp_display_new): ...but here.
2006-05-06 Michael Natterer <mitch@gimp.org>
* app/core/gimpparamspecs.[ch]: added "gboolean none_ok" members
to GimpParamSpecImageID, GimpParamSpecItemID and
GimpParamSpecDisplayID. If none_ok is set, allow '0' and '-1' as
valid IDs. Added "none_ok" parameter to all ID param spec
constructors.
* app/pdb/gimp-pdb-compat.c: set none_ok to TRUE in all compat
param specs, so only IDs that are really random garbage don't pass
validation. Fixes validation errors with 0 and -1 IDs.
* tools/pdbgen/app.pl: set none_ok to FALSE by default. Added
support for $arg->{none_ok} to control it.
* tools/pdbgen/pdb/image.pdb
* tools/pdbgen/pdb/progress.pdb
* tools/pdbgen/pdb/text_tool.pdb: use none_ok instead of
no_success (which disables validation entirely).
* app/pdb/[many]_cmds.c: regenerated.
2006-05-05 Michael Natterer <mitch@gimp.org>
* app/plug-in/gimppluginmanager.[ch]: added signals
"plug-in-opened" and "plug-in-closed". Added functions
gimp_plug_in_manager_add_open_plug_in() and _remove_open_plugin()
which maintain the list of open plug-ins and emit the signals.
* app/plug-in/gimpplugin.c (gimp_plug_in_open)
(gimp_plug_in_close): don't touch manager->open_plug_ins and don't
ref/unref the plug-in. Call above new functions instead. Don't
call gimp_pdb_dialogs_check().
* app/core/gimp-gui.[ch]
* app/gui/gui-vtable.c: removed gimp_pdb_dialogs_check().
* app/widgets/gimppdbdialog.[ch]: removed
gimp_pdb_dialogs_check_callback() and connect to the
plug-in-manager's "plug-in-closed" signal instead.
2006-05-04 Michael Natterer <mitch@gimp.org>
* app/core/gimpparamspecs.c (gimp_string_array_new)
(gimp_param_string_array_validate): restore the strict checks
on string arrays.
* app/plug-in/gimppluginmanager-help-domain.c
(gimp_plug_in_manager_get_help_domains): return NULL string arrays
when there are 0 help domains to fix the inconsistency at its root.
2006-05-03 Sven Neumann <sven@gimp.org>
* app/core/gimpparamspecs.c (gimp_string_array_new,
gimp_param_string_array_validate): relaxed the checks so that
GimpStringArray deals correctly with (length == 0 && data != NULL).
Fixes bug #340365.
2006-04-29 Sven Neumann <sven@gimp.org>
* app/core/Makefile.am (AM_CPP_FLAGS): define GIMP_APP_VERSION.
* app/core/gimp-user-install.c: use GIMP_APP_VERSION instead of
hardcoding it.
2006-04-29 Sven Neumann <sven@gimp.org>
* app/core/Makefile.am
* app/core/gimp-user-install.[ch]: new files based on code that
used to live in user-install-dialog.c.
* app/dialogs/user-install-dialog.[ch]: only the dialog code
remained here.
* app/app_procs.c: use the new user-install API. Perform a
non-interactive user installation when running without a display.
2006-04-27 Michael Natterer <mitch@gimp.org>
* app/plug-in/plug-in-locale-domain.[ch] (plug_in_locale_domains):
new function which returns string arrays of all registered locale
domains and paths.
(plug_in_standard_locale_domain): removed this function. The
standard plug-in domain is included in the domains returned by
plug_in_locale_domains().
* app/plug-in/plug-ins.c (plug_ins_init): simply bind the text
domains here instead of calling gimp_menus_init(). Destroy
gimp->plug_in_defs much earlier.
* app/core/gimp-gui.[ch]
* app/gui/gui-vtable.c: removed gimp_menus_init().
* app/menus/plug-in-menus.[ch]: removed plug_in_menus_init(),
binding text domains is completely done in the core now.
2006-04-27 Michael Natterer <mitch@gimp.org>
Added some signals inspired by Rockwalrus' libpdb:
* app/pdb/gimppdb.[ch]: added signals "register-procedure" and
"unregister-procedure".
* app/pdb/gimppluginprocedure.[ch]: added signal "menu-path-added".
* app/actions/plug-in-actions.[ch]
* app/menus/plug-in-menus.[ch]: connect to the new signals and
create/destroy plug-in actions and menus accordingly. Made all
needed functions private and merged some of them with the newly
added signal callbacks.
* app/core/gimp-gui.[ch]
* app/gui/gui-vtable.c: removed gimp_menus_create_item() and
gimp_menus_delete_item() and all related stuff.
* app/plug-in/plug-in.c
* app/plug-in/plug-ins.c: removed calls to the removed functions.
* app/plug-in/plug-ins.c (plug_ins_init): add the plug-in
procedures to the PDB *after* calling gimp_menus_init() so their
locale domains are properly initialized when the menus are
created.
2006-04-27 Sven Neumann <sven@gimp.org>
* libgimpcolor/gimprgb.[ch]: added "has_alpha" to GimpParamSpecRGB.
Made the GimpParamSpecRGB struct public. When validating a color,
only look at the alpha channel if has_alpha is set.
* libgimpconfig/gimpconfig-params.h: added "has_alpha" to
GIMP_CONFIG_INSTALL_PROP_RGB macro definition.
* libgimpconfig/gimpconfig-serialize.c: serialize color values as
"(rgb r g b)" if the param-spec indicates that the alpha channel
is meaningless.
* app/config/gimpconfig-dump.c: take "has_alpha" into account when
documenting color properties.
* app/core/gimpcontext.c
* app/core/gimpgrid.c
* app/display/gimpdisplayoptions.c
* app/text/gimptext.c
* app/widgets/gimpaction.c
* app/widgets/gimpcolorbar.c
* libgimpwidgets/gimpcolorarea.c
* libgimpwidgets/gimpcolorbutton.c: specify whether color properties
have an alpha channel.
* tools/pdbgen/app.pl: handle "has_alpha" for color paramaters.
* tools/pdbgen/pdb/channel.pdb
* tools/pdbgen/pdb/context.pdb
* tools/pdbgen/pdb/grid.pdb
* tools/pdbgen/pdb/image.pdb: set the "has_alpha" flag where
appropriate.
* app/pdb/gimp-pdb-compat.c (gimp_pdb_compat_param_spec): set
"has_alpha" to TRUE for GIMP_PDB_COLOR.
* app/pdb/channel_cmds.c
* app/pdb/context_cmds.c
* app/pdb/gradient_cmds.c
* app/pdb/grid_cmds.c
* app/pdb/image_cmds.c
* app/pdb/palette_cmds.c
* app/pdb/palettes_cmds.c
* app/pdb/selection_tools_cmds.c: regenerated.
* app/config/gimpdisplayconfig.c (gimp_display_config_class_init):
removed unused code.
2006-04-26 Michael Natterer <mitch@gimp.org>
* app/pdb/Makefile.am
* app/pdb/pdb-types.h
* app/pdb/gimppdb.[ch]: new object GimpPDB which keeps all
procedures and functions to register and run them. Renamed all
functions and did some cleanups.
* app/pdb/gimp-pdb.[ch]
* app/core/gimp.[ch]: removed the same stuff here.
* app/pdb/gimp-pdb-query.[ch]: removed these files...
* app/pdb/gimppdb-query.[ch]: ...added here as members of GimpPDB.
* app/pdb/gimp-pdb-compat.h: fix include guard.
* app/batch.c
* app/actions/vectors-commands.c
* app/dialogs/about-dialog.c
* app/file/file-open.c
* app/file/file-save.c
* app/plug-in/plug-in-message.c
* app/plug-in/plug-ins.c
* app/widgets/gimpfiledialog.c
* app/widgets/gimphelp.c
* app/xcf/xcf.c
* tools/pdbgen/pdb/brush_select.pdb
* tools/pdbgen/pdb/fileops.pdb
* tools/pdbgen/pdb/font_select.pdb
* tools/pdbgen/pdb/gradient_select.pdb
* tools/pdbgen/pdb/palette_select.pdb
* tools/pdbgen/pdb/pattern_select.pdb
* tools/pdbgen/pdb/procedural_db.pdb: changed includes and function
calls accordingly.
* tools/pdbgen/app.pl: pass around GimpPDB instead of Gimp
pointers to register the internal procedures with. Changed some
newlines in the generated code.
* app/pdb/*_cmds.c
* app/pdb/internal_procs.[ch]: regenerated.
* app/core/gimppdbprogress.[ch]
* app/widgets/gimppdbdialog.[ch]: added "pdb" CONSTRUCT_ONLY
properties.
* app/plug-in/plug-in-progress.c
* app/gui/gui-vtable.c: pass gimp->pdb when creating them.
* app/widgets/gimpbrushselect.c
* app/widgets/gimpfontselect.c
* app/widgets/gimpgradientselect.c
* app/widgets/gimppaletteselect.c
* app/widgets/gimppatternselect.c: use the new local pdb pointers
instead of some foo->bar->gimp->pdb overkill.
2006-04-15 Michael Natterer <mitch@gimp.org>
* app/core/gimp-utils.[ch]: added
gimp_g_type_instance_get_memsize() and
gimp_g_param_spec_get_memsize().
Changed gimp_g_object_get_memsize() to use
gimp_g_type_instance_get_memsize().
Handle more boxed types in gimp_g_value_get_memsize().
* app/core/gimp.c (gimp_get_memsize): add the memsize of some
members that are new or were forgotten.
* app/pdb/gimpprocedure.c
* app/pdb/gimppluginprocedure.c: implement GimpObject::get_memsize().