Commit Graph

381 Commits

Author SHA1 Message Date
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 191c2c15ef Bug 685086 - hangs while opening damaged XCF file
Fix crash for this specific XCF corruption (XCF damaged in the middle
of a parasite header). Instead, abort loading immediately.
2012-10-02 22:01:38 +02:00
Michael Natterer 025f0b0325 app: fix loading of a buffer's last tile in xcf-load.c
The last tile is not followed by a next tile, so we don't have an
offset to the next tile and have to guess the number of bytes to load,
using the largest possible tile. That guessing was based on a maximum
of four bytes per pixel.
2012-09-22 18:38:13 +02:00
Michael Natterer 47c987b09e Bug 676270 - cppcheck report
Fix a couple of harmless stuff pointed out in the report, and one
real bug: gimp_plug_in_close() was killing each process 10 times
on windows.
2012-08-04 03:20:36 +02:00
Michael Natterer 5a8295d237 app: remove an obsolete "XXX foo" comment from xcf-save.c 2012-05-29 00:19:19 +02:00
Michael Natterer ab4c613a70 Bug 675994 - Opening image with a saved selection breaks histogram updating
In fact, it broke much more than that because the way XCF loading
replaced the image's mask prevented the image's "mask-changed" signal
from ever being emitted. Add private API gimp_image_take_mask() which
properly sets the mask and use it for image construction and the XCF
selection loading hack.
2012-05-14 01:44:41 +02:00
Michael Natterer ce1179410b app: fix XCF loading of floating selections of != image's layer type
Same fix needs to be applied to gimp-layer-new in the PDB.
2012-05-11 14:22:50 +02:00
Michael Natterer 20f3cba2b6 app: rename gimp_image_base_type() to gimp_image_get_base_type() 2012-05-07 21:57:33 +02:00
Michael Natterer 7610e299ae Use GimpValueArray and GimpParamSpecValueArray
instead of the deprecated stuff from GLib.
2012-05-04 00:51:50 +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 67908df578 app: add XCF support for >8bit, using file format version 4 2012-05-02 17:51:19 +02:00
Michael Natterer e15702cbe5 app: create gimp-babl-compat.[ch] for gimp_babl_format_get_image_type()
and remove gimp_drawable_type().
2012-05-02 17:51:15 +02:00
Michael Natterer c07325a005 app: add "precision" argument to gimp_image_new() 2012-05-02 17:51:09 +02:00
Michael Natterer 309a3a1c35 app: pass the format of saved tiles around explicitly in the XCF code
It does the same as before, but is better prepared for the future now.
2012-05-02 17:51:06 +02:00
Michael Natterer 95cb77edc9 app: change gimp_image_get_format() to take a base_type and a with_alpha boolean
which kills almost all remaining use of GimpImageType.
2012-05-02 17:51:03 +02:00
Michael Natterer fb93b1344a app: don't use gimp_drawable_type() when saving to XCF
Instead, convert the drawable's format to a GimpImageType right here
where needed.
2012-05-02 17:51:02 +02:00
Michael Natterer 73108152ea app: port XCF saving to reading from the GeglBuffer 2012-05-02 17:50:53 +02:00
Michael Natterer 91c39463c4 app: port XCF loading to writing to the drawable's GeglBuffer 2012-05-02 17:50:53 +02:00
Michael Natterer 87b7af7fa5 app: remove drawable->private->format, its buffer has a format already
Also, make group layer type conversion much less hackish by using the
same kind of temporary states that are used for reallocating its
projection on size change.
2012-05-02 17:50:42 +02:00
Michael Natterer d5795c0081 app: use a GeglBuffer instead of TileManager as storage in drawables \o/ 2012-05-02 17:46:06 +02:00
Michael Natterer 765c2cfea2 app: replace GimpDraable's type by a Babl format
and change gimp_drawable_new() and all gimp_layer_new() variants to
take formats instead of types.
2012-05-02 17:46:06 +02:00
Michael Natterer 88388467cc app: move the layer mask show, edit, apply API from GimpLayerMask to GimpLayer
because it would require really evil hacks to honor these properties
in the gegl projection if they were on the mask, and because they
actually belong to the layer.
2012-05-02 17:45:56 +02:00
Massimo Valentini 62ebb4a1e5 app: initialize all members of a GimpAnchor
Conditional jump or move depends on uninitialised value(s)
==28817==    at 0x6AA386: gimp_coords_manhattan_dist (gimp/app/core/gimpcoords.c:175)
==28817==    by 0x6AB428: gimp_coords_bezier_is_straight (gimp/app/core/gimpcoords-interpolate.c:213)
==28817==    by 0x67663B: gimp_bezier_stroke_segment_nearest_point_get (gimp/app/vectors/gimpbezierstroke.c:676)
==28817==    by 0x676C86: gimp_bezier_stroke_nearest_point_get (gimp/app/vectors/gimpbezierstroke.c:631)
==28817==    by 0x4D79E3: gimp_draw_tool_on_vectors_curve (gimp/app/tools/gimpdrawtool.c:1175)
==28817==    by 0x4D7CD5: gimp_draw_tool_on_vectors (gimp/app/tools/gimpdrawtool.c:1242)
==28817==    by 0x511CE7: gimp_vector_tool_oper_update (gimp/app/tools/gimpvectortool.c:989)
==28817==    by 0x50B059: gimp_tool_oper_update (gimp/app/tools/gimptool.c:970)
==28817==    by 0x546F3C: gimp_display_shell_canvas_tool_events (gimp/app/display/gimpdisplayshell-tool-events.c:401)
==28817==    by 0x52A42E2: _gtk_marshal_BOOLEAN__BOXED (gtk-2-24/gtk/gtkmarshalers.c:86)

