[gnome-todo] animation: Another round of trivial style cleanups



commit da1e8a4083bb071f2495dd4ea3c0ee3f36bb0601
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Sun Mar 7 14:55:24 2021 -0300

    animation: Another round of trivial style cleanups

 src/animation/gtd-animatable.c          | 13 +----
 src/animation/gtd-animation-utils.c     | 39 ++++++++-------
 src/animation/gtd-interval.c            | 86 +++++++--------------------------
 src/animation/gtd-keyframe-transition.h |  2 -
 src/animation/gtd-property-transition.c | 10 ----
 src/animation/gtd-timeline.c            | 55 +--------------------
 src/animation/gtd-transition.c          | 68 +++++++-------------------
 src/animation/gtd-transition.h          |  2 +-
 8 files changed, 58 insertions(+), 217 deletions(-)
---
diff --git a/src/animation/gtd-animatable.c b/src/animation/gtd-animatable.c
index 7389a22f..b068b316 100644
--- a/src/animation/gtd-animatable.c
+++ b/src/animation/gtd-animatable.c
@@ -30,8 +30,6 @@
  * #GtdAnimatableInterface.interpolate_property() virtual function of the
  * interface to compute the animation state between two values of an interval
  * depending on a progress fwidget, expressed as a floating point value.
- *
- * #GtdAnimatable is available since Gtd 1.0
  */
 
 #include "gtd-animatable.h"
@@ -53,10 +51,7 @@ gtd_animatable_default_init (GtdAnimatableInterface *iface)
  *
  * Finds the #GParamSpec for @property_name
  *
