2006-04-06 Sven Neumann <sven@gimp.org>
* app/core/gimpdata.c (gimp_data_error_quark)
* libgimpconfig/gimpconfig-error.c (gimp_config_error_quark)
* libgimpthumb/gimpthumb-error.c (gimp_thumb_error_quark):
g_quark_from_static_string() is already reasonably fast, not much
point in caching the result.
2006-04-05 Sven Neumann <sven@gimp.org>
* app/base/lut-funcs.[ch]: minor code cleanup, renamed a function,
declared some functions as static.
* app/core/gimpdrawable-equalize.c: changed accordingly.
2006-04-05 Tor Lillqvist <tml@novell.com>
* app/core/gimpobject.c (gimp_object_get_memsize): Check if
object->name is NULL before attempting to pass it to
g_strdup_printf(). Use "anonymous" for unnamed objects.
2006-04-05 Michael Natterer <mitch@gimp.org>
* app/plug-in/plug-in-types.h
* app/plug-in/plug-in-proc-def.[ch]: renamed to GimpPlugInProcedure
and made a GObject derived from GimpProcedure (instead of having
a pointer to a GimpProcedure). Added image_types and file_magic
utility functions taken from plug-ins.[ch]. Still lives in the
same crappy files because I am undecided where to put it...
* app/pdb/gimpprocedure.c (gimp_procedure_real_execute): removed
switch() statement and always call the internal marshaller because
GimpProcedure::execute() is properly overridden by
GimpPlugInProcedure now.
* app/plug-in/plug-ins.[ch]: removed the mime_type and file_magic
utilities added to GimpPlugInProcedure.
* app/actions/file-commands.c
* app/actions/plug-in-actions.[ch]
* app/actions/plug-in-commands.[ch]
* app/core/gimp-gui.[ch]
* app/core/gimp.[ch]
* app/core/gimpimage.[ch]
* app/dialogs/file-open-dialog.c
* app/dialogs/file-save-dialog.c
* app/dialogs/print-size-dialog.c
* app/file/file-open.[ch]
* app/file/file-save.[ch]
* app/file/file-utils.[ch]
* app/gui/gui-vtable.c
* app/menus/plug-in-menus.[ch]
* app/plug-in/plug-in-def.[ch]
* app/plug-in/plug-in-message.c
* app/plug-in/plug-in-rc.c
* app/plug-in/plug-in-run.c
* app/plug-in/plug-in.c
* app/plug-in/plug-ins-query.c
* app/widgets/gimpactiongroup.[ch]
* app/widgets/gimpdnd-xds.c
* app/widgets/gimpfiledialog.[ch]
* app/widgets/gimpfileprocview.[ch]
* app/widgets/gimppluginaction.[ch]
* app/xcf/xcf.c
* tools/pdbgen/pdb/fileops.pdb
* tools/pdbgen/pdb/plug_in.pdb: changed addordingly.
* app/pdb/fileops_cmds.c
* app/pdb/plug_in_cmds.c: regenerated.
2006-04-03 Michael Natterer <mitch@gimp.org>
* app/core/gimpparamspecs.[ch]: added a shitload of new GTypes and
corresponding GParamSpecs to use them as PDB arguments.
Each GimpPDBArgType has one or more corresponding GTypes in the
core now.
* app/pdb/gimpargument.[ch] (struct GimpArgument)
(struct GimpArgumentSpec): removed "value" member because the
GValue's/GParamSpec's GType carries just as much information now.
(gimp_argument_type_to_pdb_arg_type): new function which maps
GTypes to GimpPDBArgType.
(gimp_pdb_arg_type_to_string): formerly known as
procedural_db_type_name().
* app/pdb/gimpprocedure.[ch]
* app/pdb/procedural_db.[ch]: completely switch to GValue. Use the
new GParamSpecs for procedure arguments. GimpPDBArgType is only
used for adding compat args/values of plug-in procedures.
(procedural_db_run_proc): the va_list expects a sequence of
(GType, value, GType, value, ..., G_TYPE_NONE) now.
* app/plug-in/plug-in-params.[ch]: changed accordingly.
(plug_in_param_defs_check): removed this function.
* app/plug-in/plug-in-message.c (plug_in_handle_proc_install): use
plug_in_proc_args_check() instead and initialize the GimpProcedure
before doing so.
* tools/pdbgen/app.pl
* tools/pdbgen/pdb.pl: use the new param spec types and their
utility functions. Changed argument/value registration
accordingly.
* app/pdb/procedural-db-query.c
* app/actions/plug-in-commands.c
* app/actions/vectors-commands.c
* app/core/gimppdbprogress.c
* app/dialogs/about-dialog.c
* app/file/file-open.c
* app/file/file-save.c
* app/plug-in/plug-in-progress.c
* app/plug-in/plug-in-rc.c
* app/plug-in/plug-ins.c
* app/widgets/gimpbrushselect.c
* app/widgets/gimpfontselect.c
* app/widgets/gimpgradientselect.c
* app/widgets/gimphelp.c
* app/widgets/gimppaletteselect.c
* app/widgets/gimppatternselect.c
* tools/pdbgen/pdb/fileops.pdb
* tools/pdbgen/pdb/image.pdb
* tools/pdbgen/pdb/procedural_db.pdb: changed accordingly.
* app/pdb/*_cmds.c: regenerated.
2006-04-02 Michael Natterer <mitch@gimp.org>
* app/core/gimpparasitelist.[ch] (gimp_parasite_list_add): removed
the return value again.
(gimp_parasite_list_find): return a const parasite.
* app/core/gimp-parasites.[ch]
* app/core/gimpimage.[ch]
* app/core/gimpitem.[ch] (*_parasite_attach): take a const
parasite. Make a local copy of the parasite struct because
gimp_parasite_shift_parent() changes it.
(*_parasite_find): return a const parasite.
* app/core/gimptemplate.c
* app/text/gimptextlayer-xcf.c
* app/xcf/xcf-load.c: changed accordingly.
2006-04-02 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-undo-push.[ch]
(gimp_image_undo_push_image,item_parasite): use "const GimpParasite*"
insted of gpointer for the parasite parameter.
* app/core/gimpparasitelist.[ch] (gimp_parasite_list_add): added
const to the parasite parameter, return the actually added
parasite (which is a copy).
* app/core/gimpunit.[ch] (_gimp_unit_new): added const to all
string parameters.
2006-04-02 Michael Natterer <mitch@gimp.org>
* app/core/gimpparamspecs.[ch]: removed GIMP_TYPE_PARASITE,
GIMP_TYPE_PARAM_PARASITE and the GimpRGB utility functions. Some
fixes/cleanup in the new array and string array code.
* libgimpbase/gimpbase.def
* libgimpbase/gimpparasite.[ch]
* libgimpcolor/gimpcolor.def
* libgimpcolor/gimprgb.[ch]: added the parasite and rgb stuff here.
* app/pdb/gimpargument.c: #include "libgimpbase/gimpbase.h"
* app/pdb/procedural_db.c: removed unused variable.
2006-03-31 Sven Neumann <sven@gimp.org>
* app/core/gimpimagefile.c (gimp_imagefile_get_new_pixbuf): use
"gtk-dialog-question" instead of "gimp-wilber-eek" to indicate a
missing thumbnail.
2006-03-30 Michael Natterer <mitch@gimp.org>
* app/pdb/procedural_db.c (procedural_db_execute_proc): don't
memset(0) the array of return values if the procedure didn't
succeed. GValues don't like to be treated like that and I don't
understand what the memsetting is good for. It just looks like a
very bad hack.
* app/file/file-open.c: additionally, don't access return_vals[>0]
unless the procedure returned successfully.
* app/core/gimppdbprogress.c
* app/widgets/gimppdbdialog.c: procedural_db_run_proc() always
returns non-NULL, no need to check for it.
2006-03-30 Michael Natterer <mitch@gimp.org>
* app/pdb/procedural_db.[ch] (struct Argument): replace the value
union by a GValue.
(procedural_db_argument_init)
(procedural_db_compat_arg_init): new functions to initialize
an Argument. They call g_value_init() on the Argument's value.
(procedural_db_arguments)
(procedural_db_return_values): initialize the returned Argument
arrays so their GValues are ready to use. Allow to get the
(unsuccessful) return values of a NULL ProcRecord.
(procedural_db_destroy_args): g_value_unset() the values. Added a
"gboolean full_destroy" parameter. Its only effect is to destroy
PDB arrays, everything else is nicely memory managed by GValue.
(procedural_db_execute)
(procedural_db_run_proc): do GValue stuff. Added n_args and
n_return_vals parameters to execute().
(procedural_db_execute_proc): private function to execute a
procedure. Validates the passed in arguments using the registered
GParamSpecs before passing them to the resp. exec method.
* app/plug-in/plug-in-params.[ch] (plug_in_params_to_args): needs
an array of ProcArgs now in order to initialize the Arguments'
GValues correctly. Passing NULL ProcArgs uses
procedural_db_compat_arg_init(), so procedures (plug-ins)
returning more values than expected work.
(plug_in_args_to_params): do GValue stuff here too.
(plug_in_args_destroy): removed this function,
procedural_db_destroy_args() does the same now.
* app/plug-in/plug-in-message.c (plug_in_handle_proc_run):
simplified quite a bit because everything returns n_return_values
now. Call plug_in_params_to_args() only of the procedure was found.
(plug_in_handle_proc_return_priv): pass ProcRecs to
plug_in_params_to_args().
* app/batch.c
* app/actions/plug-in-commands.c
* app/actions/vectors-commands.c
* app/core/gimppdbprogress.c
* app/dialogs/about-dialog.c
* app/file/file-open.c
* app/file/file-save.c
* app/plug-in/plug-ins.c
* app/plug-in/plug-in-progress.c
* app/plug-in/plug-in-run.[ch]
* app/widgets/gimphelp.c
* app/widgets/gimppdbdialog.c
* app/xcf/xcf.c
* tools/pdbgen/pdb/fileops.pdb: changed accordingly: don't
g_new/g_free Argument arrays, always use procedural_db_foo()
functions. Use GValue functions to get/set Arguments.
* tools/pdbgen/pdb.pl: added get_value_func and set_value_func to
all PDB types. Removed id_func, id_ret_func and check_func. Added
flags which indicated that a type is an ID. Removed unused utility
functions.
* tools/pdbgen/lib.pl: use the flag instead of looking at
functions and value types.
* tools/pdbgen/app.pl: use the get_value_func and set_value_func
to marshal inargs and outargs. Removed all checks performed on
inargs because that's done by GParamSpec validation now. Added the
missing bits to register excluded values with GimpParamSpecEnum.
* app/pdb/*_cmds.c: regenerated.
2006-03-29 Michael Natterer <mitch@gimp.org>
* app/core/gimpparamspecs.[ch]: added GimpParamSpecEnum, which is
a GParamSpecEnum plus the possibility to exclude values.
Fixed lots of validation functions.
Made all structs and macros public.
2006-03-28 Michael Natterer <mitch@gimp.org>
* app/core/gimpparamspecs.[ch] (gimp_param_spec_string): reordered
params to be consistent with other param specs.
(gimp_value_get_rgb): utility function which reads the value
into a GimpRGB struct, instead of returning a pointer.
(gimp_value_set_rgb): added for symmetry. Just calls
g_value_set_boxed().
2006-03-27 Michael Natterer <mitch@gimp.org>
* app/core/Makefile.am
* app/core/gimpparamspecs.[ch]: new unused files. Checked in so
they can be easily reviewed.
2006-03-24 Sven Neumann <sven@gimp.org>
* app/actions/colormap-editor-actions.c
* app/actions/gradient-editor-actions.c
* app/actions/palette-editor-actions.c
* app/core/gimp-edit.c
* app/core/gimpchannel-select.c: some more string changes, mainly
avoiding the use of FG and BG in labels where there's no need for
being concise.
2006-03-24 Sven Neumann <sven@gimp.org>
* app/tools/gimprectselecttool.c: renamed from "Rect Select" to
"Rectangle Select" (bug #335715).
* app/core/gimpchannel-select.c (gimp_channel_select_rectangle):
string change (bug #335715).
* plug-ins/common/svg.c: follow the change to the file format
label done in the shared-mime-info package (bug #335716).
* configure.in: fixed the --without-libtiff case in the summary
(bug #335764).
2006-03-22 Sven Neumann <sven@gimp.org>
* app/base/siox.[ch] (siox_foreground_extract): let the caller
specify a region of interest. Call the progress function more often.
* app/core/gimpdrawable-foreground-extract.c
(gimp_drawable_foreground_extract_siox): pass a region of interest
to siox_foreground_extract() to speed up the SIOX tool.
2006-03-13 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-guides.[ch]: added gimp_image_get_guide() and
gimp_image_get_next_guide(), which take a guide_ID and return the
image's GimpGuide with that ID (the one after that for next_guide())
* tools/pdbgen/pdb/guides.pdb: use them instead of having this
code here.
* app/pdb/guides_cmds.c: regenerated.
2006-03-13 Sven Neumann <sven@gimp.org>
* app/core/gimpimage.c (gimp_image_raise_layer_to_top,
gimp_image_lower_layer_to_bottom): silently return TRUE if the
layer is already at the top (or the bottom respectively).
2006-03-02 Michael Natterer <mitch@gimp.org>
* app/core/gimppickable.[ch]: added new methods ::get_bytes() and
::flush()
* app/core/gimpchannel.c
* app/core/gimpdrawable.c
* app/core/gimpimagemap.c
* app/core/gimpprojection.c: implement ::get_bytes()
* app/core/gimpprojection.c: implement ::flush() (immediately
process both the idle renderer's queue and the unflushed update
areas, to make sure that any reading from the projection will
re-construct it).
* app/core/gimp-edit.c
* app/core/gimpchannel.c
* app/core/gimpimage-contiguous-region.c
* app/core/gimpimage-crop.c
* app/core/gimppalette-import.c
* app/paint/gimpclone.c
* app/tools/gimpbycolorselecttool.c
* app/tools/gimpiscissorstool.c
* tools/pdbgen/pdb/image.pdb: use the pickable interface more
consistently when reading from any drawable or the projection, and
call gimp_pickable_flush() before doing so. Fixes bug #332933.
* app/core/gimpimage-pick-color.c: added comment why the we don't
call gimp_pickable_flush() here.
* app/pdb/image_cmds.c
* libgimp/gimpimage_pdb.c: regenerated.
2006-02-21 Michael Natterer <mitch@gimp.org>
* app/plug-in/Makefile.am
* app/plug-in/plug-in-data.[ch]: new files which keep the
plug-in data list.
* app/pdb/procedural_db.[ch]: removed here, it only cluttered the
file with unrelated functionality.
* app/core/gimp.[ch]
* app/actions/plug-in-commands.c
* tools/pdbgen/pdb/procedural_db.pdb: changed accordingly.
* app/pdb/procedural_db_cmds.c: regenerated.
2006-02-20 Sven Neumann <sven@gimp.org>
* app/config/gimpcoreconfig.[ch]
* app/config/gimprc-blurbs.h
* app/core/gimp.[ch]: keep a history of recently used plug-ins.
* app/plug-in/plug-in-run.[ch] (plug_in_repeat): pass an index
into the plug-in history.
* app/actions/plug-in-actions.c
* app/actions/plug-in-commands.c
* app/menus/plug-in-menus.c
* menus/image-menu.xml.in: added a submenu with recently used
plug-ins to the Filters menu. Fixes bug #148855.
2006-01-31 Michael Schumacher <schumaml@cvs.gnome.org>
* app/core/gimpbrushpipe.c: applying a patch by Joao S. O. Bueno
Calligaris which implements PIPE_SELECT_VELOCITY for brush
pipes. Fixes bug #150227.
2006-01-18 Michael Natterer <mitch@gimp.org>
* app/config/config-types.c: define GIMP_PARAM_STATIC_STRINGS
which is G_PARAM_STATIC_NAME|NICK|BLURB. Also define
GIMP_PARAM_READABLE, _WRITABLE and _READWRITE which include
GIMP_PARAM_STATIC_STRINGS.
* app/*/*.c: use them for all object properties so their
strings are not copied.
2006-01-14 Michael Natterer <mitch@gimp.org>
* app/config/gimpconfig-utils.[ch] (gimp_config_connect_full):
variant of gimp_config_connect() which allows the connected
objects to have different propertynames.
* app/widgets/widgets-enums.[ch]: removed enum GimpViewType...
* app/core/core-enums.[ch]: ...and added it here.
* app/widgets/gimpviewablebutton.[ch] (gimp_viewable_button_new):
added "button_preview_size" parameter so the button and popup
preview sizes can be specified separately.
* app/widgets/gimptemplateeditor.c: changed accordingly.
* app/widgets/gimpviewablebox.[ch] (gimp_prop_*_box_new):
new functions which take additional "view_type_prop" and
"view_size_prop" parameters and sync the passed context's
properties with the resp. properties of the viewable button.
* app/paint/gimppaintoptions.[ch]
* app/tools/gimpbucketfilloptions.c
* app/tools/gimpclonetool.c
* app/tools/gimppaintoptions-gui.c
* app/tools/gimptextoptions.[ch]: added view-type and view-size
properties to the options objects and use the new viewable box
constructors so the selected view types and sizes are persistant
across sessions. Fixes bug #315443.
2006-01-02 Sven Neumann <sven@gimp.org>
* app/core/gimpimage-convert-data.h
* app/core/gimpimage-convert.c: applied patch by Adam D. Moss that
replaces the default dither matrix by a 32x32 Bayer pattern (see
bug #136604).
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-12-23 Michael Natterer <mitch@gimp.org>
* app/core/gimpchannel.c
* app/core/gimpdrawable.c
* app/core/gimplayer.c
* app/core/gimplayermask.c
* app/text/gimptextlayer.c
* app/vectors/gimpvectors.c: moved variables to local scopes in
implementations of GimpItem::duplicate()
2005-12-11 Michael Natterer <mitch@gimp.org>
* app/core/gimpstrokedesc.c (gimp_stroke_desc_new): fall back to
the paintbrush if we can't get the paint method from the active
tool (because there is no active tool). Fixes bug #323778.
2005-12-10 Michael Natterer <mitch@gimp.org>
* app/config/*.c
* app/core/*.c
* app/display/*.c
* app/text/*.c
* app/vectors/*.c: port to G_DEFINE_TYPE() and friends. Some related
core reordering and cleanup.
2005-11-16 Michael Natterer <mitch@gimp.org>
* app/core/gimplayer.c (gimp_layer_convert):
gimp_layer_transform_color() wants the destination image passed,
not the source image.
2005-11-13 Sven Neumann <sven@gimp.org>
* app/core/gimpdatafactory.c (gimp_data_factory_data_free): do not
return a value from a void function. Fixes bug #321333.
2005-11-05 Sven Neumann <sven@gimp.org>
* tools/pdbgen/app.pl: removed calls to the splash update function
during initialization of internal procedures. This only takes time
and doesn't provide useful information.
* app/pdb/internal_procs.[ch]: regenerated.
* app/pdb/procedural_db.[ch]: changed accordingly.
* core/gimp.c: call the splash update function from here.
2005-11-05 Sven Neumann <sven@gimp.org>
* app/gui/splash.c: added some commented-out debug output that can
be used to get an idea of where the startup time is being spent.
* app/core/gimp.c
* app/pdb/internal_procs.c
* app/pdb/procedural_db.c
* app/plug-in/plug-ins.c
* tools/pdbgen/app.pl: cosmetic changes.
2005-11-04 Sven Neumann <sven@gimp.org>
* app/core/gimpenvirontable.c (gimp_environ_table_load_env_file):
gimp_config_path_expand() only ever returns NULL if called with a
NULL path argument.
2005-11-01 Sven Neumann <sven@gimp.org>
* app/core/gimpbrushgenerated.c (gimp_brush_generated_load): use
gimp_brush_generated_new() to create the brush object. Removed
redundant calls to gimp_data_dirty().
* app/core/gimpdata.c: freeze the data object during construction.
2005-10-31 Michael Natterer <mitch@gimp.org>
Applied modified patch from Luis de Bethencourt Guimera which adds
a "Save document history" prefs option. Fixes bug #140001.
* app/config/gimprc-blurbs.h
* app/config/gimpcoreconfig.[ch]: added boolean property
"save-document-hitory".
* app/core/gimp.c
* app/file/file-open.c
* app/file/file-save.c: don't save the document history and don't
add files to the desktop-wide list of recently used files if the
option is FALSE.
* app/dialogs/preferences-dialog.c: added its toggle to the
"Environment" page.
2005-10-31 Sven Neumann <sven@gimp.org>
* app/core/gimpdata.[ch]
* app/core/gimpdatafactory.c: applied a heavily modified version
of the patch provided by Shlomi Fish in bug #311740. Introduces a
cache to speed up reloading of data files.
* app/actions/data-commands.c: set gimp busy while refreshing data
factories.
* app/widgets/gimpwidgets-utils.c (gimp_widget_accel_changed):
free the return value of gimp_get_accel_string().
2005-10-25 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-contiguous-region.c
(struct ContinuousRegionData)
(gimp_image_contiguous_region_by_color)
(contiguous_region_by_color): the color samples are always RGB or
RGBA, so always compare 3 or 4 bytes of pixel data, and not just
the number of bytes of the drawable/projection. Fixes "select by
color" on GRAYA (bug #319683).
2005-10-17 Sven Neumann <sven@gimp.org>
* app/base/base-enums.h
* app/base/siox.[ch]
* app/core/gimpdrawable-foreground-extract.[ch]
* app/tools/gimpforegroundselecttool.[ch]: export stateful SIOX to
the core API and use it from the foreground selection tool.
2005-10-17 Sven Neumann <sven@gimp.org>
* app/core/gimpdrawable-foreground-extract.[ch]
* app/tools/gimpforegroundselectoptions.[ch]
* app/tools/gimpforegroundselecttool.c: added "multiblob"
property to GimpForegroundSelectOptions and pass it to
gimp_drawable_foreground_extract_siox().
2005-10-12 Sven Neumann <sven@gimp.org>
* app/base/base-types.h
* app/base/siox.[ch]: applied patch from Gerald Friedland that
introduces a state to the SIOX operation.
* app/core/gimpdrawable-foreground-extract.c: adapted to the new API.
2005-10-10 Michael Natterer <mitch@gimp.org>
* app/core/gimpviewable.c (gimp_viewable_get_description): set the
"tooltip" return value to NULL before calling the virtual function.
* app/core/gimpbrush.c
* app/core/gimpbuffer.c
* app/core/gimpchannel.c
* app/core/gimplayer.c
* app/core/gimppaintinfo.c
* app/core/gimppalette.c
* app/core/gimppattern.c
* app/core/gimptoolinfo.c (get_description): don't do it here.
* app/core/gimpbuffer.c
* app/core/gimppaintinfo.c: untabbify, cleanup.
* app/core/gimpobject.c: emit "notify::name" whenerver the name
changes, clenup.
2005-10-07 Sven Neumann <sven@gimp.org>
* app/core/gimppalette-import.[ch]: added new function
gimp_palette_import_from_drawable(), respecting the selection as
suggested in bug #316212.
2005-10-02 Simon Budig <simon@gimp.org>
* app/core/gimpcoords.c: use ABS instead of fabs.
* app/core/gimpimage-snap.c: Use proper default values for the
coordinates.
* app/vectors/gimpbezierstroke.c: Fix a bug plus add some debug
output. For some reason does not snap yet.
2005-10-01 Simon Budig <simon@gimp.org>
* app/core/gimpcoords.[ch]: Added small utility function for the
manhattan metric.
* app/vectors/gimpstroke.[ch]: virtualized stubs provided by mitch
* app/vectors/gimpbezierstroke.c: Reworked some internal functions
to make it easier to access the parameters for the coordinates of an
stroke interpolation. Simplified the straight line test. Added an
implementation of the _nearest_tangent_get () function that does
not yet seem to work properly. Not sure where the problem is.
2005-09-30 Michael Natterer <mitch@gimp.org>
* app/vectors/gimpstroke.[ch]: added stubs of two new snapping
functions.
* app/core/gimpimage-snap.c: removed their #defines here.
2005-09-26 Sven Neumann <sven@gimp.org>
* app/core/gimpdata.c
* app/file/file-save.c
* app/file/file-open.c: use g_access() from gstdio.h.
* app/config/gimpconfig-file.c (gimp_config_file_copy)
* libgimpthumb/gimpthumbnail.c: use g_chmod() from gstdio.h.
* app/file/gimprecentlist.c
* libgimpconfig/gimpconfigwriter.c: use g_creat() from gstdio.h.
2005-09-24 Hans Breuer <hans@breuer.org>
* **makefile.msc : updated
* app/dialogs/user-install-dialog.c : only add the migrate page if
there is something to migrate from. Avoids on version being NULL.
* app/dialogs/file-save-dialog.c : the g_print() output was crashing
on the assumption that ->menu_label != NULL. It is for colorhtml.py.
* app/widgets/gimpselectiondata.c : use HAVE_UNISTD_H and move
* process.h definition by G_OS_WIN32 below it being defined
* app/widgets/gimpwidgets-utils.c(gimp_window_get_native) : cast
return value to (GdkNativeWindow) it is not necessary an int.
* libgimpwidgets/gimpwidgets.def : added gimp_zoom_type_get_type
* plug-ins/help/gimp-help-lookup.c : dynamic lookup of help_root
instead of hard-coding DATADIR/GIMP_HELP_PREFIX
* plug-ins/xjt/xjt.c : there is no pid_t with msvc, typedef one.
2005-09-19 Sven Neumann <sven@gimp.org>
* app/core/gimpimagefile.c (gimp_imagefile_get_new_pixbuf): use
GTK_STOCK_DIRECTORY for GIMP_THUMB_STATE_FOLDER.
2005-09-13 Sven Neumann <sven@gimp.org>
* app/core/gimppalette-import.c (gimp_palette_import_from_image):
ignore transparent pixels as suggested in bug #316212.
2005-09-11 Michael Natterer <mitch@gimp.org>
* app/core/core-enums.h (enum GimpUndoType): replaced lots of
bogus strings by properly translatable ones. Many of them are
fallbacks anyway, but they should be presentable to the user.
Fixes bug #315964.
2005-09-09 Michael Natterer <mitch@gimp.org>
Added parent window API to the GimpProgress interface and to
the libgimp progress stuff. Might look strange, but does
the right thing in almost all cases (image window, file dialog,
script-fu dialog etc). Fixes bug #62988.
* app/core/gimpprogress.[ch]: added GimpProgress::get_window()
which should return a toplevel window ID if the progress is in a
window that wants to be the transient parent of plug-in dialogs.
* app/widgets/gimpwidgets-utils.[ch] (gimp_window_get_native): new
function which returns the window handle of a GtkWindow's GdkWindow.
* app/widgets/gimpfiledialog.c: implement ::get_window().
* app/display/gimpdisplay.[ch]: ditto. Removed window handle API.
* app/gui/gui-vtable.c: changed accordingly.
* libgimpbase/gimpbaseenums.[ch] (enum GimpProgressCommand):
added GIMP_PROGRESS_COMMAND_GET_WINDOW.
* app/plug-in/plug-in-progress.[ch] (plug_in_progress_get_window):
new function. Also renamed some functions to match the
GimpProgress interface, and not the legacy PDB procedure names.
* tools/pdbgen/pdb/progress.pdb
* app/core/gimppdbprogress.c: implement get_window() on both
sides of the wire, keeping backward compatibility (hopefully).
* libgimp/gimpprogress.[ch]: deprecated gimp_progress_install()
and added gimp_progress_install_vtable() which takes a vtable with
padding to be extensible. Added get_window() vtable entry and
dispatch it accordingly. Also added pulse() which was implemented
in a hackish way before. Everything is of course backward
compatible.
* libgimp/gimpprogressbar.c: inmplement the get_window() stuff
so a plug-in dialog containing a progress can be the transient
parent of another dialog in another plug-in.
* libgimp/gimpui.[ch] (gimp_ui_get_progress_window): new function
which returns a foreign GdkWindow of this plug-ins progress
window.
Renamed gimp_window_set_transient_for_default_display() to
gimp_window_set_transient() and make it use the progress' window
handle instead of the display's (which is the right thing to do in
almost all cases).
* libgimp/gimp.def
* libgimp/gimpui.def: add the new functions.
* tools/pdbgen/enums.pl
* app/pdb/internal_procs.c
* app/pdb/progress_cmds.c
* libgimp/gimpprogress_pdb.[ch]: regenerated.
* libgimp/gimpexport.c
* plug-ins/*/*.c: follow API change.
2005-09-08 Michael Natterer <mitch@gimp.org>
* app/core/gimplayer-floating-sel.c (floating_sel_boundary): if
the floating selection has no alpha, manually create BoundSegs of
its outline instead of calling boundary_find() (which creates a
boundary of the last channel). Fixes bug #145373.
* app/widgets/gimplayertreeview.c
(gimp_layer_tree_view_floating_selection_changed): update all
layer names' text attributes, not only for layers with alpha.
Fixes layer name display when making a new layer out of a floating
selection without alpha.
2005-09-07 Michael Natterer <mitch@gimp.org>
* app/core/gimpchannel-combine.c (gimp_channel_combine_ellipse):
use gimp_rectangle_intersect() instead of just looking at the
passed in w,h to figure whether nothing needs to be done. While
the algorithm does nicely with an entirely out-of-image ellipse,
the channel's bounds were set to a rectangle of zero width or
height, which caused subsequent calls to gimp_channel_bounds() to
return broken bounds. Fixes bug #315417.
(gimp_channel_combine_rect)
(gimp_channel_combine_mask): use gimp_rectangle_intersect() here
too instead of the usual unclear CLAMPing on x1,y1,x2,y2.
2005-09-05 Sven Neumann <sven@gimp.org>
Address bug #307971:
* app/core/gimp-gui.[ch]
* app/display/gimpdisplay.[ch]
* app/gui/gui-vtable.c
* tools/pdbgen/pdb/display.pdb: added PDB function to obtain a
window handle on an image display.
* app/pdb/display_cmds.c
* app/pdb/internal_procs.c
* libgimp/gimpdisplay_pdb.[ch]: regenerated.
* libgimp/gimpui.[ch]: added functions to set a GtkWindow transient
to an image display.
* plug-ins/common/gauss.c: use the new function exemplarily.
* libgimp/gimp.def
* libgimp/gimpui.def: updated.
2005-09-05 Michael Natterer <mitch@gimp.org>
* app/core/gimp-edit.c: don't let named cut/copy affect the global
buffer. Fixes bug #315225. Also make "Global Buffer" translatable.
2005-09-05 Sven Neumann <sven@gimp.org>
* app/core/gimp.[ch]
* app/core/gimpimage-new.c: removed the confusing and redundant
feature of having the New Image dialog default to the size of the
global buffer. Please use Paste as New instead. Fixes bug #315106.
2005-09-04 Michael Natterer <mitch@gimp.org>
Cleaned up and fixed the order in which default tool options and
user context values are initialized, and added loading / saving of
the global user context. Fixes bug #165078.
* app/core/Makefile.am
* app/core/gimp-contexts.[ch]: new files which manage the global
contexts. Contains gimp_contexts_init/exit/load/save/clear().
* app/core/gimp.c: use the new init/exit functions instead of
implementing the stuff here.
* app/tools/gimp-tools.c: load/save/clear the user context from
here so it follows the same logic as the tool options. Reset all
tool options before loading the user context and copy the user
context's property to all tool options before loading tool
options.
* app/core/gimptoolinfo.c (gimp_tool_info_new): don't initialize
the tool options with the users context's properties. It's way too
early here and they will be overwritten later.
* app/widgets/gimpdevices.c (gimp_devices_restore): initialize all
device contexts with the user context's properties before loading
the devices and copying the active one back to the user context.
2005-09-03 Michael Natterer <mitch@gimp.org>
* app/base/pixel-region.[ch]: some general cleanup.
(pixel_region_init_temp_buf)
(pixel_region_init_data): new functions which initialize pixel
regions on TempBufs and on raw contiguous arrays of pixel data.
(pixel_region_configure): fixed a bug that has probably been there
forever: when processing contiguous (non-tiled) data, interpret
the original x and y coordinates of the region as offsets into
the data. Before this fix, the initial x and y were simply ignored
(by using them in a broken way), thus always forcing the upper
left corner of the region being the beginning of the passed data.
Lots of code was working around this problem by setting the
pixel_region's data pointer to the proper starting pixel of the
region in the middle the buffer.
* libgimp/gimppixelrgn.c: some general cleanup.
(gimp_pixel_rgn_configure): same fix as above. Fortunately, nobody
seems to know that libgimp pixel regions can be used on arrays of
data, just as core ones. Only two plug-ins were using this
feature, and they are antique and written by spencer and federico,
respectively. They both don't use offsets into the buffers and are
not affected by this change. It's highly unlikely that anybody out
there knows/uses this feature, so it can IMHO be safely changed.
* app/base/temp-buf.c
* app/core/gimpbuffer.c
* app/core/gimpdrawable-combine.c
* app/core/gimpdrawable-preview.c
* app/core/gimpimage-preview.c
* app/core/gimplayer.c
* app/paint/gimpbrushcore.c
* app/paint/gimpclone.c
* app/paint/gimpconvolve.c
* app/paint/gimpdodgeburn.c
* app/paint/gimppaintcore.c
* app/paint/gimpsmudge.c
* app/tools/gimpiscissorstool.c
* app/tools/gimppainttool.c: use the pixel_region_init_foo()
functions instead of initializing regions of TempBufs and raw data
manually. Removed lots of workarounds for the broken offset
handling. The changed places of code are much more readable now.
2005-09-03 Michael Natterer <mitch@gimp.org>
* app/core/gimp-edit.[ch] (gimp_edit_paste_as_new): don't create a
display here.
(gimp_edit_named_cut)
(gimp_edit_named_copy)
(gimp_edit_named_copy_visible): new functions containing named
buffer wrappers around the functions affecting the global buffer
only.
* app/actions/edit-commands.c: use the new functions instead of
implementing them here, create a display for the image returned
by paste as new.
* app/actions/buffers-commands.c
* app/widgets/gimptoolbox-dnd.c: create displays here too.
* tools/pdbgen/pdb/edit.pdb: added wrappers for paste as new and
wrappers for all the cut/copy/paste named stuff.
Fixes bug #315130. Cleaned up and de-obfuscated.
* libgimp/gimp.def: changed accordingly.
* app/pdb/edit_cmds.c
* app/pdb/internal_procs.c
* libgimp/gimpedit_pdb.[ch]: regenerated.
2005-09-01 Sven Neumann <neumann@jpk.com>
* app/core/gimppalette.[ch]: reverted, it duplicates existing
functionality.
* app/core/gimppalette-import.c
(gimp_palette_import_from_indexed_image): name the colors using
their index in the colormap.
2005-08-20 Michael Natterer <mitch@gimp.org>
* app/base/boundary.[ch]: renamed puclic functions, defines and
enums to live in a proper "boundary" namespace. Cleaned up and
simplified internal code even more.
* app/core/gimpchannel.c
* app/core/gimpdrawable-stroke.c
* app/core/gimplayer-floating-sel.c
* app/paint/gimppaintcore-stroke.c
* app/tools/gimpeditselectiontool.c
* app/tools/gimpfuzzyselecttool.c
* app/tools/gimppainttool.c: changed accordingly.
2005-08-18 Sven Neumann <sven@gimp.org>
* app/core/gimptemplate.c: go back to using dpi as the default
resolution unit.
* app/core/gimp-utils.[ch]: moved the code to determine the unit
from the locale settings here as gimp_get_default_unit().
* app/dialogs/print-size-dialog.c
* app/widgets/gimpimagepropview.c: use the unit returned by the
new function to display the print size (bug #107497).
2005-08-17 Sven Neumann <sven@gimp.org>
* configure.in: check for langinfo.h and _NL_MEASUREMENT_MEASUREMENT.
* app/core/gimptemplate.c: try to determine the default unit from
the locale settings. Supposed to fix bug #107497.
2005-08-13 Manish Singh <yosh@gimp.org>
* app/core/gimpimage-preview.c (gimp_image_get_new_preview): if the
offsets of the layer are such that they are just on the border of
the image, detect that and bail instead of trying to make a
sub-preview with a 0 dimension.
2005-08-09 Michael Natterer <mitch@gimp.org>
* app/paint-funcs/paint-funcs.[ch] (extract_from_inten_pixels)
(extract_from_indexed_pixels): pass src_bytes and dest_bytes to
these functions instead of just the source's bytes and whether it
has an alpha. Honor dest_bytes when extracting instead of crashing
by always asuming that the destination has alpha.
Fixes bug #312392.
(extract_from_region): removed has_alpha paramater. pass
src->bytes and dest->bytes to above functions.
* app/core/gimpselection.c (gimp_selection_extract): changed
accordingly.
2005-08-09 Sven Neumann <sven@gimp.org>
* app/base/siox.[ch]
* app/core/gimpdrawable-foreground-extract.[ch]
* app/tools/gimpforegroundselectoptions.[ch]
* app/tools/gimpforegroundselecttool.c: renamed Granularity to
Color Sensitivity, both in the GUI and in the APIs.
2005-08-09 Sven Neumann <sven@gimp.org>
* app/core/gimplayer.c (gimp_layer_transform_color): take image
type instead of basetype of the source drawable. Handle conversion
from drawables without alpha channel.
(gimp_layer_new_from_region): handle source regions without alpha.
2005-08-08 Sven Neumann <sven@gimp.org>
* app/core/gimpscanconvert.[ch]: added the possibility to specify
a clip rectangle.
* app/base/siox.c (find_max_blob): use g_try_malloc().
2005-08-07 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-resize.c (gimp_image_resize_with_layers):
take care of sample points. Addresses bug #137776.
2005-08-06 Sven Neumann <sven@gimp.org>
* app/base/siox.[ch]: reordered parameters to match the order of
parameters in gimp_drawable_foreground_extract_siox().
* app/core/gimpdrawable-foreground-extract.c: changed accordingly.
* app/tools/gimpforegroundselectoptions.[ch]: draw slider value to
the right.
* app/tools/gimpfreeselecttool.[ch]: added
gimp_free_select_tool_select() to calls the virtual select() method.
* app/tools/gimpforegroundselecttool.[ch]: queue an idle select if
the smoothness or granularity values change in the tool options.
2005-08-06 Sven Neumann <sven@gimp.org>
* app/base/siox.[ch]
* app/core/gimpdrawable-foreground-extract.[ch]: expose all
parameters of the SIOX algorithm. Provide default values.
* app/tools/gimpforegroundselectoptions.[ch]: added properties and
user interface for all SIOX parameters.
* app/tools/gimpforegroundselecttool.c: changed accordingly.
2005-08-06 Sven Neumann <sven@gimp.org>
* plug-ins/benchmark-foreground-extract.py: pass run-mode to PDB
calls.
2005-08-06 Sven Neumann <sven@gimp.org>
* app/base/siox.c
* app/core/gimpdrawable-foreground-extract.c: moved rectangle
intersection into gimp_drawable_foreground_extract().
2005-08-06 Sven Neumann <sven@gimp.org>
* app/core/gimpscanconvert.[ch]: added gimp_scan_convert_compose(),
an alternative to gimp_scan_convert_render() that allows to compose
strokes on a drawable.
* app/tools/gimpforegroundselecttool.c: use the new function to
get rid of temporary channels for applying the strokes. Also fixed
calculation of stroke width from display scale.
2005-08-06 Sven Neumann <sven@gimp.org>
* app/batch.c: canonicalize hardcoded procedure names.
* app/base/siox.[ch]
* app/core/gimpdrawable-foreground-extract.[ch]
* app/tools/gimpforegroundselecttool.c: restrict the working area
to the double of the bounding box of the initial selection.
2005-08-05 Michael Natterer <mitch@gimp.org>
* app/core/gimpitem.c (gimp_item_parasite_attach): revert previous
change. Instead, don't push undos if the item is not attached.
2005-08-05 Sven Neumann <sven@gimp.org>
* app/xcf/xcf-load.c (xcf_load_image): disable undo while the
image is being loaded.
* app/core/gimpitem.c (gimp_item_parasite_attach): don't try to
push an undo step if undo is disabled. Gets rid of warnings while
loading an XCF file with undoable drawable parasites.
2005-07-31 Sven Neumann <sven@gimp.org>
* app/core/gimpscanconvert.c (gimp_scan_convert_render): pass 255
as value to gimp_scan_convert_render_internal().
* app/tools/gimpforegroundselecttool.[ch]: add paint strokes as
foreground color; draw function is missing.
2005-07-29 Sven Neumann <sven@gimp.org>
* app/base/siox.[ch]
* app/core/gimpdrawable-foreground-extract.c: pass progress_callback
and progress_data to siox_foreground_extract().
2005-07-29 Sven Neumann <sven@gimp.org>
* app/core/gimpdrawable-foreground-extract.[ch]: added a progress
parameter.
* app/tools/gimpforegroundselecttool.[ch]: changed the "select"
method to take a GimpDisplay instead of a GimpImage.
* tools/pdbgen/pdb/drawable.pdb
* app/tools/gimpforegroundselecttool.c: changed accordingly.
* app/pdb/drawable_cmds.c: regenerated.
2005-07-29 Sven Neumann <sven@gimp.org>
* libgimpbase/gimpbaseenums.[ch]: added GimpForegroundExtractMode
in preparation for other implementations to be added in the future.
* libgimp/gimpenums.c.tail
* tools/pdbgen/enums.pl: regenerated.
* app/core/gimpdrawable-foreground-extract.[ch]
* app/tools/gimpforegroundselecttool.c
* tools/pdbgen/pdb/drawable.pdb: added the mode parameter.
* app/pdb/drawable_cmds.c
* libgimp/gimpdrawable_pdb.[ch]: regenerated.
2005-07-29 Sven Neumann <sven@gimp.org>
* app/core/gimpscanconvert.[ch]: added
gimp_scan_convert_render_value(), a variant of
gimp_scan_convert_render() that allows to pass the foreground value.
* app/tools/gimpfreeselecttool.[ch]: added a virtual "select" method.
* app/tools/Makefile.am
* app/tools/gimp-tools.c
* app/tools/gimpforegroundselecttool.[ch]: added a rough first
version of foreground selection tool based on the SIOX algorithm.
Work in progress...
* app/widgets/gimphelp-ids.h: added help-id for the new tool.
2005-07-28 Sven Neumann <sven@gimp.org>
* app/base/siox.[ch]: accept an offset between pixels and mask,
work only on the intersection rectangle.
* app/core/gimpdrawable-foreground-extract.c: pass the drawable
offsets to siox_foreground_extract().
2005-07-28 Sven Neumann <sven@gimp.org>
* app/core/Makefile.am
* app/core/cpercep.[ch]: moved cpercep from here ...
* app/base/Makefile.am
* app/base/cpercep.[ch]: ... to here.
* app/base/siox.[ch]: use the cpercep routines for RGB->LAB
conversion, gives a 20% speedup. Removed normalization which seems
redundant. Make it work for grayscale and indexed, not only RGB.
* app/core/gimpdrawable-foreground-extract.c
* app/core/gimpimage-convert.c: changed accordingly.
2005-07-14 Michael Natterer <mitch@gimp.org>
* app/widgets/gimppaletteview.[ch]: added "entry-clicked" and
"color-dropped" signals. Completely handle color DND. Cleanup.
* app/core/gimpmarshal.list: marshallers for above signals.
* app/widgets/gimppaletteeditor.[ch]: chopped and reassembled.
Remove tons of code and use a GimpPaletteView instead of the
deprecated GtkPreview. Addresses bug #102204.
2005-07-13 Sven Neumann <sven@gimp.org>
* app/base/Makefile.am
* app/base/segmentator.[ch]: renamed to siox.[ch].
* app/base/siox.[ch]: added API docs and a link to the algorithm's
new homepage. Removed unused code.
* app/core/gimpdrawable-foreground-extract.c: changed accordingly.
2005-07-13 Michael Natterer <mitch@gimp.org>
* app/core/gimppalette.c (gimp_palette_add_entry): actually return
the added entry, and not always the palette's last entry (argh!).
* app/widgets/gimppaletteeditor.c: make sure the cursor is always
on the newly added color. Really fixes#15060 this time.
2005-07-12 Michael Natterer <mitch@gimp.org>
* app/core/gimp-edit.c: pass opacity and paint_mode to
gimp_edit_fill_internal() instead of figuring them in the
function.
2005-07-10 Hans Breuer <hans@breuer.org>
* **/makefile.msc app/gimpcore.def : updated
* app/widgets/gimpcontrollerlist.c : dont include
"gimpmessagedialog.c" to avoid redefinitions.
Instead include gimpmessagebox.h and gimpmessagedialog.h
* plug-ins/common/raw.c : include <io.h>
* plug-ins/common/screenshot.c : make it compile. It
still has no code to actually work on win32.
2005-07-10 Sven Neumann <sven@gimp.org>
* app/base/segmentator.[ch]: ported to GIMP data structures. There
are still some TODOs, smooth_mask() isn't implemented yet.
* app/core/Makefile.am
* app/core/gimpdrawable-foreground-extract.[ch]: thin wrapper around
the new segmentation algorithm.
* tools/pdbgen/pdb/drawable.pdb: added a first draft of a PDB API
for foreground extraction.
* app/pdb/drawable_cmds.c
* app/pdb/internal_procs.c
* libgimp/gimpdrawable_pdb.[ch]: regenerated.
2005-07-09 Sven Neumann <sven@gimp.org>
* app/core/gimpchannel.c (gimp_channel_real_feather):
gaussian_blur_region() writes to the pixel data, need to initialize
the pixel region with dirty == TRUE;
* app/paint-funcs/paint-funcs-generic.h: formatting.
2005-07-09 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-pick-color.c (gimp_image_pick_color): if
sample_merged is FALSE and drawable is NULL, just get the image's
active drawable instead of bailing out.
* app/widgets/gimpcursorview.c (gimp_cursor_view_update_cursor):
use gimp_image_pick_color() insted of duplicating its code.
2005-07-05 Sven Neumann <sven@gimp.org>
* app/core/cpercep.[ch]: renamed cpercep_init_conversions() to
cpercep_init(); only initialize the tables on the first call.
* app/core/gimpimage-convert.c: changed accordingly.
2005-06-26 Manish Singh <yosh@gimp.org>
* app/core/gimpenvirontable.c: feed environment values through
gimp_config_path_expand, so ${gimp..} variables can be used.
* plug-ins/pygimp/Makefile.am: define PYTHONPATH in terms of
${gimp_plug_in_dir}. Use ; as a path separator on windows.
With this final changes, pygimp should work out of the box on
Win32 now. Thanks to Michael Schumacher and lode leroy for
figuring out the high level details and testing.
2005-06-18 Sven Neumann <sven@gimp.org>
* app/core/gimpimagefile.c (gimp_imagefile_get_new_pixbuf):
simplified, use the eek wilber icon if the file doesn't exist.
2005-06-17 Sven Neumann <sven@gimp.org>
* app/core/gimpselection.c (gimp_selection_extract): fixed
long-standing bug in the calculation of the depth of the
tile-manager created when copying from an indexed drawable.
2005-06-15 Sven Neumann <sven@gimp.org>
* app/core/gimpimagefile.c (gimp_imagefile_load_thumb):
* app/widgets/gimpthumbbox.c (gimp_thumb_box_auto_thumbnail):
don't display a preview and don't attempt to create one if the
image file does not exist any longer (bug #307672).
2005-06-14 Sven Neumann <sven@gimp.org>
* app/core/gimpimage.c (gimp_image_raise_layer)
(gimp_image_raise_layer_to_top): allow to raise a layer w/o an
alpha channel.
2005-06-10 Michael Natterer <mitch@gimp.org>
Fix bug #134304, as far as it's fixable:
* app/core/gimp-edit.c (gimp_edit_paste_as_new): handle pasting
buffers without alpha. Also don't uselessly convert all buffers
to RGB but create an image in the buffer's color space.
(gimp_edit_extract): call gimp_selection_extract() with
add_alpha = FALSE.
* app/core/gimpselection.c (gimp_selection_extract): set add_alpha
to TRUE if there is a selection, because the selection could have
any shape.
2005-06-08 Sven Neumann <sven@gimp.org>
Removed "stingy-memory-use" all over the place. This feature was
really not that useful anymore. The GUI for the preference option
was already removed for GIMP 2.2. Fixes bug #306617.
* app/config/gimpbaseconfig.[ch]: set IGNORE flag on
"stingy-memory-use".
* app/config/gimpcoreconfig.h: added a comment that the
font_path_writable variable is unused.
* app/base/temp-buf.[ch]: removed code that used to deal with
swapping temp-bufs to disk.
* app/base/base.c: made base_config a static variable.
* app/core/gimpdata.[ch]
* app/core/gimpdatafactory.[ch]: removed stingy_memory_use
parameter from data construction methods.
* app/core/gimp-gradients.c
* app/core/gimpbrush-load.[ch]
* app/core/gimpbrush.[ch]
* app/core/gimpbrushgenerated.[ch]
* app/core/gimpbrushpipe.[ch]
* app/core/gimpcontext.c
* app/core/gimpgradient-load.[ch]
* app/core/gimpgradient.[ch]
* app/core/gimppalette-import.c
* app/core/gimppalette.[ch]
* app/core/gimppattern.[ch]: changed accordingly.
* app/core/gimpitem-align.[ch]: newly created to
hold code for gimp_item_align().
* app/core/Makefile.am: add new files
* app/core/gimpitem.[ch]: remove code from here.
* app/tools/gimpaligntool.c: fix includes and remove
unneeded includes.
2005-05-31 Sven Neumann <sven@gimp.org>
* app/core/gimppalette-import.c: applied patch from Joao
S. O. Bueno Calligaris that adds support for loading PSP color
palette files (bug #305956).
2005-05-26 Sven Neumann <sven@gimp.org>
* app/core/gimpdata.[ch]: added MIME type as a construct property
to GimpData.
* app/core/gimpbrush-load.c
* app/core/gimpbrushgenerated.c
* app/core/gimpbrushpipe.c
* app/core/gimpgradient-load.c
* app/core/gimppalette.c
* app/core/gimppattern.c: set the MIME type when loading a data
object from file. MIME types needs review and GimpPalette isn't
quite done yet...
* app/core/gimpdashpattern.c: cosmetics.
2005-05-25 Michael Natterer <mitch@gimp.org>
* app/core/gimpviewable.[ch]: added virtual function
GimpViewable::get_size() and public API gimp_viewable_get_size()
which return width and height and a boolean indicating if the
viewable has a size at all.
Added default implementation of GimpViewable::get_popup_size()
using the new get_size() API.
* app/core/gimpbrush.c
* app/core/gimpbuffer.c
* app/core/gimpdrawable.c
* app/core/gimpimage.c
* app/core/gimppattern.c: implement GimpViewable::get_size().
* app/core/gimpbrush.c
* app/core/gimppattern.c: removed GimpViewable::get_popup_size()
implementations, the default one is good enough.
* app/core/gimpbrushpipe.c (gimp_brush_pipe_get_popup_size):
redirect to gimp_viewable_get_size() instead of duplicating its
return values.
* app/widgets/gimpcontainertreeview.c
* app/widgets/gimpview.c: allow pixbuf dragging out of any
viewable that has a size.
* app/widgets/gimpdrawabletreeview.c: removed pixbuf dragging code
here.
* app/widgets/gimpdnd.c: set gimp busy around encoding/decoding
pixbufs into/from GtkSelectionData, because it can be a time
consuming operation.
2005-05-22 Sven Neumann <sven@gimp.org>
* tools/gimp-mkenums (parse_trigraph): use quotewords() from
Text::ParseWords to split the trigraph. This function correctly
deals with commas inside quotes.
* app/core/core-enums.[ch]: tweaked descriptions in the
GimpDashPreset enum.
2005-05-22 Sven Neumann <sven@gimp.org>
* app/core/gimpdashpattern.c: minor cleanup.
* app/widgets/gimpcellrendererdashes.c: don't draw a background,
draw the dash pattern twice, use the correct widget state.
2005-05-21 Sven Neumann <sven@gimp.org>
* app/core/gimpdashpattern.[ch]: added utility functions to copy
and to free a dash pattern.
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimpcellrendererdashes.[ch]: added a simple cell
renderer to visualize a dash pattern.
* app/widgets/gimpstrokeeditor.c: show previews of the dash
presets in the combo-box.
2005-05-19 Sven Neumann <sven@gimp.org>
* app/core/gimpstrokeoptions.[ch]: renamed property "miter" to
"miter-limit" and added a description to be used as a tooltip in
the stroke editor.
* app/core/gimpdrawable-stroke.c
* app/widgets/gimpstrokeeditor.c: changed accordingly.
2005-05-19 Sven Neumann <sven@gimp.org>
* app/core/gimpstrokeoptions.[ch]
* app/widgets/gimpdasheditor.c
* app/widgets/gimpstrokeeditor.c: small change to the internal API
to reduce code and conversion between GArray and GValueArray.
2005-05-19 Sven Neumann <sven@gimp.org>
* app/core/gimpdashpattern.[ch]
* app/widgets/gimpdasheditor.c: moved more code out of
GimpDashEditor to gimpdashpattern.c. Fixed bug in last commit.
2005-05-19 Sven Neumann <sven@gimp.org>
* app/core/gimpdashpattern.[ch]
* app/widgets/gimpdasheditor.c: moved code out of GimpDashEditor
to gimpdashpattern.c.
2005-05-19 Sven Neumann <sven@gimp.org>
* app/core/Makefile.am
* app/core/gimpdashpattern.[ch]: new files with coode split out of
gimpstrokeoptions.c.
* app/core/gimpstrokeoptions.c: use gimp_dash_pattern_from_preset().
2005-05-06 Sven Neumann <sven@gimp.org>
* app/actions/layers-actions.c
* app/core/gimpimage.c (gimp_image_position_layer)
* app/widgets/gimplayertreeview.c (gimp_layer_tree_view_drop_possible):
drop the limitation that layers not at the bottom of the stack
have to have an alpha channel. Allow the user to move the
background layer up in the stack or reposition it using DND.
* tips/gimp-tips.xml.in: changed the relevant tip and some more.
2005-04-29 Sven Neumann <sven@gimp.org>
* app/core/gimpprojection-construct.c (gimp_projection_construct):
use copy_region() instead of using tile_manager_map_over_tile()
directly.
2005-04-29 Sven Neumann <sven@gimp.org>
* app/core/gimpprojection-construct.c: save COW projection code from
bit-rotting. It can now be enabled again (but is definitely broken).
2005-04-27 Sven Neumann <sven@gimp.org>
* app/core/gimpimage-colormap.[ch]: declared the return value of
gimp_image_get_colormap() as const.
* app/display/gimpdisplayshell-render.c: added some const qualifiers.
2005-04-24 Hans Breuer <hans@breuer.org>
* menus/makefile.msc : build menus with nmake, too
menus/Makefile.am : added to EXTRA_DIST
* **/makefile.msc app/gimpcore.def : updated
* app/base/tmp-buf.c : there is no pid_t with msvc so typedef one
2005-04-19 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-snap.c: bail out early if the coords are
out-of-image plus a border of the snapping epsilon, and not just
out-of-image. Fixes bug #169892.
2005-04-16 Michael Natterer <mitch@gimp.org>
* app/core/gimpcontext.c (gimp_context_real_set_brush)
(gimp_context_real_set_pattern): no need to get base_config twice
in the same function.
* app/widgets/gimpblobeditor.h: include the parent class.
* app/widgets/gimpdataeditor.c (gimp_data_editor_init): set the
name entry insensitive.
2005-04-16 Sven Neumann <sven@gimp.org>
Applied a patch (with minor modifications) from Karine Delvare
that makes it possible to choose between various ways to remove
color from a drawable (bug #155507):
* libgimpbase/gimpbaseenums.h: added new enum GimpDesaturateMode.
* libgimpbase/gimpbaseenums.c
* libgimp/gimpenums.c.tail
* plug-ins/pygimp/gimpenums.py
* tools/pdbgen/enums.pl: regenerated.
* app/core/gimpdrawable-desaturate.[ch]: implement other formulas
to remove colors from a drawable.
* tools/pdbgen/pdb/color.pdb: let gimp_desaturate() call
gimp_drawable_desaturate() with GIMP_DESATURATE_LIGHTNESS so that
it behaves like it always did.
* app/pdb/color_cmds.c: regenerated.
* app/dialogs/Makefile.am
* app/dialogs/desaturate-dialog.[ch]: new files that define a simple
dialog to choose a mode for desaturation.
* app/actions/drawable-actions.[ch]: use the new dialog.
2005-04-15 Michael Natterer <mitch@gimp.org>
Added loading of Photoshop brushes. Fixes bug #163047:
* app/core/Makefile.am
* app/core/gimpbrush-load.[ch]: new files holding all brush
loading code. Added .abr loader based on a patch by Adrian
Likins. Didn't add a new brush subclass as in the original patch,
but only a loading function which loads the brushes into standard
GimpBrush objects. Did misc fixes to the code, needs further
cleanup.
* app/core/gimpbrush.[ch]: removed brush loading code here.
* app/core/gimpbrushpipe.c: changed #includes accordingly.
* app/core/gimp.c (gimp_real_initialize): register the new load
functions and their extensions with the brush factory.
2005-04-13 Sven Neumann <sven@gimp.org>
* app/config/gimpcoreconfig.c: set GIMP_CONFIG_PARAM_CONFIRM on
the "font-path" property. Set GIMP_CONFIG_PARAM_IGNORE for
"font-path-writable".
* app/dialogs/preferences-dialog.c: don't use "font-path-writable".
* app/core/gimp.c (gimp_restore)
* app/text/gimp-fonts.c: handle --no-fonts similar to --no-data
and allow to load the fonts later by pressing "Refresh" in the
fonts dialog.
2005-04-13 Sven Neumann <sven@gimp.org>
* app/app_procs.c: register handler for the "GimpPaint" log domain.
* app/core/gimpdatafactory.c (gimp_data_factory_init): don't load
any data if TRUE is passed for no_data.
* app/tools/gimppainttool.c (gimp_paint_tool_draw): handle a NULL
brush gracefully.
2005-04-09 Michael Natterer <mitch@gimp.org>
Implement dragging and dropping in any GdkPixbuf supported
format. Fixes bug #172794 and bug #172795.
* app/core/gimplayer.[ch] (gimp_layer_new_from_region): new
function which contains all stuff that was in
gimp_layer_new_from_tiles().
(gimp_layer_new_from_tiles): use above function.
(gimp_layer_new_from_pixbuf): new function.
* app/widgets/Makefile.am
* app/widgets/gimppixbuf.[ch]: new files containing GdkPixbuf
utility functions for clipboard and DnD.
* app/widgets/gimpselectiondata.[ch]: removed
gimp_selection_data_set,get_pixbuf(), GTK+ provides the same API.
Also removed GdkAtom parameters all over the place because it's
always the same as selection_data->target.
* app/widgets/gimpclipboard.c: use the new pixbuf utility
functions and gtk_selection_data_set,get_pixbuf().
* app/widgets/widgets-enums.h
* app/widgets/gimpdnd.[ch]: removed never-implemented
GIMP_DND_TYPE_PNG and added a generic GIMP_DND_TYPE_PIXBUF
instead. Added API to drag and drop GdkPixbufs which transparently
converts from/to and GdkPixbuf-supported image format. Removed
passing around of GdkAtoms, since they were always the same
as selection_data->target.
* app/widgets/gimpdnd-xds.[ch]: follow GdkAtom parameter removal.
* app/widgets/gimpcontainertreeview.[ch]: added virtual function
GimpContainerTreeView::drop_pixbuf().
* app/widgets/gimpcontainertreeview-dnd.c: dispatch drop_pixbuf().
* app/widgets/gimplayertreeview.c: implement drop_pixbuf().
* app/widgets/gimpdrawabletreeview.c: allow to drag all drawables
as pixbufs.
* app/display/gimpdisplayshell-dnd.c: allow dropping of pixbufs.
2005-04-05 Sven Neumann <sven@gimp.org>
* app/core/core-enums.[ch]
* app/core/gimpimage.c
(gimp_image_remove_layer, gimp_image_remove_channel): handle a
floating selection attached to the layer or channel that is being
removed. Fixes bug #168582 but doesn't handle floating selections
attached to layer masks.
2005-04-04 Sven Neumann <sven@gimp.org>
* app/core/gimpdata.c (gimp_data_create_filename): return early if
called for an internal data object. Fixes bug #172581.
2005-04-03 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage.[ch]: added new signals "sample-point-added"
and "sample-point-removed" and public functions to emit them.
* app/core/gimpimage-sample-points.c (gimp_image_add_sample_point)
(gimp_image_remove_sample_point): emit them accordingly.
* app/core/gimpimage-undo-push.c (undo_pop_image_sample_point):
ditto.
(undo_pop_image_guide)
(undo_pop_image_sample_point): added comments why we add/remove
stuff manually instead of using the GimpImage APIs.
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimpcursorview.[ch]
* app/widgets/gimpsamplepointeditor.[ch]: new widgets.
GimpCursorView is a replacement for the info window's "Cursor"
page, GimpSamplePointEditor is a view on an image's sample points.
The sample point editor does nothing yet except keeping a 2x2 grid
of GimpColorFrames. Addresses bug #137776.
* app/dialogs/dialogs.c
* app/dialogs/dialogs-constructors.[ch]: register the new widgets
as dockable dialogs.
* app/actions/dialogs-actions.c (dialogs_dockable_actions)
* menus/dialogs-menuitems.xml: added actions and menu items for
the new dialogs.
* app/display/gimpdisplayshell-cursor.c
(gimp_display_shell_update_cursor)
(gimp_display_shell_clear_cursor): update the new cursor view.
* app/widgets/gimphelp-ids.h: help IDs for the new dialogs.
* app/widgets/widgets-enums.[ch] (enum GimpColorFrameMode):
changed description "Pixel values" to "Pixel" because the former
was too long.
2005-03-25 Sven Neumann <sven@gimp.org>
* app/core/gimpmarshal.list: added VOID: OBJECT, OBJECT.
* app/widgets/gimpview.[ch]: pass old and new viewable in the
"set-viewable" signal.
* app/widgets/gimptoolbox-image-area.c: don't add the XDS drag source
more than once.
2005-03-24 Michael Natterer <mitch@gimp.org>
* app/core/core-enums.[ch]
* app/core/gimpimage-undo-push.[ch]
* app/core/gimplayermask.[ch]: eek, my fault... removed
GIMP_UNDO_LAYER_MASK_EDIT stuff again because that just determines
the active drawable, which must not affect undo.
* app/pdb/pdb_glue.h
* app/actions/layers-commands.c (layers_mask_edit_cmd_callback):
changed accordingly.
(layers_mask_disable_cmd_callback): reverted last change. the old
code was correct.
2005-03-24 Michael Natterer <mitch@gimp.org>
* app/core/core-enums.[ch] (enum GimpUndoType) : reordered values
so layer and layer mask undos are grouped together.
* app/core/gimpimage-undo-push.[ch]: same here. Changed the new
layer mask undos to have 3 simple push functions for the 3
properties, just as the layer property undos. Also made the code
look like the layer properties undo stuff.
* app/core/gimplayermask.c (gimp_layer_mask_set_apply,edit,show):
changed accordingly.
* app/core/core-enums.[ch]
* app/core/gimpimage-undo-push.[ch]
* app/core/gimplayermask.[ch]:
* app/pdb/pdb_glue.h
* app/actions/layers-commands.c: try again from clean tree;
hopefully will work this time. (bug #148852)
2005-03-24 Michael Natterer <mitch@gimp.org>
Added API to explicitly register dynamic menu items hierarchies.
Fixes bug #170623.
* app/core/gimp.h: added "GSList *plug_in_menu_branches".
* app/plug-in/plug-in-types.h
* app/plug-in/plug-ins.[ch]: added API to register plug-in menu
branches, just as for locale and help domans. Cleaned up handling
of locale and help domains.
(plug_ins_exit): free the registered menu branches.
* app/actions/plug-in-actions.[ch] (plug_in_actions_add_branch):
new function to explicitly add a menu branch action.
(plug_in_actions_setup): add the registered menu branches to each
new action group.
(plug_in_actions_build_path): always strip the untranslated menu
path from underlines before using it as hash table key or action
name.
* app/menus/plug-in-menus.c (plug_in_menus_add_proc): changed
accordingly: strip underlines from untranslated menu paths before
passing them to plug_in_menus_build_path().
* app/core/gimp-gui.[ch]: added gimp_menus_create_branch() plus
vtable entry to access the new stuff from the core. Renamed the
functions desling with items from gimp_foo_entry() to
gimp_foo_item().
* app/gui/gui-vtable.c: implement create_branch() and add the
branch action to all existing "plug-in" action groups. Note that
we don't need to create any menus because that happens implicitly
when adding menu items.
* tools/pdbgen/pdb/plug_in.pdb (plugin_menu_branch_register): new
PDB wrapper to access branch registering from plug-ins.
* app/pdb/internal_procs.c
* app/pdb/plug_in_cmds.c
* libgimp/gimpplugin_pdb.[ch]: regenerated.
* libgimp/gimp.def: changed accordingly.
* plug-ins/script-fu/script-fu-scripts.c (script_fu_find_scripts):
register the menu branches for all included scripts.
* app/core/core-enums.[ch]
* app/core/gimpimage-undo-push.[ch]
* app/pdb/pdb_glue.h
* app/actions/layers-commands.c: make layer mask property changes
undoable, should fix bug #148852. Note that a little shape-layer
stuff is in core-enums, will be needed shortly.
* app/tools/gimptransformtool.c
* app/tools/gimpfliptool.c
* app/core/gimpdrawabletransform.c: avoid messages and critical
error when transforming a drawable that does not intersect
the selection.
* app/core/gimpimage-convert.c: check for non-empty palette
before converting to indexed using custom palette, otherwise
show warning and abort; fixes bug #170973.
2005-03-19 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-sample-points.c
* app/display/gimpdisplayshell-draw.c
* app/display/gimpdisplayshell.c
* app/tools/gimpcolortool.c: make sure sample points always have
coordinates in the range [0..width/height-1], also added lots of
+0.5 because they live at the pixels' centers, not at their
borders. Fixed drawing of sample points at the display borders.
* app/core/gimpimage-convert.c: when converting grayscale
to mono, treat the palette as gray rather than rgb, giving
more than tenfold speedup. Fixes bug #170801.
2005-03-09 Michael Natterer <mitch@gimp.org>
More sample point stuff. Addresses bug #137776.
* app/core/gimpimage-sample-points.c
* app/core/gimpimage-undo-push.c: append, not prepend the sample
paints to the image's list because their index matters. Update
sample points when their index changes.
* app/display/gimpcanvas.[ch]: added own sytles for the sample
points. Added gimp_canvas_draw_text() which uses a PangoLayout
which is cached in the canvas.
* app/display/gimpdisplayshell-draw.c
(gimp_display_shell_draw_sample_point): draw the sample points
more distinct from guides using the new canvas APIs above.
* app/display/gimpdisplayshell-callbacks.c
(gimp_display_shell_[hv]ruler_button_press): factored out all
code to
(gimp_display_shell_ruler_burron_press): which takes a boolean
"horizontal" variable and allows to add sample points with
<control>+drag.
* app/tools/gimpcolortool.[ch]: implement adding, moving and
removing of sample points in the same way as the move tool moves
guides.
* app/tools/gimpcolorpickertool.c
(gimp_color_picker_tool_oper_update): chain up.
2005-03-08 Sven Neumann <sven@gimp.org>
* app/core/gimpgradient.c (gimp_gradient_segment_split_uniform):
fixed brokeness introduced I when eliminating gradient->last_visited.
2005-03-08 Sven Neumann <sven@gimp.org>
* app/core/gimppalette.[ch]: renamed gimp_palette_[gs]et_n_columns
to gimp_palette_[gs]et_num_columns().
* app/dialogs/palette-import-dialog.c
* app/widgets/gimppaletteeditor.c: changed accordingly.
* tools/pdbgen/pdb/palette.pdb: added new PDB function to control
the number of columns used when displaying a palette (bug #169370).
* app/pdb/internal_procs.c
* app/pdb/palette_cmds.c
* libgimp/gimppalette_pdb.[ch]: regenerated.
* libgimp/gimp.def: updated.