[Xfce4-commits] <midori:master> Move throbber class declarations to the beginning of the function

Christian Dywan noreply at xfce.org
Fri Jan 29 21:14:03 CET 2010


Updating branch refs/heads/master
         to 9785317a888aea7524a3e89f3fe9d263344503c0 (commit)
       from 32a62a7057788f493f6fc7205ea7132fa3cb727f (commit)

commit 9785317a888aea7524a3e89f3fe9d263344503c0
Author: Christian Dywan <christian at twotoasts.de>
Date:   Fri Jan 29 21:10:05 2010 +0100

    Move throbber class declarations to the beginning of the function

 katze/katze-throbber.c |   19 ++++++++++++-------
 1 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/katze/katze-throbber.c b/katze/katze-throbber.c
index 0698ccb..e6ab7df 100644
--- a/katze/katze-throbber.c
+++ b/katze/katze-throbber.c
@@ -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))
         {



More information about the Xfce4-commits mailing list