In gimp_metadata_set_from_{exif,iptc,xmp}(), gracefully reject data
of invalid size, returning an error instead of raising a critical.
In particular, this avoids a CRITICAL when loading an XCF with an
empty exif-ata parasite.
The flag `free_selection_string` is used to track an array of strings
with some of them being static and others allocated. This should have
been an array of boolean but we can't change it because it is public API
(though it should really not have been!).
So let's just allocate every string of the `selection` array instead,
which makes the boolean flag useless now.
(cherry picked from commit b585201e5e)
... after each successful read().
I completely missed this declaration after a statement during the review
of !13 even though I saw another similar issue!
Also let's reset the error counter to 0 each time a successful read()
happens so that we can continue reading even if a lot of EINTR were to
happen, as long as we globally go forward. Only consecutive errors
increment the counter.
Finally add a small comment to explain why we let EINTR pass instead of
breaking directly.
When lldb attaching to the process it triggers few "-1" errors on read with
EINTR error. After 1-2 errors read() call works again.
Also this patch fixing TID detection, syscall SYS_gettid is oficially deprecated
now and does not work. Also adding safecheck to avoid enldless loop.
...upon exporting an image
Step 1: make it configurable just like "Export EXIF" etc.
app, libgimp: add "export-color-profile" config option
Add it to the preferences dialog, and pass it on to plug-ins in the
GPConfig message. Add gimp_export_color_profile() to libgimp.
Nothing uses this yet.
Also remove all traces of it from the plug-in protocol and raise the
protocol version to 0x0100 (we now allow features and therefore
version bumps in stable, and the master protocol version should always
be higher). Fix the code that aborts plug-in startup on protocol
version mismatch, we can't use gimp_message() because we have no
protocol.
Pass the current icon theme directory to plug-ins through the
config message, and add a gimp_icon_theme_dir() libgimp function
for retrieving it. Note that we already have a similar
gimp_icon_get_theme_dir() PDB function, which we keep around, since
it can be used to dynamically query for the current icon dir,
unlike the former, and since it returns a dynamically-allocated
string, while the rest of the config-related functions return
statically allocated strings.
Use the new function, instead of gimp_get_icon_theme_dir(), in
gimp_ui_init(). This allows gimp_ui_init() to run without making
any PDB calls. Consequently, this allows us to start plug-ins that
call gimp_ui_init() without entering the main loop in the main app.
We're going to add a plug-in that displays an interactive dialog
while the main app is blocking waiting for an operation to
complete, and we need to be able to start the plug-in without
entering the main loop, to avoid the possibility of arbitrary code
being executed during the wait.
Bump the protocol version.
even if we don't have private members (yet). Also make class padding 8
pointers in all headers. This commit moves nothing to private, it just
makes all headers consistent and adjusts .c files accordigly.
Let's make our various usages of this broken function more robust, or at
least return with errors when we can. But this is still seriously
broken. Inside gimp_locale_directory() though, there was nothing I could
do, so I just added a FIXME for at least keeping an eye on it.
I could not find for sure what to use on FreeBSD instead, so let's just
not get this information there. It is quite useful information to know
where thread traces were asked from, but it is more important to make
sure the program can be compiled everywhere. Also we can just check
which thread has gimp_stack_trace*() calls. Thus it can be seen as
redundant information in any case.
SYS_gettid is apparently defined as a macro, so let's simply check for
it being defined.
First WIP commit, adds:
- enum GimpGradientBlendColorSpace { RGB_PERCEPTUAL, RGB_LINEAR }
- linear blending mode for gradient segments
- tool options GUI for the blend and paint tools which use gradients
Since commit bb52431cdd, we get multi-thread traces in functions
gimp_stack_trace_*(). Adding now the LLDB equivalent improvement.
Also adding the process and thread id information, from which the trace
order was made, atop the listing, as well as the thread list. This would
allow to easily find and associate the threads.
The problem is that sometimes the thread where we got a trace from may
not matter (for instance signals, even such as SIGABRT or SIGSEGV, seem
to sent a bit randomly to either the thread which provoked them or the
main thread; there is a bit of contradictory info on this when reading
on the topic, in my case I experienced this), in such case, getting all
thread stack is important to find the origin of the signal.
Other times it will highly matter, in particular when getting a trace
for a WARNING or CRITICAL. This information will help to discriminate
between thread traces.
Last commit caused -xobjective-c to be passed during linking on
Mac, causing object files to be treated as source files. Add a
-xnone flag to AM_LDFLAGS, canceling the effect of -xobjective-c.
Additinally, add a -xobjective-c++ flag to AM_CXXFLAGS, so that we
can use Objective-C in C++ files on Mac, if we ever need to.
On Mac, pass -xobjective-c to the compiler through AM_CFLAGS, not
AM_CPPFLAGS, so that it's only used for C sources, and not C++
sources. In the latter case, it clashes with the -std=... flag,
spewing an error. Thanks, Partha :)
... non-latin unicode path.
g_win32_locale_filename_from_utf8() was sometimes returning NULL for
some paths on Windows. Then the call to gexiv2_metadata_open_path() with
a NULL value was crashing plug-ins.
This commit only prevents from crashing by simply failing to load
metadata when this occurs, which means losing metadata support on
Windows depending on filenames. A proper solution will have to be
implemented.
It seems old blend tool (from GIMP 2.8) was using manhattan distance,
whereas the new one uses euclidean. I guess there must be use cases for
both. In any case, it is a good idea to simply propose the option since
the property exists in the "gegl:distance-transform" operation.
See also bug 781621.
Reap the child *after* we're done reading its output, so that we
can disable ptracing after reading, but before reaping. This
avoids a window during which the child is gone, but ptracing using
its PID is still allowed.
Clear the ptrace permission given to the child after it terminates,
so that a future process that happens to have the same PID the
child had can't ptrace us.
On Linux, when /proc/sys/kernel/yama/ptrace_scope is 1, a process
may only ptrace its descendants by default, which prevents the GDB
process spawned by gimp_stack_trace_print() from attaching to, and
producing a backtrace for, the calling process.
Use prctl() with PR_SET_PTRACER, when available, in the parent
process, to allow the child process to ptrace it.
It seems that older GDB (under version 7) are not handling very well
some common debug information format, in particular DWARF > 3. Such
version of GDB is usually not a problem since it is quite old (more than
10 years old, it would seem) so you don't see it anymore on any modern
GNU/Linux distribution. On FreeBSD on the other hand, it is still
available (probably for license reasons) and even installed by default!
As a consequence, it makes debugging fail, even though LLDB is also
installed by default.
That is even more of a problem because it would seem that GIMP is killed
(most likely by FreeBSD kernel according to the reporter tests) as a
side-effect of GDB failing, which is seriously bad, in particular since
we also use the debug dialog for non-fatal errors (which could therefore
end up killing GIMP as side effect of a bad GDB!).
So I add some GDB version check. I implement this without any dynamic
memory management, as usual, since this needs to happen also during
crash handling where the state is unstable and prone to memory
allocation failure.
I also add gimp_utils_backtrace_available() public API which can be used
by the Preferences.
The only debugger command which uses this value currently is gdb. And
even there, it doesn't look mandatory. The alternative call using "-p"
option does not require the program name. The manual doesn't say if
calling with the program name has any advantage (but I don't see why it
would, the PID is enough to find a process). Just in case, I leave the
prog_name parameter (because it's easier to make a parameter useless
than changing a libgimp* API) but simply allows setting it to NULL.
... backtrace_symbols() when possible.
When we allocate a new string, anyway we have memory allocation. But
when we just print to a file descriptor, this version of the API is
guaranteed without any memory allocation and therefore should always
work. This is important since allocations may fail in particular after
memory errors.
The value descriptions of GimpGradientColor,
GimpGradientSegmentColor, and GimpGradientSegmentType enums appear
in the on-canvas gradient editor UI, as combo-box items in the tool
GUI overlay. Since we want to keep the overlay as small as
possible, we previously used abbreviations for these descriptions
(e.g., "FG (t)", instead of "Foreground (transparent)").
Replace the abbreviated descriptions with unabbreviated ones, and
move the abbreviations to the "abbrev" parameter. This way we get
the abbreviated version in the combo-box, and the full version in
the combo-box's menu.
Update the dprod production of generated enum files to include
abbreviated value descriptions, as per the previous commits.
Add a comment for translators above the abbreviated descriptions,
specifying the full description they abbreviate.
Add support for specifying an abbreviated description for enum/
flags values, which can be used in contexts where the full
description is too long.
Since the exact layout and size of Gimp{Enum,Flags}Desc is part of
the ABI, we can't simply add a field to these structs to hold the
abbreviated description. Instead, we use the fact that entries
with a repeated value in the value descriptions array are ignored,
and that the array is NULL terminated (in particular, that all non-
NULL entries are followed by at least one additional entry), and
specify the abbreviation in the "value_desc" field of the entry
that immediately follows the initial entry for a given value,
setting the "value" field of both entries to the same value.
Right now this behavior is undocumented, so there is no proper way
to specify abbreviated descriptions in the API, and is only meant
to be used in generated enum files.
to gimp_base_compat_enums_init() and move its prototype from
gimputils.h to gimpbase-private.h; it's not supposed to be
public API even though it's callable from the outside.
Allows setting the midpoint's position, blending function, and
coloring type.
The midpoint can be converted to a stop, and centered, through
editor buttons.
...protocol calls.
Some calls are waiting for answers, for instance plugin procedures, and
tiles which expects data and acknoledgement.
This would result in error messages such as:
"expected tile ack and received: 5" (5 is GP_PROC_RUN)
Typically because a thread would run a procedure while another would
receive tiles.
...on macOS (with macports)
Changed gimp_metadata_get_guid() to use a GRand that automatically
seeds itself from /dev/urandom (if available) or the current time.
...resources to be loaded and shown multiple times
Change gimp_path_parse() to filter out duplicate paths. This is the
function at the bottom which is used by everything else, so should
generically catch all duplicates.
Commit 1e6acbd4e1 modified the
generated enum recipes to run gimp-mkenums from the source
directory, instead of the build directory, so that only the
basenames of the corresponding header files would appear in
the comment at the top of the generated files. This was a
mistake -- $(GIMP_MKENUMS) is expecting to be invoked from the
build directory.
Switch back to running gimp-mkenums from the build directory. To
avoid including the relative path from the build directory to the
source directory in the generated file, add a @basename@ production
variable to gimp-mkenums, which exapnds to the basename of the
input file, and use it instead of @filename@ in the recipes for the
generated enum files.
When regenerating an enum file, don't copy it back to the source
directory if it hasn't actually changed. This allows using a read-
only source directory where the enum header is newer than the
generated file, as long as they're not really out of sync.
OTOH, *do* touch the generated source-dir file even when unchanged,
in order to avoid re-running its recipe on the next build, however,
allow this to silently fail (which is harmless).
Add the additional enum values to enum GimpSelectCriterion, and
the few needed lines to gimppickable-contiguous-region.c.
It's horribly slow, but works.
We check them into git, so this makes it easier to keep them in
sync when using a separate build directory.
Case in point -- this commit also syncs a few enum files that went
out-of-sync with their headers.
It was agreed that we should write "plug-in" consistently. Only possibly
user-visible strings were updated.
Thanks to scootergrisen for a first patch which could not make it
after changing decision on the canonical writing.
which unlike HSL Lightness is actually physically meaningful and
also generally speaking much more useful than HSL Lightness.
Change "Lightness" to "Lightness (HSL)" to make it clear that
the "Lightness" in the Colors/Desaturate/Desaturate menu is not the
same as "Lightness" in LAB/LCH.
For completeness add the option to desaturate to "Value (HSV)".
Add links in app/operations/gimpoperationdesaturate.c
to the Wikipedia article with definitions of L/I/V in HSL/HSI/HSV.
being exported to libgimp, and having a non-exported value, this is a
horrible mess like with GimpLayerMode, but at least the cruft value
names are deprecated now.
C++ won't allow us to use GimpLayerMode in the API where we used to
have GimpLayerModeEffects.
Move GimpLayerModeEffects to libgimpbase/gimpcompatenums.h so it's
not in the API any longer, and instead typedef and define stuff in
libgimp/gimptypes.h, and adapt the compat enum registering code
accordingly.
Which are entirely private (not installed). They contain compat values
for enums where values have been renamed in gimpbaseenums.h. The old
names get the old nicks generated so the new values in gimpbaseenums.h
can have proper new nicks. Register them as compat enums using
mechanism introduced for the GimpLayerMode change.
with proper value names. Mark most values as _BROKEN because they use
weird alpha compositing that has to die. Move GimpLayerModeEffects to
libgimpbase, deprecate it, and set it as compat enum for GimpLayerMode.
Add the GimpLayerModeEffects values as compat constants to script-fu
and pygimp.
Add property "color-tag" of type enum GimpColorTag to GimpItem so all
layers, channels and paths can be tagged with a color.
For interoperability, use the color list from Krita which is a
superset of Photoshop's colors.
Features a "Color Tag" submenu in the layers, channels and paths
menus, a row of color radio buttons in the properties dialogs,
undo and PDB API.
As a side effect, some common code is now factores out into
items-actions.[ch] and items-commands.[ch] which adds visible, linked
and lock actions for layers and channels.
Don't skip the first 10 bytes. That code was there to skip the magic
"GIMP_XMP_1" of the old "gimp-metadata" parasite. Instead, properly
check for that magic in xcf_load_image() and pass only the actual XMP
to gimp_metadata_set_from_xmp(). Also remove the +10 hack in file-exr.
"exif-data" parasite
To migrate old "exif-data" parasites to GimpMetadata
an exif-only jpeg file is generated in memory, but its
APP1 marker length was 2 bytes short resulting in a
CRITICAL warning:
** (gimp-2.9:9): CRITICAL **: Directory Photo: IFD exceeds data buffer, cannot read next pointer.
Properly terminating the jpeg with an EOI marker also
gets rid of the WARNING:
** (gimp-2.9:9): WARNING **: JPEG format error, rc = 5
Since we have many themes now, this new name better indicates that it
is meant to follow your desktop theme settings.
Also it will likely not remain the default theme.
Add GIMP_DESATURATE_LUMINANCE to enum GimpDesaturateMode and rename
GIMP_DESATURATE_LUMINOSITY to GIMP_DESATURATE_LUMA.
Keep GIMP_DESATURATE_LUMINOSITY as deprecated compat value and add it
to the script-fo and pygimp compat constants.
Change GimpOperationDesaturate to process GIMP_DESATURATE_LUMINANCE
with linear "RGBA float".
Change the logic in gimp_metadata_get_colorspace() to be like in the
respective KExiv2 function, which looks pretty well done. No guarantee
of correctness, this just looks more logical than before :)
Some refactoring: add gimp_metadata_get,set_colorspace() and a new
enum GimpMetadataColorspace which so far can be one of { UNSPECIFIED,
UNCALIBRATED, SRGB, ADOBERGB }. The setter is untested and I don't
know if it's doing the right thing, please review. Use the getter in
gimp_image_metadata_load_finish(), so complex metadata logic and
profile creation/setting are separated.
Add flag GIMP_METADATA_LOAD_COLORSPACE which defaults to TRUE, and in
gimp_image_metadata_load_finish(), assign AdobeRGB to the image if
Exif.Iop.InteroperabilityIndex says "R03". This is most likely very
incomplete because there are quite some other colorspace tags in
various parts of the image metadata.
because it confuses gtk-doc and breaks some links. Also change the
"Index of new symbols in GIMP 2.x" sections to be what seems to be the
modern standard (looked at the GLib and GTK+ docs), and update some
other stuff.
gimp_param_unit_value_validate() set a value to itself to not
change the value, which was strange though not particularly wrong.
Found by Coverity Scan.
Add gimp_file_show_in_file_manager() to libgimpbase and a menu item
in app which shows the image's file (if any) in the file manager.
Implemented calling the org.freedesktop.FileManager1 interface
and dropped snippets found on stackoverflow for somebody to
turn into working code for OSX and Windows.
gimp_directory_file(), gimp_data_directory_file() etc. The new
functions take a variable list of path elements to the file,
the list has to be NULL-terminated. Remove the newly added
gimp_personal_rc_gfile(). Start using the new functions in app/.
Which works like gimp_filename_to_utf8() and returns a displayable
UTF-8 encoded name of a GFile that does not need to be freed, which
makes a lot of code more readable and compact.
It makes little sense to keep them in one header and parse them with a
pile of perl, just to generate them in another header. Simply keep
them in a place everybody depends on.
and keep GIMP_ICON_TYPE_STOCK_ID as a deprecated alias. Change all
plug-ins accordingly and increase the pluginrc file version number so
it gets regenerated with "icon-name" instead of "stock-id".
GIMP_ADD_foo_MASK -> GIMP_ADD_MASK_foo
GIMP_foo_MODE -> GIMP_BLEND_foo
GIMP_foo_CLONE -> GIMP_CLONE_foo
GIMP_foo -> GIMP_DODGE_BURN_TYPE_foo
GIMP_foo -> GIMP_TRANSFER_foo
Add compat values for the old names and compat code to script-fu
and pygimp.
Check in gimp_parasite_new() and fail GValue validation for parasites
with empty name. So far we only disallowed NULL names, this change
forbids the empty string "" too.
The foo_DEPENDENCIES rule replaces the default dependencies, where
EXTRA_foo_DEPENDENCIES just appends to it. This was causing libgimp
and libgimpui to build out of order.
...the whole metadata loading
Don't drop non-utf8 values from gexiv2 when serializing to XML,
instead, base64 encode them. This should be robust against whatever
garbage data is in tags.
Rationals have integers as nominator and denominator, so we can't set
something like "300.5/1". Instead, multiply the nominator and
denominator of non-integer ppi values until the error is smaller than
0.01, or the denomiator reaches 100 ("300.5/1" becomes "601/2").
...the whole metadata loading
Don't serialize a value that does not UTF-8-validate to XML. This is
not a real fix, but no matter what we do here in the future, UTF-8
validation should always be part of the serialization, in order to
avoid passing broken data into the core.
start with flags = ALL (which now includes all possible current and
future flags), and optionally *remove* individual flags instead of
adding them. This way the plug-ins default to TRUE for future flags.
So the plug-in has the chance to decide whether it wants to trust the
metadata information (e.g. resolution). Also reorder parameters in
gimp_image_metadata_save_finish(). Change all plug-ins accordingly.
Based on original patches from Hartmut Kuhse and modified
by Michael Natterer. Changes include:
- remove libexif dependency and add a hard dependency on gexiv2
- typedef GExiv2Metadata to GimpMetadata to avoid having to
include gexiv2 globally
- add basic GimpMetadata handling functions to libgimpbase
- add image and image file specific metadata functions to libgimp,
including the exif orientation image rotate dialog
- port plug-ins to use the new APIs
- port file-tiff-save's UI to GtkBuilder
- add new plug-in "metadata" to view the image's metadata
- keep metadata around as GimpImage member in the core
- update the image's metadata on image size, resolution and precision
changes
- obsolete the old metadata parasites
- migrate the old parasites to new GimpMetadata object on XCF load
- don't include <gdk-pixbuf/gdk-pixbuf.h> in headers in app/
- instead, include it in many .c files instead of <glib-object.h>,
finally acknowledging the fact that app/ depends on gdk-pixbuf almost
globally
- fix up includes as if libgimpbase depended in GIO, which it soon will
which currently returns TRUE if the unit has a factor that matches mm,
cm, dm or m. Incomplete, but at least now extendable in one place,
just need to use the new function everywhere.
by removing all but the toplevel prefix getter from gimpreloc.c It was
1) confusing 2) sometimes trying to subsitute the runtime prefix twice
and 3) sometimes ignoring configure-given directories within the
configure-prefix. This should all be fixed now, and done in one less
place.
I used SHGetFolderLocation, deprecated, which I thought was a better idea than
SHGetSpecialFolderLocation, deprecated as well, but also unsupported. But it
apparently won't compile on XP. Reverts back to glib exact copy.
New configuration directory scheme, consistent across platforms, and
following standards.
UNIX platforms (except OSX): $XDG_CONFIG_HOME/GIMP/{GIMP_APP_VERSION}
Windows: %APPDATA%/GIMP/{GIMP_APP_VERSION}
OSX: NSApplicationSupportDirectory/GIMP/{GIMP_APP_VERSION}
gimp_tile_put(): make sure we don't free libgimp's tile data twice in
the non-SHM case. I could never reproduce the bug, but I'm pretty sure
this fixes it. The change in gimpprotocol.c is just cleanup.
gimpdir goes to ~/Library/Gimp/x.y
thumbnails go to ~/Library/Caches/org.freedesktop.thumbnails
The thumbnail location is not standardized yet, but is the only
location that makes sense. Also fix user install to search old
gimpdirs to migrate in both Library and the classic location.
Remove the obsolete CABON_CFLAGS from all makefiles.
This only helps to maintain proper includes in app/ and shouldn't
affect plug-ins at all, because these are supposed to only include the
main headers from libgimp/ since the beginning of time.
The gimpfootypes.h files do not have these guards, so we can continue
to maintain app/'s include policy that is very likely to error out if
wrong things are included.
The item groups has all the duplicated functionality from drawable
and vectors (name, visible, linked etc).
Hijack the unused GIMP_PDB_REGION and turn it into GIMP_PDB_ITEM;
change all protocol aware files accordingly and bump the protocol
version number. Change script-fu to handle the new type.
Disable gimp_wire_read() warning, most of the time it just gives this
confusing error message when the GIMP core crashes:
(script-fu:28495): LibGimpBase-WARNING **: script-fu: gimp_wire_read(): error
In order to be able to change GIMP2_DIRECTORY during run-time, check
for changes to GIMP2_DIRECTORY in gimp_directory().
This is typically useful in test case where you could read from one
GIMP2_DIRECTORY at start-up and then write to a different
GIMP2_DIRECTORY at shut down.
The documentation for this function does not suggest that the value is
cached and thus the old behavior can be considered a bug. It is hard
to imagine why anyone would change GIMP2_DIRECTORY at run-time in a
script for example and *not* expect gimp_directory() to return the
updated gimp_dir.
2009-01-17 Michael Natterer <mitch@gimp.org>
* all files with a GPL header and all COPYING files:
Change licence to GPLv3 (and to LGPLv3 for libgimp).
Cleaned up some copyright headers and regenerated the parsers in
the ImageMap plugin.
svn path=/trunk/; revision=27913
2008-11-06 Sven Neumann <sven@gimp.org>
* tools/gimp-mkenums: use NC_() to mark enum values for
translation.
Use a lower-case short form of the type name as translation
context.
* libgimp/libgimp-intl.h: define the NC_() macro as noop.
* libgimpbase/gimpbasetypes.[ch]
* libgimpbase/gimpbase.def: added new functions to set and
get a translation context on an enum type.
* app/base/Makefile.am
* app/core/Makefile.am
* app/display/Makefile.am
* app/paint/Makefile.am
* app/plug-in/Makefile.am
* app/text/Makefile.am
* app/tools/Makefile.am
* app/widgets/Makefile.am
* libgimp/Makefile.am
* libgimpbase/Makefile.am:
* libgimpconfig/Makefile.am
* libgimpthumb/Makefile.am
* libgimpwidgets/Makefile.am: register the translation context
with the enum types.
* app/display/display-enums.h
* libgimpbase/gimpbaseenums.h
* libgimpconfig/gimpcolorconfig-enums.h: removed old-style
explicit
translation context.
* app/base/base-enums.c
* app/core/core-enums.c
* app/display/display-enums.c
* app/paint/paint-enums.c
* app/plug-in/plug-in-enums.c
* app/text/text-enums.c
* app/tools/tools-enums.c
* app/widgets/widgets-enums.c
* libgimpbase/gimpbaseenums.c
* libgimpconfig/gimpcolorconfig-enums.c
* libgimpwidgets/gimpwidgetsenums.c: regenerated.
svn path=/trunk/; revision=27562
2008-10-27 Sven Neumann <sven@gimp.org>
* libgimpbase/gimpbaseenums.[ch]: added new enum
GimpTextHintStyle.
* libgimp/gimpenums.c.tail
* tools/pdbgen/enums.pl: regenerated.
* app/text/gimptext.[ch]: added new property "hint-style".
Removed
"autohint" property and mapped the boolean property "hinting" to
the new enum property "hint-style".
* app/text/gimptextlayout-render.c
(gimp_text_layout_render_flags):
use "hint-style".
* app/tools/gimptextoptions.[ch]: changed tool options
accordingly.
* tools/pdbgen/pdb/text_layer.pdb: deprecated the "hinting" API
and introduced getters and setters for "hint-style".
* app/pdb/text-layer-cmds.c
* app/pdb/internal-procs.c
* libgimp/gimptextlayer_pdb.[ch]: regenerated.
svn path=/trunk/; revision=27432
2008-09-04 Michael Natterer <mitch@gimp.org>
* libgimpbase/gimpreloc.c (set_gerror): made the error_message
variable const.
svn path=/trunk/; revision=26856
2008-09-04 Michael Natterer <mitch@gimp.org>
* libgimpbase/gimpbasetypes.h
(struct GimpEnumDesc)
(struct GimpFlagsDesc): made the value_desc and value_help members
const, just as the corresponding GEnumValue and GFlagsValue
members. This is technically an API change but shouldn't hurt
since it totally reflects how they are used.
svn path=/trunk/; revision=26855
2008-08-19 Sven Neumann <sven@gimp.org>
Complements the fix for bug #344818:
* libgimpbase/gimpbaseenums.[ch]: added new enum
GimpPDBErrorHandler.
* tools/pdbgen/enums.pl: regenerated.
* app/plug-in/gimpplugin.[ch]: added error_handler to
GimpPlugIn.
* app/plug-in/gimpplugin-message.c
(gimp_plug_in_handle_proc_run):
only display an error message for a failed procedure call if the
plug-in's error-handler is set to
GIMP_PDB_ERROR_HANDLER_INTERNAL.
* tools/pdbgen/pdb/plug_in.pdb: added PDB getter and setter for
the plug-in's error-handler.
* app/pdb/plug-in-cmds.c
* app/pdb/internal-procs.c
* libgimp/gimpenums.c.tail
* libgimp/gimpplugin_pdb.[ch]: regenerated.
* plug-ins/common/file-compressor.c
* plug-ins/file-uri/uri.c: set the error-handler to
GIMP_PDB_ERROR_HANDLER_PLUGIN as these plug-ins are forwarding
the
error with their return values.
svn path=/trunk/; revision=26656
2008-07-14 Sven Neumann <sven@gimp.org>
Add new PDB data type PDB_COLORARRAY for using arrays of GimpRGB
colors as argument or return value.
* libgimpbase/gimpbaseenums.[ch] (enum GimpPDBArgType): replaced
the unused GIMP_PDB_BOUNDARY with GIMP_PDB_COLORARRAY.
* libgimpbase/gimpprotocol.h: increased GIMP_PROTOCOL_VERSION.
(struct _GPParam): added d_colorarray entry to the union.
* libgimpbase/gimpprotocol.c
* libgimp/gimp.[ch]
* app/pdb/gimp-pdb-compat.c
* app/plug-in/plug-in-params.c
* app/plug-in/gimpplugin-message.c
* tools/pdbgen/pdb.pl: deal with the new data type.
* tools/pdbgen/enums.pl: regenerated.
* plug-ins/pygimp/pygimp-pdb.c
* plug-ins/script-fu/scheme-wrapper.c: handle the new data type.
svn path=/trunk/; revision=26189
2008-04-14 Michael Natterer <mitch@gimp.org>
* libgimpbase/gimpmemsize.c: #undef GIMP_DISABLE_DEPRECATED so
gimp_memsize_to_string() sees its own prototype.
svn path=/trunk/; revision=25483
2008-03-31 Sven Neumann <sven@gimp.org>
* app/text/text-enums.[ch]
* libgimpbase/gimpbaseenums.[ch]: as a first step towards a new
text PDB API, moved GimpTextDirection and GimpTextJustification
enums to libgimpbase.
* libgimpbase/gimpbase.def: updated.
svn path=/trunk/; revision=25325
2008-03-27 Sven Neumann <sven@gimp.org>
Properly pass the focus from the core to plug-in dialogs:
* libgimpbase/gimpprotocol.[ch]: added a user_time member to the
GimpConfig struct. Bumped the protocol version to 0x0012.
* app/core/gimp-gui.[ch]
* app/gui/gui-vtable.c: added gimp_get_user_time() to get the
timestamp of the last user interaction.
* app/plug-in/gimppluginmanager-call.c
(gimp_plug_in_manager_call_run): pass the timestamp to in the
GimpConfig message.
* libgimp/gimp.[ch]:
* libgimp/gimp.def: added method to access the timestamp as set
in the config message.
* libgimp/gimpui.c (gimp_ui_init): construct a fake startup ID and
set the DESKTOP_STARTUP_ID environment variable.
svn path=/trunk/; revision=25263
2007-12-12 Tor Lillqvist <tml@novell.com>
* libgimpbase/gimpenv.c (gimp_locale_directory) [Win32]: Use
g_win32_locale_filename_from_utf8() instead of duplicating its
code.
svn path=/trunk/; revision=24345
2007-12-12 Tor Lillqvist <tml@novell.com>
* libgimpbase/gimpenv.c (gimp_toplevel_directory) [Win32]: Use the
location of the libgimpbase DLL and not that of the main
executable (which will be the Python interpreter in the case of
python-fu) to determine the top-level GIMP installation
folder. (#502506)
(gimp_locale_directory) [Win32]: Guard against the possibility
that we can't get the system codepage form of the locale
directory, in case the installation folder contains characters not
in the system codepage. In that case use the short name instead.
svn path=/trunk/; revision=24333
2007-12-11 Sven Neumann <sven@gimp.org>
* libgimpbase/gimpprotocol.c: made the code more robust against
errors on the wire protocol level.
* app/plug-in/gimpplugin-message.c: added sanity checks to message
handlers. This doesn't keep us from crashing on invalid input, but
we will at least get some warnings before that happens.
svn path=/trunk/; revision=24317
2007-12-11 Sven Neumann <sven@gimp.org>
* libgimpbase/gimpwire.c (_gimp_wire_read_string): use g_try_new()
so a plug-in can't easily crash the core by sending an invalid
string message.
svn path=/trunk/; revision=24316
2007-12-11 Sven Neumann <sven@gimp.org>
* libgimpbase/gimpwire.c (_gimp_read_read_string):
NULL-terminate
all strings coming in over the wire protocol. Should help with
bug
#498207.
svn path=/trunk/; revision=24312
2007-10-27 Sven Neumann <sven@gimp.org>
* libgimpbase/gimpmemsize.c (string_to_memsize): don't just
crash
right away if the impossible happens.
svn path=/trunk/; revision=23977
2007-10-27 Tor Lillqvist <tml@novell.com>
* libgimpbase/gimpenv.c (gimp_toplevel_directory): Drop the Win9x
code path here, too.
* libgimpbase/gimpenv.c (gimp_locale_directory): On Windows return
the pathname in system codepage and not UTF-8.
svn path=/trunk/; revision=23962
2007-09-14 Michael Natterer <mitch@gimp.org>
* libgimpbase/gimpdatafiles.c: move private functions to the end
of the file. Added function is_hidden() and use it in
gimp_datafiles_read_directories(). Moved variables to local
scopes.
svn path=/trunk/; revision=23547
2007-08-28 Michael Natterer <mitch@gimp.org>
* libgimpbase/gimpdatafiles.c (gimp_datafiles_read_directories):
skip files starting with '.' so we don't try to parse .DS_Store
and other metadata storage files. Also moved variables to local
scopes.
svn path=/trunk/; revision=23388
2007-08-28 Tor Lillqvist <tml@novell.com>
* libgimpbase/gimpenv.c: Update doc comments about filename
encoding on Windows. It is now always UTF-8, like in
GLib. (#471033) Change "Win32" to "Windows" in doc comments.
svn path=/trunk/; revision=23387
2007-08-11 Michael Natterer <mitch@gimp.org>
* libgimpbase/gimpbaseenums.[ch]
* libgimpbase/gimpenv.[ch]: changed enum GimpUserDirectory and API
of gimp_user_directory() so that g_get_user_special_dir() can be
used instead as soon as we depend on GLib 2.14.
* tools/pdbgen/enums.pl: regenerated.
* app/widgets/gimpfiledialog.c
* plug-ins/pygimp/gimpmodule.c: changed accordingly.
svn path=/trunk/; revision=23212
2007-07-06 Sven Neumann <sven@gimp.org>
* app/xcf/xcf-load.c (xcf_load_image): marked two error messages
as translatable strings.
* libgimpbase/gimputils.c (gimp_any_to_utf8): insert a blank
before the text that marks the string as invalid.
svn path=/trunk/; revision=22887
2007-06-25 Sven Neumann <sven@gimp.org>
* configure.in: removed extra check for gthread and fold it into
the GLIB and GTK checks.
* */Makefile.am: changed accordingly.
* app/main.c (main): always call g_thread_init().
svn path=/trunk/; revision=22832
2007-06-25 Sven Neumann <sven@gimp.org>
* libgimpbase/gimpwire.c: if the wire protocol is used without
prior initialization, abort with g_error() instead of crashing.
svn path=/trunk/; revision=22831
2007-05-14 Tor Lillqvist <tml@novell.com>
* libgimpbase/gimpenv.c: Undef DATADIR before including <shlobj.h>
to avoid collision with DATADIR enum in objidl.h. Define
CSIDL_MYDOCUMENTS, CSIDL_MYMUSIC and CSIDL_MYVIDEO in case missing
from shlobj.h.
* libgimpbase/Makefile.am: Link with -lole32 on Win32 for
CoTaskMemFree().
svn path=/trunk/; revision=22483
2007-05-13 Sven Neumann <sven@gimp.org>
* app/file/Makefile.am
* app/file/xdg-user-dir.c[ch]: removed here ...
* libgimpbase/Makefile.am
* libgimpbase/xdg-user-dir.[ch]: ... and moved to libgimpbase.
* libgimpbase/gimpbaseenums.[ch]: added GimpUserDirectory enum.
* libgimpbase/gimpenv.[ch]: added new function to identify
special
user folders. Added Win32 specific code and use
xdg_user_dir_lookup()
on other platforms.
* libgimpbase/gimpbase.def: regenerated.
svn path=/trunk/; revision=22475
2007-04-12 Sven Neumann <sven@gimp.org>
* libgimpbase/gimpprotocol.[ch] (struct _GPParam): don't redefine
the GimpParasite struct, just use it.
* libgimp/gimp.c: include gimpparasite.h.
* libgimp/gimpitemcombobox.c (gimp_item_combo_box_new): initialize
combo_box_type to suppress a compiler warning.
* libgimpwidgets/gimpmemsizeentry.c (gimp_memsize_entry_new):
avoid dereferencing a type-punned pointer.
svn path=/trunk/; revision=22237
2007-03-19 Sven Neumann <sven@gimp.org>
* libgimpbase/gimpbaseenums.[ch]: changed labels for
GimpTransformDirection to make the corrective transform feature
more obvious.
svn path=/trunk/; revision=22146
2007-02-19 Sven Neumann <sven@gimp.org>
* libgimpbase/gimpbaseenums.[ch]: changed description for
GIMP_INTERPOLATION_LANCZOS to "Sinc (Lanczos3)". More correct
and
more in sync with the other terms.
svn path=/trunk/; revision=21949
2006-11-30 Michael Natterer <mitch@gimp.org>
* libgimp/gimp.def
* libgimpbase/gimpbase.def: move around version number symbols
here too. Fixes bug #380658.
2006-11-28 Michael Natterer <mitch@gimp.org>
* libgimp/gimp.[ch]: removed gimp_foo_version variables.
* libgimpbase/gimpenv.[ch]: added them here.
* app/sanity.c: added sanity_check_gimp() and abort if the libgimp
version gimp is compiled with is not exactly the same we encounter
at runtime.
2006-08-29 Sven Neumann <sven@gimp.org>
* libgimpbase/Makefile.am
* libgimpbase/gimpbase.h
* libgimpbase/gimprectangle.[ch]: added new files that hold
gimp_rectangle_intersect(), factored out of the core.
* libgimpbase/gimpbase.def: updated.
* app/core/gimp-edit.c
* app/core/gimp-utils.c
* app/core/gimp-utils.h
* app/core/gimpchannel-combine.c
* app/core/gimpdrawable-foreground-extract.c
* app/core/gimpdrawable-transform.c
* app/core/gimpdrawable.c
* app/core/gimpimage-preview.c
* app/core/gimplayer.c
* app/core/gimpscanconvert.c
* app/display/gimpdisplayshell-draw.c: changed includes accordingly.
* libgimp/gimpdrawablepreview.c: don't duplicate
gimp_rectangle_intersect() here, use the function in libgimpbase.
* app/base/siox.c: use gimp_rectangle_intersect() to reduce the
working area to the region of interest. Fixes bug #340422.
2006-08-22 Sven Neumann <sven@gimp.org>
* libgimpbase/gimpwire.h
* libgimpbase/gimpreloc.h
* libgimp/gimpdrawablepreview.h
* libgimp/gimptile.h
* libgimp/gimpunitcache.h
* libgimpthumb/gimpthumb-utils.h
* libgimpwidgets/gimpcolorarea.h
* libgimpwidgets/gimphelpui.h: moved G_GNUC_INTERNAL before the
return value (bug #352268).
* tools/pdbgen/lib.pl : changed code generation rules to place
G_GNUC_INTERNAL before the return value.
* libgimp/*_pdb.h: regenerated.
2006-08-15 Hans Breuer <hans@breuer.org>
* **/makefile.msc app/gimpcore.def : updated
* app/xcf/xcf-save.c(1464) : error C2036: 'void *' : unknown size
pointer arithmetics on void a pointer looks like a GCC extension
* app/tools/gimpbrightnesscontrasttool.c
app/tools/gimpcolorbalancetool.c
app/tools/gimphuesaturationtool.c
app/tools/gimpcolorizetool.c : #include "core/gimp.h" for gimp_message
* app/tools/gimpiscissorstool.c : use RINT() rather than rint()
* app/widgets/gimpcontrollerlist.c : #include "gimpwidgets-utils.h"
for gimp_show_message_dialog
* app/core/gimpprogress.c(229) : 'gimp_progress_message' must
return a value
2006-08-06 Michael Natterer <mitch@gimp.org>
* libgimpbase/gimputils.c (gimp_strip_uline): restore unescaping
of "__"-escaped underlines which was broken since the addition of
"(_X)"-stripping.
2006-07-05 Sven Neumann <sven@gimp.org>
* libgimpbase/gimpenv.h
* libgimpbase/gimpmemsize.h
* libgimpbase/gimpparasiteio.[ch]
* libgimpbase/gimputils.h
* libgimpconfig/gimpconfig-path.[ch]
* libgimpthumb/gimpthumb-utils.[ch]: marked some function with
G_GNUC_MALLOC.
* plug-ins/common/dicom.c: use g_date_set_time_t() instead of the
deprecated g_date_set_time().