summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Thurman <tthurman@gnome.org>2009-10-19 15:55:36 -0400
committerThomas Thurman <tthurman@gnome.org>2009-10-19 15:55:36 -0400
commit8f4b5a08cf4bec1bb1e099be1bcf73687efdebaf (patch)
treec3d82c35c07bc8575d2a6e8e05d49c1476d93df4
parent61fbda51478c47f58a81de519c0930685c597f78 (diff)
downloadmetacity-8f4b5a08cf4bec1bb1e099be1bcf73687efdebaf.tar.gz
Use provided layout
-rw-r--r--src/ui/theme.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ui/theme.c b/src/ui/theme.c
index a5d15db8..665eef73 100644
--- a/src/ui/theme.c
+++ b/src/ui/theme.c
@@ -394,6 +394,7 @@ draw_rectangle (ccss_stylesheet_t *stylesheet,
return full_width;
}
+#if 0
static PangoLayout*
cowbell_title_text (ccss_stylesheet_t *stylesheet,
cairo_t *cr,
@@ -459,6 +460,7 @@ cowbell_title_text (ccss_stylesheet_t *stylesheet,
return layout;
}
+#endif
void
meta_theme_draw_frame_with_style (MetaTheme *theme,
@@ -498,9 +500,9 @@ meta_theme_draw_frame_with_style (MetaTheme *theme,
CopperClasses *cursor;
int leftpos, rightpos;
- PangoLayout *layout = cowbell_title_text (stylesheet, cr, "Badgers");
+ /* PangoLayout *layout = cowbell_title_text (stylesheet, cr, "Badgers");*/
- pango_layout_get_pixel_extents (layout, NULL, &text_extents);
+ pango_layout_get_pixel_extents (title_layout, NULL, &text_extents);
reduce_by_padding_borders_and_margins (stylesheet, CC_TITLE,
&text_extents.x, &text_extents.y,
&text_extents.width,
@@ -542,7 +544,7 @@ meta_theme_draw_frame_with_style (MetaTheme *theme,
cursor++;
}
- switch (pango_layout_get_alignment (layout))
+ switch (pango_layout_get_alignment (title_layout))
{
case PANGO_ALIGN_LEFT:
x = leftpos;
@@ -565,9 +567,7 @@ meta_theme_draw_frame_with_style (MetaTheme *theme,
g_error ("Unknown alignment");
}
- draw_rectangle (stylesheet, cr, CC_TITLE, x, y, text_extents.width, h, TRUE, FALSE, layout);
-
- g_object_unref (G_OBJECT (layout));
+ draw_rectangle (stylesheet, cr, CC_TITLE, x, y, text_extents.width, h, TRUE, FALSE, title_layout);
cairo_destroy (cr);
}