Commit Graph

1606 Commits

Author SHA1 Message Date
Mukund Sivaraman b1dbfd2567 pdbgen: Regenerate C code 2012-12-05 08:48:54 +05:30
Sven Neumann 9b2e301c87 pdbgen: programmatically add hint about using g_strfreev()
Add the note about the need to free the returned string array
to the generated libgimp code. This way it will show up in the
libgimp documentation but not in the general PDB API.
2012-12-04 21:07:34 +01:00
Sven Neumann c8209ddb4c Revert "pdb: update documentation for all pdb functions whose return can be freed with g_strfreev()."
Such comment should not be included in the general PDB
documentation as it is specific to the C bindings and can
be easily added by the pdbgen infrastructure.

This reverts commit c9888f2222.
2012-12-04 21:07:34 +01:00
Jehan c9888f2222 pdb: update documentation for all pdb functions whose return can be freed with g_strfreev(). 2012-12-04 00:16:08 +09:00
Michael Natterer c77fc779db libgimp, plug-ins: use g_strfreev() to free PDB string arrays 2012-11-27 21:16:26 +01:00
Michael Natterer e61b1f7603 pdb: return NULL terminated stringarrays from libgimp PDB wrappers
so they can be freed with g_strfreev().
2012-11-27 20:50:21 +01:00
Jehan d8456b5d47 pdb - update documentation comments the right way.
PDB functions must be updated from *.pdb files as *_pdb.c files are
generated by make.
2012-11-28 00:57:23 +09:00
Jehan ee71ed65a4 pdb - update documentation comments.
Update various doc comments of pdb functions where returned value has
to be freed with g_free() after usage.
2012-11-27 23:55:09 +09:00
Michael Natterer 07f77e5ec8 pdb: allow file procedures to register themselves for handling URIs
and store the flag in pluginrc. There are no URIs passed to procedures
yet and no procedure registers as such, this is just preparation.
2012-11-17 16:01:52 +01:00
Michael Natterer ab801970ca Bug 677776 - filter popup windows get hidden behind main image window
Simone found a better way than setting plug-in windows to UTILITY: simply
call the proper API, [NSApp arrangeInFront: nil].
2012-11-12 23:42:15 +01:00
Michael Natterer 908f727f0a Chain up unconditionally in GObject::constructed()
It's supported since GLib 2.28.
2012-11-12 21:51:22 +01:00
Michael Natterer 018fc32727 Bug 677776 - filter popup windows get hidden behind main image window
On OSX, set all transient plug-in windows to UTILITY, so they appear
on top of the image window, which is a bad hack. See the comment in
gimp_window_set_transient_for_display().
2012-11-11 21:19:17 +01:00
Michael Natterer 9e5ed1e70a Bug 684003 - When using the main window in secondary monitor...
If gimp_window_set_transient_for() fails (due to platform
restrictions), at least set GTK_WIN_POS_CENTER on the window, so it
gets centered on the monitor where the mouse is. This also removes the
need for OSX specific centering code in GimpDialog (bug 677776).
2012-11-11 21:09:46 +01:00
Michael Natterer fe19ad9706 Bug 683694 - Spelling errors
Reworded all places that used to say "allows to".
2012-11-11 15:50:25 +01:00
Michael Natterer d4933b3052 Bug 674160 - Redesign of "Lock panel"
Apply and heavily modify patch from remyDev which adds "lock position"
to GimpItem, similar to "lock content". Lock position disables all
sorts of translation and transform, from the GUI and the PDB.

Cleaned up some aspects of the lock content code as well because a
second instance of similar code always shows what went wrong the first
time.
2012-11-09 11:17:25 +01:00
Michael Natterer 0b56aa0d13 Bug 677776 - filter popup windows get hidden behind main image window
On OSX, call [NSApp activateIgnoringOtherApps] when a plug-in dialog
is shown, so the plug-in process becomes the active app, and the
dialog gets focussed.

In order to avoid doing this in GimpDialog (which is also used in
the core), do it in gimp_ui_init() which all interactive plug-ins
call, and when gimp_temp_proc_run() is called interactively, to
catch repeated activation of an already running plug-in.

Also, set GimpDialog's initial position to GTK_WIN_POS_CENTER,
or they will pop up in the top left corner.

