From c5551184b0337ea8a990b14e52eb15e855a27ca9 Mon Sep 17 00:00:00 2001 From: Damien Lespiau Date: Mon, 12 Oct 2009 16:45:39 +0100 Subject: [PATCH] Add a warning when ClutterInterval can't compute progress This is really useful when trying to animate GTypes that haven't registered any progress function. Instead of silently not working it will warn the developer. http://bugzilla.openedhand.com/show_bug.cgi?id=1845 --- clutter/clutter-interval.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/clutter/clutter-interval.c b/clutter/clutter-interval.c index 671c6e5..5b09fea 100644 --- a/clutter/clutter-interval.c +++ b/clutter/clutter-interval.c @@ -307,6 +307,15 @@ clutter_interval_real_compute_value (ClutterInterval *interval, break; } + /* We're trying to animate a property without knowing how to do that. Issue + * a warning with a hint to what could be done to fix that */ + if (G_UNLIKELY (retval == FALSE)) + g_warning ("%s: Could not compute progress between two %ss. You can " + "register a progress function to instruct ClutterInterval " + "how to deal with this GType", + G_STRLOC, + g_type_name (value_type)); + return retval; } -- 2.7.4