[frogr] Made location an object property for pictures, not a pointer



commit af6080b87ff3da6bc1731673e1c254998fd7f017
Author: Mario Sanchez Prada <msanchez igalia com>
Date:   Thu Aug 25 22:46:26 2011 +0200

    Made location an object property for pictures, not a pointer

 src/frogr-picture.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/src/frogr-picture.c b/src/frogr-picture.c
index 16cb2ce..6a5d75d 100644
--- a/src/frogr-picture.c
+++ b/src/frogr-picture.c
@@ -226,7 +226,7 @@ _frogr_picture_set_property (GObject *object,
       frogr_picture_set_license (self, g_value_get_int (value));
       break;
     case PROP_LOCATION:
-      frogr_picture_set_location (self, g_value_get_pointer (value));
+      frogr_picture_set_location (self, FROGR_LOCATION (g_value_get_object (value)));
       break;
     case PROP_SHOW_IN_SEARCH:
       frogr_picture_set_show_in_search (self, g_value_get_boolean (value));
@@ -293,7 +293,7 @@ _frogr_picture_get_property (GObject *object,
       g_value_set_int (value, priv->license);
       break;
     case PROP_LOCATION:
-      g_value_set_pointer (value, priv->location);
+      g_value_set_object (value, priv->location);
       break;
     case PROP_SHOW_IN_SEARCH:
       g_value_set_boolean (value, priv->show_in_search);
@@ -479,10 +479,11 @@ frogr_picture_class_init(FrogrPictureClass *klass)
                                                      G_PARAM_READWRITE));
   g_object_class_install_property (obj_class,
                                    PROP_LOCATION,
-                                   g_param_spec_pointer ("location",
-                                                         "location",
-                                                         "Location for this picture",
-                                                         G_PARAM_READWRITE));
+                                   g_param_spec_object ("location",
+                                                        "location",
+                                                        "Location for this picture",
+                                                        FROGR_TYPE_LOCATION,
+                                                        G_PARAM_READWRITE));
 
   g_object_class_install_property (obj_class,
                                    PROP_SHOW_IN_SEARCH,



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