- * Return value: (transfer none): The #GParamSpec for the given property
- *   or %NULL
- *
- * Since: 1.4
+ * Return value: (transfer none) (nullable): The #GParamSpec for the given property
  */
 GParamSpec *
 gtd_animatable_find_property (GtdAnimatable *animatable,
@@ -84,8 +79,6 @@ gtd_animatable_find_property (GtdAnimatable *animatable,
  * @value: a #GValue initialized to the type of the property to retrieve
  *
  * Retrieves the current state of @property_name and sets @value with it
- *
- * Since: 1.4
  */
 void
 gtd_animatable_get_initial_state (GtdAnimatable *animatable,
@@ -113,8 +106,6 @@ gtd_animatable_get_initial_state (GtdAnimatable *animatable,
  * @value: the value of the animatable property to set
  *
  * Sets the current state of @property_name to @value
- *
- * Since: 1.4
  */
 void
 gtd_animatable_set_final_state (GtdAnimatable *animatable,
@@ -157,8 +148,6 @@ gtd_animatable_set_final_state (GtdAnimatable *animatable,
  *
  * Return value: %TRUE if the interpolation was successful,
  *   and %FALSE otherwise
- *
- * Since: 1.8
  */
 gboolean
 gtd_animatable_interpolate_value (GtdAnimatable *animatable,
diff --git a/src/animation/gtd-animation-utils.c b/src/animation/gtd-animation-utils.c
index 0abc2ca6..7ab2198b 100644
--- a/src/animation/gtd-animation-utils.c
+++ b/src/animation/gtd-animation-utils.c
@@ -42,25 +42,25 @@ gtd_has_progress_function (GType gtype)
 }
 
 gboolean
-gtd_run_progress_function (GType gtype,
-                                const GValue *initial,
-                                const GValue *final,
-                                gdouble progress,
-                                GValue *retval)
+gtd_run_progress_function (GType         gtype,
+                           const GValue *initial,
+                           const GValue *final,
+                           gdouble       progress,
+                           GValue       *retval)
 {
   ProgressData *pdata;
   gboolean res;
 
   G_LOCK (progress_funcs);
 
-  if (G_UNLIKELY (progress_funcs == NULL))
+  if (G_UNLIKELY (!progress_funcs))
     {
       res = FALSE;
       goto out;
     }
 
   pdata = g_hash_table_lookup (progress_funcs, g_type_name (gtype));
-  if (G_UNLIKELY (pdata == NULL))
+  if (G_UNLIKELY (!pdata))
     {
       res = FALSE;
       goto out;
@@ -75,9 +75,9 @@ out:
 }
 
 static void
-progress_data_destroy (gpointer data_)
+progress_data_destroy (gpointer data)
 {
-  g_slice_free (ProgressData, data_);
+  g_free (data);
 }
 
 /**
@@ -124,8 +124,8 @@ progress_data_destroy (gpointer data_)
  * Since: 1.0
  */
 void
-gtd_interval_register_progress_func (GType               value_type,
-                                         GtdProgressFunc func)
+gtd_interval_register_progress_func (GType           value_type,
+                                     GtdProgressFunc func)
 {
   ProgressData *progress_func;
   const char *type_name;
@@ -136,27 +136,26 @@ gtd_interval_register_progress_func (GType               value_type,
 
   G_LOCK (progress_funcs);
 
-  if (G_UNLIKELY (progress_funcs == NULL))
-    progress_funcs = g_hash_table_new_full (NULL, NULL,
-                                            NULL,
-                                            progress_data_destroy);
+  if (G_UNLIKELY (!progress_funcs))
+    progress_funcs = g_hash_table_new_full (NULL, NULL, NULL, progress_data_destroy);
 
-  progress_func =
-    g_hash_table_lookup (progress_funcs, type_name);
+  progress_func = g_hash_table_lookup (progress_funcs, type_name);
 
   if (G_UNLIKELY (progress_func))
     {
       if (func == NULL)
         {
           g_hash_table_remove (progress_funcs, type_name);
-          g_slice_free (ProgressData, progress_func);
+          g_free (progress_func);
         }
       else
-        progress_func->func = func;
+        {
+          progress_func->func = func;
+        }
     }
   else
     {
-      progress_func = g_slice_new (ProgressData);
+      progress_func = g_new0 (ProgressData, 1);
       progress_func->value_type = value_type;
       progress_func->func = func;
 
diff --git a/src/animation/gtd-interval.c b/src/animation/gtd-interval.c
index 2eb5583a..20efd826 100644
--- a/src/animation/gtd-interval.c
+++ b/src/animation/gtd-interval.c
@@ -236,11 +236,7 @@ gtd_interval_real_compute_value (GtdInterval *self,
 
   if (gtd_has_progress_function (value_type))
     {
-      retval = gtd_run_progress_function (value_type,
-                                          initial,
-                                          final,
-                                          factor,
-                                          value);
+      retval = gtd_run_progress_function (value_type, initial, final, factor, value);
       if (retval)
         return TRUE;
     }
@@ -386,9 +382,9 @@ gtd_interval_finalize (GObject *object)
 
 static void
 gtd_interval_set_property (GObject      *gobject,
-                               guint         prop_id,
-                               const GValue *value,
-                               GParamSpec   *pspec)
+                           guint         prop_id,
+                           const GValue *value,
+                           GParamSpec   *pspec)
 {
   GtdInterval *self = GTD_INTERVAL (gobject);
   GtdIntervalPrivate *priv = gtd_interval_get_instance_private (self);
@@ -421,9 +417,9 @@ gtd_interval_set_property (GObject      *gobject,
 
 static void
 gtd_interval_get_property (GObject    *gobject,
-                               guint       prop_id,
-                               GValue     *value,
-                               GParamSpec *pspec)
+                           guint       prop_id,
+                           GValue     *value,
+                           GParamSpec *pspec)
 {
   GtdIntervalPrivate *priv;
 
@@ -467,8 +463,6 @@ gtd_interval_class_init (GtdIntervalClass *klass)
    * GtdInterval:value-type:
    *
    * The type of the values in the interval.
-   *
-   * Since: 1.0
    */
   obj_props[PROP_VALUE_TYPE] =
     g_param_spec_gtype ("value-type",
@@ -481,31 +475,25 @@ gtd_interval_class_init (GtdIntervalClass *klass)
    * GtdInterval:initial:
    *
    * The initial value of the interval.
-   *
-   * Since: 1.12
    */
   obj_props[PROP_INITIAL] =
     g_param_spec_boxed ("initial",
                         "Initial Value",
                         "Initial value of the interval",
                         G_TYPE_VALUE,
-                        G_PARAM_READWRITE |
-                        G_PARAM_STATIC_STRINGS);
+                        G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
 
   /**
    * GtdInterval:final:
    *
    * The final value of the interval.
-   *
-   * Since: 1.12
    */
   obj_props[PROP_FINAL] =
     g_param_spec_boxed ("final",
                         "Final Value",
                         "Final value of the interval",
                         G_TYPE_VALUE,
-                        G_PARAM_READWRITE |
-                        G_PARAM_STATIC_STRINGS);
+                        G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
 
   g_object_class_install_properties (gobject_class, PROP_LAST, obj_props);
 }
@@ -695,8 +683,6 @@ gtd_interval_get_interval_valist (GtdInterval *self,
  * ]|
  *
  * Return value: the newly created #GtdInterval
- *
- * Since: 1.0
  */
 GtdInterval *
 gtd_interval_new (GType gtype,
@@ -734,13 +720,11 @@ out:
  * This function is useful for language bindings.
  *
  * Return value: the newly created #GtdInterval
- *
- * Since: 1.0
  */
 GtdInterval *
 gtd_interval_new_with_values (GType         gtype,
-                                  const GValue *initial,
-                                  const GValue *final)
+                              const GValue *initial,
+                              const GValue *final)
 {
   g_return_val_if_fail (gtype != G_TYPE_INVALID, NULL);
   g_return_val_if_fail (initial == NULL || G_VALUE_TYPE (initial) == gtype, NULL);
@@ -760,8 +744,6 @@ gtd_interval_new_with_values (GType         gtype,
  * Creates a copy of @interval.
  *
  * Return value: (transfer full): the newly created #GtdInterval
- *
- * Since: 1.0
  */
 GtdInterval *
 gtd_interval_clone (GtdInterval *self)
@@ -793,8 +775,6 @@ gtd_interval_clone (GtdInterval *self)
  * Retrieves the #GType of the values inside @interval.
  *
  * Return value: the type of the value, or G_TYPE_INVALID
- *
- * Since: 1.0
  */
 GType
 gtd_interval_get_value_type (GtdInterval *self)
@@ -814,8 +794,6 @@ gtd_interval_get_value_type (GtdInterval *self)
  *
  * Sets the initial value of @interval to @value. The value is copied
  * inside the #GtdInterval.
- *
- * Since: 1.0
  */
 void
 gtd_interval_set_initial_value (GtdInterval  *self,
@@ -838,12 +816,10 @@ gtd_interval_set_initial_value (GtdInterval  *self,
  *
  * Language bindings should use gtd_interval_set_initial_value()
  * instead.
- *
- * Since: 1.10
  */
 void
 gtd_interval_set_initial (GtdInterval *self,
-                              ...)
+                          ...)
 {
   va_list args;
 
@@ -864,12 +840,10 @@ gtd_interval_set_initial (GtdInterval *self,
  *
  * The passed #GValue must be initialized to the value held by
  * the #GtdInterval.
- *
- * Since: 1.0
  */
 void
 gtd_interval_get_initial_value (GtdInterval *self,
-                                    GValue          *value)
+                                GValue      *value)
 {
   g_return_if_fail (GTD_IS_INTERVAL (self));
   g_return_if_fail (value != NULL);
@@ -886,8 +860,6 @@ gtd_interval_get_initial_value (GtdInterval *self,
  * Return value: (transfer none): the initial value of the interval.
  *   The value is owned by the #GtdInterval and it should not be
  *   modified or freed
- *
- * Since: 1.0
  */
 GValue *
 gtd_interval_peek_initial_value (GtdInterval *self)
@@ -907,12 +879,10 @@ gtd_interval_peek_initial_value (GtdInterval *self)
  *
  * Sets the final value of @interval to @value. The value is
  * copied inside the #GtdInterval.
- *
- * Since: 1.0
  */
 void
-gtd_interval_set_final_value (GtdInterval *self,
-                                  const GValue    *value)
+gtd_interval_set_final_value (GtdInterval  *self,
+                              const GValue *value)
 {
   g_return_if_fail (GTD_IS_INTERVAL (self));
   g_return_if_fail (value != NULL);
@@ -930,12 +900,10 @@ gtd_interval_set_final_value (GtdInterval *self,
  *
  * The passed #GValue must be initialized to the value held by
  * the #GtdInterval.
- *
- * Since: 1.0
  */
 void
 gtd_interval_get_final_value (GtdInterval *self,
-                                  GValue          *value)
+                              GValue      *value)
 {
   g_return_if_fail (GTD_IS_INTERVAL (self));
   g_return_if_fail (value != NULL);
@@ -953,12 +921,10 @@ gtd_interval_get_final_value (GtdInterval *self,
  * This function is meant as a convenience for the C API.
  *
  * Language bindings should use gtd_interval_set_final_value() instead.
- *
- * Since: 1.10
  */
 void
 gtd_interval_set_final (GtdInterval *self,
-                            ...)
+                        ...)
 {
   va_list args;
 
@@ -978,8 +944,6 @@ gtd_interval_set_final (GtdInterval *self,
  * Return value: (transfer none): the final value of the interval.
  *   The value is owned by the #GtdInterval and it should not be
  *   modified or freed
- *
- * Since: 1.0
  */
 GValue *
 gtd_interval_peek_final_value (GtdInterval *self)
@@ -1009,8 +973,6 @@ gtd_interval_peek_final_value (GtdInterval *self)
  *
  * This function is meant for the convenience of the C API; bindings
  * should reimplement this function using the #GValue-based API.
- *
- * Since: 1.0
  */
 void
 gtd_interval_set_interval (GtdInterval *self,
@@ -1050,8 +1012,6 @@ out:
  *
  * This function is meant for the convenience of the C API; bindings
  * should reimplement this function using the #GValue-based API.
- *
- * Since: 1.0
  */
 void
 gtd_interval_get_interval (GtdInterval *self,
@@ -1077,8 +1037,6 @@ gtd_interval_get_interval (GtdInterval *self,
  * a #GParamSpec.
  *
  * Return value: %TRUE if the #GtdInterval is valid, %FALSE otherwise
- *
- * Since: 1.0
  */
 gboolean
 gtd_interval_validate (GtdInterval *self,
@@ -1100,8 +1058,6 @@ gtd_interval_validate (GtdInterval *self,
  * progress @factor and copies it into @value.
  *
  * Return value: %TRUE if the operation was successful
- *
- * Since: 1.0
  */
 gboolean
 gtd_interval_compute_value (GtdInterval *self,
@@ -1131,8 +1087,6 @@ gtd_interval_compute_value (GtdInterval *self,
  *
  * Return value: (transfer none): a pointer to the computed value,
  *   or %NULL if the computation was not successfull
- *
- * Since: 1.4
  */
 const GValue *
 gtd_interval_compute (GtdInterval *self,
@@ -1149,9 +1103,7 @@ gtd_interval_compute (GtdInterval *self,
   if (G_VALUE_TYPE (value) == G_TYPE_INVALID)
     g_value_init (value, priv->value_type);
 
-  res = GTD_INTERVAL_GET_CLASS (self)->compute_value (self,
-                                                              factor,
-                                                              value);
+  res = GTD_INTERVAL_GET_CLASS (self)->compute_value (self, factor, value);
 
   if (res)
     return priv->values + RESULT;
@@ -1167,8 +1119,6 @@ gtd_interval_compute (GtdInterval *self,
  *
  * Return value: %TRUE if the #GtdInterval has an initial and
  *   final values, and %FALSE otherwise
- *
- * Since: 1.12
  */
 gboolean
 gtd_interval_is_valid (GtdInterval *self)
diff --git a/src/animation/gtd-keyframe-transition.h b/src/animation/gtd-keyframe-transition.h
index f302be7f..d3d50246 100644
--- a/src/animation/gtd-keyframe-transition.h
+++ b/src/animation/gtd-keyframe-transition.h
@@ -64,7 +64,6 @@ void                 gtd_keyframe_transition_set                 (GtdKeyframeTra
                                                                   guint                  n_key_frames,
                                                                   ...);
 
-
 void                 gtd_keyframe_transition_set_key_frame       (GtdKeyframeTransition *transition,
                                                                   guint                  index_,
                                                                   double                 key,
@@ -79,7 +78,6 @@ void                 gtd_keyframe_transition_get_key_frame       (GtdKeyframeTra
 
 guint                gtd_keyframe_transition_get_n_key_frames    (GtdKeyframeTransition  *transition);
 
-
 void                 gtd_keyframe_transition_clear               (GtdKeyframeTransition  *transition);
 
 G_END_DECLS
diff --git a/src/animation/gtd-property-transition.c b/src/animation/gtd-property-transition.c
index db364ae3..f0ceb883 100644
--- a/src/animation/gtd-property-transition.c
+++ b/src/animation/gtd-property-transition.c
@@ -26,8 +26,6 @@
  *
  * #GtdPropertyTransition is a specialized #GtdTransition that
  * can be used to tween a property of a #GtdAnimatable instance.
- *
- * #GtdPropertyTransition is available since Gtd 1.10
  */
 
 #include "gtd-property-transition.h"
@@ -253,8 +251,6 @@ gtd_property_transition_class_init (GtdPropertyTransitionClass *klass)
    * GtdPropertyTransition:property-name:
    *
    * The name of the property of a #GtdAnimatable to animate.
-   *
-   * Since: 1.10
    */
   obj_props[PROP_PROPERTY_NAME] =
     g_param_spec_string ("property-name",
@@ -299,8 +295,6 @@ gtd_property_transition_new_for_actor (GtdWidget  *widget,
  *
  * Return value: (transfer full): the newly created #GtdPropertyTransition.
  *   Use g_object_unref() when done
- *
- * Since: 1.10
  */
 GtdTransition *
 gtd_property_transition_new (const char *property_name)
@@ -316,8 +310,6 @@ gtd_property_transition_new (const char *property_name)
  * @property_name: (allow-none): a property name
  *
  * Sets the #GtdPropertyTransition:property-name property of @transition.
- *
- * Since: 1.10
  */
 void
 gtd_property_transition_set_property_name (GtdPropertyTransition *self,
@@ -354,8 +346,6 @@ gtd_property_transition_set_property_name (GtdPropertyTransition *self,
  * Return value: the name of the property being animated, or %NULL if
  *   none is set. The returned string is owned by the @transition and
  *   it should not be freed.
- *
- * Since: 1.10
  */
 const char *
 gtd_property_transition_get_property_name (GtdPropertyTransition *self)
diff --git a/src/animation/gtd-timeline.c b/src/animation/gtd-timeline.c
index ebe272f7..9ec77f0e 100644
--- a/src/animation/gtd-timeline.c
+++ b/src/animation/gtd-timeline.c
@@ -416,7 +416,7 @@ remove_tick_callback (GtdTimeline *self)
 
 static void
 set_is_playing (GtdTimeline *self,
-                gboolean         is_playing)
+                gboolean     is_playing)
 {
   GtdTimelinePrivate *priv = gtd_timeline_get_instance_private (self);
 
@@ -585,8 +585,6 @@ gtd_timeline_class_init (GtdTimelineClass *klass)
    *
    * A delay, in milliseconds, that should be observed by the
    * timeline before actually starting.
-   *
-   * Since: 0.4
    */
   obj_props[PROP_DELAY] =
     g_param_spec_uint ("delay",
@@ -599,10 +597,7 @@ gtd_timeline_class_init (GtdTimelineClass *klass)
   /**
    * GtdTimeline:duration:
    *
-   * Duration of the timeline in milliseconds, depending on the
-   * GtdTimeline:fps value.
-   *
-   * Since: 0.6
+   * Duration of the timeline in milliseconds.
    */
   obj_props[PROP_DURATION] =
     g_param_spec_uint ("duration",
@@ -617,8 +612,6 @@ gtd_timeline_class_init (GtdTimelineClass *klass)
    *
    * The direction of the timeline, either %GTD_TIMELINE_FORWARD or
    * %GTD_TIMELINE_BACKWARD.
-   *
-   * Since: 0.6
    */
   obj_props[PROP_DIRECTION] =
     g_param_spec_enum ("direction",
@@ -633,8 +626,6 @@ gtd_timeline_class_init (GtdTimelineClass *klass)
    *
    * If the direction of the timeline should be automatically reversed
    * when reaching the end.
-   *
-   * Since: 1.6
    */
   obj_props[PROP_AUTO_REVERSE] =
     g_param_spec_boolean ("auto-reverse",
@@ -652,8 +643,6 @@ gtd_timeline_class_init (GtdTimelineClass *klass)
    *
    * If the repeat count is set to -1, the timeline will repeat until it is
    * stopped.
-   *
-   * Since: 1.10
    */
   obj_props[PROP_REPEAT_COUNT] =
     g_param_spec_int ("repeat-count",
@@ -667,8 +656,6 @@ gtd_timeline_class_init (GtdTimelineClass *klass)
    * GtdTimeline:progress-mode:
    *
    * Controls the way a #GtdTimeline computes the normalized progress.
-   *
-   * Since: 1.10
    */
   obj_props[PROP_PROGRESS_MODE] =
     g_param_spec_enum ("progress-mode",
@@ -767,8 +754,6 @@ gtd_timeline_class_init (GtdTimelineClass *klass)
    *
    * If the #GtdTimeline has is marked as infinitely repeating,
    * this signal will never be emitted.
-   *
-   * Since: 1.12
    */
   timeline_signals[STOPPED] =
     g_signal_new ("stopped",
@@ -798,8 +783,6 @@ gtd_timeline_init (GtdTimeline *self)
  *
  * Return value: the newly created #GtdTimeline instance. Use
  *   g_object_unref() when done using it
- *
- * Since: 0.6
  */
 GtdTimeline *
 gtd_timeline_new (guint duration_ms)
@@ -1069,8 +1052,6 @@ gtd_timeline_is_playing (GtdTimeline *self)
  * Retrieves the delay set using gtd_timeline_set_delay().
  *
  * Return value: the delay in milliseconds.
- *
- * Since: 0.4
  */
 guint
 gtd_timeline_get_delay (GtdTimeline *self)
@@ -1089,8 +1070,6 @@ gtd_timeline_get_delay (GtdTimeline *self)
  * @msecs: delay in milliseconds
  *
  * Sets the delay, in milliseconds, before @timeline should start.
- *
- * Since: 0.4
  */
 void
 gtd_timeline_set_delay (GtdTimeline *self,
@@ -1119,8 +1098,6 @@ gtd_timeline_set_delay (GtdTimeline *self,
  * See gtd_timeline_set_duration().
  *
  * Return value: the duration of the timeline, in milliseconds.
- *
- * Since: 0.6
  */
 guint
 gtd_timeline_get_duration (GtdTimeline *self)
@@ -1141,8 +1118,6 @@ gtd_timeline_get_duration (GtdTimeline *self)
  *
  * Sets the duration of the timeline, in milliseconds. The speed
  * of the timeline depends on the GtdTimeline:fps setting.
- *
- * Since: 0.6
  */
 void
 gtd_timeline_set_duration (GtdTimeline *self,
@@ -1176,8 +1151,6 @@ gtd_timeline_set_duration (GtdTimeline *self,
  * progress function set using gtd_timeline_set_progress_func().
  *
  * Return value: the normalized current position in the timeline.
- *
- * Since: 0.6
  */
 gdouble
 gtd_timeline_get_progress (GtdTimeline *self)
@@ -1202,8 +1175,6 @@ gtd_timeline_get_progress (GtdTimeline *self)
  * gtd_timeline_set_direction().
  *
  * Return value: the direction of the timeline
- *
- * Since: 0.6
  */
 GtdTimelineDirection
 gtd_timeline_get_direction (GtdTimeline *self)
@@ -1223,8 +1194,6 @@ gtd_timeline_get_direction (GtdTimeline *self)
  *
  * Sets the direction of @timeline, either %GTD_TIMELINE_FORWARD or
  * %GTD_TIMELINE_BACKWARD.
- *
- * Since: 0.6
  */
 void
 gtd_timeline_set_direction (GtdTimeline          *self,
@@ -1260,8 +1229,6 @@ gtd_timeline_set_direction (GtdTimeline          *self,
  *
  * Return value: the amount of time in milliseconds elapsed since the
  * last frame
- *
- * Since: 0.6
  */
 guint
 gtd_timeline_get_delta (GtdTimeline *self)
@@ -1318,8 +1285,6 @@ gtd_timeline_get_delta (GtdTimeline *self)
  *   gtd_timeline_set_repeat_count (self, -1);
  *   gtd_timeline_set_auto_reverse (self);
  * ]|
- *
- * Since: 1.6
  */
 void
 gtd_timeline_set_auto_reverse (GtdTimeline *self,
@@ -1348,8 +1313,6 @@ gtd_timeline_set_auto_reverse (GtdTimeline *self,
  *
  * Return value: %TRUE if the timeline should automatically reverse, and
  *   %FALSE otherwise
- *
- * Since: 1.6
  */
 gboolean
 gtd_timeline_get_auto_reverse (GtdTimeline *self)
@@ -1373,8 +1336,6 @@ gtd_timeline_get_auto_reverse (GtdTimeline *self)
  *
  * If @count is -1, the timeline will always repeat until
  * it's stopped.
- *
- * Since: 1.10
  */
 void
 gtd_timeline_set_repeat_count (GtdTimeline *self,
@@ -1401,8 +1362,6 @@ gtd_timeline_set_repeat_count (GtdTimeline *self,
  * Retrieves the number set using gtd_timeline_set_repeat_count().
  *
  * Return value: the number of repeats
- *
- * Since: 1.10
  */
 gint
 gtd_timeline_get_repeat_count (GtdTimeline *self)
@@ -1433,8 +1392,6 @@ gtd_timeline_get_repeat_count (GtdTimeline *self)
  *
  * If @func is %NULL, any previously set progress function will be unset, and
  * the #GtdTimeline:progress-mode property will be set to %GTD_EASE_LINEAR.
- *
- * Since: 1.10
  */
 void
 gtd_timeline_set_progress_func (GtdTimeline             *self,
@@ -1471,8 +1428,6 @@ gtd_timeline_set_progress_func (GtdTimeline             *self,
  * Sets the progress function using a value from the #GtdEaseMode
  * enumeration. The @mode cannot be %GTD_CUSTOM_MODE or bigger than
  * %GTD_ANIMATION_LAST.
- *
- * Since: 1.10
  */
 void
 gtd_timeline_set_progress_mode (GtdTimeline *self,
@@ -1508,8 +1463,6 @@ gtd_timeline_set_progress_mode (GtdTimeline *self,
  * or gtd_timeline_set_progress_func().
  *
  * Return value: a #GtdEaseMode
- *
- * Since: 1.10
  */
 GtdEaseMode
 gtd_timeline_get_progress_mode (GtdTimeline *self)
@@ -1536,8 +1489,6 @@ gtd_timeline_get_progress_mode (GtdTimeline *self)
  * as long as the @timeline hasn't been changed.
  *
  * Return value: the full duration of the #GtdTimeline
- *
- * Since: 1.10
  */
 gint64
 gtd_timeline_get_duration_hint (GtdTimeline *self)
@@ -1567,8 +1518,6 @@ gtd_timeline_get_duration_hint (GtdTimeline *self)
  * Repeats start at 0.
  *
  * Return value: the current repeat
- *
- * Since: 1.10
  */
 gint
 gtd_timeline_get_current_repeat (GtdTimeline *self)
diff --git a/src/animation/gtd-transition.c b/src/animation/gtd-transition.c
index 0d71355b..0ca1d3f4 100644
--- a/src/animation/gtd-transition.c
+++ b/src/animation/gtd-transition.c
@@ -102,16 +102,15 @@ gtd_transition_new_frame (GtdTimeline *timeline,
   GtdTransitionPrivate *priv = gtd_transition_get_instance_private (self);
   gdouble progress;
 
-  if (priv->interval == NULL ||
-      priv->animatable == NULL)
+  if (!priv->interval || !priv->animatable)
     return;
 
   progress = gtd_timeline_get_progress (timeline);
 
   GTD_TRANSITION_GET_CLASS (timeline)->compute_value (self,
-                                                          priv->animatable,
-                                                          priv->interval,
-                                                          progress);
+                                                      priv->animatable,
+                                                      priv->interval,
+                                                      progress);
 }
 
 static void
@@ -229,8 +228,6 @@ gtd_transition_class_init (GtdTransitionClass *klass)
    *
    * The #GtdInterval used to describe the initial and final states
    * of the transition.
-   *
-   * Since: 1.10
    */
   obj_props[PROP_INTERVAL] =
     g_param_spec_object ("interval",
@@ -243,8 +240,6 @@ gtd_transition_class_init (GtdTransitionClass *klass)
    * GtdTransition:animatable:
    *
    * The #GtdAnimatable instance currently being animated.
-   *
-   * Since: 1.10
    */
   obj_props[PROP_ANIMATABLE] =
     g_param_spec_object ("animatable",
@@ -264,8 +259,6 @@ gtd_transition_class_init (GtdTransitionClass *klass)
    * account the value of the #GtdTimeline:repeat-count property,
    * and it only detaches the transition if the transition is not
    * repeating.
-   *
-   * Since: 1.10
    */
   obj_props[PROP_REMOVE_ON_COMPLETE] =
     g_param_spec_boolean ("remove-on-complete",
@@ -291,8 +284,6 @@ gtd_transition_init (GtdTransition *self)
  *
  * The @transition will acquire a reference on the @interval, sinking
  * the floating flag on it if necessary.
- *
- * Since: 1.10
  */
 void
 gtd_transition_set_interval (GtdTransition *self,
@@ -325,8 +316,6 @@ gtd_transition_set_interval (GtdTransition *self,
  * Return value: (transfer none): a #GtdInterval, or %NULL; the returned
  *   interval is owned by the #GtdTransition and it should not be freed
  *   directly
- *
- * Since: 1.10
  */
 GtdInterval *
 gtd_transition_get_interval (GtdTransition *self)
@@ -352,12 +341,10 @@ gtd_transition_get_interval (GtdTransition *self)
  * If an existing #GtdAnimatable is attached to @self, the
  * reference will be released, and the #GtdTransitionClass.detached()
  * virtual function will be called.
- *
- * Since: 1.10
  */
 void
 gtd_transition_set_animatable (GtdTransition *self,
-                                   GtdAnimatable *animatable)
+                               GtdAnimatable *animatable)
 {
   GtdTransitionPrivate *priv;
   GtdWidget *widget;
@@ -394,8 +381,6 @@ gtd_transition_set_animatable (GtdTransition *self,
  * Return value: (transfer none): a #GtdAnimatable, or %NULL; the returned
  *   animatable is owned by the #GtdTransition, and it should not be freed
  *   directly.
- *
- * Since: 1.10
  */
 GtdAnimatable *
 gtd_transition_get_animatable (GtdTransition *self)
@@ -416,8 +401,6 @@ gtd_transition_get_animatable (GtdTransition *self)
  * Sets whether @transition should be detached from the #GtdAnimatable
  * set using gtd_transition_set_animatable() when the
  * #GtdTimeline::completed signal is emitted.
- *
- * Since: 1.10
  */
 void
 gtd_transition_set_remove_on_complete (GtdTransition *self,
@@ -435,8 +418,7 @@ gtd_transition_set_remove_on_complete (GtdTransition *self,
 
   priv->remove_on_complete = remove_complete;
 
-  g_object_notify_by_pspec (G_OBJECT (self),
-                            obj_props[PROP_REMOVE_ON_COMPLETE]);
+  g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_REMOVE_ON_COMPLETE]);
 }
 
 /**
@@ -447,8 +429,6 @@ gtd_transition_set_remove_on_complete (GtdTransition *self,
  *
  * Return value: %TRUE if the @transition should be detached when complete,
  *   and %FALSE otherwise
- *
- * Since: 1.10
  */
 gboolean
 gtd_transition_get_remove_on_complete (GtdTransition *self)
@@ -474,9 +454,7 @@ gtd_transition_set_value (GtdTransition   *self,
 
   if (priv->interval == NULL)
     {
-      priv->interval = gtd_interval_new_with_values (G_VALUE_TYPE (value),
-                                                         NULL,
-                                                         NULL);
+      priv->interval = gtd_interval_new_with_values (G_VALUE_TYPE (value), NULL, NULL);
       g_object_ref_sink (priv->interval);
     }
 
@@ -511,7 +489,9 @@ gtd_transition_set_value (GtdTransition   *self,
         }
     }
   else
-    interval_set_func (priv->interval, value);
+    {
+      interval_set_func (priv->interval, value);
+    }
 }
 
 /**
@@ -533,19 +513,15 @@ gtd_transition_set_value (GtdTransition   *self,
  * as the interval's #GtdInterval:value-type property.
  *
  * This function is meant to be used by language bindings.
- *
- * Since: 1.12
  */
 void
 gtd_transition_set_from_value (GtdTransition *self,
-                                   const GValue      *value)
+                               const GValue  *value)
 {
   g_return_if_fail (GTD_IS_TRANSITION (self));
   g_return_if_fail (G_IS_VALUE (value));
 
-  gtd_transition_set_value (self,
-                                gtd_interval_set_initial_value,
-                                value);
+  gtd_transition_set_value (self, gtd_interval_set_initial_value, value);
 }
 
 /**
@@ -567,12 +543,10 @@ gtd_transition_set_from_value (GtdTransition *self,
  * as the interval's #GtdInterval:value-type property.
  *
  * This function is meant to be used by language bindings.
- *
- * Since: 1.12
  */
 void
 gtd_transition_set_to_value (GtdTransition *self,
-                                 const GValue      *value)
+                             const GValue  *value)
 {
   g_return_if_fail (GTD_IS_TRANSITION (self));
   g_return_if_fail (G_IS_VALUE (value));
@@ -600,13 +574,11 @@ gtd_transition_set_to_value (GtdTransition *self,
  *
  * This is a convenience function for the C API; language bindings
  * should use gtd_transition_set_from_value() instead.
- *
- * Since: 1.12
  */
 void
 gtd_transition_set_from (GtdTransition *self,
-                             GType              value_type,
-                             ...)
+                         GType          value_type,
+                         ...)
 {
   GValue value = G_VALUE_INIT;
   gchar *error = NULL;
@@ -628,9 +600,7 @@ gtd_transition_set_from (GtdTransition *self,
       return;
     }
 
-  gtd_transition_set_value (self,
-                                gtd_interval_set_initial_value,
-                                &value);
+  gtd_transition_set_value (self, gtd_interval_set_initial_value, &value);
 
   g_value_unset (&value);
 }
@@ -653,8 +623,6 @@ gtd_transition_set_from (GtdTransition *self,
  *
  * This is a convenience function for the C API; language bindings
  * should use gtd_transition_set_to_value() instead.
- *
- * Since: 1.12
  */
 void
 gtd_transition_set_to (GtdTransition *self,
@@ -681,9 +649,7 @@ gtd_transition_set_to (GtdTransition *self,
       return;
     }
 
-  gtd_transition_set_value (self,
-                                gtd_interval_set_final_value,
-                                &value);
+  gtd_transition_set_value (self, gtd_interval_set_final_value, &value);
 
   g_value_unset (&value);
 }
diff --git a/src/animation/gtd-transition.h b/src/animation/gtd-transition.h
index 3c8a9184..32e20fa3 100644
--- a/src/animation/gtd-transition.h
+++ b/src/animation/gtd-transition.h
@@ -55,7 +55,7 @@ struct _GtdTransitionClass
   void (* compute_value) (GtdTransition *transition,
                           GtdAnimatable *animatable,
                           GtdInterval   *interval,
-                          gdouble            progress);
+                          gdouble        progress);
 
   /*< private >*/
   gpointer _padding[8];


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