- 09 Feb, 2010 16 commits
-
-
Michael Natterer authored
because it better fits there, and it's never actually been a "paste" from the implementation point of view.
-
Michael Natterer authored
Add gimp_image_new_from_drawable(), from_component() and from_pixbuf() and remove that duplicated code from gimptoolbox-dnd.c and gimpdisplayshell-dnd.c
-
Michael Natterer authored
-
Michael Natterer authored
instead of in gimp_image_set_active_layer()
-
Michael Natterer authored
-
Michael Natterer authored
See below...
-
Michael Natterer authored
-
Michael Natterer authored
-
Michael Natterer authored
-
Michael Natterer authored
Don't write to the string returned by gimp_object_get_name(). Pull most of the code out of the inner loop (which also means to allocate only one instead of three strings in the inner loop). Don't use the object as storage for the name that gets generated in the inner loop. Also, a space can't hurt so it's now "Foo #1" instead of "Foo#1".
-
Michael Natterer authored
-
Michael Natterer authored
so we check for the real type of the items that are in the tree. Also added some more precondition checks.
-
Michael Natterer authored
and emit "active-foo-changed" in the signal handlers instead of in gimp_image_set_active_foo().
-
Michael Natterer authored
because they are "new" only once and then never again. Instead, simply call new stuff "Layer", "Channel" and "Path", either by passing that string explicitely, or by passing NULL so their class' default name will be used.
-
Michael Natterer authored
Use the item class' default name unstead of "Unnamed" so they will be called "Layer", "Channel" and "Path".
-
Michael Natterer authored
-
- 08 Feb, 2010 3 commits
-
-
Cristian Secară authored
-
Cristian Secară authored
-
Sven Neumann authored
-
- 07 Feb, 2010 14 commits
-
-
Michael Natterer authored
-
Michael Natterer authored
and turn its code into a simple hash table lookup.
-
Michael Natterer authored
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.
-
Michael Natterer authored
so all item renaming goes through GimpItemTree API. Add "push_undo" parameter to gimp_item_tree_rename_item().
-
Michael Natterer authored
and call it from gimp_item_real_rename() if the item is attached to an image; simply use gimp_object_set_name() otherwise.
-
Michael Natterer authored
-
Michael Natterer authored
-
Michael Natterer authored
-
Michael Natterer authored
and use it to store the image's active layer, channel and vectors.
-
Michael Natterer authored
-
Michael Natterer authored
Get rid of tons of local "parent" variables and inline the get_parent() calls. They were on separate lines only to make them readable at all.
-
Michael Natterer authored
this is pretty pointless from an abstraction point of view, but using these functions will make the code a lot more readable by getting rid of tons of ugly casts to and from GimpViewable whenever getting an item's parent.
-
Michael Natterer authored
-
Michael Natterer authored
and use them from gimp_image_add,remove_layer,channel,vectors(). Removes quite some code duplication from the remove() functions but almost none from add() because of the ongoing floating selection madness. We need the calls to the item tree anyway because it's going to ensure unique names of its items.
-
- 06 Feb, 2010 7 commits
-
-
Michael Natterer authored
- get rid of the individual undo types and add GIMP_UNDO_ITEM_REORDER. - replace the pushing functions by a single one. - merge all the actual undo code into gimpitempropundo.[ch]. - use gimp_item_tree_reorder_item() to do the actual reordering. - fix gimp_item_tree_reorder_item() to use an ordinary "push_undo" boolean again instead of a pointer to an undo function. GimpVectorsPropUndo is now a completely empty skeleton. Keep it around anyway, maybe we'll get vectors properties to undo soon.
-
Michael Natterer authored
- add gimp_image_get_layer_tree(), channel_tree() and vectors_tree() - change GimpItem::get_container() to GimpItem::get_tree() - implement gimp_item_get_container() using gimp_item_get_tree()
-
Michael Natterer authored
and remove the code duplication in gimp_image_reorder_layer(), _channel() and _vectors(), which now consist of a single call to gimp_item_tree_reorder_item().
-
Michael Natterer authored
-
Michael Natterer authored
This commit is basically just an exchange of the stack-keeping objects and one big replacement of e.g. private->layers by private->layers->container. Useful code will follow :)
-
Michael Natterer authored
It will make sure all items in the tree have unique names, will keep the active item, handle inserting, removing and reordering and whatnot...
-
Michael Natterer authored
Instead, use the proper "add" APIs and remove checks for the guides / sample points being at the right positions (they might be out of image when an image resize or rotation is undone). Add comments to make clear that these functions are internal API, also add comments to the proper public APIs so it's clear which one to use in which situation.
-