Move throbber class declarations to the beginning of the function

This commit is contained in:
Christian Dywan 2010-01-29 21:10:05 +01:00
parent 32a62a7057
commit 9785317a88

View file

@ -108,15 +108,20 @@ katze_throbber_timeout_destroy (KatzeThrobber* throbber);
static void
katze_throbber_class_init (KatzeThrobberClass* class)
{
GObjectClass* gobject_class = G_OBJECT_CLASS (class);
GObjectClass* gobject_class;
GtkObjectClass* object_class;
GtkWidgetClass* widget_class;
GParamFlags flags = G_PARAM_READWRITE | G_PARAM_CONSTRUCT;
gobject_class = G_OBJECT_CLASS (class);
gobject_class->dispose = katze_throbber_dispose;
gobject_class->set_property = katze_throbber_set_property;
gobject_class->get_property = katze_throbber_get_property;
GtkObjectClass* object_class = GTK_OBJECT_CLASS (class);
object_class = GTK_OBJECT_CLASS (class);
object_class->destroy = katze_throbber_destroy;
GtkWidgetClass* widget_class = GTK_WIDGET_CLASS (class);
widget_class = GTK_WIDGET_CLASS (class);
widget_class->realize = katze_throbber_realize;
widget_class->unrealize = katze_throbber_unrealize;
widget_class->map = katze_throbber_map;
@ -126,8 +131,6 @@ katze_throbber_class_init (KatzeThrobberClass* class)
widget_class->size_request = katze_throbber_size_request;
widget_class->expose_event = katze_throbber_expose_event;
GParamFlags flags = G_PARAM_READWRITE | G_PARAM_CONSTRUCT;
g_object_class_install_property (gobject_class,
PROP_ICON_SIZE,
g_param_spec_int (
@ -855,6 +858,8 @@ katze_throbber_expose_event (GtkWidget* widget,
}
else
{
gint cols, rows;
if (G_UNLIKELY (throbber->icon_name && !throbber->pixbuf))
{
icon_theme_changed (KATZE_THROBBER (widget));
@ -868,8 +873,8 @@ katze_throbber_expose_event (GtkWidget* widget,
}
}
gint cols = gdk_pixbuf_get_width (throbber->pixbuf) / throbber->width;
gint rows = gdk_pixbuf_get_height (throbber->pixbuf) / throbber->height;
cols = gdk_pixbuf_get_width (throbber->pixbuf) / throbber->width;
rows = gdk_pixbuf_get_height (throbber->pixbuf) / throbber->height;
if (G_UNLIKELY (cols == 1 && cols == rows))
{