gimp r27638 - in trunk: . app/core
- From: mitch svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r27638 - in trunk: . app/core
- Date: Thu, 13 Nov 2008 15:06:34 +0000 (UTC)
Author: mitch
Date: Thu Nov 13 15:06:34 2008
New Revision: 27638
URL: http://svn.gnome.org/viewvc/gimp?rev=27638&view=rev
Log:
2008-11-13 Michael Natterer <mitch gimp org>
* app/core/gimpitem.c: add read-only boolean properties "visible"
and "linked".
Modified:
trunk/ChangeLog
trunk/app/core/gimpitem.c
Modified: trunk/app/core/gimpitem.c
==============================================================================
--- trunk/app/core/gimpitem.c (original)
+++ trunk/app/core/gimpitem.c Thu Nov 13 15:06:34 2008
@@ -60,7 +60,9 @@
PROP_WIDTH,
PROP_HEIGHT,
PROP_OFFSET_X,
- PROP_OFFSET_Y
+ PROP_OFFSET_Y,
+ PROP_VISIBLE,
+ PROP_LINKED
};
@@ -213,6 +215,16 @@
-GIMP_MAX_IMAGE_SIZE,
GIMP_MAX_IMAGE_SIZE, 0,
GIMP_PARAM_READABLE));
+
+ g_object_class_install_property (object_class, PROP_VISIBLE,
+ g_param_spec_boolean ("visible", NULL, NULL,
+ TRUE,
+ GIMP_PARAM_READABLE));
+
+ g_object_class_install_property (object_class, PROP_LINKED,
+ g_param_spec_boolean ("linked", NULL, NULL,
+ FALSE,
+ GIMP_PARAM_READABLE));
}
static void
@@ -274,6 +286,12 @@
case PROP_OFFSET_Y:
g_value_set_int (value, item->offset_y);
break;
+ case PROP_VISIBLE:
+ g_value_set_boolean (value, item->visible);
+ break;
+ case PROP_LINKED:
+ g_value_set_boolean (value, item->linked);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
@@ -1444,6 +1462,8 @@
item->visible = visible ? TRUE : FALSE;
g_signal_emit (item, gimp_item_signals[VISIBILITY_CHANGED], 0);
+
+ g_object_notify (G_OBJECT (item), "visible");
}
}
@@ -1467,6 +1487,8 @@
item->linked = linked ? TRUE : FALSE;
g_signal_emit (item, gimp_item_signals[LINKED_CHANGED], 0);
+
+ g_object_notify (G_OBJECT (item), "linked");
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]