[gnome-photos] base-item: Add "info-updated" signal
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] base-item: Add "info-updated" signal
- Date: Sun, 15 Jul 2012 20:15:43 +0000 (UTC)
commit 452d52912be2a084084b8ec508981df07cb9559b
Author: Debarshi Ray <debarshir gnome org>
Date: Sun Jul 15 21:44:10 2012 +0200
base-item: Add "info-updated" signal
src/photos-base-item.c | 21 +++++++++++++++++++++
src/photos-base-item.h | 3 +++
2 files changed, 24 insertions(+), 0 deletions(-)
---
diff --git a/src/photos-base-item.c b/src/photos-base-item.c
index db451b6..5a290bf 100644
--- a/src/photos-base-item.c
+++ b/src/photos-base-item.c
@@ -61,6 +61,14 @@ enum
PROP_TRIED_THUMBNAILING
};
+enum
+{
+ INFO_UPDATED,
+ LAST_SIGNAL
+};
+
+static guint signals[LAST_SIGNAL] = { 0 };
+
G_DEFINE_TYPE (PhotosBaseItem, photos_base_item, G_TYPE_OBJECT);
@@ -165,6 +173,8 @@ photos_base_item_check_effects_and_update_info (PhotosBaseItem *self)
else
priv->icon = g_object_ref (icon);
+ g_signal_emit (self, signals[INFO_UPDATED], 0);
+
g_object_unref (icon);
g_list_free_full (emblem_icons, g_object_unref);
}
@@ -593,6 +603,17 @@ photos_base_item_class_init (PhotosBaseItemClass *class)
FALSE,
G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE));
+ signals[INFO_UPDATED] = g_signal_new ("info-updated",
+ G_TYPE_FROM_CLASS (class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (PhotosBaseItemClass,
+ info_updated),
+ NULL, /* accumulator */
+ NULL, /* accu_data */
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE,
+ 0);
+
g_type_class_add_private (class, sizeof (PhotosBaseItemPrivate));
}
diff --git a/src/photos-base-item.h b/src/photos-base-item.h
index 2a96316..f2fd3ce 100644
--- a/src/photos-base-item.h
+++ b/src/photos-base-item.h
@@ -63,6 +63,9 @@ struct _PhotosBaseItemClass
GObjectClass parent_class;
void (*update_type_description) (PhotosBaseItem *self);
+
+ /* signals */
+ void (*info_updated) (PhotosBaseItem *self);
};
GType photos_base_item_get_type (void) G_GNUC_CONST;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]