tooltips: Make icon a paintable
authorBenjamin Otte <otte@redhat.com>
Fri, 16 Mar 2018 02:38:50 +0000 (03:38 +0100)
committerBenjamin Otte <otte@redhat.com>
Fri, 16 Mar 2018 05:04:44 +0000 (06:04 +0100)
gtk/gtktooltip.c
gtk/gtktooltip.h
gtk/gtktooltipwindow.c
gtk/gtktooltipwindowprivate.h

index 6d9c6e3a94dae423d2eb61f0e1ac81b12ce91764..99b8ac736e5874363d551dfa725e7d038ece51d7 100644 (file)
@@ -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);
 }
 
 /**
index 1c826d5b4ab59af09a262f11f7c44eb15b0e8a30..b5c634d8ecddc906c534c5ee4dc87ea75cf8ea66 100644 (file)
@@ -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);
index 18bcca3bc4256b0da41a190d0a3134f8b3a7db15..8fcb2a44a6fefb5964042a0a5fc018693bd8706f 100644 (file)
@@ -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
index 527c3499961d926b6d7120c9167e84557ea6665e..ad26f8dd925aba85f19cb677f6d32251cda4bba3 100644 (file)
@@ -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,