From 627a393ed6efdcfff4d7e0136507aa84e6221d11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Wed, 23 Sep 2015 20:08:55 +0200 Subject: [PATCH] st: Don't mix declarations and code --- src/st/st-theme-node-drawing.c | 6 +++--- src/st/test-theme.c | 12 +++++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/st/st-theme-node-drawing.c b/src/st/st-theme-node-drawing.c index be2aa550d..cb2eb8759 100644 --- a/src/st/st-theme-node-drawing.c +++ b/src/st/st-theme-node-drawing.c @@ -1298,15 +1298,15 @@ st_theme_node_load_border_image (StThemeNode *node) if (node->border_slices_texture == COGL_INVALID_HANDLE) { StBorderImage *border_image; + GFile *file; + int scale_factor; border_image = st_theme_node_get_border_image (node); if (border_image == NULL) goto out; - GFile *file; file = st_border_image_get_file (border_image); - int scale_factor; g_object_get (node->context, "scale-factor", &scale_factor, NULL); node->border_slices_texture = st_texture_cache_load_file_to_cogl_texture (st_texture_cache_get_default (), @@ -1350,12 +1350,12 @@ st_theme_node_load_background_image (StThemeNode *node) { GFile *background_image; StShadow *background_image_shadow_spec; + int scale_factor; background_image = st_theme_node_get_background_image (node); if (background_image == NULL) goto out; - int scale_factor; g_object_get (node->context, "scale-factor", &scale_factor, NULL); background_image_shadow_spec = st_theme_node_get_background_image_shadow (node); diff --git a/src/st/test-theme.c b/src/st/test-theme.c index 6c95c61d5..37844e9f6 100644 --- a/src/st/test-theme.c +++ b/src/st/test-theme.c @@ -107,8 +107,10 @@ assert_foreground_color (StThemeNode *node, guint32 expected) { ClutterColor color; + guint32 value; + st_theme_node_get_foreground_color (node, &color); - guint32 value = clutter_color_to_pixel (&color); + value = clutter_color_to_pixel (&color); if (expected != value) { @@ -124,8 +126,10 @@ assert_background_color (StThemeNode *node, guint32 expected) { ClutterColor color; + guint32 value; + st_theme_node_get_background_color (node, &color); - guint32 value = clutter_color_to_pixel (&color); + value = clutter_color_to_pixel (&color); if (expected != value) { @@ -160,8 +164,10 @@ assert_border_color (StThemeNode *node, guint32 expected) { ClutterColor color; + guint32 value; + st_theme_node_get_border_color (node, side, &color); - guint32 value = clutter_color_to_pixel (&color); + value = clutter_color_to_pixel (&color); if (expected != value) {