GES*Object: only use g_object_notify_by_pspec if available
authorEdward Hervey <edward.hervey@collabora.co.uk>
Fri, 17 Dec 2010 10:27:37 +0000 (11:27 +0100)
committerEdward Hervey <edward.hervey@collabora.co.uk>
Fri, 17 Dec 2010 10:27:37 +0000 (11:27 +0100)
ges/ges-timeline-object.c
ges/ges-track-object.c

index 2d5aca10e09ac697e0c4141cae725e4f1f97636d..b6446e5ce3151251feaca8ea77c10aa08ff39e82 100644 (file)
@@ -807,7 +807,11 @@ track_object_priority_changed_cb (GESTrackObject * child,
     /* FIXME : We only grow the height */
     if (object->height < (max_prio - min_prio + 1)) {
       object->height = max_prio - min_prio + 1;
+#if GLIB_CHECK_VERSION(2,26,0)
       g_object_notify_by_pspec (G_OBJECT (object), properties[PROP_HEIGHT]);
+#else
+      g_object_notify (G_OBJECT (object), "height");
+#endif
     }
   } else {
     /* Or update the parent priority */
index 2ff58c922eb3bff90806aa45ae52ebc89111b5c9..5bf8bb2de04b20a3d76093071176f3a2c41f3f0a 100644 (file)
@@ -287,7 +287,11 @@ void
 ges_track_object_set_start (GESTrackObject * object, guint64 start)
 {
   if (ges_track_object_set_start_internal (object, start))
+#if GLIB_CHECK_VERSION(2,26,0)
     g_object_notify_by_pspec (G_OBJECT (object), properties[PROP_START]);
+#else
+    g_object_notify (G_OBJECT (object), "start");
+#endif
 }
 
 static inline gboolean
@@ -319,7 +323,11 @@ void
 ges_track_object_set_inpoint (GESTrackObject * object, guint64 inpoint)
 {
   if (ges_track_object_set_inpoint_internal (object, inpoint))
+#if GLIB_CHECK_VERSION(2,26,0)
     g_object_notify_by_pspec (G_OBJECT (object), properties[PROP_INPOINT]);
+#else
+    g_object_notify (G_OBJECT (object), "in-point");
+#endif
 }
 
 static inline gboolean
@@ -352,7 +360,11 @@ void
 ges_track_object_set_duration (GESTrackObject * object, guint64 duration)
 {
   if (ges_track_object_set_duration_internal (object, duration))
+#if GLIB_CHECK_VERSION(2,26,0)
     g_object_notify_by_pspec (G_OBJECT (object), properties[PROP_DURATION]);
+#else
+    g_object_notify (G_OBJECT (object), "duration");
+#endif
 }
 
 static inline gboolean
@@ -389,7 +401,11 @@ void
 ges_track_object_set_priority (GESTrackObject * object, guint32 priority)
 {
   if (ges_track_object_set_priority_internal (object, priority))
+#if GLIB_CHECK_VERSION(2,26,0)
     g_object_notify_by_pspec (G_OBJECT (object), properties[PROP_PRIORITY]);
+#else
+    g_object_notify (G_OBJECT (object), "priority");
+#endif
 }