mirror of https://github.com/GNOME/gimp.git
app: clean up last commit
Remove gimp_item_tree_clear(), added in last commit, and move its code to gimp_item_tree_dispose(). Likewise, in gimp_image_dispose(), use g_object_run_dispose() on the image item- trees, instead of gimp_item_tree_clear().
This commit is contained in:
parent
d7e3a1e226
commit
b0de51b6bf
|
@ -1032,9 +1032,9 @@ gimp_image_dispose (GObject *object)
|
|||
gimp_image_channel_remove,
|
||||
image);
|
||||
|
||||
gimp_item_tree_clear (private->layers);
|
||||
gimp_item_tree_clear (private->channels);
|
||||
gimp_item_tree_clear (private->vectors);
|
||||
g_object_run_dispose (G_OBJECT (private->layers));
|
||||
g_object_run_dispose (G_OBJECT (private->channels));
|
||||
g_object_run_dispose (G_OBJECT (private->vectors));
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->dispose (object);
|
||||
}
|
||||
|
|
|
@ -163,9 +163,16 @@ gimp_item_tree_constructed (GObject *object)
|
|||
static void
|
||||
gimp_item_tree_dispose (GObject *object)
|
||||
{
|
||||
GimpItemTree *tree = GIMP_ITEM_TREE (object);
|
||||
GimpItemTree *tree = GIMP_ITEM_TREE (object);
|
||||
GimpItemTreePrivate *private = GIMP_ITEM_TREE_GET_PRIVATE (tree);
|
||||
|
||||
gimp_item_tree_clear (tree);
|
||||
gimp_item_tree_set_active_item (tree, NULL);
|
||||
|
||||
gimp_container_foreach (tree->container,
|
||||
(GFunc) gimp_item_removed, NULL);
|
||||
|
||||
gimp_container_clear (tree->container);
|
||||
g_hash_table_remove_all (private->name_hash);
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->dispose (object);
|
||||
}
|
||||
|
@ -396,24 +403,6 @@ gimp_item_tree_get_insert_pos (GimpItemTree *tree,
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
gimp_item_tree_clear (GimpItemTree *tree)
|
||||
{
|
||||
GimpItemTreePrivate *private;
|
||||
|
||||
g_return_if_fail (GIMP_IS_ITEM_TREE (tree));
|
||||
|
||||
private = GIMP_ITEM_TREE_GET_PRIVATE (tree);
|
||||
|
||||
gimp_item_tree_set_active_item (tree, NULL);
|
||||
|
||||
gimp_container_foreach (tree->container,
|
||||
(GFunc) gimp_item_removed, NULL);
|
||||
|
||||
gimp_container_clear (tree->container);
|
||||
g_hash_table_remove_all (private->name_hash);
|
||||
}
|
||||
|
||||
void
|
||||
gimp_item_tree_add_item (GimpItemTree *tree,
|
||||
GimpItem *item,
|
||||
|
|
|
@ -64,8 +64,6 @@ gboolean gimp_item_tree_get_insert_pos (GimpItemTree *tree,
|
|||
GimpItem **parent,
|
||||
gint *position);
|
||||
|
||||
void gimp_item_tree_clear (GimpItemTree *tree);
|
||||
|
||||
void gimp_item_tree_add_item (GimpItemTree *tree,
|
||||
GimpItem *item,
|
||||
GimpItem *parent,
|
||||
|
|
Loading…
Reference in New Issue