Commit 04c5fdac authored by Benjamin Otte's avatar Benjamin Otte

css: Remove old animation code

Deprecate public API where appropriate and make it no-ops.
Remove all calls to it.
Get rid of the 'transition' css property.

For now, this means spinners don't animate anymore.
parent dcd54e20
......@@ -405,7 +405,6 @@ gtk_private_h_sources = \
gtkaccelgroupprivate.h \
gtkaccelmapprivate.h \
gtkallocatedbitmaskprivate.h \
gtkanimationdescription.h \
gtkappchooserprivate.h \
gtkappchoosermodule.h \
gtkappchooseronline.h \
......@@ -525,7 +524,6 @@ gtk_private_h_sources = \
gtktextutil.h \
gtkthemingbackgroundprivate.h \
gtkthemingengineprivate.h \
gtktimeline.h \
gtktoolpaletteprivate.h \
gtktreedatalist.h \
gtktreeprivate.h \
......@@ -591,7 +589,6 @@ gtk_base_c_sources = \
gtkappchooseronline.c \
gtkapplication.c \
gtkapplicationwindow.c \
gtkanimationdescription.c \
gtkarrow.c \
gtkaspectframe.c \
gtkassistant.c \
......@@ -819,7 +816,6 @@ gtk_base_c_sources = \
gtktextview.c \
gtkthemingbackground.c \
gtkthemingengine.c \
gtktimeline.c \
gtktoggleaction.c \
gtktogglebutton.c \
gtktoggletoolbutton.c \
......
......@@ -36,10 +36,6 @@ GtkTreeView.view.expander:selected:hover {
color: @text_color;
}
.expander:active {
transition: 200ms linear;
}
*:insensitive {
border-color: shade (@bg_color, 0.7);
background-color: shade (@bg_color, 0.9);
......@@ -295,10 +291,6 @@ GtkLabel:selected:focused {
background-color: @selected_bg_color;
}
.spinner:active {
transition: 750ms linear loop;
}
.info {
background-color: @info_bg_color;
color: @info_fg_color;
......
......@@ -77,10 +77,6 @@ GtkFrame {
color: #fff;
}
.spinner:active {
transition: 750ms linear loop;
}
.notebook > GtkScrolledWindow.frame {
border-style: none;
}
......@@ -837,4 +833,4 @@ GtkStatusbar > GtkFrame {
background-color: transparent;
background-image: -gtk-win32-theme-part(status, 3 1);
}
*/
\ No newline at end of file
*/
/* GTK - The GIMP Toolkit
* Copyright (C) 2010 Carlos Garnacho <carlosg@gnome.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include "gtkanimationdescription.h"
#include "gtkintl.h"
struct GtkAnimationDescription
{
GtkTimelineProgressType progress_type;
gdouble duration;
guint loop : 1;
guint ref_count;
};
GtkAnimationDescription *
_gtk_animation_description_new (gdouble duration,
GtkTimelineProgressType progress_type,
gboolean loop)
{
GtkAnimationDescription *desc;
desc = g_slice_new (GtkAnimationDescription);
desc->duration = duration;
desc->progress_type = progress_type;
desc->loop = loop;
desc->ref_count = 1;
return desc;
}
gdouble
_gtk_animation_description_get_duration (GtkAnimationDescription *desc)
{
return desc->duration;
}
GtkTimelineProgressType
_gtk_animation_description_get_progress_type (GtkAnimationDescription *desc)
{
return desc->progress_type;
}
gboolean
_gtk_animation_description_get_loop (GtkAnimationDescription *desc)
{
return (desc->loop != 0);
}
GtkAnimationDescription *
_gtk_animation_description_ref (GtkAnimationDescription *desc)
{
desc->ref_count++;
return desc;
}
void
_gtk_animation_description_unref (GtkAnimationDescription *desc)
{
desc->ref_count--;
if (desc->ref_count == 0)
g_slice_free (GtkAnimationDescription, desc);
}
GtkAnimationDescription *
_gtk_animation_description_from_string (const gchar *str)
{
gchar timing_function[16] = { 0, };
gchar duration_unit[3] = { 0, };
gchar loop_str[5] = { 0, };
GtkTimelineProgressType progress_type;
guint duration = 0;
gboolean loop;
if (sscanf (str, "%d%2s %15s %5s", &duration, duration_unit, timing_function, loop_str) == 4)
loop = TRUE;
else if (sscanf (str, "%d%2s %15s", &duration, duration_unit, timing_function) == 3)
loop = FALSE;
else
return NULL;
if (strcmp (duration_unit, "s") == 0)
duration *= 1000;
else if (strcmp (duration_unit, "ms") != 0)
{
g_warning ("Unknown duration unit: %s\n", duration_unit);
return NULL;
}
if (strcmp (timing_function, "linear") == 0)
progress_type = GTK_TIMELINE_PROGRESS_LINEAR;
else if (strcmp (timing_function, "ease") == 0)
progress_type = GTK_TIMELINE_PROGRESS_EASE;
else if (strcmp (timing_function, "ease-in") == 0)
progress_type = GTK_TIMELINE_PROGRESS_EASE_IN;
else if (strcmp (timing_function, "ease-out") == 0)
progress_type = GTK_TIMELINE_PROGRESS_EASE_OUT;
else if (strcmp (timing_function, "ease-in-out") == 0)
progress_type = GTK_TIMELINE_PROGRESS_EASE_IN_OUT;
else
{
g_warning ("Unknown timing function: %s\n", timing_function);
return NULL;
}
return _gtk_animation_description_new ((gdouble) duration, progress_type, loop);
}
void
_gtk_animation_description_print (GtkAnimationDescription *desc,
GString *str)
{
int duration;
g_return_if_fail (desc != NULL);
g_return_if_fail (str != NULL);
duration = desc->duration;
if (duration % 1000 == 0)
g_string_append_printf (str, "%ds", (int) desc->duration / 1000);
else
g_string_append_printf (str, "%dms", (int) desc->duration);
switch (desc->progress_type)
{
case GTK_TIMELINE_PROGRESS_LINEAR:
g_string_append (str, " linear");
break;
case GTK_TIMELINE_PROGRESS_EASE:
g_string_append (str, " ease");
break;
case GTK_TIMELINE_PROGRESS_EASE_IN:
g_string_append (str, " ease-in");
break;
case GTK_TIMELINE_PROGRESS_EASE_OUT:
g_string_append (str, " ease-out");
break;
case GTK_TIMELINE_PROGRESS_EASE_IN_OUT:
g_string_append (str, " ease-in-out");
break;
default:
g_assert_not_reached ();
}
if (desc->loop)
g_string_append (str, " loop");
}
GType
_gtk_animation_description_get_type (void)
{
static GType type = 0;
if (G_UNLIKELY (!type))
type = g_boxed_type_register_static (I_("GtkAnimationDescription"),
(GBoxedCopyFunc) _gtk_animation_description_ref,
(GBoxedFreeFunc) _gtk_animation_description_unref);
return type;
}
/* GTK - The GIMP Toolkit
* Copyright (C) 2010 Carlos Garnacho <carlosg@gnome.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __GTK_ANIMATION_DESCRIPTION_H__
#define __GTK_ANIMATION_DESCRIPTION_H__
#include "gtktimeline.h"
G_BEGIN_DECLS
/* Dummy typedefs */
typedef struct GtkAnimationDescription GtkAnimationDescription;
#define GTK_TYPE_ANIMATION_DESCRIPTION (_gtk_animation_description_get_type ())
GType _gtk_animation_description_get_type (void) G_GNUC_CONST;
GtkAnimationDescription * _gtk_animation_description_new (gdouble duration,
GtkTimelineProgressType progress_type,
gboolean loop);
gdouble _gtk_animation_description_get_duration (GtkAnimationDescription *desc);
GtkTimelineProgressType _gtk_animation_description_get_progress_type (GtkAnimationDescription *desc);
gboolean _gtk_animation_description_get_loop (GtkAnimationDescription *desc);
GtkAnimationDescription * _gtk_animation_description_ref (GtkAnimationDescription *desc);
void _gtk_animation_description_unref (GtkAnimationDescription *desc);
GtkAnimationDescription * _gtk_animation_description_from_string (const gchar *str);
void _gtk_animation_description_print (GtkAnimationDescription *desc,
GString *string);
G_END_DECLS
#endif /* __GTK_ANIMATION_DESCRIPTION_H__ */
......@@ -27,7 +27,6 @@
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <cairo-gobject.h>
#include "gtkanimationdescription.h"
#include "gtkcssimagegradientprivate.h"
#include "gtkcssprovider.h"
#include "gtkcssrgbavalueprivate.h"
......@@ -602,43 +601,6 @@ theming_engine_value_print (const GValue *value,
}
}
static gboolean
animation_description_value_parse (GtkCssParser *parser,
GFile *base,
GValue *value)
{
GtkAnimationDescription *desc;
char *str;
str = _gtk_css_parser_read_value (parser);
if (str == NULL)
return FALSE;
desc = _gtk_animation_description_from_string (str);
g_free (str);
if (desc == NULL)
{
_gtk_css_parser_error (parser, "Invalid animation description");
return FALSE;
}
g_value_take_boxed (value, desc);
return TRUE;
}
static void
animation_description_value_print (const GValue *value,
GString *string)
{
GtkAnimationDescription *desc = g_value_get_boxed (value);
if (desc == NULL)
g_string_append (string, "none");
else
_gtk_animation_description_print (desc, string);
}
static gboolean
border_value_parse (GtkCssParser *parser,
GFile *base,
......@@ -1038,10 +1000,6 @@ gtk_css_style_funcs_init (void)
theming_engine_value_parse,
theming_engine_value_print,
NULL);
register_conversion_function (GTK_TYPE_ANIMATION_DESCRIPTION,
animation_description_value_parse,
animation_description_value_print,
NULL);
register_conversion_function (GTK_TYPE_BORDER,
border_value_parse,
border_value_print,
......
......@@ -38,7 +38,6 @@
#include "fallback-c89.c"
/* the actual parsers we have */
#include "gtkanimationdescription.h"
#include "gtkbindings.h"
#include "gtkcssarrayvalueprivate.h"
#include "gtkcssbgsizevalueprivate.h"
......@@ -113,21 +112,6 @@ gtk_css_style_property_register (const char * name,
/*** IMPLEMENTATIONS ***/
static void
query_simple (GtkCssStyleProperty *property,
const GtkCssValue *css_value,
GValue *value)
{
_gtk_css_value_init_gvalue (css_value, value);
}
static GtkCssValue *
assign_simple (GtkCssStyleProperty *property,
const GValue *value)
{
return _gtk_css_value_new_from_gvalue (value);
}
static void
query_length_as_int (GtkCssStyleProperty *property,
const GtkCssValue *css_value,
......@@ -816,27 +800,6 @@ engine_assign (GtkCssStyleProperty *property,
return _gtk_css_engine_value_new (g_value_get_object (value));
}
static GtkCssValue *
transition_parse (GtkCssStyleProperty *property,
GtkCssParser *parser,
GFile *base)
{
GValue value = G_VALUE_INIT;
GtkCssValue *result;
g_value_init (&value, GTK_TYPE_ANIMATION_DESCRIPTION);
if (!_gtk_css_style_parse_value (&value, parser, base))
{
g_value_unset (&value);
return NULL;
}
result = _gtk_css_value_new_from_gvalue (&value);
g_value_unset (&value);
return result;
}
static GtkCssValue *
parse_margin (GtkCssStyleProperty *property,
GtkCssParser *parser,
......@@ -1602,17 +1565,6 @@ _gtk_css_style_property_init_properties (void)
engine_assign,
NULL,
_gtk_css_engine_value_new (gtk_theming_engine_load (NULL)));
gtk_css_style_property_register ("transition",
GTK_CSS_PROPERTY_TRANSITION,
GTK_TYPE_ANIMATION_DESCRIPTION,
0,
transition_parse,
NULL,
NULL,
query_simple,
assign_simple,
NULL,
_gtk_css_value_new_from_boxed (GTK_TYPE_ANIMATION_DESCRIPTION, NULL));
/* Private property holding the binding sets */
gtk_css_style_property_register ("gtk-key-bindings",
......
......@@ -108,7 +108,6 @@ enum { /*< skip >*/
GTK_CSS_PROPERTY_TRANSITION_TIMING_FUNCTION,
GTK_CSS_PROPERTY_TRANSITION_DELAY,
GTK_CSS_PROPERTY_ENGINE,
GTK_CSS_PROPERTY_TRANSITION,
GTK_CSS_PROPERTY_GTK_KEY_BINDINGS,
/* add more */
GTK_CSS_PROPERTY_N_PROPERTIES
......
......@@ -911,15 +911,11 @@ gtk_expander_paint (GtkExpander *expander,
gtk_style_context_set_state (context, state);
gtk_style_context_add_class (context, GTK_STYLE_CLASS_EXPANDER);
/* The expander is the only animatable region */
gtk_style_context_push_animatable_region (context, GUINT_TO_POINTER (1));
gtk_render_expander (context, cr,
clip.x - allocation.x,
clip.y - allocation.y,
size, size);
gtk_style_context_pop_animatable_region (context);
gtk_style_context_restore (context);
}
......@@ -1709,28 +1705,9 @@ gtk_expander_set_expanded (GtkExpander *expander,
if (priv->expanded != expanded)
{
GtkWidget *widget = GTK_WIDGET (expander);
GtkSettings *settings = gtk_widget_get_settings (widget);
GtkStyleContext *context;
gboolean enable_animations;
context = gtk_widget_get_style_context (widget);
priv->expanded = expanded;
g_object_get (settings, "gtk-enable-animations", &enable_animations, NULL);
if (enable_animations && gtk_widget_get_realized (widget))
{
gtk_style_context_save (context);
gtk_style_context_add_class (context, GTK_STYLE_CLASS_EXPANDER);
gtk_style_context_notify_state_change (context,
gtk_widget_get_window (widget),
GUINT_TO_POINTER (1),
GTK_STATE_ACTIVE,
expanded);
gtk_style_context_restore (context);
}
child = gtk_bin_get_child (GTK_BIN (expander));
if (child)
......
This diff is collapsed.
......@@ -741,6 +741,7 @@ void gtk_style_context_set_state (GtkStyleContext *context,
GtkStateFlags flags);
GtkStateFlags gtk_style_context_get_state (GtkStyleContext *context);
GDK_DEPRECATED_IN_3_6
gboolean gtk_style_context_state_is_running (GtkStyleContext *context,
GtkStateType state,
gdouble *progress);
......@@ -803,20 +804,25 @@ gboolean gtk_style_context_lookup_color (GtkStyleContext *context,
const gchar *color_name,
GdkRGBA *color);
GDK_DEPRECATED_IN_3_6
void gtk_style_context_notify_state_change (GtkStyleContext *context,
GdkWindow *window,
gpointer region_id,
GtkStateType state,
gboolean state_value);
GDK_DEPRECATED_IN_3_6
void gtk_style_context_cancel_animations (GtkStyleContext *context,
gpointer region_id);
GDK_DEPRECATED_IN_3_6
void gtk_style_context_scroll_animations (GtkStyleContext *context,
GdkWindow *window,
gint dx,
gint dy);
GDK_DEPRECATED_IN_3_6
void gtk_style_context_push_animatable_region (GtkStyleContext *context,
gpointer region_id);
GDK_DEPRECATED_IN_3_6
void gtk_style_context_pop_animatable_region (GtkStyleContext *context);
/* Some helper functions to retrieve most common properties */
......
......@@ -39,9 +39,6 @@ void _gtk_style_context_validate (GtkStyleContext *c
GtkCssChange change);
void _gtk_style_context_queue_invalidate (GtkStyleContext *context,
GtkCssChange change);
void _gtk_style_context_invalidate_animation_areas (GtkStyleContext *context);
void _gtk_style_context_coalesce_animation_areas (GtkStyleContext *context,
GtkWidget *widget);
gboolean _gtk_style_context_check_region_name (const gchar *str);
gboolean _gtk_style_context_resolve_color (GtkStyleContext *context,
......
......@@ -26,7 +26,6 @@
#include "gtkstyleprovider.h"
#include "gtksymboliccolor.h"
#include "gtkthemingengine.h"
#include "gtkanimationdescription.h"
#include "gtkgradient.h"
#include "gtkcssshadowvalueprivate.h"
#include "gtkcssshorthandpropertyprivate.h"
......
......@@ -1021,10 +1021,7 @@ gtk_switch_set_active (GtkSwitch *sw,
if (priv->is_active != is_active)
{
AtkObject *accessible;
GtkWidget *widget;
GtkStyleContext *context;
widget = GTK_WIDGET (sw);
priv->is_active = is_active;
g_object_notify_by_pspec (G_OBJECT (sw), switch_props[PROP_ACTIVE]);
......@@ -1038,14 +1035,6 @@ gtk_switch_set_active (GtkSwitch *sw,
accessible = gtk_widget_get_accessible (GTK_WIDGET (sw));
atk_object_notify_state_change (accessible, ATK_STATE_CHECKED, priv->is_active);
if (gtk_widget_get_realized (widget))
{
context = gtk_widget_get_style_context (widget);
gtk_style_context_notify_state_change (context,
gtk_widget_get_window (widget),
NULL, GTK_STATE_ACTIVE, is_active);
}
if (priv->is_active)
gtk_widget_set_state_flags (GTK_WIDGET (sw), GTK_STATE_FLAG_ACTIVE, FALSE);
else
......
......@@ -580,18 +580,17 @@ gtk_theming_engine_get_state (GtkThemingEngine *engine)
* Returns: %TRUE if there is a running transition animation for @state.
*
* Since: 3.0
*
* Deprecated: 3.6: Always returns %FALSE
**/
gboolean
gtk_theming_engine_state_is_running (GtkThemingEngine *engine,
GtkStateType state,
gdouble *progress)
{
GtkThemingEnginePrivate *priv;
g_return_val_if_fail (GTK_IS_THEMING_ENGINE (engine), FALSE);
priv = engine->priv;
return gtk_style_context_state_is_running (priv->context, state, progress);
return FALSE;
}
/**
......
This diff is collapsed.
/* GTK - The GIMP Toolkit
* Copyright (C) 2007 Carlos Garnacho <carlos@imendio.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __GTK_TIMELINE_H__
#define __GTK_TIMELINE_H__
#include <glib-object.h>
#include <gtk/gtkenums.h>
#include <gdk/gdk.h>
G_BEGIN_DECLS
#define GTK_TYPE_TIMELINE (_gtk_timeline_get_type ())
#define GTK_TIMELINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_TIMELINE, GtkTimeline))
#define GTK_TIMELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_TIMELINE, GtkTimelineClass))
#define GTK_IS_TIMELINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_TIMELINE))
#define GTK_IS_TIMELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TIMELINE))
#define GTK_TIMELINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_TIMELINE, GtkTimelineClass))
typedef struct GtkTimeline GtkTimeline;
typedef struct GtkTimelineClass GtkTimelineClass;
typedef enum {
GTK_TIMELINE_DIRECTION_FORWARD,
GTK_TIMELINE_DIRECTION_BACKWARD
} GtkTimelineDirection;
typedef enum {
GTK_TIMELINE_PROGRESS_LINEAR,
GTK_TIMELINE_PROGRESS_EASE,
GTK_TIMELINE_PROGRESS_EASE_IN,
GTK_TIMELINE_PROGRESS_EASE_OUT,
GTK_TIMELINE_PROGRESS_EASE_IN_OUT
} GtkTimelineProgressType;
struct GtkTimeline
{
GObject parent_instance;
gpointer priv;
};
struct GtkTimelineClass
{
GObjectClass parent_class;
void (* started) (GtkTimeline *timeline);
void (* finished) (GtkTimeline *timeline);
void (* paused) (GtkTimeline *timeline);
void (* frame) (GtkTimeline *timeline,
gdouble progress);
void (* __gtk_reserved1) (void);
void (* __gtk_reserved2) (void);
void (* __gtk_reserved3) (void);
void (* __gtk_reserved4) (void);
};
GType _gtk_timeline_get_type (void) G_GNUC_CONST;
GtkTimeline * _gtk_timeline_new (guint duration);
GtkTimeline * _gtk_timeline_new_for_screen (guint duration,
GdkScreen *screen);
void _gtk_timeline_start (GtkTimeline *timeline);
void _gtk_timeline_pause (GtkTimeline *timeline);
void _gtk_timeline_rewind (GtkTimeline *timeline);
gboolean _gtk_timeline_is_running (GtkTimeline *timeline);
guint _gtk_timeline_get_elapsed_time (GtkTimeline *timeline);
guint _gtk_timeline_get_fps (GtkTimeline *timeline);
void _gtk_timeline_set_fps (GtkTimeline *timeline,
guint fps);
gboolean _gtk_timeline_get_loop (GtkTimeline *timeline);
void _gtk_timeline_set_loop (GtkTimeline *timeline,
gboolean loop);
guint _gtk_timeline_get_duration (GtkTimeline *timeline);
void _gtk_timeline_set_duration (GtkTimeline *timeline,
guint duration);
GdkScreen * _gtk_timeline_get_screen (GtkTimeline *timeline);
void _gtk_timeline_set_screen (GtkTimeline *timeline,
GdkScreen *screen);
GtkTimelineDirection _gtk_timeline_get_direction (GtkTimeline *timeline);
void _gtk_timeline_set_direction (GtkTimeline *timeline,
GtkTimelineDirection direction);
gdouble _gtk_timeline_get_progress (GtkTimeline *timeline);
GtkTimelineProgressType _gtk_timeline_get_progress_type (GtkTimeline *timeline);
void _gtk_timeline_set_progress_type (GtkTimeline *timeline,
GtkTimelineProgressType progress_type);
G_END_DECLS
#endif /* __GTK_TIMELINE_H__ */
......@@ -303,14 +303,10 @@ gtk_tool_item_group_header_draw_cb (GtkWidget *widget,
y = 0;
}
/* The expander is the only animatable region */
gtk_style_context_push_animatable_region (context, GUINT_TO_POINTER (1));
gtk_render_expander (context, cr, x, y,
priv->expander_size,
priv->expander_size);
gtk_style_context_pop_animatable_region (context);
gtk_style_context_restore (context);
return FALSE;
......@@ -1909,8 +1905,6 @@ gtk_tool_item_group_set_collapsed (GtkToolItemGroup *group,
GTK_WIDGET (group));
if (collapsed != priv->collapsed)
{
GtkStyleContext *context;
if (priv->animation)
{
if (priv->animation_timeout)
......@@ -1923,19 +1917,6 @@ gtk_tool_item_group_set_collapsed (GtkToolItemGroup *group,
gtk_tool_item_group_animation_cb,
group, NULL);
g_source_attach (priv->animation_timeout, NULL);
context = gtk_widget_get_style_context (gtk_bin_get_child (GTK_BIN (priv->header)));
gtk_style_context_save (context);
gtk_style_context_add_class (context, GTK_STYLE_CLASS_EXPANDER);
gtk_style_context_notify_state_change (context,
gtk_widget_get_window (priv->header),
GUINT_TO_POINTER (1),
GTK_STATE_FLAG_ACTIVE,