Commit Graph

3589 Commits

Author SHA1 Message Date
Michael Natterer ede0d26b91 app: gimp_data_create_filename(): avoid evil characters in the filename
such as forbidden ones on various platforms. List collected on #gimp
with a fair portion of paranoia involved.
2011-04-13 21:25:10 +02:00
Michael Natterer 846cc27207 app: implement begin_use()/end_use() in GimpBrushPipe
and call it on all the pipe's sub-brushes
2011-04-12 13:59:39 +02:00
Michael Natterer 5a4a741936 app: virtualize GimpBrush::begin_use() and ::end_use() 2011-04-12 13:59:04 +02:00
Michael Natterer 391c74899c app: rename gimp_brush_start_use() to gimp_brush_begin_use() 2011-04-12 09:06:22 +02:00
Michael Natterer f7646fd171 app: gimpdrawable-stroke.c: don't try to fill a dot or a line 2011-04-10 22:43:03 +02:00
Michael Natterer 0f91a11b75 app: use GimpBezierDesc in gimp_channel_select_vectors() too 2011-04-10 22:42:39 +02:00
Michael Natterer f316269f71 app: stroke vectors by gimp_vectors_get_bezier(); gimp_scan_convert_add_bezier() 2011-04-10 19:40:40 +02:00
Michael Natterer bb9efebbaf app: use the new GimpBezierDesc APIs for stroking a selection
instead of iterating the BoundSegs menually.
2011-04-10 19:19:43 +02:00
Michael Natterer 8c3698eccc app: add gimp_bezier_desc_translate() which translates all points
Also add back an internal "gboolean closed" parameter which I removed
when copying the function, it might be useful later and doesn't hurt.
2011-04-10 19:16:31 +02:00
Michael Natterer 1a4ffb3d21 app: add gimp_scan_convert_add_bezier() which adds a GimpBezierDesc
Also remove unused member num_nodes.
2011-04-10 19:07:04 +02:00
Michael Natterer 3ab59f1bff app: don't try to add a NULL boundary to GimpBrush's boundary cache 2011-04-08 21:22:55 +02:00
Michael Natterer 6e65d1a392 app: coding styls cleanup in core/gimpbrush-transform.[ch] 2011-04-08 21:18:39 +02:00
Mikael Magnusson 71541db52d app: Make scale timer output depend on GIMP_UNSTABLE 2011-04-08 14:04:36 +02:00
Michael Natterer a83876040d app: make GimpBrushCache debug spew depend on GIMP_LOG=brush-cache 2011-04-06 09:15:50 +02:00
Michael Natterer 21b8007b29 app: add GimpBrushCache which stores brush stuff based on transform parameters
such as masks and outlines. The cache is currently very stupid and
only cacheds the last transformed object. Add caches to GimpBrush for
its mask, its pixmap and its boundary, and remove the same caches and
a ton of members from GimpBrushCore. This involves adding lots of
const qualifiers because GimpBrush returns const pointers now for
trasnformed stuff.
2011-04-05 22:15:30 +02:00
Michael Natterer e2226e9933 app: add gimp_brush_start_use() and gimp_brush_end_use()
and use them in GimpBrushCore when setting/unsetting a brush. They
will be used for managing some caches inside GimpBrush.
2011-04-05 19:18:26 +02:00
Michael Natterer c8c1b4ece6 app: remove gimp_brush_spacing_changed(), it should never have been public 2011-04-05 19:09:56 +02:00
Michael Natterer 054957a1ee app: s/nbrushes/n_brushes/ in GimpBrushPipe 2011-04-05 15:16:06 +02:00
Michael Natterer 7db7cc111c app: clean up gimpbrush-boundary.c a bit and prepare for outline approximation 2011-04-05 14:52:44 +02:00
Michael Natterer eda5cdf666 app: add gimp_bezier_desc_new_from_bound_segs() to GimpBezierDesc
and remove that code from gimpbrush-boundary.c
2011-04-04 22:06:32 +02:00
Michael Natterer cf52b10e9b app: implement gimp_brush_transform_boundary()
There is infinite room for optimization, but the API and pixel-perfect
functionality is there, which is step one.
2011-04-04 21:11:39 +02:00
Michael Natterer 9e1db5dc92 app: add empty stub gimp_brush_transform_boundary()
as a separate commit because it reindents the entire header.
2011-04-04 19:21:25 +02:00
Michael Natterer ac9b487795 app: fix GimpBrush transform parameter names and coding style 2011-04-04 18:57:48 +02:00
Michael Natterer 8b4870dad7 app: move GimpBezierDesc from app/vectors/ to app/core/ 2011-04-04 18:40:12 +02:00
Michael Natterer 6d73eead54 app: emit "notify::tool-options" when GimpToolPreset's options change
Fixes the "dirty" state and thus saving of modified presets.
2011-04-03 19:34:31 +02:00
Alexia Death 8bbc475eab Revert "app: initialize GimpToolPreset's tool options from the user context"
This reverts commit b458b1b5c0.

