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.