[gtk+/wip/cssnode3: 65/102] cssstyle: Handle 0 timestamp to mean "don't animate"
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/cssnode3: 65/102] cssstyle: Handle 0 timestamp to mean "don't animate"
- Date: Wed, 11 Mar 2015 00:21:52 +0000 (UTC)
commit f0bea08c43dcb13ca0a9b0461f7cf34d8763c74d
Author: Benjamin Otte <otte redhat com>
Date: Sat Feb 21 00:15:04 2015 +0100
cssstyle: Handle 0 timestamp to mean "don't animate"
gtk/gtkcssanimatedstyle.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkcssanimatedstyle.c b/gtk/gtkcssanimatedstyle.c
index 4583d8c..6e845f6 100644
--- a/gtk/gtkcssanimatedstyle.c
+++ b/gtk/gtkcssanimatedstyle.c
@@ -410,6 +410,9 @@ gtk_css_animated_style_new (GtkCssStyle *base_style,
gtk_internal_return_val_if_fail (GTK_IS_STYLE_PROVIDER (provider), NULL);
gtk_internal_return_val_if_fail (previous_style == NULL || GTK_IS_CSS_STYLE (previous_style), NULL);
+ if (timestamp == 0)
+ return g_object_ref (base_style);
+
animations = NULL;
if (previous_style != NULL)
@@ -441,6 +444,9 @@ gtk_css_animated_style_new_advance (GtkCssAnimatedStyle *source,
gtk_internal_return_val_if_fail (GTK_IS_CSS_ANIMATED_STYLE (source), NULL);
gtk_internal_return_val_if_fail (GTK_IS_CSS_STYLE (base), NULL);
+ if (timestamp == 0)
+ return g_object_ref (source->style);
+
animations = NULL;
for (l = source->animations; l; l = l->next)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]