diff options
author | Timm Bäder <mail@baedert.org> | 2017-10-08 10:49:28 +0200 |
---|---|---|
committer | Timm Bäder <mail@baedert.org> | 2017-10-10 09:49:35 +0200 |
commit | 4a03e86d4fb05a0cc2d70d03aa02b799dab03af6 (patch) | |
tree | 0bb3539ce20f414ae499fa49c57b4de4206dfabc /gtk/gtktextdisplay.c | |
parent | b994cac6ddb313d25aa4f2cf99900a3f45db10a7 (diff) | |
download | gtk+-4a03e86d4fb05a0cc2d70d03aa02b799dab03af6.tar.gz |
textdisplay: Remove widgets parameter from gtk_text_layout_draw
All calls in gtk+ were passing NULL anyway.
Diffstat (limited to 'gtk/gtktextdisplay.c')
-rw-r--r-- | gtk/gtktextdisplay.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/gtk/gtktextdisplay.c b/gtk/gtktextdisplay.c index c6e28e4cec..8c1009625c 100644 --- a/gtk/gtktextdisplay.c +++ b/gtk/gtktextdisplay.c @@ -504,11 +504,10 @@ text_renderer_begin (GtkTextRenderer *text_renderer, /* Returns a GSList of (referenced) widgets encountered while drawing. */ -static GList * +static void text_renderer_end (GtkTextRenderer *text_renderer) { GtkStyleContext *context; - GList *widgets = text_renderer->widgets; cairo_restore (text_renderer->cr); @@ -519,15 +518,11 @@ text_renderer_end (GtkTextRenderer *text_renderer) text_renderer->widget = NULL; text_renderer->cr = NULL; - text_renderer->widgets = NULL; - if (text_renderer->error_color) { gdk_rgba_free (text_renderer->error_color); text_renderer->error_color = NULL; } - - return widgets; } static cairo_region_t * @@ -818,8 +813,7 @@ get_text_renderer (void) void gtk_text_layout_draw (GtkTextLayout *layout, GtkWidget *widget, - cairo_t *cr, - GList **widgets) + cairo_t *cr) { GtkStyleContext *context; gint offset_y; @@ -828,7 +822,6 @@ gtk_text_layout_draw (GtkTextLayout *layout, gboolean have_selection; GSList *line_list; GSList *tmp_list; - GList *tmp_widgets; GdkRectangle clip; g_return_if_fail (GTK_IS_TEXT_LAYOUT (layout)); @@ -932,12 +925,7 @@ gtk_text_layout_draw (GtkTextLayout *layout, } gtk_text_layout_wrap_loop_end (layout); - - tmp_widgets = text_renderer_end (text_renderer); - if (widgets) - *widgets = tmp_widgets; - else - g_list_free_full (tmp_widgets, g_object_unref); + text_renderer_end (text_renderer); g_slist_free (line_list); } |