Inspired by patches from Simone Karin Lehmann and Daniel Sabo.
2012-11-07 23:44:35 +01:00
Michael Natterer 0a5059da51 Bug 685445 - color-to-alpha plugin crashes (use-after-free)
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.
2012-10-22 19:03:00 +02:00
Michael Natterer d6cf29e8c4 Bug 685797 - all python plug-ins are broken after 3b55877a
Remove the privately added GimpItemComboBox class instead, it confuses
the hell out of python. Instead, use g_object_set,get_data() to manage
the newly needed members, and code duplication.
2012-10-10 23:10:56 +02:00
Michael Natterer 4aaaa1a7fa Bug 378334 - Plugins with image drop-list crash when image is closed
Let image and item combo boxes connect to their own "changed" signal
first, and if the chosen image/item doesn't exist any longer,
reinitialize the combo box and select the first item instead.

Also fixes the type macros in gimpitemcombobox.h which were lacking a
')' and introduces an internal GimpItemComboBox class to hold the
common functionality.
2012-10-08 22:01:30 +02:00
Michael Natterer 52c00faad5 Bug 685590 - 16-bit Tiff loader crashes on Windows and Mac both 64-bit
The tile transfer SHM segment is now width*height*16 bytes large,
not only width*height*4. I have no clue how this could work on
32 bit systems.
2012-10-06 14:35:30 +02:00
Michael Natterer c91702917e libgimp: gimp_drawable_get_buffer(): return NULL for an invalid drawable
instead of repeating the crappy behavior of gimp_drawable_get() which
would return something even for bogus drawable IDs.
2012-09-22 20:33:03 +02:00
Kevin Cozens a2e037fb00 Corrected spelling errors spotted by Ari Pollak (Mostly fixes bug #683694)
Still need to address the "allows to" grammatical error.
2012-09-10 12:22:12 -04:00
Michael Natterer b955205676 Bug 678452 - Libgimp drawable combo boxes are not aware of layer groups
Add all a tree's items to the combo boxes. Try to visualize the tree
structure by prepending '-'s, but that could probably need some
suggestions for improvement.
2012-09-03 02:21:28 +02:00
Michael Natterer e620eb8cef Bug 678732 - gimp-image-insert-layer inserts into a wrong place...
Fix the docs, the function does what it's supposed to do.  Passing
"0, -1" actually means "insert where the ui would insert" and is
supposed to be used when e.g. scripts create layers.
2012-08-04 02:18:15 +02:00
Michael Natterer 01dffdc276 Bug 680531 - Function gimp-context-get-brush-size takes size argument...
The context getters need PDB @outargs, not @inargs. This "API change"
is OK in stable because the API was totally unusable before this fix.
2012-07-26 16:26:14 +02:00
Michael Henning 1c1e7813f4 libgimp: Use a relative path to libgimp-2.0.la so parallel builds work. 2012-05-13 15:42:21 +02:00
Martin Nordholts d7db79c2f2 app: Make tests build
In particular: link.
2012-05-10 22:12:58 +02:00
Michael Natterer 486e76bdab libgimp*: use GIMP_API_VERSION in Makefile.am instead of hardcoding 2.0 2012-05-04 15:38:45 +02:00
Michael Natterer ffa1546853 libgimp: add GEGL branch to gimp_layer_new_from_surface() 2012-05-03 04:13:39 +02:00
Michael Natterer 48a264ce4b libgimp: add GEGL branch to gimp_layer_new_from_pixbuf()
can't get rid of the legacy impl yet bacause plug-ins need to be able
to run in compat mode.
2012-05-03 03:48:49 +02:00
Michael Natterer 3ad73b3658 libgimpcolor: add GdkPixbuf <-> GeglBuffer utility functions
and update tons of includes in libgimp and app.
2012-05-03 03:37:20 +02:00
Michael Natterer 7e17a1e42e libgimp: deprecate the entire legacy pixel fiddling api
which generates a gazillion warnings in plug-ins, a perfect guide
where to do porting.
2012-05-03 01:51:39 +02:00
Michael Natterer 86f53a3ceb libgimp: make pdbgen generate GIMP_DEPRECATED stuff
instead of GIMP_DISABLE_DEPRECATED.
2012-05-03 01:12:25 +02:00
Michael Natterer 0d481702c7 libgimp*: add GIMP_DEPRECATED macros using G_DEPRECATED
and start using them instead of GIMP_DISABLE_DEPRECATED where possible.
2012-05-03 00:54:21 +02:00
Michael Natterer 9f85f35c07 libgimp: don't recurse infinitely in gimp_parasite_detach()
(cherry picked from commit 5b59af7c2e)
2012-05-03 00:35:55 +02:00
Michael Natterer 3d5758d209 libgimp: fix docs of deprecated functions
(cherry picked from commit 569c122137)
2012-05-03 00:26:26 +02:00
Michael Natterer b5842539f5 libgimp: don't recurse infinitely in deprecated gimpvectors functions
(cherry picked from commit f32706a0d1)
2012-05-03 00:26:09 +02:00
Simon Budig 43cce00fd9 libgimp: fix NULL colormap for gimp_drawable_get_format() 2012-05-02 17:51:22 +02:00
Simon Budig 641848ea0b Fix the palette handling in gimp_drawable_get_format() 2012-05-02 17:51:21 +02:00
Simon Budig 2cb15f8669 libgimp: fix swapped alpha handling in indexed case 2012-05-02 17:51:20 +02:00
Michael Natterer 1badcb7ce9 app: add GIMP_PRECISION_U32 and all its formats 2012-05-02 17:51:19 +02:00
Michael Natterer 2e7944cad0 app: add GIMP_PRECISION_HALF for 16 bit floating point
and use babl_format_get_palette() to simplify some code.
2012-05-02 17:51:18 +02:00
Michael Natterer 92b4c66777 pdb: export gimp-image-get-precision 2012-05-02 17:51:17 +02:00
Michael Natterer 8918fd338b pdb/libgimp: export gimp-image-new-with-precision
And switch on precision awareness of a plug-in in the core when
possible, instead of in the libgimp wrappers.
2012-05-02 17:51:17 +02:00
Michael Natterer 3e4edc1aea pdb/libgimp: export enum GimpPrecision and gimp-image-convert-precision 2012-05-02 17:51:17 +02:00
Michael Natterer 21dfb8bd9f app/libgimp: enable plug-ins on high precision images
Add gimp_plugin_enable_precision() in libgimp which switches the
plug-in to deal with the drawables' real precision, call it from the
libgimp GeglBuffer and Babl format APIs. If it's not enabled, let the
core's plug-in convert the tiles to legacy formats when sending them
over the wire.
2012-05-02 17:51:14 +02:00
Michael Natterer 3a46cfbbc6 app/pdb: allow some more stuff on indexed by simply removing the restriction 2012-05-02 17:51:12 +02:00
Michael Natterer 3e0891b80c libgimp: sytle cleanup in GimpTileBackendPlugin
and use gimp_drawable_get_format() instead our own utility function.
2012-05-02 17:50:53 +02:00
Michael Natterer 79464eefce libgimp: add gimp_drawable_get_format() 2012-05-02 17:50:53 +02:00
Øyvind Kolås ee97c1f4ff app: correct usage of babl formats
GIMP was doing evil hacks lying to GEGL about it's pixels being in a linear
color space when they are not. This causes incorrect rendering, makes gaussian
blur misbehave etc.

The legacy projection modes should be implemented using the same 2.2 gamma
formats that are correct to specify for sRGB data. (for proper color
management in higher bitdepths; icc backend babl formats should be used.)

For the old image modes correct babl formats are:

R'G'B'A u8  -  8 bit RGB with 2.2 gamma (sRGB) with linear alpha component
R'G'B' u8   -  8 bit RGB with 2.2 gamma (sRGB)
Y'A u8      -  8 bit Grayscale with 2.2 gamma with linear alpha component
Y' u8       -  8 bit Grayscale with 2.2 gamma

Y u8        -  8 bit linear data, used for masks/channels
A u8        -  8 bit linear alpha

-----------------------------------------------

RGBA float  -     32bit floating point linear light RGB
RaGaBaA float  -  32bit floating point linear light RGB, premultiplied alpha
                  to be used for processing that needs to scale by the alpha,
                  (blurs, resampling etc)
R'G'B'A float  -  32bit floating point sRGB with gamma, to be used where
                  the result depends on being closer to perceptual when
                  processing, can be used a cheaper alternative to CIE Lab
                  based modes.

-----------------------------------------------

The legacy layer modes should use the formats with gamma 2.2 only for loading
and rendering legacy XCF files correctly, in the brave new world compositing
should most likely be done in linear light with "RGBA float" and even better
"RaGaBaA float" like GEGL does for porter duff and other compositing modes.

The ability to chose the legacy layer modes should probably be hidden from the
user unless an old .xcf has been opened.
2012-05-02 17:50:38 +02:00