Commit da057b56 authored by Matthias Clasen's avatar Matthias Clasen

Close an api gap in tooltips

svn path=/trunk/; revision=19175
parent 22e10208
2007-12-14 Matthias Clasen <mclasen@redhat.com>
* gtk/gtk.symbols:
* gtk/gtktooltip.[hc]: Add gtk_tooltip_set_icon_from_icon_name().
2007-12-14 Kristian Rietveld <kris@imendio.com>
* gtk/tests/liststore.c:
......
......@@ -4181,6 +4181,7 @@ gtk_tooltip_set_markup
gtk_tooltip_set_text
gtk_tooltip_set_icon
gtk_tooltip_set_icon_from_stock
gtk_tooltip_set_icon_from_icon_name
gtk_tooltip_set_custom
gtk_tooltip_trigger_tooltip_query
gtk_tooltip_set_tip_area
......
......@@ -4103,6 +4103,7 @@ gtk_tooltip_get_type G_GNUC_CONST
gtk_tooltip_set_custom
gtk_tooltip_set_icon
gtk_tooltip_set_icon_from_stock
gtk_tooltip_set_icon_from_icon_name
gtk_tooltip_set_markup
gtk_tooltip_set_text
gtk_tooltip_set_tip_area
......
......@@ -274,7 +274,7 @@ gtk_tooltip_set_icon (GtkTooltip *tooltip,
/**
* gtk_tooltip_set_icon_from_stock:
* @tooltip: a #GtkTooltip
* @stock_id: a stock icon name, or %NULL
* @stock_id: a stock id, or %NULL
* @size: a stock icon size
*
* Sets the icon of the tooltip (which is in front of the text) to be
......@@ -298,6 +298,33 @@ gtk_tooltip_set_icon_from_stock (GtkTooltip *tooltip,
gtk_widget_hide (tooltip->image);
}
/**
* gtk_tooltip_set_icon_from_icon_name:
* @tooltip: a #GtkTooltip
* @icon_name: an icon name, or %NULL
* @size: a stock icon size
*
* Sets the icon of the tooltip (which is in front of the text) to be
* the icon indicated by @icon_name with the size indicated
* by @size. If @icon_name is %NULL, the image will be hidden.
*
* Since: 2.16
*/
void
gtk_tooltip_set_icon_from_icon_name(GtkTooltip *tooltip,
const gchar *icon_name,
GtkIconSize size)
{
g_return_if_fail (GTK_IS_TOOLTIP (tooltip));
gtk_image_set_from_icon_name (GTK_IMAGE (tooltip->image), icon_name, size);
if (icon_name)
gtk_widget_show (tooltip->image);
else
gtk_widget_hide (tooltip->image);
}
/**
* gtk_tooltip_set_custom:
* @tooltip: a #GtkTooltip
......
......@@ -42,6 +42,9 @@ void gtk_tooltip_set_icon (GtkTooltip *tooltip,
void gtk_tooltip_set_icon_from_stock (GtkTooltip *tooltip,
const gchar *stock_id,
GtkIconSize size);
void gtk_tooltip_set_icon_from_icon_name (GtkTooltip *tooltip,
const gchar *icon_name,
GtkIconSize size);
void gtk_tooltip_set_custom (GtkTooltip *tooltip,
GtkWidget *custom_widget);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment