summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Thurman <tthurman@gnome.org>2009-10-23 14:29:53 -0400
committerThomas Thurman <tthurman@gnome.org>2009-10-23 14:29:53 -0400
commitbcfd946063058b57e4effda74f2dd85e635c3e33 (patch)
treeadb0f7ec480f77d33869740092c66e039b40731c
parent4e7adebaf7e529908b800beaee4fd94d9c8c5fe2 (diff)
downloadmetacity-bcfd946063058b57e4effda74f2dd85e635c3e33.tar.gz
rm old code
-rw-r--r--src/ui/theme.c105
1 files changed, 0 insertions, 105 deletions
diff --git a/src/ui/theme.c b/src/ui/theme.c
index c45aedb1..ae49d3ac 100644
--- a/src/ui/theme.c
+++ b/src/ui/theme.c
@@ -587,111 +587,6 @@ meta_theme_draw_frame_with_style (MetaTheme *theme,
}
}
-#if 0
-
-/* This is the old code from Copper. We are now using the calculations
- * we have to do anyway in geometry.
- */
-{
- /* stub */
-
- cairo_t *cr = gdk_cairo_create (drawable);
- ccss_stylesheet_t *stylesheet = theme->stylesheet;
-
- int x = 0;
- int y = 0;
- int w = client_width;
- int h = client_height;
- int te, be, le, re;
-
- PangoRectangle text_extents;
-
- int titlebar_height;
-
- CopperClasses left_buttons[] = {CC_MENU, CC_LAST};
- CopperClasses right_buttons[] = {CC_CLOSE, CC_MAXIMIZE, CC_MINIMIZE, CC_LAST};
- CopperClasses *cursor;
- int leftpos, rightpos;
-
- meta_theme_get_frame_borders (theme, type, text_height, flags,
- &te, &be, &le, &re);
- w += le+re;
- h += te+be;
-
- cowbell_style_title_text (stylesheet, title_layout, cr);
-
- 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,
- &text_extents.height,
- TRUE, TRUE);
-
- titlebar_height = text_extents.height;
-
- reduce_by_padding_borders_and_margins (stylesheet, CC_TITLEBAR,
- NULL, NULL, NULL,
- &titlebar_height,
- TRUE, TRUE);
-
- draw_rectangle (stylesheet, cr, CC_FRAME, x, y, w, h, FALSE, FALSE, NULL);
-
- reduce_by_padding_borders_and_margins (stylesheet, CC_FRAME, &x, &y, &w, &h, FALSE, FALSE);
-
- draw_rectangle (stylesheet, cr, CC_TITLEBAR, x, y, w, titlebar_height, TRUE, FALSE, NULL);
-
- draw_rectangle (stylesheet, cr, CC_CONTENT, x, y+titlebar_height, w, h-titlebar_height, TRUE, FALSE, NULL);
-
- h = titlebar_height;
-
- reduce_by_padding_borders_and_margins (stylesheet, CC_TITLEBAR, &x, &y, &w, &h, TRUE, FALSE);
-
- cursor = left_buttons;
- leftpos = x;
- while (*cursor != CC_LAST)
- {
- leftpos += draw_rectangle (stylesheet, cr, *cursor, leftpos, y, 0, h, TRUE, FALSE, NULL);
- cursor++;
- }
-
- cursor = right_buttons;
- rightpos = x+w;
- while (*cursor != CC_LAST)
- {
- rightpos -= draw_rectangle (stylesheet, cr, *cursor, rightpos, y, 0, h, TRUE, TRUE, NULL);
- cursor++;
- }
-
- switch (pango_layout_get_alignment (title_layout))
- {
- case PANGO_ALIGN_LEFT:
- x = leftpos;
- draw_rectangle (stylesheet, cr, CC_FILLER, leftpos+text_extents.width, y,
- (rightpos-leftpos)-text_extents.width, h, TRUE, FALSE, NULL);
- break;
- case PANGO_ALIGN_CENTER:
- x = leftpos + ((rightpos-leftpos)/2 - text_extents.width);
- draw_rectangle (stylesheet, cr, CC_FILLER, leftpos, y,
- x-leftpos, h, TRUE, FALSE, NULL);
- draw_rectangle (stylesheet, cr, CC_FILLER, x+text_extents.width, y,
- rightpos-(x+text_extents.width), h, TRUE, FALSE, NULL);
- break;
- case PANGO_ALIGN_RIGHT:
- x = rightpos - text_extents.width;
- draw_rectangle (stylesheet, cr, CC_FILLER, leftpos, y,
- rightpos-(leftpos-text_extents.width), h, TRUE, FALSE, NULL);
- break;
- default:
- g_error ("Unknown alignment");
- }
-
- draw_rectangle (stylesheet, cr, CC_TITLE, x, y, text_extents.width, h, TRUE, FALSE, title_layout);
-
- cairo_destroy (cr);
-}
-
-#endif /* 0 */
-
/**
* Returns the style to use with the given type and flags.
* When you're done with it, call ccss_style_destroy (style).