[gimp] Use the new item counting functions where appropriate
- From: Michael Natterer <mitch src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp] Use the new item counting functions where appropriate
- Date: Sun, 2 Aug 2009 10:24:32 +0000 (UTC)
commit 7805bd2186253dfb2908a03832cc0b8c7d7d43cb
Author: Michael Natterer <mitch gimp org>
Date: Sun Aug 2 12:24:06 2009 +0200
Use the new item counting functions where appropriate
app/core/gimpimage.c | 2 +-
app/core/gimpimagefile.c | 2 +-
app/display/gimpdisplayshell-title.c | 4 ++--
app/widgets/gimpimagepropview.c | 6 +++---
4 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/app/core/gimpimage.c b/app/core/gimpimage.c
index c71fca2..a9f647a 100644
--- a/app/core/gimpimage.c
+++ b/app/core/gimpimage.c
@@ -1617,7 +1617,7 @@ gimp_image_has_alpha (const GimpImage *image)
layer = gimp_image_get_layer_by_index (image, 0);
- return ((gimp_container_get_n_children (image->layers) > 1) ||
+ return ((gimp_image_get_n_layers (image) > 1) ||
(layer && gimp_drawable_has_alpha (GIMP_DRAWABLE (layer))));
}
diff --git a/app/core/gimpimagefile.c b/app/core/gimpimagefile.c
index 6d654bf..7cc266e 100644
--- a/app/core/gimpimagefile.c
+++ b/app/core/gimpimagefile.c
@@ -824,7 +824,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_get_n_children (image->layers),
+ "image-num-layers", gimp_image_get_n_layers (image),
NULL);
}
diff --git a/app/display/gimpdisplayshell-title.c b/app/display/gimpdisplayshell-title.c
index af7b042..babf493 100644
--- a/app/display/gimpdisplayshell-title.c
+++ b/app/display/gimpdisplayshell-title.c
@@ -305,12 +305,12 @@ gimp_display_shell_format_title (GimpDisplayShell *shell,
case 'l': /* number of layers */
i += print (title, title_len, i, "%d",
- gimp_container_get_n_children (image->layers));
+ gimp_image_get_n_layers (image));
break;
case 'L': /* number of layers (long) */
{
- gint num = gimp_container_get_n_children (image->layers);
+ gint num = gimp_image_get_n_layers (image);
i += print (title, title_len, i,
ngettext ("%d layer", "%d layers", num), num);
diff --git a/app/widgets/gimpimagepropview.c b/app/widgets/gimpimagepropview.c
index 7943548..7bb778d 100644
--- a/app/widgets/gimpimagepropview.c
+++ b/app/widgets/gimpimagepropview.c
@@ -513,17 +513,17 @@ gimp_image_prop_view_update (GimpImagePropView *view)
/* number of layers */
g_snprintf (buf, sizeof (buf), "%d",
- gimp_container_get_n_children (image->layers));
+ gimp_image_get_n_layers (image));
gtk_label_set_text (GTK_LABEL (view->layers_label), buf);
/* number of channels */
g_snprintf (buf, sizeof (buf), "%d",
- gimp_container_get_n_children (image->channels));
+ gimp_image_get_n_channels (image));
gtk_label_set_text (GTK_LABEL (view->channels_label), buf);
/* number of vectors */
g_snprintf (buf, sizeof (buf), "%d",
- gimp_container_get_n_children (image->vectors));
+ gimp_image_get_n_vectors (image));
gtk_label_set_text (GTK_LABEL (view->vectors_label), buf);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]