[nautilus-actions] Define new 'pivot-prop-loadable' property
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions] Define new 'pivot-prop-loadable' property
- Date: Sat, 19 Feb 2011 14:36:01 +0000 (UTC)
commit 2f1d1c8a5e7f7a916b375a479a0a192d448de77f
Author: Pierre Wieser <pwieser trychlos org>
Date: Thu Feb 17 20:13:48 2011 +0100
Define new 'pivot-prop-loadable' property
ChangeLog | 3 +++
src/core/na-pivot.c | 37 +++++++++++++++++++++++++++++--------
src/core/na-pivot.h | 1 +
3 files changed, 33 insertions(+), 8 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 266da91..44af312 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2011-02-17 Pierre Wieser <pwieser trychlos org>
+ * src/core/na-pivot.h:
+ * src/core/na-pivot.c: Define new 'pivot-prop-loadable' property.
+
* src/nact/base-window.h:
* src/nact/base-window.c (class_init):
Defines a new 'base-window-willing-to-quit' stop-with-accumulator signal.
diff --git a/src/core/na-pivot.c b/src/core/na-pivot.c
index bb94e0f..49d9690 100644
--- a/src/core/na-pivot.c
+++ b/src/core/na-pivot.c
@@ -75,7 +75,13 @@ struct _NAPivotPrivate {
/* NAPivot properties
*/
enum {
- PIVOT_PROP_TREE_ID = 1,
+ PRIVOT_PROP_0,
+
+ PIVOT_PROP_LOADABLE_ID,
+ PIVOT_PROP_TREE_ID,
+
+ /* count of properties */
+ PIVOT_PROP_N
};
/* signals
@@ -145,7 +151,6 @@ class_init( NAPivotClass *klass )
{
static const gchar *thisfn = "na_pivot_class_init";
GObjectClass *object_class;
- GParamSpec *spec;
g_debug( "%s: klass=%p", thisfn, ( void * ) klass );
@@ -158,12 +163,20 @@ class_init( NAPivotClass *klass )
object_class->dispose = instance_dispose;
object_class->finalize = instance_finalize;
- spec = g_param_spec_pointer(
- PIVOT_PROP_TREE,
- "Items tree",
- "Hierarchical tree of items",
- G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE );
- g_object_class_install_property( object_class, PIVOT_PROP_TREE_ID, spec );
+ g_object_class_install_property( object_class, PIVOT_PROP_LOADABLE_ID,
+ g_param_spec_uint(
+ PIVOT_PROP_LOADABLE,
+ "Loadable set",
+ "The set of loadble items",
+ 0, 255, 0,
+ G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE ));
+
+ g_object_class_install_property( object_class, PIVOT_PROP_TREE_ID,
+ g_param_spec_pointer(
+ PIVOT_PROP_TREE,
+ "Items tree",
+ "Hierarchical tree of items",
+ G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE ));
klass->private = g_new0( NAPivotClassPrivate, 1 );
@@ -254,6 +267,10 @@ instance_get_property( GObject *object, guint property_id, GValue *value, GParam
if( !self->private->dispose_has_run ){
switch( property_id ){
+ case PIVOT_PROP_LOADABLE_ID:
+ g_value_set_uint( value, self->private->loadable_set );
+ break;
+
case PIVOT_PROP_TREE_ID:
g_value_set_pointer( value, self->private->tree );
break;
@@ -276,6 +293,10 @@ instance_set_property( GObject *object, guint property_id, const GValue *value,
if( !self->private->dispose_has_run ){
switch( property_id ){
+ case PIVOT_PROP_LOADABLE_ID:
+ self->private->loadable_set = g_value_get_uint( value );
+ break;
+
case PIVOT_PROP_TREE_ID:
self->private->tree = g_value_get_pointer( value );
break;
diff --git a/src/core/na-pivot.h b/src/core/na-pivot.h
index de97fcc..336e6d4 100644
--- a/src/core/na-pivot.h
+++ b/src/core/na-pivot.h
@@ -109,6 +109,7 @@ GType na_pivot_get_type( void );
/* properties
*/
+#define PIVOT_PROP_LOADABLE "pivot-prop-loadable"
#define PIVOT_PROP_TREE "pivot-prop-tree"
/* signals
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]