[gimp] Make "item" parameter of GimpItem::is_attached() const
- From: Michael Natterer <mitch src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp] Make "item" parameter of GimpItem::is_attached() const
- Date: Sat, 29 Aug 2009 17:48:59 +0000 (UTC)
commit d84e48a82f6b3b67ec8ec4d34d5294cf2eea1b4a
Author: Michael Natterer <mitch gimp org>
Date: Sat Aug 29 19:47:52 2009 +0200
Make "item" parameter of GimpItem::is_attached() const
app/core/gimpchannel.c | 7 ++++---
app/core/gimpitem.c | 2 +-
app/core/gimpitem.h | 4 ++--
app/core/gimplayer.c | 7 ++++---
app/core/gimplayermask.c | 4 ++--
app/core/gimpselection.c | 7 ++++---
app/vectors/gimpvectors.c | 7 ++++---
7 files changed, 21 insertions(+), 17 deletions(-)
---
diff --git a/app/core/gimpchannel.c b/app/core/gimpchannel.c
index 1bd6432..09bdbe7 100644
--- a/app/core/gimpchannel.c
+++ b/app/core/gimpchannel.c
@@ -76,7 +76,7 @@ static gint64 gimp_channel_get_memsize (GimpObject *object,
static gchar * gimp_channel_get_description (GimpViewable *viewable,
gchar **tooltip);
-static gboolean gimp_channel_is_attached (GimpItem *item);
+static gboolean gimp_channel_is_attached (const GimpItem *item);
static GimpContainer *
gimp_channel_get_container (GimpItem *item);
static GimpItem * gimp_channel_duplicate (GimpItem *item,
@@ -376,10 +376,11 @@ gimp_channel_get_description (GimpViewable *viewable,
}
static gboolean
-gimp_channel_is_attached (GimpItem *item)
+gimp_channel_is_attached (const GimpItem *item)
{
return (GIMP_IS_IMAGE (gimp_item_get_image (item)) &&
- gimp_container_have (gimp_item_get_image (item)->channels, GIMP_OBJECT (item)));
+ gimp_container_have (gimp_item_get_image (item)->channels,
+ GIMP_OBJECT (item)));
}
static GimpContainer *
diff --git a/app/core/gimpitem.c b/app/core/gimpitem.c
index 8cfbd92..2f20051 100644
--- a/app/core/gimpitem.c
+++ b/app/core/gimpitem.c
@@ -671,7 +671,7 @@ gimp_item_configure (GimpItem *item,
* Returns: %TRUE if the item is attached to an image, %FALSE otherwise.
*/
gboolean
-gimp_item_is_attached (GimpItem *item)
+gimp_item_is_attached (const GimpItem *item)
{
GimpViewable *parent;
diff --git a/app/core/gimpitem.h b/app/core/gimpitem.h
index c1986a5..82989c0 100644
--- a/app/core/gimpitem.h
+++ b/app/core/gimpitem.h
@@ -68,7 +68,7 @@ struct _GimpItemClass
void (* lock_content_changed) (GimpItem *item);
/* virtual functions */
- gboolean (* is_attached) (GimpItem *item);
+ gboolean (* is_attached) (const GimpItem *item);
gboolean (* is_content_locked) (const GimpItem *item);
GimpContainer * (* get_container) (GimpItem *item);
GimpItem * (* duplicate) (GimpItem *item,
@@ -141,7 +141,7 @@ GType gimp_item_get_type (void) G_GNUC_CONST;
void gimp_item_removed (GimpItem *item);
gboolean gimp_item_is_removed (const GimpItem *item);
-gboolean gimp_item_is_attached (GimpItem *item);
+gboolean gimp_item_is_attached (const GimpItem *item);
GimpContainer * gimp_item_get_container (GimpItem *item);
GList * gimp_item_get_container_iter (GimpItem *item);
diff --git a/app/core/gimplayer.c b/app/core/gimplayer.c
index ebbaee9..98ca9d4 100644
--- a/app/core/gimplayer.c
+++ b/app/core/gimplayer.c
@@ -96,7 +96,7 @@ static gchar * gimp_layer_get_description (GimpViewable *viewable,
gchar **tooltip);
static void gimp_layer_removed (GimpItem *item);
-static gboolean gimp_layer_is_attached (GimpItem *item);
+static gboolean gimp_layer_is_attached (const GimpItem *item);
static GimpContainer *
gimp_layer_get_container (GimpItem *item);
static GimpItem * gimp_layer_duplicate (GimpItem *item,
@@ -539,10 +539,11 @@ gimp_layer_removed (GimpItem *item)
}
static gboolean
-gimp_layer_is_attached (GimpItem *item)
+gimp_layer_is_attached (const GimpItem *item)
{
return (GIMP_IS_IMAGE (gimp_item_get_image (item)) &&
- gimp_container_have (gimp_item_get_image (item)->layers, GIMP_OBJECT (item)));
+ gimp_container_have (gimp_item_get_image (item)->layers,
+ GIMP_OBJECT (item)));
}
static GimpContainer *
diff --git a/app/core/gimplayermask.c b/app/core/gimplayermask.c
index 608b5aa..afab9c2 100644
--- a/app/core/gimplayermask.c
+++ b/app/core/gimplayermask.c
@@ -45,7 +45,7 @@ enum
};
-static gboolean gimp_layer_mask_is_attached (GimpItem *item);
+static gboolean gimp_layer_mask_is_attached (const GimpItem *item);
static gboolean gimp_layer_mask_is_content_locked (const GimpItem *item);
static GimpContainer * gimp_layer_mask_get_container (GimpItem *item);
static GimpItem * gimp_layer_mask_duplicate (GimpItem *item,
@@ -132,7 +132,7 @@ gimp_layer_mask_is_content_locked (const GimpItem *item)
}
static gboolean
-gimp_layer_mask_is_attached (GimpItem *item)
+gimp_layer_mask_is_attached (const GimpItem *item)
{
GimpLayerMask *mask = GIMP_LAYER_MASK (item);
GimpLayer *layer = gimp_layer_mask_get_layer (mask);
diff --git a/app/core/gimpselection.c b/app/core/gimpselection.c
index 53bcb9c..4853893 100644
--- a/app/core/gimpselection.c
+++ b/app/core/gimpselection.c
@@ -45,7 +45,7 @@
#include "gimp-intl.h"
-static gboolean gimp_selection_is_attached (GimpItem *item);
+static gboolean gimp_selection_is_attached (const GimpItem *item);
static GimpContainer *
gimp_selection_get_container (GimpItem *item);
static void gimp_selection_translate (GimpItem *item,
@@ -186,10 +186,11 @@ gimp_selection_init (GimpSelection *selection)
}
static gboolean
-gimp_selection_is_attached (GimpItem *item)
+gimp_selection_is_attached (const GimpItem *item)
{
return (GIMP_IS_IMAGE (gimp_item_get_image (item)) &&
- gimp_image_get_mask (gimp_item_get_image (item)) == GIMP_CHANNEL (item));
+ gimp_image_get_mask (gimp_item_get_image (item)) ==
+ GIMP_CHANNEL (item));
}
static GimpContainer *
diff --git a/app/vectors/gimpvectors.c b/app/vectors/gimpvectors.c
index e90b991..2c1eb21 100644
--- a/app/vectors/gimpvectors.c
+++ b/app/vectors/gimpvectors.c
@@ -63,7 +63,7 @@ static void gimp_vectors_finalize (GObject *object);
static gint64 gimp_vectors_get_memsize (GimpObject *object,
gint64 *gui_size);
-static gboolean gimp_vectors_is_attached (GimpItem *item);
+static gboolean gimp_vectors_is_attached (const GimpItem *item);
static GimpContainer *
gimp_vectors_get_container (GimpItem *item);
static GimpItem * gimp_vectors_duplicate (GimpItem *item,
@@ -266,10 +266,11 @@ gimp_vectors_get_memsize (GimpObject *object,
}
static gboolean
-gimp_vectors_is_attached (GimpItem *item)
+gimp_vectors_is_attached (const GimpItem *item)
{
return (GIMP_IS_IMAGE (gimp_item_get_image (item)) &&
- gimp_container_have (gimp_item_get_image (item)->vectors, GIMP_OBJECT (item)));
+ gimp_container_have (gimp_item_get_image (item)->vectors,
+ GIMP_OBJECT (item)));
}
static GimpContainer *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]