[frogr] Made 'filesize' and 'datetime' properties for FrogrPicture
- From: Mario Sanchez Prada <msanchez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [frogr] Made 'filesize' and 'datetime' properties for FrogrPicture
- Date: Sun, 24 Apr 2011 06:40:04 +0000 (UTC)
commit 7fa7e22c7f770787278618b1333f4c9f8c7b839a
Author: Mario Sanchez Prada <msanchez igalia com>
Date: Sat Apr 23 16:10:19 2011 +0200
Made 'filesize' and 'datetime' properties for FrogrPicture
src/frogr-picture.c | 34 +++++++++++++++++++++++++++++++++-
1 files changed, 33 insertions(+), 1 deletions(-)
---
diff --git a/src/frogr-picture.c b/src/frogr-picture.c
index d2fad60..9e6a0cc 100644
--- a/src/frogr-picture.c
+++ b/src/frogr-picture.c
@@ -73,7 +73,9 @@ enum {
PROP_SAFETY_LEVEL,
PROP_CONTENT_TYPE,
PROP_SHOW_IN_SEARCH,
- PROP_PIXBUF
+ PROP_PIXBUF,
+ PROP_FILESIZE,
+ PROP_DATETIME
};
/* Prototypes */
@@ -222,6 +224,12 @@ _frogr_picture_set_property (GObject *object,
case PROP_PIXBUF:
frogr_picture_set_pixbuf (self, GDK_PIXBUF (g_value_get_object (value)));
break;
+ case PROP_FILESIZE:
+ frogr_picture_set_filesize (self, g_value_get_long (value));
+ break;
+ case PROP_DATETIME:
+ frogr_picture_set_datetime (self, g_value_get_long (value));
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -274,6 +282,12 @@ _frogr_picture_get_property (GObject *object,
case PROP_PIXBUF:
g_value_set_object (value, priv->pixbuf);
break;
+ case PROP_FILESIZE:
+ g_value_set_long (value, priv->filesize);
+ break;
+ case PROP_DATETIME:
+ g_value_set_long (value, priv->datetime);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -443,6 +457,24 @@ frogr_picture_class_init(FrogrPictureClass *klass)
"for this picture",
GDK_TYPE_PIXBUF,
G_PARAM_READWRITE));
+ g_object_class_install_property (obj_class,
+ PROP_FILESIZE,
+ g_param_spec_long ("filesize",
+ "filesize",
+ "Filesize in KB for the file",
+ G_MINLONG,
+ G_MAXLONG,
+ 0,
+ G_PARAM_READWRITE));
+ g_object_class_install_property (obj_class,
+ PROP_DATETIME,
+ g_param_spec_long ("datetime",
+ "datetime",
+ "Date and time in seconds for the file",
+ G_MINLONG,
+ G_MAXLONG,
+ 0,
+ G_PARAM_READWRITE));
g_type_class_add_private (obj_class, sizeof (FrogrPicturePrivate));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]