[mutter/wip/cairo: 14/14] theme: Remove 'widget' parameter from draw_frame_with_style API
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/cairo: 14/14] theme: Remove 'widget' parameter from draw_frame_with_style API
- Date: Sun, 11 Mar 2012 23:07:40 +0000 (UTC)
commit e8517609df85820f98855b532d7b863455c97104
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Sun Mar 11 17:52:30 2012 -0400
theme: Remove 'widget' parameter from draw_frame_with_style API
The only use of the widget parameter was being passed around - there was
nothing else using it.
src/ui/frames.c | 3 ---
src/ui/theme-private.h | 1 -
src/ui/theme.c | 17 ++++-------------
3 files changed, 4 insertions(+), 17 deletions(-)
---
diff --git a/src/ui/frames.c b/src/ui/frames.c
index 1b4ef8d..afa46c9 100644
--- a/src/ui/frames.c
+++ b/src/ui/frames.c
@@ -2359,7 +2359,6 @@ meta_frames_paint (MetaFrames *frames,
MetaUIFrame *frame,
cairo_t *cr)
{
- GtkWidget *widget;
MetaFrameFlags flags;
MetaFrameType type;
GdkPixbuf *mini_icon;
@@ -2372,7 +2371,6 @@ meta_frames_paint (MetaFrames *frames,
MetaGrabOp grab_op;
Display *display;
- widget = GTK_WIDGET (frames);
display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
for (i = 0; i < META_BUTTON_TYPE_LAST; i++)
@@ -2471,7 +2469,6 @@ meta_frames_paint (MetaFrames *frames,
meta_theme_draw_frame_with_style (meta_theme_get_current (),
frame->style,
- widget,
cr,
type,
flags,
diff --git a/src/ui/theme-private.h b/src/ui/theme-private.h
index 50f150a..0932aa7 100644
--- a/src/ui/theme-private.h
+++ b/src/ui/theme-private.h
@@ -1042,7 +1042,6 @@ void meta_theme_draw_frame (MetaTheme *theme,
void meta_theme_draw_frame_with_style (MetaTheme *theme,
GtkStyleContext *style_gtk,
- GtkWidget *widget,
cairo_t *cr,
MetaFrameType type,
MetaFrameFlags flags,
diff --git a/src/ui/theme.c b/src/ui/theme.c
index fa1702e..2bbeaac 100644
--- a/src/ui/theme.c
+++ b/src/ui/theme.c
@@ -3170,7 +3170,6 @@ meta_draw_op_list_draw_with_style (const MetaDrawOpList *op_list,
static void
meta_draw_op_draw_with_env (const MetaDrawOp *op,
GtkStyleContext *style_gtk,
- GtkWidget *widget,
cairo_t *cr,
const MetaDrawInfo *info,
MetaRectangle rect,
@@ -3550,8 +3549,7 @@ meta_draw_op_draw_with_env (const MetaDrawOp *op,
d_rect.height = parse_size_unchecked (op->data.op_list.height, env);
meta_draw_op_list_draw_with_style (op->data.op_list.op_list,
- style_gtk, widget, cr, info,
- d_rect);
+ style_gtk, cr, info, d_rect);
}
break;
@@ -3588,8 +3586,7 @@ meta_draw_op_draw_with_env (const MetaDrawOp *op,
while (tile.y < (ry + rheight))
{
meta_draw_op_list_draw_with_style (op->data.tile.op_list,
- style_gtk, widget, cr, info,
- tile);
+ style_gtk, cr, info, tile);
tile.y += tile.height;
}
@@ -3660,7 +3657,6 @@ meta_draw_op_list_unref (MetaDrawOpList *op_list)
static void
meta_draw_op_list_draw_with_style (const MetaDrawOpList *op_list,
GtkStyleContext *style_gtk,
- GtkWidget *widget,
cairo_t *cr,
const MetaDrawInfo *info,
MetaRectangle rect)
@@ -3695,7 +3691,7 @@ meta_draw_op_list_draw_with_style (const MetaDrawOpList *op_list,
else if (gdk_cairo_get_clip_rectangle (cr, NULL))
{
meta_draw_op_draw_with_env (op,
- style_gtk, widget, cr, info,
+ style_gtk, cr, info,
rect,
&env);
}
@@ -4085,7 +4081,6 @@ button_rect (MetaButtonType type,
static void
meta_frame_style_draw_with_style (MetaFrameStyle *style,
GtkStyleContext *style_gtk,
- GtkWidget *widget,
cairo_t *cr,
const MetaFrameGeometry *fgeom,
int client_width,
@@ -4255,7 +4250,6 @@ meta_frame_style_draw_with_style (MetaFrameStyle *style,
m_rect = meta_rect (rect.x, rect.y, rect.width, rect.height);
meta_draw_op_list_draw_with_style (op_list,
style_gtk,
- widget,
cr,
&draw_info,
m_rect);
@@ -4297,7 +4291,6 @@ meta_frame_style_draw_with_style (MetaFrameStyle *style,
meta_draw_op_list_draw_with_style (op_list,
style_gtk,
- widget,
cr,
&draw_info,
m_rect);
@@ -4933,7 +4926,6 @@ meta_theme_get_title_scale (MetaTheme *theme,
void
meta_theme_draw_frame_with_style (MetaTheme *theme,
GtkStyleContext *style_gtk,
- GtkWidget *widget,
cairo_t *cr,
MetaFrameType type,
MetaFrameFlags flags,
@@ -4968,7 +4960,6 @@ meta_theme_draw_frame_with_style (MetaTheme *theme,
meta_frame_style_draw_with_style (style,
style_gtk,
- widget,
cr,
&fgeom,
client_width, client_height,
@@ -4993,7 +4984,7 @@ meta_theme_draw_frame (MetaTheme *theme,
GdkPixbuf *mini_icon,
GdkPixbuf *icon)
{
- meta_theme_draw_frame_with_style (theme, gtk_widget_get_style_context (widget), widget,
+ meta_theme_draw_frame_with_style (theme, gtk_widget_get_style_context (widget),
cr, type,flags,
client_width, client_height,
title_layout, text_height,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]