[gtk] cellrenderertext: Don't unnecessarily ref a layout
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk] cellrenderertext: Don't unnecessarily ref a layout
- Date: Sun, 21 Jul 2019 10:46:13 +0000 (UTC)
commit 03fa8ed25930a43d4c9d9d17e8bcd418780cae1f
Author: Timm Bäder <mail baedert org>
Date: Sun Jul 21 10:22:05 2019 +0200
cellrenderertext: Don't unnecessarily ref a layout
We never pass a NULL layout to get_size().
gtk/gtkcellrenderertext.c | 7 -------
1 file changed, 7 deletions(-)
---
diff --git a/gtk/gtkcellrenderertext.c b/gtk/gtkcellrenderertext.c
index a3b09a89b1..965818d7ec 100644
--- a/gtk/gtkcellrenderertext.c
+++ b/gtk/gtkcellrenderertext.c
@@ -1652,11 +1652,6 @@ get_size (GtkCellRenderer *cell,
if (width == NULL)
return;
}
-
- if (layout)
- g_object_ref (layout);
- else
- layout = get_layout (celltext, widget, NULL, 0);
pango_layout_get_pixel_extents (layout, NULL, &rect);
@@ -1696,8 +1691,6 @@ get_size (GtkCellRenderer *cell,
if (width)
*width = xpad * 2 + rect.width;
-
- g_object_unref (layout);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]