[frogr] add frog_picture_[gs]et_location



commit f695da553dce41329d2afbd88eeafebca0178792
Author: Christophe Fergeau <teuf gnome org>
Date:   Sat Aug 13 23:31:23 2011 +0200

    add frog_picture_[gs]et_location

 src/frogr-picture.c |   26 ++++++++++++++++++++++++++
 src/frogr-picture.h |    2 ++
 2 files changed, 28 insertions(+), 0 deletions(-)
---
diff --git a/src/frogr-picture.c b/src/frogr-picture.c
index 022e3f6..83820ee 100644
--- a/src/frogr-picture.c
+++ b/src/frogr-picture.c
@@ -53,6 +53,7 @@ struct _FrogrPicturePrivate
   FspSafetyLevel safety_level;
   FspContentType content_type;
   FspLicense license;
+  FspLocation *location;
   gboolean show_in_search;
 
   GdkPixbuf *pixbuf;
@@ -347,6 +348,9 @@ _frogr_picture_finalize (GObject* object)
   g_slist_foreach (priv->tags_list, (GFunc) g_free, NULL);
   g_slist_free (priv->tags_list);
 
+  /* free structs */
+  g_free (priv->location);
+
   /* call super class */
   G_OBJECT_CLASS (frogr_picture_parent_class)->finalize(object);
 }
@@ -844,6 +848,28 @@ frogr_picture_set_license (FrogrPicture *self, FspLicense license)
   priv->license = license;
 }
 
+FspLocation *
+frogr_picture_get_location (FrogrPicture *self)
+{
+  FrogrPicturePrivate *priv = NULL;
+
+  g_return_val_if_fail(FROGR_IS_PICTURE(self), FALSE);
+
+  priv = FROGR_PICTURE_GET_PRIVATE (self);
+  return priv->location;
+}
+
+void
+frogr_picture_set_location (FrogrPicture *self, FspLocation *location)
+{
+  FrogrPicturePrivate *priv = NULL;
+
+  g_return_if_fail(FROGR_IS_PICTURE(self));
+
+  priv = FROGR_PICTURE_GET_PRIVATE (self);
+  priv->location = location;
+}
+
 gboolean
 frogr_picture_show_in_search (FrogrPicture *self)
 {
diff --git a/src/frogr-picture.h b/src/frogr-picture.h
index 4160adb..6003c59 100644
--- a/src/frogr-picture.h
+++ b/src/frogr-picture.h
@@ -105,6 +105,8 @@ void frogr_picture_set_content_type (FrogrPicture *self,
                                      FspContentType content_type);
 FspLicense frogr_picture_get_license (FrogrPicture *self);
 void frogr_picture_set_license (FrogrPicture *self, FspLicense license);
+FspLocation *frogr_picture_get_location (FrogrPicture *self);
+void frogr_picture_set_location (FrogrPicture *self, FspLocation *location);
 
 gboolean frogr_picture_show_in_search (FrogrPicture *self);
 void frogr_picture_set_show_in_search (FrogrPicture *self,



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