forked from AuroraMiddleware/gtk
textdisplay: Remove widgets parameter from gtk_text_layout_draw
All calls in gtk+ were passing NULL anyway.
This commit is contained in:
parent
b994cac6dd
commit
4a03e86d4f
@ -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);
|
||||
}
|
||||
|
@ -88,13 +88,11 @@ G_BEGIN_DECLS
|
||||
* widget - Widget to grab some style info from
|
||||
* cr - Context to render to, matrix set so that (0, 0)
|
||||
* is the top left of the layout
|
||||
* widgets - list of widgets that need exposing
|
||||
*/
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gtk_text_layout_draw (GtkTextLayout *layout,
|
||||
GtkWidget *widget,
|
||||
cairo_t *cr,
|
||||
GList **widgets);
|
||||
cairo_t *cr);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
@ -350,7 +350,7 @@ _gtk_text_util_create_rich_drag_icon (GtkWidget *widget,
|
||||
|
||||
cr = cairo_create (surface);
|
||||
|
||||
gtk_text_layout_draw (layout, widget, cr, NULL);
|
||||
gtk_text_layout_draw (layout, widget, cr);
|
||||
|
||||
cairo_destroy (cr);
|
||||
g_object_unref (layout);
|
||||
|
@ -5804,8 +5804,7 @@ gtk_text_view_paint (GtkWidget *widget,
|
||||
|
||||
gtk_text_layout_draw (priv->layout,
|
||||
widget,
|
||||
cr,
|
||||
NULL);
|
||||
cr);
|
||||
|
||||
cairo_restore (cr);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user