This hides preset errors form users and creates confusion in case
of presets with bugs distributed among users. It also tries to set
resources from user context when that context doesnt exist yet.
2011-04-03 12:34:52 +03:00
Michael Natterer b458b1b5c0 app: initialize GimpToolPreset's tool options from the user context
so that if deserializing wants to set an unknown brush, pattern etc.,
the previously set default value will be used instead.
2011-04-03 00:47:41 +02:00
Michael Natterer f7bb4afbd8 app: add gimp_image_pick_layer_by_bounds() and use it in GimpAlignTool
Also do some refactoring in the align tool, like adding
gimp_align_tool_halt() and using it to shut down the tool.
2011-03-29 13:58:23 +02:00
Michael Natterer c38eb0df4a app: core-enums.h: fix type macros of the align type enums 2011-03-29 12:45:54 +02:00
Michael Natterer babc2186c5 app: move the enum of indexes into the trans_info array to the .c files
and turn #defines from 0 to N into enums.
2011-03-28 00:50:46 +02:00
Michael Natterer eb4f01039a app: add utility function gimp_transform_polygon_is_convex()
and use it in GimpTransformTool and GimpCanvasTransformPreview.
2011-03-27 22:04:33 +02:00
Michael Natterer 92aeeadecf app: remove unused macros from gimpdrawable-transform.c 2011-03-27 16:53:48 +02:00
Michael Natterer 88ee23aa29 app: move some of the new tile offset variables to local scopes 2011-03-26 18:37:34 +01:00
Michael Natterer 047d31fa68 app: gimp_drawable_transform: place new the tiles at offset_x, offset_y
and not at offset_y, offset_y (typo).
2011-03-26 16:50:38 +01:00
Michael Natterer bc8d5f84d6 app: remove the "offset" API from TileManager
It made the transform code hard to read and never belonged into the
tile manager anyway. It's a simple pixel buffer that should not know
about any position in an image. Instead, pass around the offsets of
tile managers explicitly, so everything is less obscure for the price
of having more parameters. This will also help replacing TileManagers
with GeglBuffers.
2011-03-26 08:30:15 +01:00
Mukund Sivaraman 41ab7d8e10 Remove broken include 2011-03-26 10:55:21 +05:30
Michael Natterer b590804212 app: move GimpFilteredContainer's match logic to a utility function 2011-03-24 13:10:43 +01:00
Michael Natterer aec66d0c26 app: make GimpTaggedContainer properly memory manage the filter list
instead of leaking it. Also make the fact that tags in the list can
validly be NULL obvious by adding utility functions
gimp_tag_or_null_ref/unref().
2011-03-24 12:28:45 +01:00
Michael Natterer ac7aab2376 app: forgot to remove member GimpTaggedContainer:src_container 2011-03-24 09:43:21 +01:00
Michael Natterer d64eae8c4e app: use gimp_tagged_has_tag() instead of imlementing the same
and some general cleanup.
2011-03-24 09:17:44 +01:00
Michael Natterer 39d2067058 app: add gimp_tagged_has_tag(), and some cleanup in GimpTagged 2011-03-24 09:17:39 +01:00
Michael Natterer f2d5831ee2 app: virtualize the add/remove/freeze/thaw logic of GimpFilteredContainer
and derive GimpTaggedContainer from it, removing a lot od code
dupliucation.
2011-03-23 22:12:49 +01:00
Michael Natterer 014a333d27 app: fix GimpTaggedContainer's base class
And make it use the sort_func from the src_container which must
now be a GimpList (which is likely temporary).
2011-03-23 21:51:56 +01:00
Michael Natterer b49fdd4fd0 app: fix GimpTaggedContainer to work with multiple views
Refactor the container so it dynamically inserts/removes items when
their tags change, rather than implicitly relying on the filter logic
that was only triggered when the view called set_filter(). Before,
another view on the same original container would not update
automatically.
2011-03-23 20:57:04 +01:00
Michael Muré 2aeac1cf4e Merge branch 'soc-2010-cage-2' 2011-03-23 20:07:17 +01:00
Michael Natterer 91195e8593 app: remove the old tool presets system
Instead, keep around a GimpFilteredContainer in GimpToolInfo that
maintains a per-tool list of presets from the global preset factory.
Turn the tool options dialog's preset Save/Restore/Edit/Delete menus
and buttons into shortcuts for managing the active tool's presets.
2011-03-23 09:27:29 +01:00
Michael Natterer f3a99ed8f7 app: turn GimpFilteredContainer into a general purpose filter 2011-03-22 23:41:42 +01:00
Michael Natterer 051ef0ebcb app: add GimpTaggedContainer
which is a copy of GimpFilteredContainer with s/Filtered/Tagged/ and
no other change. #if 0 GimpFilteredContainer for now and use
GimpTaggedContainer instead all over the place.
2011-03-22 23:11:46 +01:00
Michael Natterer 49710c1cd4 app: cosmetic cleanups in GimpFilteredContainer 2011-03-22 22:26:30 +01:00
Michael Natterer ab9cb53be8 app: gimp_tool_preset_new(): ignore the passed name
and use GimpToolInfo's blurb, so new presets are by default called
"Blend", "Paintbrush" etc. and not simply "Untitled".
2011-03-22 15:08:11 +01:00
Alexia Death 5f546938b6 app: Fix whitespace in last commit 2011-03-19 23:27:08 +02:00
Alexia Death 6d6ab78d2a app: Fix stroking brush size to brush default 2011-03-19 23:26:34 +02:00
Michael Natterer 1c8149a553 Bug 632568 - 'gimp-drawable-transform-rotate-simple' makes GIMP crash in some cases
Applied modified patch from Massimo that makes sure we don't use
negative width/height if source and dest regions don't overlap.
2011-03-18 00:53:21 +01:00
Martin Nordholts 0d0ffd1265 Bug 644891 - Ctrl+e crashes gimp
Don't freak out if setting an URI on GimpImage that was getted with
the corresponding getter. Fix by Massimo.
2011-03-17 20:25:43 +01:00
Michael Natterer c07811f0a3 app: remove unused variables in gimp_drawable_duplicate() 2011-03-16 02:06:21 +01:00
Michael Natterer 9f30550f9a app: move drawable->type to private 2011-03-16 02:02:47 +01:00
Michael Natterer a62071e9eb app: remove mamber GimpDrawable::bytes
because it's always the same as GIMP_IMAGE_TYPE_BYTES(drawable->type)
2011-03-16 00:16:31 +01:00
Michael Natterer 8184296b3c app: add gimp_container_get_neighbor_of() to GimpContainer
instead of gimp_container_get_neighbor_of_active() in gimp-utils.c.
Move the additional GimpContext logic of the old function into the
callers, but use the new function in more places.
2011-03-13 02:14:44 +01:00
Michael Natterer 62f2ae80c8 app: move GimpItem's width and height members to private 2011-03-08 18:10:59 +01:00
Michael Natterer f7ce31d62f app: fake the size of a gruop layer by overriding GimpViewable::get_size()
instead of messing with GimpItem's width and height members.
2011-03-08 18:04:23 +01:00
Michael Natterer 5bd1b318af app: cosmetic cleanup 2011-03-08 17:15:47 +01:00
Michael Natterer 3e93f45703 app: keep the preview TempBuf and GdkPixbuf in GimpViewablePrivate
instead of attaching them as object data.
2011-03-08 16:38:25 +01:00
Michael Natterer 383cc27f30 app: move all GimpViewable members to private 2011-03-08 16:23:53 +01:00
Michael Natterer fcfb7cf160 Use the new g_[s]list_free_full() instead of foreach() and free() 2011-03-07 17:11:28 +01:00
Michael Natterer fc7bd98d92 app: move all GimpStrokeOptions members to private 2011-03-05 21:00:28 +01:00
Michael Natterer 5ad45dae03 app: move all GimpFillOptions members to private 2011-03-05 20:26:41 +01:00
Michael Natterer 616285fa7d app: fix possible warning when removing layers, channels or vectors
Don't call gimp_viewable_is_ancestor() on a NULL ancestor.
2011-03-04 01:49:32 +01:00
Michael Natterer e3c0a4e549 app: move all GimpDynamics members to private 2011-03-03 18:43:56 +01:00
Michael Natterer c31d675ac1 app: move all GimpDynamicsOutput members to private 2011-03-03 11:48:35 +01:00
Michael Natterer 672286515c app: remove gimp_data_name_compare() prototype, the function doesn't exist 2011-03-03 11:32:45 +01:00
Michael Muré fe7aa4e113 Merge branch 'master' into soc-2010-cage-2 2011-03-02 15:08:11 +01:00
Michael Natterer c550eae5e1 app: move all GimpImagefile members to private 2011-03-02 12:26:04 +01:00
Michael Natterer 5b09e61c46 app: move all GimpTemplate members to private 2011-03-02 10:16:43 +01:00
Michael Natterer 8f294661b2 app: don't #include "core/gimpprogress.h" when not needed 2011-02-22 17:32:33 +01:00
Michael Natterer ca2fde3950 app: move default icon assignment a few lines up 2011-02-22 01:57:52 +01:00
Alexia Death 56dd924b9c app: add default dynamics icon 2011-02-20 18:47:40 +02:00
Alexia Death 8136bdb914 app: fix an error in aspect ratio dynamics 2011-02-14 21:17:54 +02:00
Michael Natterer 02477f5563 Bug 625167 - Problem exporting floating selections from within layer groups
Add "gboolean merge_active_group" to gimp_image_merge_visible_layers()
and pass FALSE from the PDB wrapper so plug-in invoked layer merging
always acts on the toplevel container as it did in 2.6. Do the same
when opening an image as layer.

