summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDebarshi Ray <debarshir@gnome.org>2018-02-01 17:33:39 +0100
committerDebarshi Ray <debarshir@gnome.org>2018-02-01 19:53:09 +0100
commit391c5febaa7f278de1ab4390b46982fb8198ed43 (patch)
treed4283c81da8985e0251f9468c268d9020b456555
parent49269e4e6fdcb6b78ee98ab251cf3e972e4812a0 (diff)
downloadlibgd-391c5febaa7f278de1ab4390b46982fb8198ed43.tar.gz
two-lines-renderer: Simplify code
The PangoLayouts are only needed for gd_two_lines_renderer_get_size, which can prepare them itself. https://bugzilla.gnome.org/show_bug.cgi?id=792665
-rw-r--r--libgd/gd-two-lines-renderer.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/libgd/gd-two-lines-renderer.c b/libgd/gd-two-lines-renderer.c
index 5a029f7..b28fc1e 100644
--- a/libgd/gd-two-lines-renderer.c
+++ b/libgd/gd-two-lines-renderer.c
@@ -474,14 +474,11 @@ gd_two_lines_renderer_get_aligned_area (GtkCellRenderer *cell,
const GdkRectangle *cell_area,
GdkRectangle *aligned_area)
{
- GdTwoLinesRenderer *self = GD_TWO_LINES_RENDERER (cell);
gint x_offset, x_offset_1, x_offset_2, y_offset;
- PangoLayout *layout_one, *layout_two;
/* fetch common information */
- gd_two_lines_renderer_prepare_layouts (self, cell_area, widget, &layout_one, &layout_two);
gd_two_lines_renderer_get_size (cell, widget,
- layout_one, layout_two,
+ NULL, NULL,
&aligned_area->width, &aligned_area->height,
cell_area,
&x_offset_1, &x_offset_2, &y_offset);
@@ -490,9 +487,6 @@ gd_two_lines_renderer_get_aligned_area (GtkCellRenderer *cell,
aligned_area->x = cell_area->x + x_offset;
aligned_area->y = cell_area->y;
-
- g_clear_object (&layout_one);
- g_clear_object (&layout_two);
}
static void