[gnome-photos/wip/search: 5/27] search-type: Make 'name' a read/write property



commit 2d5c2709ae35c8ce19a184dfeeacfef527026f7e
Author: Debarshi Ray <debarshir gnome org>
Date:   Thu Jan 2 18:11:23 2014 +0100

    search-type: Make 'name' a read/write property
    
    PhotosBaseModel should be able to read 'name'.

 src/photos-search-type.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/photos-search-type.c b/src/photos-search-type.c
index e0b8441..8525a52 100644
--- a/src/photos-search-type.c
+++ b/src/photos-search-type.c
@@ -90,11 +90,16 @@ static void
 photos_search_type_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
 {
   PhotosSearchType *self = PHOTOS_SEARCH_TYPE (object);
+  PhotosSearchTypePrivate *priv = self->priv;
 
   switch (prop_id)
     {
     case PROP_ID:
-      g_value_set_string (value, self->priv->id);
+      g_value_set_string (value, priv->id);
+      break;
+
+    case PROP_NAME:
+      g_value_set_string (value, priv->name);
       break;
 
     default:
@@ -173,7 +178,7 @@ photos_search_type_class_init (PhotosSearchTypeClass *class)
                                                         "",
                                                         "",
                                                         NULL,
-                                                        G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE));
+                                                        G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE));
 
   g_object_class_install_property (object_class,
                                    PROP_WHERE,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]