[gimp] When an item is removed, emit "removed" on all its children
- From: Michael Natterer <mitch src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp] When an item is removed, emit "removed" on all its children
- Date: Sat, 1 Aug 2009 17:22:15 +0000 (UTC)
commit 464ce841aa165f9502ec2ae749488a91b1977166
Author: Michael Natterer <mitch gimp org>
Date: Sat Aug 1 19:21:43 2009 +0200
When an item is removed, emit "removed" on all its children
app/core/gimpitem.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/app/core/gimpitem.c b/app/core/gimpitem.c
index 34700b5..e2b0227 100644
--- a/app/core/gimpitem.c
+++ b/app/core/gimpitem.c
@@ -528,10 +528,17 @@ gimp_item_sync_offset_node (GimpItem *item)
void
gimp_item_removed (GimpItem *item)
{
+ GimpContainer *children;
+
g_return_if_fail (GIMP_IS_ITEM (item));
item->removed = TRUE;
+ children = gimp_viewable_get_children (GIMP_VIEWABLE (item));
+
+ if (children)
+ gimp_container_foreach (children, (GFunc) gimp_item_removed, NULL);
+
g_signal_emit (item, gimp_item_signals[REMOVED], 0);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]