[gnome-photos] base-item: Add "failed-thumbnailing" & "tried-thumbnailing" properties
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] base-item: Add "failed-thumbnailing" & "tried-thumbnailing" properties
- Date: Sun, 15 Jul 2012 20:15:28 +0000 (UTC)
commit 23c77a7ee1dc7c48b2b8369e4e465ed961f9ef7b
Author: Debarshi Ray <debarshir gnome org>
Date: Sun Jul 15 18:55:09 2012 +0200
base-item: Add "failed-thumbnailing" & "tried-thumbnailing" properties
They need to be properties because the derived types need to set them
during construction.
src/photos-base-item.c | 29 ++++++++++++++++++++++++++++-
src/photos-local-item.c | 6 +++++-
2 files changed, 33 insertions(+), 2 deletions(-)
---
diff --git a/src/photos-base-item.c b/src/photos-base-item.c
index fe7e3cc..2e8cb44 100644
--- a/src/photos-base-item.c
+++ b/src/photos-base-item.c
@@ -55,7 +55,9 @@ enum
{
PROP_0,
PROP_CURSOR,
- PROP_ID
+ PROP_FAILED_THUMBNAILING,
+ PROP_ID,
+ PROP_TRIED_THUMBNAILING
};
@@ -499,6 +501,7 @@ static void
photos_base_item_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
{
PhotosBaseItem *self = PHOTOS_BASE_ITEM (object);
+ PhotosBaseItemPrivate *priv = self->priv;
switch (prop_id)
{
@@ -506,6 +509,14 @@ photos_base_item_set_property (GObject *object, guint prop_id, const GValue *val
photos_base_item_populate_from_cursor (self, TRACKER_SPARQL_CURSOR (g_value_get_object (value)));
break;
+ case PROP_FAILED_THUMBNAILING:
+ priv->failed_thumbnailing = g_value_get_boolean (value);
+ break;
+
+ case PROP_TRIED_THUMBNAILING:
+ priv->tried_thumbnailing = g_value_get_boolean (value);
+ break;
+
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -543,6 +554,14 @@ photos_base_item_class_init (PhotosBaseItemClass *class)
G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE));
g_object_class_install_property (object_class,
+ PROP_FAILED_THUMBNAILING,
+ g_param_spec_boolean ("failed-thumbnailing",
+ "Thumbnailing failed",
+ "Failed to create a thumbnail",
+ FALSE,
+ G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE));
+
+ g_object_class_install_property (object_class,
PROP_ID,
g_param_spec_string ("id",
"Uniform Resource Name",
@@ -550,6 +569,14 @@ photos_base_item_class_init (PhotosBaseItemClass *class)
"",
G_PARAM_READABLE));
+ g_object_class_install_property (object_class,
+ PROP_TRIED_THUMBNAILING,
+ g_param_spec_boolean ("tried-thumbnailing",
+ "Thumbnailing attempted",
+ "An attempt was made to create a thumbnail",
+ FALSE,
+ G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE));
+
g_type_class_add_private (class, sizeof (PhotosBaseItemPrivate));
}
diff --git a/src/photos-local-item.c b/src/photos-local-item.c
index ded1c90..461b82c 100644
--- a/src/photos-local-item.c
+++ b/src/photos-local-item.c
@@ -44,5 +44,9 @@ photos_local_item_class_init (PhotosLocalItemClass *class)
PhotosBaseItem *
photos_local_item_new (TrackerSparqlCursor *cursor)
{
- return g_object_new (PHOTOS_TYPE_LOCAL_ITEM, "cursor", cursor, NULL);
+ return g_object_new (PHOTOS_TYPE_LOCAL_ITEM,
+ "cursor", cursor,
+ "failed-thumbnailing", FALSE,
+ "tried-thumbnailing", FALSE,
+ NULL);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]