s/gimp_container_children_type/gimp_container_get_children_type/

s/gimp_container_policy/gimp_container_get_policy/
s/gimp_container_num_children/gimp_container_get_n_children/

* app/actions/actions.c
* app/actions/file-actions.c
* app/actions/file-commands.c
* app/actions/tool-options-actions.c
* app/actions/tools-actions.c
* app/actions/tools-commands.c
* app/actions/vectors-actions.c
* app/core/gimpcontainer-filter.c
* app/core/gimpcontainer.c
* app/core/gimpcontainer.h
* app/core/gimpimage-convert.c
* app/core/gimpimage-flip.c
* app/core/gimpimage-merge.c
* app/core/gimpimage-resize.c
* app/core/gimpimage-rotate.c
* app/core/gimpimage-scale.c
* app/core/gimpimage-undo.c
* app/core/gimpimage.c
* app/core/gimpimagefile.c
* app/core/gimplist.c
* app/core/gimpundostack.c
* app/dialogs/palette-import-dialog.c
* app/dialogs/quit-dialog.c
* app/display/gimpdisplay.c
* app/display/gimpdisplayshell-layer-select.c
* app/display/gimpdisplayshell-title.c
* app/gui/gui-vtable.c
* app/menus/tool-options-menu.c
* app/tools/gimp-tools.c
* app/widgets/gimpcontrollerlist.c
* app/widgets/gimpimagepropview.c
* app/widgets/gimpsettingsbox.c
* app/widgets/gimpviewablebutton.c
* app/xcf/xcf-load.c
* app/xcf/xcf-save.c

svn path=/trunk/; revision=27692
This commit is contained in:
Martin Nordholts 2008-11-20 22:45:19 +00:00
parent 807095548b
commit 5aeb568650
36 changed files with 129 additions and 87 deletions

View File

@ -1,3 +1,45 @@
2008-11-20 Martin Nordholts <martinn@svn.gnome.org>
s/gimp_container_children_type/gimp_container_get_children_type/
s/gimp_container_policy/gimp_container_get_policy/
s/gimp_container_num_children/gimp_container_get_n_children/
* app/actions/actions.c
* app/actions/file-actions.c
* app/actions/file-commands.c
* app/actions/tool-options-actions.c
* app/actions/tools-actions.c
* app/actions/tools-commands.c
* app/actions/vectors-actions.c
* app/core/gimpcontainer-filter.c
* app/core/gimpcontainer.c
* app/core/gimpcontainer.h
* app/core/gimpimage-convert.c
* app/core/gimpimage-flip.c
* app/core/gimpimage-merge.c
* app/core/gimpimage-resize.c
* app/core/gimpimage-rotate.c
* app/core/gimpimage-scale.c
* app/core/gimpimage-undo.c
* app/core/gimpimage.c
* app/core/gimpimagefile.c
* app/core/gimplist.c
* app/core/gimpundostack.c
* app/dialogs/palette-import-dialog.c
* app/dialogs/quit-dialog.c
* app/display/gimpdisplay.c
* app/display/gimpdisplayshell-layer-select.c
* app/display/gimpdisplayshell-title.c
* app/gui/gui-vtable.c
* app/menus/tool-options-menu.c
* app/tools/gimp-tools.c
* app/widgets/gimpcontrollerlist.c
* app/widgets/gimpimagepropview.c
* app/widgets/gimpsettingsbox.c
* app/widgets/gimpviewablebutton.c
* app/xcf/xcf-load.c
* app/xcf/xcf-save.c
2008-11-20 Martin Nordholts <martinn@svn.gnome.org>
* app/core/gimpcontainer.[ch]: Don't expose class instance members

View File

