st: Don't mix declarations and code

This commit is contained in:
Florian Müllner 2015-09-23 20:08:55 +02:00
parent a025b151ef
commit 627a393ed6
2 changed files with 12 additions and 6 deletions

View File

@ -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);

View File

@ -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)
{