From 5aeb56f131c174ce8436e1d9cb43cd176e90b7d2 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 27 Nov 2005 20:21:04 +0000 Subject: Don't leak a PangoLayout here. (#322505, Paolo Borelli) 2005-11-27 Matthias Clasen * gtk/gtkcolorbutton.c (gtk_color_button_init): Don't leak a PangoLayout here. (#322505, Paolo Borelli) --- ChangeLog | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ gtk/gtkcolorbutton.c | 2 ++ 3 files changed, 12 insertions(+) diff --git a/ChangeLog b/ChangeLog index d0f6164b8..fe2b56875 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-11-27 Matthias Clasen + + * gtk/gtkcolorbutton.c (gtk_color_button_init): Don't leak a + PangoLayout here. (#322505, Paolo Borelli) + 2005-11-27 Tor Lillqvist Once again rework Win32 window decoration code. Doesn'tbreak diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index d0f6164b8..fe2b56875 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +2005-11-27 Matthias Clasen + + * gtk/gtkcolorbutton.c (gtk_color_button_init): Don't leak a + PangoLayout here. (#322505, Paolo Borelli) + 2005-11-27 Tor Lillqvist Once again rework Win32 window decoration code. Doesn'tbreak diff --git a/gtk/gtkcolorbutton.c b/gtk/gtkcolorbutton.c index 6ade7cefa..923827d07 100644 --- a/gtk/gtkcolorbutton.c +++ b/gtk/gtkcolorbutton.c @@ -567,6 +567,8 @@ gtk_color_button_init (GtkColorButton *color_button) layout = gtk_widget_create_pango_layout (GTK_WIDGET (color_button), "Black"); pango_layout_get_pixel_extents (layout, NULL, &rect); + g_object_unref (layout); + gtk_widget_set_size_request (color_button->priv->draw_area, rect.width - 2, rect.height - 2); g_signal_connect (color_button->priv->draw_area, "expose-event", G_CALLBACK (expose_event), color_button); -- cgit v1.2.1