@ -531,7 +531,7 @@ action_select_object (GimpActionSelectType select_type,
if (! current)
return NULL;
n_children = gimp_container_num_children (container);
n_children = gimp_container_get_n_children (container);
if (n_children == 0)
return NULL;

View File

@ -260,7 +260,7 @@ file_actions_last_opened_update (GimpContainer *container,
gint i;
gint n = GIMP_GUI_CONFIG (group->gimp->config)->last_opened_size;
num_documents = gimp_container_num_children (container);
num_documents = gimp_container_get_n_children (container);
for (i = 0; i < n; i++)
{
@ -330,7 +330,7 @@ file_actions_close_all_update (GimpContainer *images,
GimpActionGroup *group)
{
GimpContainer *container = group->gimp->displays;
gint n_displays = gimp_container_num_children (container);
gint n_displays = gimp_container_get_n_children (container);
gboolean sensitive = (n_displays > 0);
if (n_displays == 1)

View File

@ -149,7 +149,7 @@ file_open_recent_cmd_callback (GtkAction *action,
gint num_entries;
return_if_no_gimp (gimp, data);
num_entries = gimp_container_num_children (gimp->documents);
num_entries = gimp_container_get_n_children (gimp->documents);
if (value >= num_entries)
return;

View File

@ -179,7 +179,7 @@ tool_options_actions_update_presets (GimpActionGroup *group,
}
if (presets)
n_children = gimp_container_num_children (presets);
n_children = gimp_container_get_n_children (presets);
if (n_children > 0)
{

View File

@ -702,7 +702,7 @@ tools_actions_update (GimpActionGroup *group,
SET_ACTIVE ("tools-visibility", tool_info->visible);
last_index = gimp_container_num_children (container) -1;
last_index = gimp_container_get_n_children (container) -1;
index = gimp_container_get_child_index (container,
GIMP_OBJECT (tool_info));

View File

@ -190,7 +190,7 @@ tools_lower_cmd_callback (GtkAction *action,
index = gimp_container_get_child_index (container,
GIMP_OBJECT (tool_info));
if (index + 1 < gimp_container_num_children (container))
if (index + 1 < gimp_container_get_n_children (container))
gimp_container_reorder (container, GIMP_OBJECT (tool_info), index + 1);
}
}
@ -211,7 +211,7 @@ tools_lower_to_bottom_cmd_callback (GtkAction *action,
gint index;
container = context->gimp->tool_info_list;
index = gimp_container_num_children (container) - 1;
index = gimp_container_get_n_children (container) - 1;
index = index >= 0 ? index : 0;

View File

@ -249,7 +249,7 @@ vectors_actions_update (GimpActionGroup *group,
if (image)
{
n_vectors = gimp_container_num_children (image->vectors);
n_vectors = gimp_container_get_n_children (image->vectors);
mask_empty = gimp_channel_is_empty (gimp_image_get_mask (image));
global_buf = FALSE;

View File

@ -72,7 +72,7 @@ gimp_container_filter (const GimpContainer *container,
result =
g_object_new (G_TYPE_FROM_INSTANCE (container),
"children-type", gimp_container_children_type (container),
"children-type", gimp_container_get_children_type (container),
"policy", GIMP_CONTAINER_POLICY_WEAK,
NULL);

View File

@ -519,7 +519,7 @@ gimp_container_disconnect_callback (GimpObject *object,
}
GType
gimp_container_children_type (const GimpContainer *container)
gimp_container_get_children_type (const GimpContainer *container)
{
g_return_val_if_fail (GIMP_IS_CONTAINER (container), G_TYPE_NONE);
@ -527,7 +527,7 @@ gimp_container_children_type (const GimpContainer *container)
}
GimpContainerPolicy
gimp_container_policy (const GimpContainer *container)
gimp_container_get_policy (const GimpContainer *container)
{
g_return_val_if_fail (GIMP_IS_CONTAINER (container), 0);
@ -535,7 +535,7 @@ gimp_container_policy (const GimpContainer *container)
}
gint
gimp_container_num_children (const GimpContainer *container)
gimp_container_get_n_children (const GimpContainer *container)
{
g_return_val_if_fail (GIMP_IS_CONTAINER (container), 0);
@ -903,7 +903,7 @@ gimp_container_get_name_array (const GimpContainer *container,
g_return_val_if_fail (GIMP_IS_CONTAINER (container), NULL);
g_return_val_if_fail (length != NULL, NULL);
*length = gimp_container_num_children (container);
*length = gimp_container_get_n_children (container);
if (*length == 0)
return NULL;

View File

@ -82,9 +82,9 @@ struct _GimpContainerClass
GType gimp_container_get_type (void) G_GNUC_CONST;
GType gimp_container_children_type (const GimpContainer *container);
GimpContainerPolicy gimp_container_policy (const GimpContainer *container);
gint gimp_container_num_children (const GimpContainer *container);
GType gimp_container_get_children_type (const GimpContainer *container);
GimpContainerPolicy gimp_container_get_policy (const GimpContainer *container);
gint gimp_container_get_n_children (const GimpContainer *container);
gboolean gimp_container_add (GimpContainer *container,
GimpObject *object);

View File

@ -798,7 +798,7 @@ gimp_image_convert (GimpImage *image,
gimp_set_busy (image->gimp);
n_layers = gimp_container_num_children (GIMP_CONTAINER (image->layers));
n_layers = gimp_container_get_n_children (GIMP_CONTAINER (image->layers));
switch (new_type)
{

View File

@ -69,9 +69,9 @@ gimp_image_flip (GimpImage *image,
return;
}
progress_max = (gimp_container_num_children (image->channels) +
gimp_container_num_children (image->layers) +
gimp_container_num_children (image->vectors) +
progress_max = (gimp_container_get_n_children (image->channels) +
gimp_container_get_n_children (image->layers) +
gimp_container_get_n_children (image->vectors) +
1 /* selection */);
gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_IMAGE_FLIP, NULL);

View File

@ -486,7 +486,7 @@ gimp_image_merge_layers (GimpImage *image,
*/
layer = reverse_list->data;
position =
gimp_container_num_children (image->layers) -
gimp_container_get_n_children (image->layers) -
gimp_container_get_child_index (image->layers, GIMP_OBJECT (layer));
}
@ -601,7 +601,7 @@ gimp_image_merge_layers (GimpImage *image,
/* Add the layer to the image */
gimp_image_add_layer
(image, merge_layer,
gimp_container_num_children (image->layers) - position + 1,
gimp_container_get_n_children (image->layers) - position + 1,
TRUE);
}

View File

@ -79,9 +79,9 @@ gimp_image_resize_with_layers (GimpImage *image,
gimp_set_busy (image->gimp);
progress_max = (gimp_container_num_children (image->channels) +
gimp_container_num_children (image->layers) +
gimp_container_num_children (image->vectors) +
progress_max = (gimp_container_get_n_children (image->channels) +
gimp_container_get_n_children (image->layers) +
gimp_container_get_n_children (image->vectors) +
1 /* selection */);
g_object_freeze_notify (G_OBJECT (image));

View File

@ -79,9 +79,9 @@ gimp_image_rotate (GimpImage *image,
center_x = previous_image_width / 2.0;
center_y = previous_image_height / 2.0;
progress_max = (gimp_container_num_children (image->channels) +
gimp_container_num_children (image->layers) +
gimp_container_num_children (image->vectors) +
progress_max = (gimp_container_get_n_children (image->channels) +
gimp_container_get_n_children (image->layers) +
gimp_container_get_n_children (image->vectors) +
1 /* selection */);
g_object_freeze_notify (G_OBJECT (image));

View File

@ -71,9 +71,9 @@ gimp_image_scale (GimpImage *image,
sub_progress = gimp_sub_progress_new (progress);
progress_steps = (gimp_container_num_children (image->channels) +
gimp_container_num_children (image->layers) +
gimp_container_num_children (image->vectors) +
progress_steps = (gimp_container_get_n_children (image->channels) +
gimp_container_get_n_children (image->layers) +
gimp_container_get_n_children (image->vectors) +
1 /* selection */);
g_object_freeze_notify (G_OBJECT (image));

View File

@ -419,23 +419,23 @@ gimp_image_undo_free_space (GimpImage *image)
#ifdef DEBUG_IMAGE_UNDO
g_printerr ("undo_steps: %d undo_bytes: %ld\n",
gimp_container_num_children (container),
gimp_container_get_n_children (container),
(glong) gimp_object_get_memsize (GIMP_OBJECT (container), NULL));
#endif
/* keep at least min_undo_levels undo steps */
if (gimp_container_num_children (container) <= min_undo_levels)
if (gimp_container_get_n_children (container) <= min_undo_levels)
return;
while ((gimp_object_get_memsize (GIMP_OBJECT (container), NULL) > undo_size) ||
(gimp_container_num_children (container) > max_undo_levels))
(gimp_container_get_n_children (container) > max_undo_levels))
{
GimpUndo *freed = gimp_undo_stack_free_bottom (image->undo_stack,
GIMP_UNDO_MODE_UNDO);
#ifdef DEBUG_IMAGE_UNDO
g_printerr ("freed one step: undo_steps: %d undo_bytes: %ld\n",
gimp_container_num_children (container),
gimp_container_get_n_children (container),
(glong) gimp_object_get_memsize (GIMP_OBJECT (container),
NULL));
#endif
@ -444,7 +444,7 @@ gimp_image_undo_free_space (GimpImage *image)
g_object_unref (freed);
if (gimp_container_num_children (container) <= min_undo_levels)
if (gimp_container_get_n_children (container) <= min_undo_levels)
return;
}
}
@ -456,21 +456,21 @@ gimp_image_undo_free_redo (GimpImage *image)
#ifdef DEBUG_IMAGE_UNDO
g_printerr ("redo_steps: %d redo_bytes: %ld\n",
gimp_container_num_children (container),
gimp_container_get_n_children (container),
(glong) gimp_object_get_memsize (GIMP_OBJECT (container), NULL));
#endif
if (gimp_container_is_empty (container))
return;
while (gimp_container_num_children (container) > 0)
while (gimp_container_get_n_children (container) > 0)
{
GimpUndo *freed = gimp_undo_stack_free_bottom (image->redo_stack,
GIMP_UNDO_MODE_REDO);
#ifdef DEBUG_IMAGE_UNDO
g_printerr ("freed one step: redo_steps: %d redo_bytes: %ld\n",
gimp_container_num_children (container),
gimp_container_get_n_children (container),
(glong )gimp_object_get_memsize (GIMP_OBJECT (container),
NULL));
#endif

View File

@ -1263,7 +1263,7 @@ static void
gimp_image_layer_alpha_changed (GimpDrawable *drawable,
GimpImage *image)
{
if (gimp_container_num_children (image->layers) == 1)
if (gimp_container_get_n_children (image->layers) == 1)
image->flush_accum.alpha_changed = TRUE;
}
@ -1610,7 +1610,7 @@ gimp_image_has_alpha (const GimpImage *image)
layer = gimp_image_get_layer_by_index (image, 0);
return ((gimp_container_num_children (image->layers) > 1) ||
return ((gimp_container_get_n_children (image->layers) > 1) ||
(layer && gimp_drawable_has_alpha (GIMP_DRAWABLE (layer))));
}
@ -2968,7 +2968,7 @@ gimp_image_add_layer (GimpImage *image,
position = 1;
/* Don't add at a non-existing index */
position = MIN (position, gimp_container_num_children (image->layers));
position = MIN (position, gimp_container_get_n_children (image->layers));
gimp_container_insert (image->layers, GIMP_OBJECT (layer), position);
@ -3077,7 +3077,7 @@ gimp_image_remove_layer (GimpImage *image,
}
else
{
gint n_children = gimp_container_num_children (image->layers);
gint n_children = gimp_container_get_n_children (image->layers);
if (n_children > 0)
{
@ -3212,7 +3212,7 @@ gimp_image_lower_layer (GimpImage *image,
index = gimp_container_get_child_index (image->layers,
GIMP_OBJECT (layer));
if (index == gimp_container_num_children (image->layers) - 1)
if (index == gimp_container_get_n_children (image->layers) - 1)
{
g_set_error_literal (error, GIMP_ERROR, GIMP_FAILED,
_("Layer cannot be lowered more."));
@ -3243,7 +3243,7 @@ gimp_image_lower_layer_to_bottom (GimpImage *image,
g_return_val_if_fail (GIMP_IS_IMAGE (image), FALSE);
g_return_val_if_fail (GIMP_IS_LAYER (layer), FALSE);
length = gimp_container_num_children (image->layers);
length = gimp_container_get_n_children (image->layers);
return gimp_image_position_layer (image, layer, length - 1,
TRUE, _("Lower Layer to Bottom"));
@ -3267,7 +3267,7 @@ gimp_image_position_layer (GimpImage *image,
if (index < 0)
return FALSE;
num_layers = gimp_container_num_children (image->layers);
num_layers = gimp_container_get_n_children (image->layers);
new_index = CLAMP (new_index, 0, num_layers - 1);
@ -3313,7 +3313,7 @@ gimp_image_add_channel (GimpImage *image,
}
/* Don't add at a non-existing index */
position = MIN (position, gimp_container_num_children (image->channels));
position = MIN (position, gimp_container_get_n_children (image->channels));
gimp_container_insert (image->channels, GIMP_OBJECT (channel), position);
@ -3378,7 +3378,7 @@ gimp_image_remove_channel (GimpImage *image,
}
else
{
gint n_children = gimp_container_num_children (image->channels);
gint n_children = gimp_container_get_n_children (image->channels);
if (n_children > 0)
{
@ -3455,7 +3455,7 @@ gimp_image_lower_channel (GimpImage *image,
index = gimp_container_get_child_index (image->channels,
GIMP_OBJECT (channel));
if (index == gimp_container_num_children (image->channels) - 1)
if (index == gimp_container_get_n_children (image->channels) - 1)
{
g_set_error_literal (error, GIMP_ERROR, GIMP_FAILED,
_("Channel cannot be lowered more."));
@ -3475,7 +3475,7 @@ gimp_image_lower_channel_to_bottom (GimpImage *image,
g_return_val_if_fail (GIMP_IS_IMAGE (image), FALSE);
g_return_val_if_fail (GIMP_IS_CHANNEL (channel), FALSE);
length = gimp_container_num_children (image->channels);
length = gimp_container_get_n_children (image->channels);
return gimp_image_position_channel (image, channel, length - 1,
TRUE, _("Lower Channel to Bottom"));
@ -3499,7 +3499,7 @@ gimp_image_position_channel (GimpImage *image,
if (index < 0)
return FALSE;
num_channels = gimp_container_num_children (image->channels);
num_channels = gimp_container_get_n_children (image->channels);
new_index = CLAMP (new_index, 0, num_channels - 1);
@ -3546,7 +3546,7 @@ gimp_image_add_vectors (GimpImage *image,
}
/* Don't add at a non-existing index */
position = MIN (position, gimp_container_num_children (image->vectors));
position = MIN (position, gimp_container_get_n_children (image->vectors));
gimp_container_insert (image->vectors, GIMP_OBJECT (vectors), position);
@ -3592,7 +3592,7 @@ gimp_image_remove_vectors (GimpImage *image,
}
else
{
gint n_children = gimp_container_num_children (image->vectors);
gint n_children = gimp_container_get_n_children (image->vectors);
if (n_children > 0)
{
@ -3662,7 +3662,7 @@ gimp_image_lower_vectors (GimpImage *image,
index = gimp_container_get_child_index (image->vectors,
GIMP_OBJECT (vectors));
if (index == gimp_container_num_children (image->vectors) - 1)
if (index == gimp_container_get_n_children (image->vectors) - 1)
{
g_set_error_literal (error, GIMP_ERROR, GIMP_FAILED,
_("Path cannot be lowered more."));
@ -3682,7 +3682,7 @@ gimp_image_lower_vectors_to_bottom (GimpImage *image,
g_return_val_if_fail (GIMP_IS_IMAGE (image), FALSE);
g_return_val_if_fail (GIMP_IS_VECTORS (vectors), FALSE);
length = gimp_container_num_children (image->vectors);
length = gimp_container_get_n_children (image->vectors);
return gimp_image_position_vectors (image, vectors, length - 1,
TRUE, _("Lower Path to Bottom"));
@ -3706,7 +3706,7 @@ gimp_image_position_vectors (GimpImage *image,
if (index < 0)
return FALSE;
num_vectors = gimp_container_num_children (image->vectors);
num_vectors = gimp_container_get_n_children (image->vectors);
new_index = CLAMP (new_index, 0, num_vectors - 1);

View File

@ -825,7 +825,7 @@ gimp_thumbnail_set_info_from_image (GimpThumbnail *thumbnail,
"image-width", gimp_image_get_width (image),
"image-height", gimp_image_get_height (image),
"image-type", desc->value_desc,
"image-num-layers", gimp_container_num_children (image->layers),
"image-num-layers", gimp_container_get_n_children (image->layers),
NULL);
}

View File

@ -194,10 +194,10 @@ gimp_list_get_memsize (GimpObject *object,
GimpList *list = GIMP_LIST (object);
gint64 memsize = 0;
memsize += (gimp_container_num_children (GIMP_CONTAINER (list)) *
memsize += (gimp_container_get_n_children (GIMP_CONTAINER (list)) *
sizeof (GList));
if (gimp_container_policy (GIMP_CONTAINER (list)) ==
if (gimp_container_get_policy (GIMP_CONTAINER (list)) ==
GIMP_CONTAINER_POLICY_STRONG)
{
GList *glist;

View File

@ -208,5 +208,5 @@ gimp_undo_stack_get_depth (GimpUndoStack *stack)
{
g_return_val_if_fail (GIMP_IS_UNDO_STACK (stack), 0);
return gimp_container_num_children (stack->undos);
return gimp_container_get_n_children (stack->undos);
}

View File

@ -747,7 +747,7 @@ palette_import_image_remove (GimpContainer *container,
GimpImage *image,
ImportDialog *dialog)
{
if (! gimp_container_num_children (dialog->context->gimp->images))
if (! gimp_container_get_n_children (dialog->context->gimp->images))
{
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->image_radio)))
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->gradient_radio),

View File

@ -143,7 +143,7 @@ quit_close_all_dialog_new (Gimp *gimp,
-1);
view_size = gimp->config->layer_preview_size;
rows = CLAMP (gimp_container_num_children (images), 3, 6);
rows = CLAMP (gimp_container_get_n_children (images), 3, 6);
view = gimp_container_tree_view_new (images, context, view_size, 1);
gimp_container_box_set_size_request (GIMP_CONTAINER_BOX (view),
@ -205,7 +205,7 @@ quit_close_all_dialog_container_changed (GimpContainer *images,
GimpObject *image,
GimpMessageBox *box)
{
gint num_images = gimp_container_num_children (images);
gint num_images = gimp_container_get_n_children (images);
GtkWidget *label = g_object_get_data (G_OBJECT (box), "lost-label");
GtkWidget *button = g_object_get_data (G_OBJECT (box), "ok-button");
GtkWidget *dialog = gtk_widget_get_toplevel (button);

View File

@ -453,7 +453,7 @@ gimp_display_close (GimpDisplay *display)
{
g_return_if_fail (GIMP_IS_DISPLAY (display));
if (gimp_container_num_children (display->gimp->displays) > 1)
if (gimp_container_get_n_children (display->gimp->displays) > 1)
{
gimp_display_delete (display);
}

View File

@ -208,8 +208,8 @@ layer_select_advance (LayerSelect *layer_select,
index += move;
if (index < 0)
index = gimp_container_num_children (layer_select->image->layers) - 1;
else if (index >= gimp_container_num_children (layer_select->image->layers))
index = gimp_container_get_n_children (layer_select->image->layers) - 1;
else if (index >= gimp_container_get_n_children (layer_select->image->layers))
index = 0;
next_layer = gimp_image_get_layer_by_index (layer_select->image, index);

View File

@ -310,12 +310,12 @@ gimp_display_shell_format_title (GimpDisplayShell *shell,
case 'l': /* number of layers */
i += print (title, title_len, i, "%d",
gimp_container_num_children (image->layers));
gimp_container_get_n_children (image->layers));
break;
case 'L': /* number of layers (long) */
{
gint num = gimp_container_num_children (image->layers);
gint num = gimp_container_get_n_children (image->layers);
i += print (title, title_len, i,
ngettext ("%d layer", "%d layers", num), num);

View File

@ -284,7 +284,7 @@ gui_get_empty_display (Gimp *gimp)
{
GimpObject *display = NULL;
if (gimp_container_num_children (gimp->displays) == 1)
if (gimp_container_get_n_children (gimp->displays) == 1)
{
display = gimp_container_get_first_child (gimp->displays);

View File

@ -139,7 +139,7 @@ tool_options_menu_update_presets (GimpUIManager *manager,
gint n_children;
gint i;
n_children = gimp_container_num_children (presets);
n_children = gimp_container_get_n_children (presets);
for (i = 0; i < n_children; i++)
{

View File

@ -248,7 +248,7 @@ gimp_tools_restore (Gimp *gimp)
if (gimp_config_deserialize_file (GIMP_CONFIG (gimp_list), filename,
NULL, NULL))
{
gint n = gimp_container_num_children (gimp->tool_info_list);
gint n = gimp_container_get_n_children (gimp->tool_info_list);
gint i;
gimp_list_reverse (GIMP_LIST (gimp_list));

View File

@ -704,7 +704,7 @@ gimp_controller_list_down_clicked (GtkWidget *button,
index = gimp_container_get_child_index (container,
GIMP_OBJECT (list->dest_info));
if (index < gimp_container_num_children (container) - 1)
if (index < gimp_container_get_n_children (container) - 1)
gimp_container_reorder (container, GIMP_OBJECT (list->dest_info),
index + 1);
}

View File

@ -514,17 +514,17 @@ gimp_image_prop_view_update (GimpImagePropView *view)
/* number of layers */
g_snprintf (buf, sizeof (buf), "%d",
gimp_container_num_children (image->layers));
gimp_container_get_n_children (image->layers));
gtk_label_set_text (GTK_LABEL (view->layers_label), buf);
/* number of channels */
g_snprintf (buf, sizeof (buf), "%d",
gimp_container_num_children (image->channels));
gimp_container_get_n_children (image->channels));
gtk_label_set_text (GTK_LABEL (view->channels_label), buf);
/* number of vectors */
g_snprintf (buf, sizeof (buf), "%d",
gimp_container_num_children (image->vectors));
gimp_container_get_n_children (image->vectors));
gtk_label_set_text (GTK_LABEL (view->vectors_label), buf);
}

View File

@ -224,7 +224,7 @@ gimp_settings_box_constructor (GType type,
g_assert (GIMP_IS_CONTAINER (box->container));
g_assert (box->filename != NULL);
if (gimp_container_num_children (box->container) == 0)
if (gimp_container_get_n_children (box->container) == 0)
gimp_settings_box_deserialize (box);
box->combo = gimp_container_combo_box_new (box->container,

View File

@ -199,7 +199,7 @@ gimp_viewable_button_scroll_event (GtkWidget *widget,
gint n_children;
gint new_index = index;
n_children = gimp_container_num_children (button->container);
n_children = gimp_container_get_n_children (button->container);
if (sevent->direction == GDK_SCROLL_UP)
{

View File

@ -201,7 +201,7 @@ xcf_load_image (Gimp *gimp,
/* add the layer to the image if its not the floating selection */
if (layer != info->floating_sel)
gimp_image_add_layer (image, layer,
gimp_container_num_children (image->layers),
gimp_container_get_n_children (image->layers),
FALSE);
/* restore the saved position so we'll be ready to
@ -243,7 +243,7 @@ xcf_load_image (Gimp *gimp,
/* add the channel to the image if its not the selection */
if (channel != gimp_image_get_mask (image))
gimp_image_add_channel (image, channel,
gimp_container_num_children (image->channels),
gimp_container_get_n_children (image->channels),
FALSE);
/* restore the saved position so we'll be ready to
@ -1629,7 +1629,7 @@ xcf_load_old_path (XcfInfo *info,
gimp_item_set_tattoo (GIMP_ITEM (vectors), tattoo);
gimp_image_add_vectors (image, vectors,
gimp_container_num_children (image->vectors),
gimp_container_get_n_children (image->vectors),
FALSE);
return TRUE;
@ -1818,7 +1818,7 @@ xcf_load_vector (XcfInfo *info,
}
gimp_image_add_vectors (image, vectors,
gimp_container_num_children (image->vectors),
gimp_container_get_n_children (image->vectors),
FALSE);
return TRUE;

View File

@ -252,8 +252,8 @@ xcf_save_image (XcfInfo *info,
xcf_write_int32_check_error (info, &value, 1);
/* determine the number of layers and channels in the image */
n_layers = (guint) gimp_container_num_children (image->layers);
n_channels = (guint) gimp_container_num_children (image->channels);
n_layers = (guint) gimp_container_get_n_children (image->layers);
n_channels = (guint) gimp_container_get_n_children (image->channels);
max_progress = 1 + n_layers + n_channels;
@ -415,7 +415,7 @@ xcf_save_image_props (XcfInfo *info,
if (unit < _gimp_unit_get_number_of_built_in_units (image->gimp))
xcf_check_error (xcf_save_prop (info, image, PROP_UNIT, error, unit));
if (gimp_container_num_children (image->vectors) > 0)
if (gimp_container_get_n_children (image->vectors) > 0)
{
if (gimp_vectors_compat_is_compatible (image))
xcf_check_error (xcf_save_prop (info, image, PROP_PATHS, error));
@ -1605,7 +1605,7 @@ xcf_save_old_paths (XcfInfo *info,
* then each path:-
*/
num_paths = gimp_container_num_children (image->vectors);
num_paths = gimp_container_get_n_children (image->vectors);
active_vectors = gimp_image_get_active_vectors (image);
@ -1722,7 +1722,7 @@ xcf_save_vectors (XcfInfo *info,
active_index = gimp_container_get_child_index (image->vectors,
GIMP_OBJECT (active_vectors));
num_paths = gimp_container_num_children (image->vectors);
num_paths = gimp_container_get_n_children (image->vectors);
xcf_write_int32_check_error (info, &version, 1);
xcf_write_int32_check_error (info, &active_index, 1);