Commit d84e48a8 authored by Michael Natterer's avatar Michael Natterer 😴

Make "item" parameter of GimpItem::is_attached() const

parent 02903d69
......@@ -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 *
......
......@@ -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;
......
......@@ -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);
......
......@@ -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 *
......
......@@ -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);
......
......@@ -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 *
......
......@@ -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 *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment