[gimp] Override the "lock-content" property to default to TRUE
- From: Michael Natterer <mitch src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp] Override the "lock-content" property to default to TRUE
- Date: Sun, 23 Aug 2009 18:03:02 +0000 (UTC)
commit 819abf2fa0e74ea6e51ebd8249cd890ccff5fcbd
Author: Michael Natterer <mitch gimp org>
Date: Sun Aug 23 20:02:36 2009 +0200
Override the "lock-content" property to default to TRUE
app/core/gimpgrouplayer.c | 59 +++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 59 insertions(+), 0 deletions(-)
---
diff --git a/app/core/gimpgrouplayer.c b/app/core/gimpgrouplayer.c
index c1c432e..5d628b6 100644
--- a/app/core/gimpgrouplayer.c
+++ b/app/core/gimpgrouplayer.c
@@ -33,6 +33,21 @@
#include "gimp-intl.h"
+enum
+{
+ PROP_0,
+ PROP_LOCK_CONTENT
+};
+
+
+static void gimp_group_layer_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec);
+static void gimp_group_layer_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec);
static void gimp_group_layer_finalize (GObject *object);
static gint64 gimp_group_layer_get_memsize (GimpObject *object,
@@ -57,6 +72,8 @@ gimp_group_layer_class_init (GimpGroupLayerClass *klass)
GimpViewableClass *viewable_class = GIMP_VIEWABLE_CLASS (klass);
GimpItemClass *item_class = GIMP_ITEM_CLASS (klass);
+ object_class->set_property = gimp_group_layer_set_property;
+ object_class->get_property = gimp_group_layer_get_property;
object_class->finalize = gimp_group_layer_finalize;
gimp_object_class->get_memsize = gimp_group_layer_get_memsize;
@@ -74,15 +91,57 @@ gimp_group_layer_class_init (GimpGroupLayerClass *klass)
item_class->flip_desc = _("Flip Group Layer");
item_class->rotate_desc = _("Rotate Group Layer");
item_class->transform_desc = _("Transform Group Layer");
+
+ g_object_class_install_property (object_class, PROP_LOCK_CONTENT,
+ g_param_spec_boolean ("lock-content",
+ NULL, NULL,
+ TRUE,
+ GIMP_PARAM_READABLE));
}
static void
gimp_group_layer_init (GimpGroupLayer *layer)
{
+ GIMP_ITEM (layer)->lock_content = TRUE;
+
layer->children = gimp_drawable_stack_new (GIMP_TYPE_LAYER);
}
static void
+gimp_group_layer_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ switch (property_id)
+ {
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gimp_group_layer_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ GimpItem *item = GIMP_ITEM (object);
+
+ switch (property_id)
+ {
+ case PROP_LOCK_CONTENT:
+ g_value_set_boolean (value, gimp_item_get_lock_content (item));
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
gimp_group_layer_finalize (GObject *object)
{
GimpGroupLayer *layer = GIMP_GROUP_LAYER (object);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]