app: rename GimpContainer's "children-type" property to "child-type"

This commit is contained in:
Michael Natterer 2025-07-17 09:28:26 +02:00
parent 77bb857046
commit d4e8ab0234
18 changed files with 57 additions and 58 deletions

View file

@ -254,9 +254,9 @@ gimp_init (Gimp *gimp)
gimp->drawable_filter_table = gimp_id_table_new ();
gimp->displays = g_object_new (GIMP_TYPE_LIST,
"children-type", GIMP_TYPE_OBJECT,
"policy", GIMP_CONTAINER_POLICY_WEAK,
"append", TRUE,
"child-type", GIMP_TYPE_OBJECT,
"policy", GIMP_CONTAINER_POLICY_WEAK,
"append", TRUE,
NULL);
gimp_object_set_static_name (GIMP_OBJECT (gimp->displays), "displays");
gimp->next_display_id = 1;
@ -268,15 +268,15 @@ gimp_init (Gimp *gimp)
gimp_data_factories_init (gimp);
gimp->tool_info_list = g_object_new (GIMP_TYPE_LIST,
"children-type", GIMP_TYPE_TOOL_INFO,
"append", TRUE,
"child-type", GIMP_TYPE_TOOL_INFO,
"append", TRUE,
NULL);
gimp_object_set_static_name (GIMP_OBJECT (gimp->tool_info_list),
"tool infos");
gimp->tool_item_list = g_object_new (GIMP_TYPE_LIST,
"children-type", GIMP_TYPE_TOOL_ITEM,
"append", TRUE,
"child-type", GIMP_TYPE_TOOL_ITEM,
"append", TRUE,
NULL);
gimp_object_set_static_name (GIMP_OBJECT (gimp->tool_item_list),
"tool items");

View file

@ -71,8 +71,8 @@ gimp_container_filter (GimpContainer *container,
result =
g_object_new (G_TYPE_FROM_INSTANCE (container),
"children-type", gimp_container_get_children_type (container),
"policy", GIMP_CONTAINER_POLICY_WEAK,
"child-type", gimp_container_get_children_type (container),
"policy", GIMP_CONTAINER_POLICY_WEAK,
NULL);
context.filter = filter;

View file

@ -56,7 +56,7 @@ enum
enum
{
PROP_0,
PROP_CHILDREN_TYPE,
PROP_CHILD_TYPE,
PROP_POLICY
};
@ -212,8 +212,8 @@ gimp_container_class_init (GimpContainerClass *klass)
klass->get_child_by_index = NULL;
klass->get_child_index = NULL;
g_object_class_install_property (object_class, PROP_CHILDREN_TYPE,
g_param_spec_gtype ("children-type",
g_object_class_install_property (object_class, PROP_CHILD_TYPE,
g_param_spec_gtype ("child-type",
NULL, NULL,
GIMP_TYPE_OBJECT,
GIMP_PARAM_READWRITE |
@ -287,7 +287,7 @@ gimp_container_set_property (GObject *object,
switch (property_id)
{
case PROP_CHILDREN_TYPE:
case PROP_CHILD_TYPE:
container->priv->child_type = g_value_get_gtype (value);
g_type_class_ref (container->priv->child_type);
break;
@ -310,7 +310,7 @@ gimp_container_get_property (GObject *object,
switch (property_id)
{
case PROP_CHILDREN_TYPE:
case PROP_CHILD_TYPE:
g_value_set_gtype (value, container->priv->child_type);
break;
case PROP_POLICY:

View file

@ -52,9 +52,9 @@ gimp_document_list_new (Gimp *gimp)
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
document_list = g_object_new (GIMP_TYPE_DOCUMENT_LIST,
"name", "document-list",
"children-type", GIMP_TYPE_IMAGEFILE,
"policy", GIMP_CONTAINER_POLICY_STRONG,
"name", "document-list",
"child-type", GIMP_TYPE_IMAGEFILE,
"policy", GIMP_CONTAINER_POLICY_STRONG,
NULL);
document_list->gimp = gimp;

View file

@ -161,9 +161,9 @@ gimp_drawable_stack_new (GType drawable_type)
g_return_val_if_fail (g_type_is_a (drawable_type, GIMP_TYPE_DRAWABLE), NULL);
return g_object_new (GIMP_TYPE_DRAWABLE_STACK,
"name", g_type_name (drawable_type),
"children-type", drawable_type,
"policy", GIMP_CONTAINER_POLICY_STRONG,
"name", g_type_name (drawable_type),
"child-type", drawable_type,
"policy", GIMP_CONTAINER_POLICY_STRONG,
NULL);
}

View file

@ -314,7 +314,7 @@ gimp_filtered_container_new (GimpContainer *src_container,
return g_object_new (GIMP_TYPE_FILTERED_CONTAINER,
"sort-func", sort_func,
"children-type", child_type,
"child-type", child_type,
"policy", GIMP_CONTAINER_POLICY_WEAK,
"unique-names", FALSE,
"src-container", src_container,

View file

@ -175,9 +175,9 @@ gimp_filter_stack_new (GType filter_type)
g_return_val_if_fail (g_type_is_a (filter_type, GIMP_TYPE_FILTER), NULL);
return g_object_new (GIMP_TYPE_FILTER_STACK,
"name", g_type_name (filter_type),
"children-type", filter_type,
"policy", GIMP_CONTAINER_POLICY_STRONG,
"name", g_type_name (filter_type),
"child-type", filter_type,
"policy", GIMP_CONTAINER_POLICY_STRONG,
NULL);
}

View file

@ -104,9 +104,9 @@ gimp_item_stack_new (GType item_type)
g_return_val_if_fail (g_type_is_a (item_type, GIMP_TYPE_ITEM), NULL);
return g_object_new (GIMP_TYPE_ITEM_STACK,
"name", g_type_name (item_type),
"children-type", item_type,
"policy", GIMP_CONTAINER_POLICY_STRONG,
"name", g_type_name (item_type),
"child-type", item_type,
"policy", GIMP_CONTAINER_POLICY_STRONG,
NULL);
}

View file

@ -163,9 +163,9 @@ gimp_item_tree_constructed (GObject *object)
gimp_assert (private->item_type != GIMP_TYPE_ITEM);
tree->container = g_object_new (private->container_type,
"name", g_type_name (private->item_type),
"children-type", private->item_type,
"policy", GIMP_CONTAINER_POLICY_STRONG,
"name", g_type_name (private->item_type),
"child-type", private->item_type,
"policy", GIMP_CONTAINER_POLICY_STRONG,
NULL);
}

View file

@ -157,9 +157,9 @@ gimp_layer_stack_new (GType layer_type)
g_return_val_if_fail (g_type_is_a (layer_type, GIMP_TYPE_LAYER), NULL);
return g_object_new (GIMP_TYPE_LAYER_STACK,
"name", g_type_name (layer_type),
"children-type", layer_type,
"policy", GIMP_CONTAINER_POLICY_STRONG,
"name", g_type_name (layer_type),
"child-type", layer_type,
"policy", GIMP_CONTAINER_POLICY_STRONG,
NULL);
}

View file

@ -450,9 +450,9 @@ gimp_list_new (GType child_type,
g_return_val_if_fail (g_type_is_a (child_type, GIMP_TYPE_OBJECT), NULL);
list = g_object_new (GIMP_TYPE_LIST,
"children-type", child_type,
"policy", GIMP_CONTAINER_POLICY_STRONG,
"unique-names", unique_names ? TRUE : FALSE,
"child-type", child_type,
"policy", GIMP_CONTAINER_POLICY_STRONG,
"unique-names", unique_names ? TRUE : FALSE,
NULL);
/* for debugging purposes only */
@ -484,9 +484,9 @@ gimp_list_new_weak (GType child_type,
g_return_val_if_fail (g_type_is_a (child_type, GIMP_TYPE_OBJECT), NULL);
list = g_object_new (GIMP_TYPE_LIST,
"children-type", child_type,
"policy", GIMP_CONTAINER_POLICY_WEAK,
"unique-names", unique_names ? TRUE : FALSE,
"child-type", child_type,
"policy", GIMP_CONTAINER_POLICY_WEAK,
"unique-names", unique_names ? TRUE : FALSE,
NULL);
/* for debugging purposes only */

View file

@ -271,7 +271,7 @@ gimp_tagged_container_new (GimpContainer *src_container)
tagged_container = g_object_new (GIMP_TYPE_TAGGED_CONTAINER,
"sort-func", sort_func,
"children-type", child_type,
"child-type", child_type,
"policy", GIMP_CONTAINER_POLICY_WEAK,
"unique-names", FALSE,
"src-container", src_container,

View file

@ -147,11 +147,10 @@ gimp_tool_group_init (GimpToolGroup *tool_group)
{
tool_group->priv = gimp_tool_group_get_instance_private (tool_group);
tool_group->priv->children = g_object_new (
GIMP_TYPE_LIST,
"children-type", GIMP_TYPE_TOOL_INFO,
"append", TRUE,
NULL);
tool_group->priv->children = g_object_new (GIMP_TYPE_LIST,
"child-type", GIMP_TYPE_TOOL_INFO,
"append", TRUE,
NULL);
g_signal_connect (tool_group->priv->children, "add",
G_CALLBACK (gimp_tool_group_child_add),

View file

@ -518,9 +518,9 @@ gimp_tree_proxy_new (GType child_type)
g_type_class_unref (children_class);
return g_object_new (GIMP_TYPE_TREE_PROXY,
"children-type", child_type,
"policy", GIMP_CONTAINER_POLICY_WEAK,
"append", TRUE,
"child-type", child_type,
"policy", GIMP_CONTAINER_POLICY_WEAK,
"append", TRUE,
NULL);
}

View file

@ -175,8 +175,8 @@ gimp_tool_widget_group_init (GimpToolWidgetGroup *group)
priv = group->priv = gimp_tool_widget_group_get_instance_private (group);
priv->children = g_object_new (GIMP_TYPE_LIST,
"children-type", GIMP_TYPE_TOOL_WIDGET,
"append", TRUE,
"child-type", GIMP_TYPE_TOOL_WIDGET,
"append", TRUE,
NULL);
g_signal_connect (priv->children, "add",

View file

@ -521,8 +521,8 @@ gimp_tools_deserialize (Gimp *gimp,
gimp_container_clear (container);
src_container = g_object_new (GIMP_TYPE_LIST,
"children-type", GIMP_TYPE_TOOL_ITEM,
"append", TRUE,
"child-type", GIMP_TYPE_TOOL_ITEM,
"append", TRUE,
NULL);
if (gimp_config_deserialize (GIMP_CONFIG (src_container),

View file

@ -152,7 +152,7 @@ gimp_controller_manager_new (Gimp *gimp)
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
self = g_object_new (GIMP_TYPE_CONTROLLER_MANAGER,
"children-type", GIMP_TYPE_CONTROLLER_INFO,
"child-type", GIMP_TYPE_CONTROLLER_INFO,
NULL);
self->gimp = gimp;

View file

@ -295,11 +295,11 @@ gimp_device_manager_new (Gimp *gimp)
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
return g_object_new (GIMP_TYPE_DEVICE_MANAGER,
"gimp", gimp,
"children-type", GIMP_TYPE_DEVICE_INFO,
"policy", GIMP_CONTAINER_POLICY_STRONG,
"unique-names", TRUE,
"sort-func", gimp_device_info_compare,
"gimp", gimp,
"child-type", GIMP_TYPE_DEVICE_INFO,
"policy", GIMP_CONTAINER_POLICY_STRONG,
"unique-names", TRUE,
"sort-func", gimp_device_info_compare,
NULL);
}