Steps to reproduce:

G_SLICE=always-malloc valgrind gimp-2.7 app/tests/*/*.xcf

B (Activate Path tool)
2012-03-13 20:44:47 +01:00
Massimo Valentini 39368a410d plugged memory leaks 2012-02-07 17:32:02 +01:00
Michael Natterer 056e09a6cb Remove the makefile.msc build system, it is unmaintained since 2008 2011-12-16 15:53:56 +01:00
Massimo Valentini ca650844c2 xcf: use only one bit to save expanded state 2011-10-07 20:05:52 +02:00
Mukund Sivaraman 3699475be9 app (xcf): Remove duplicate assignment 2011-10-06 08:35:00 +05:30
Massimo Valentini 0f03ed9e05 Bug 616416: hidden layer groups appear again after an image change
Introduced two virtual functions to a GimpViewable

'set_expanded' and 'get_expanded'

and a PROP_GROUP_ITEM_FLAGS to load/save the expanded state
of layer_groups and use them.
2011-09-25 21:57:20 +02:00
Massimo Valentini a67bb11cf5 Revert "Bug 616416: hidden layer groups appear again after an image change"
This reverts commit 359c9c22d9.
2011-09-25 21:49:36 +02:00
Massimo Valentini 359c9c22d9 Bug 616416: hidden layer groups appear again after an image change 2011-09-25 21:38:50 +02:00
Michael Natterer c35ff719a7 app/libgimp*: remove stuff found by -Wunused-but-set-variable 2011-05-01 23:23:19 +02:00
Michael Natterer cc47b2a600 libgimpwidgets/color: move the cairo color utility functions to libgimpcolor
Add CAIRO_CFLAGS to a lot of Makefiles to make this possible, and
because they pull in cairo via the libgimp headers.
2011-04-28 15:50:39 +02:00
Michael Natterer 9f30550f9a app: move drawable->type to private 2011-03-16 02:02:47 +01:00
Michael Natterer 21ad9d33b7 app: don't ref the layer mask twice when keeping it around while loading
Don't g_object_ref() *and* g_object_ref_sink() it when temporatily
attaching it as object data to its layer.
2011-03-03 10:57:38 +01:00
Michael Natterer 5b09e61c46 app: move all GimpTemplate members to private 2011-03-02 10:16:43 +01:00
Michael Natterer ad88eb55a2 app: add accessors for GimpItem::parasites and move it to private 2011-01-31 23:51:18 +01:00
Michael Natterer f63a8fcfe6 app: remove some leftover dead code
probably from before some text layer saving refactoring.
2011-01-30 20:43:01 +01:00
Michael Natterer 90419e0672 app: add "gboolean push_undo" to gimp_item_parasite_attach/detach()
and use this API instead of manually fiddling with the item's
GimpParasiteList.
2011-01-30 20:40:43 +01:00
Martin Nordholts 130885e903 app/xcf: Simplify MAX_XCF_STRING_LEN
Simplify MAX_XCF_STRING_LEN and align sentences in warning message.
2010-10-17 21:25:46 +02:00
Mukund Sivaraman f1a7db80c9 Validate number of colors in XCF colormaps 2010-10-16 04:22:11 +05:30
Mukund Sivaraman 4855d433b0 Validate XCF string length
This patch limits the string length to 16 MB. If problems occur in the
future because 16 MB is small, increase the limit by modifying
MAX_XCF_STRING_LEN.
2010-10-16 04:13:27 +05:30
Michael Natterer b5e49426df app: forgot to remove debug output in xcf_save_choose_format() 2010-08-24 18:04:49 +02:00
Michael Natterer bb40aef9bf Bug 626492 - XCF version not increased when new layers are in layer group
Set the XCF version to 3 when saving an image with layer groups and
add a version 3 loader entry.
2010-08-24 14:04:31 +02:00
Sven Neumann 5c252e323f app: move duplicated code into a helper function 2010-08-07 00:26:58 +02:00
Michael Natterer 0908e53148 app: use the new unit conversion functions
and get rid of the brainfuck idea that app/ has to use _gimp_unit_foo()
functions, passing a gimp pointer. Instead, simply use the libgimpbase
API all over the place. Should we ever allow more than one gimp instance,
they will simply have to share one unit database.
2010-02-21 16:46:39 +01:00
Michael Natterer 9a561646c2 Move the undo disable/freeze APIs to gimpimage-undo.[ch] 2010-02-09 22:32:48 +01:00
Michael Natterer 4143f5cd62 Move "parasites" to GimpImagePrivate 2010-02-03 23:42:32 +01:00
Michael Natterer 4a247e9182 Move "floating_sel" and "selection_mask" to GimpImagePrivate 2010-02-03 23:24:18 +01:00
Michael Natterer 88de69464e Move "layers", "channels" and "vectors" to GimpImagePrivate 2010-02-03 23:00:31 +01:00
Michael Natterer c9f8399614 Move "grid", "guides" and "sample_points" to GimpImagePrivate 2010-02-03 22:16:02 +01:00