From: Benjamin Otte Date: Fri, 16 Mar 2018 02:38:50 +0000 (+0100) Subject: tooltips: Make icon a paintable X-Git-Tag: archive/raspbian/4.4.1+ds1-2+rpi1^2~18^2~22^2~945 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=bcf1aa7cb2cc019144bbe405976aad59d08126c1;p=gtk4.git tooltips: Make icon a paintable --- diff --git a/gtk/gtktooltip.c b/gtk/gtktooltip.c index 6d9c6e3a94..99b8ac736e 100644 --- a/gtk/gtktooltip.c +++ b/gtk/gtktooltip.c @@ -264,19 +264,19 @@ gtk_tooltip_set_text (GtkTooltip *tooltip, /** * gtk_tooltip_set_icon: * @tooltip: a #GtkTooltip - * @texture: (allow-none): a #GdkTexture, or %NULL + * @paintable: (allow-none): a #GdkPaintable, or %NULL * * Sets the icon of the tooltip (which is in front of the text) to be - * @texture. If @texure is %NULL, the image will be hidden. + * @paintable. If @paintable is %NULL, the image will be hidden. */ void -gtk_tooltip_set_icon (GtkTooltip *tooltip, - GdkTexture *texture) +gtk_tooltip_set_icon (GtkTooltip *tooltip, + GdkPaintable *paintable) { g_return_if_fail (GTK_IS_TOOLTIP (tooltip)); - g_return_if_fail (texture == NULL || GDK_IS_TEXTURE (texture)); + g_return_if_fail (paintable == NULL || GDK_IS_PAINTABLE (paintable)); - gtk_tooltip_window_set_image_icon (GTK_TOOLTIP_WINDOW (tooltip->window), texture); + gtk_tooltip_window_set_image_icon (GTK_TOOLTIP_WINDOW (tooltip->window), paintable); } /** diff --git a/gtk/gtktooltip.h b/gtk/gtktooltip.h index 1c826d5b4a..b5c634d8ec 100644 --- a/gtk/gtktooltip.h +++ b/gtk/gtktooltip.h @@ -43,7 +43,7 @@ void gtk_tooltip_set_text (GtkTooltip *tooltip, const gchar *text); GDK_AVAILABLE_IN_ALL void gtk_tooltip_set_icon (GtkTooltip *tooltip, - GdkTexture *texture); + GdkPaintable *paintable); GDK_AVAILABLE_IN_ALL void gtk_tooltip_set_icon_from_icon_name (GtkTooltip *tooltip, const gchar *icon_name); diff --git a/gtk/gtktooltipwindow.c b/gtk/gtktooltipwindow.c index 18bcca3bc4..8fcb2a44a6 100644 --- a/gtk/gtktooltipwindow.c +++ b/gtk/gtktooltipwindow.c @@ -121,12 +121,12 @@ gtk_tooltip_window_set_label_text (GtkTooltipWindow *window, void gtk_tooltip_window_set_image_icon (GtkTooltipWindow *window, - GdkTexture *texture) + GdkPaintable *paintable) { - if (texture != NULL) + if (paintable != NULL) { - gtk_image_set_from_texture (GTK_IMAGE (window->image), texture); + gtk_image_set_from_paintable (GTK_IMAGE (window->image), paintable); gtk_widget_show (window->image); } else diff --git a/gtk/gtktooltipwindowprivate.h b/gtk/gtktooltipwindowprivate.h index 527c349996..ad26f8dd92 100644 --- a/gtk/gtktooltipwindowprivate.h +++ b/gtk/gtktooltipwindowprivate.h @@ -42,7 +42,7 @@ void gtk_tooltip_window_set_label_markup (GtkTooltipWindo void gtk_tooltip_window_set_label_text (GtkTooltipWindow *window, const char *text); void gtk_tooltip_window_set_image_icon (GtkTooltipWindow *window, - GdkTexture *texture); + GdkPaintable *paintable); void gtk_tooltip_window_set_image_icon_from_name (GtkTooltipWindow *window, const char *icon_name); void gtk_tooltip_window_set_image_icon_from_gicon (GtkTooltipWindow *window,