[metacity/cowbell] Use provided layout
- From: Thomas James Alexander Thurman <tthurman src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [metacity/cowbell] Use provided layout
- Date: Mon, 19 Oct 2009 20:54:28 +0000 (UTC)
commit 8f4b5a08cf4bec1bb1e099be1bcf73687efdebaf
Author: Thomas Thurman <tthurman gnome org>
Date: Mon Oct 19 15:55:36 2009 -0400
Use provided layout
src/ui/theme.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/ui/theme.c b/src/ui/theme.c
index a5d15db..665eef7 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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]