Commit Graph

21 Commits

Author SHA1 Message Date
Michael Natterer 39909b6008 app: replace GimpList's internal GList with a GQueue
so we can easily iterate in reverse order, and access the last element
in O(1). Nothing makes use of this yet.
2016-05-01 15:22:44 +02:00
Michael Natterer 7c95676f88 app: implement the GimpColorManaged interface in GimpLayer
and change GimpImage and GimpItemStack to emit the "profile-changed"
signal when the image's profile changed. Also connect GimpViewRenderer
to "profile-changed" if the viewable is a GimpColorManaged and
invalidate the preview.
2015-09-03 00:21:40 +02:00
Michael Natterer 697572ccc0 app,libgimp*: fix includes to follow our include policy
- 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
2013-10-15 01:58:39 +02:00
Michael Natterer aa56bcd284 app: add new class GimpFilterStack factored out of GimpDrawableStack
and make it the parent class of GimpItemStack. Which means we now have
a generic stack of filters independent of any image items.
2013-04-11 12:25:11 +02: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 5e4eee4653 app: implement GObject::constructed() instead of ::constructor() 2011-01-12 22:53:58 +01:00
Michael Natterer b2642272a4 app: add gimp_item_stack_get_item_by_path()
which finds an item by its path as returned by gimp_item_get_path().
2010-08-08 17:31:39 +02:00
Michael Natterer 217d80bb78 Move get_item_by_name() from GimpItemStack to GimpItemTree
and turn its code into a simple hash table lookup.
2010-02-07 16:34:44 +01:00
Michael Natterer 8a7f2e8f51 Bug 604175 - gimp_vectors_import() is O(n**2) in gimp_list_uniquefy_name(), for some data
Switch off unique names for all individual item stacks and make sure
that all items in a GimpItemTree have unique names across all
containers. Uses a hash table and thus gets rid of the O(n**2)
complexity of the unique name code in GimpList.
2010-02-07 16:23:02 +01:00
Michael Natterer 1961036f5e Add gimp_item_stack_is_flat() which returns TRUE if it's not a tree 2009-09-07 21:07:44 +02:00
Michael Natterer a3558e3cb8 Remove GIMP_OBJECT() casts when calling gimp_object_get_name() 2009-08-31 22:47:18 +02:00
Michael Natterer f9c8bea368 Add gimp_item_stack_get_parent_by_path(), for use un XCF loading
The opposite of gimp_item_get_path(), just that it doesn't return an
item, it returns a parent item and an index that can be used to add
the item to an item tree.
2009-08-30 20:58:24 +02:00
Michael Natterer ffe1359d84 Add gimp_item_stach_get_item_iter()
Simply an accessor for GIMP_LIST (stack)->list.
2009-08-24 16:05:37 +02:00
Michael Natterer 6be068ceab Add functions to count the items in an image
* app/core/gimpitemstack.[ch]: add gimp_item_stack_get_n_items()
  which counts a stack's items recursively.

* app/core/gimpimage.[ch]: add get_n_layers(), get_n_channels()
  and get_n_vectors().
2009-08-02 12:13:55 +02:00
Michael Natterer 251ee3a7be Move get_item_by_tattoo() and by_name() functions from GimpImage to GimpItemStack 2009-08-02 01:39:51 +02:00
Michael Natterer 571d26a198 Add functions for getting lists of all an image's items
* app/core/gimpitemstack.[ch]: add gimp_item_stack_get_item_list()
  which returns a GList of all the stack's items, in depth-first
  order if the stack is in fact a tree.

* app/core/gimpimage.[ch]: add gimp_image_get_layer_list(),
  channel_list(), vectors_list() which use above new function.
2009-08-01 21:59:45 +02:00
Michael Natterer ad66250f90 Invalidate all the item stack's previews recursively 2009-08-01 19:23:59 +02:00
Michael Natterer d9b5207aa2 Change licence to GPLv3 (and to LGPLv3 for libgimp).
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
2009-01-17 22:28:01 +00:00
Martin Nordholts 2f25fb132f Use GimpContainer getters instead of poking into the class
instance struct.

* app/actions/context-commands.c
* app/actions/data-commands.c
* app/actions/plug-in-commands.c
* app/actions/templates-commands.c
* app/core/gimp-utils.c
* app/core/gimpdrawablestack.c
* app/core/gimpitemstack.c
* app/core/gimplist.c
* app/gui/gui-vtable.c
* app/widgets/gimpcontainerbox.c
* app/widgets/gimpcontainercombobox.c
* app/widgets/gimpcontainereditor.c
* app/widgets/gimpcontainerentry.c
* app/widgets/gimpcontainergridview.c
* app/widgets/gimpcontainerpopup.c
* app/widgets/gimpcontainertreeview-dnd.c
* app/widgets/gimpcontainertreeview.c
* app/widgets/gimpcontainerview-utils.c
* app/widgets/gimpcontainerview.c
* app/widgets/gimpdataeditor.c
* app/widgets/gimpdatafactoryview.c
* app/widgets/gimpsettingsbox.c
* app/widgets/gimpviewablebutton.c

svn path=/trunk/; revision=27693
2008-11-20 23:43:58 +00:00
Michael Natterer 0b2061c150 move the invalidate_previews() API from here...
2008-11-06  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawablestack.[ch]: move the invalidate_previews()
	API from here...

	* app/core/gimpitemstack.[ch]: ...to here.

	* app/core/gimpimage.c: changed accordingly.


svn path=/trunk/; revision=27569
2008-11-06 19:44:51 +00:00
Michael Natterer a3d556c0ca app/core/Makefile.am app/core/core-types.h new GimpList subclass which
* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpitemstack.[ch]: new GimpList subclass which (for
	now) does nothing but taking ownership of its children by the
	means of g_object_ref_sink().

	* app/core/gimpdrawablestack.[ch]: derive from GimpItemStack.

	* app/core/gimpimage.c: use a GimpItemStack instead of a plain
	GimpList for the list of vectors. Remove code which takes
	ownerships of added items from gimp_image_add_layer(),
	add_channel() and add_vectors().


svn path=/trunk/; revision=27568
2008-11-06 19:09:59 +00:00