[gtk+/gtk-style-context: 387/540] Fix a memory leak
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-style-context: 387/540] Fix a memory leak
- Date: Fri, 3 Dec 2010 03:08:40 +0000 (UTC)
commit 0055d50dd4c4232e8f856b9ffae28c6fbae0b89b
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Nov 16 21:50:56 2010 -0500
Fix a memory leak
gtk/gtkthemingengine.c | 13 ++++---------
1 files changed, 4 insertions(+), 9 deletions(-)
---
diff --git a/gtk/gtkthemingengine.c b/gtk/gtkthemingengine.c
index 55cb6bc..9baea1b 100644
--- a/gtk/gtkthemingengine.c
+++ b/gtk/gtkthemingengine.c
@@ -870,12 +870,10 @@ gtk_theming_engine_render_check (GtkThemingEngine *engine,
gdouble height)
{
GdkRGBA *fg_color, *bg_color;
- const GtkWidgetPath *path;
GtkStateFlags flags;
gint exterior_size, interior_size, thickness, pad;
flags = gtk_theming_engine_get_state (engine);
- path = gtk_theming_engine_get_path (engine);
cairo_save (cr);
gtk_theming_engine_get (engine, flags,
@@ -911,7 +909,6 @@ gtk_theming_engine_render_check (GtkThemingEngine *engine,
cairo_fill_preserve (cr);
gdk_cairo_set_source_rgba (cr, fg_color);
-
cairo_stroke (cr);
}
@@ -974,6 +971,7 @@ gtk_theming_engine_render_check (GtkThemingEngine *engine,
cairo_restore (cr);
gdk_rgba_free (fg_color);
+ gdk_rgba_free (bg_color);
}
static void
@@ -986,12 +984,10 @@ gtk_theming_engine_render_option (GtkThemingEngine *engine,
{
GtkStateFlags flags;
GdkRGBA *fg_color, *bg_color;
- const GtkWidgetPath *path;
gint exterior_size, interior_size, pad, thickness;
gdouble radius;
flags = gtk_theming_engine_get_state (engine);
- path = gtk_theming_engine_get_path (engine);
radius = MIN (width, height) / 2 - 0.5;
cairo_save (cr);
@@ -1011,19 +1007,18 @@ gtk_theming_engine_render_option (GtkThemingEngine *engine,
if (!gtk_theming_engine_has_class (engine, "menu"))
{
- gdk_cairo_set_source_rgba (cr, bg_color);
-
+ cairo_set_line_width (cr, 1.);
cairo_arc (cr,
x + exterior_size / 2.,
y + exterior_size / 2.,
(exterior_size - 1) / 2.,
0, 2 * G_PI);
+ gdk_cairo_set_source_rgba (cr, bg_color);
+g_print ("filling the arc with %f %f %f %f\n", bg_color->red, bg_color->green, bg_color->blue, bg_color->alpha);
cairo_fill_preserve (cr);
gdk_cairo_set_source_rgba (cr, fg_color);
-
- cairo_set_line_width (cr, 1.);
cairo_stroke (cr);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]