Also, added a "Merge within active group only" toggle to the merge
layers dialog and pass it down to the core, but default to TRUE here
so.
2011-02-14 09:45:59 +01:00
Michael Natterer d9dd65529f app: include floating selection removal in the layer merge undo group
and pull undo group starting/ending out of the
gimp_image_merge_layers() utility function.
2011-02-14 01:43:55 +01:00
Michael Natterer 9f89bda3b1 app: when removing groups, check if the active item was in the group
and set a new active item.
2011-02-14 01:25:45 +01:00
Michael Natterer 3873aa5cac app: gimp_data_duplicate() reset name, filename, writable and deletable
to default values on the copy, so the duplicated data behaves as
documented, even if a subclass copied too much. Makes duplicated
dynamics work.
2011-02-07 19:38:23 +01:00
Michael Natterer 708555a378 app: keep a reference to channels and vectors around removing them
because we temporarily need them after removal from their item trees,
and bad things can happen if they are not kept alive by the undo stack
(like when undo is disabled while loading an image).
2011-02-07 11:35:58 +01:00
Barak Itkin 18b9ba1c87 app: Add some comment documentation to code 2011-02-07 03:29:23 +02:00
Michael Natterer ef28d7fee6 app: don't gimp_object_set_name() on an item that's attached to an image
because it bypasses the unique name logic used by gimp_item_rename().
2011-02-06 23:56:24 +01:00
Michael Natterer f4af9b549e Globally switch to saying "window_id" instead of just "window"
when dealing with native window handles. Also get rid of using
GdkNativeWindow and simply consistently use guint32 all over the
place. This is more obvious and consistent and keeps the diff to the
gtk3-port branch smaller.
2011-02-06 12:07:55 +01:00
Michael Natterer a116681982 app: move all GimpGroupLayer members to a private struct 2011-02-03 22:30:22 +01:00
Michael Natterer f8e8952147 app: clean up dynamics duplicate implementation 2011-02-03 19:47:52 +01:00
Martin Nordholts 93f63335dc app: End core/gimpdynamics.c with newline
Fix compiler warning.
2011-02-03 08:04:26 +01:00
Martin Nordholts 366cddc856 app: gimp_image_get/set_imported/exported/save_a_copy_uri()
Add more proper core API for GimpImage URI management.
2011-02-02 22:28:46 +01:00
Martin Nordholts d449317501 app: Add and use gimp_image_get_string_untitled() 2011-02-02 22:28:46 +01:00
Alexia Death 60a77f6db2 app: Fix and enable duplicate for dynamics 2011-02-02 21:48:10 +02:00
Michael Natterer 6a08376d49 app: add new virtual function GimpItem::unset_removed()
and implement it in GimpLayer to unset the removed flag on the layer
mask. Remove layer mask special casing from gimp_image_add_layer().
Make sure that all an item's children get their removed flag unset in
gimp_item_unset_removed().
2011-02-02 19:42:29 +01:00
Alexia Death 418632916a app: Fix outline offset 2011-02-02 00:58:09 +02:00
Alexia Death 6a89db0f53 app: Minor aspect ratio fixes 2011-02-02 00:33:08 +02:00
Michael Natterer eacd80446d app: finally get rid of gimp_item_configure() and drawable_configure()
and turn them into gimp_item_new() and gimp_drawable_new()
2011-02-01 12:47:24 +01:00
Michael Natterer ccd3beb8ff app: don't use gimp_drawable_configure() in gimp_drawable_duplicate()
Instead, copy over the needed drawable members manually.
2011-02-01 10:46:53 +01:00
Michael Natterer 5c8ec234cc app: add "image" as construct property to GimpItem
- The image *must* now be passed to g_object_new() when creating items
- Remove the "image" parameter from all item configure() functions
- Set the item's ID in gimp_item_set_image() if it has none yet
2011-02-01 10:28:10 +01:00
Michael Natterer 12e531f512 app: gimp_item_replace_item(): if the item has an ID, remove it from the item hash 2011-01-31 23:53:59 +01:00
Michael Natterer e893e3130c app: don't leak the item's old parasite list in gimp_item_replace_item() 2011-01-31 23:52:41 +01:00
Michael Natterer ad88eb55a2 app: add accessors for GimpItem::parasites and move it to private 2011-01-31 23:51:18 +01:00