forked from AuroraMiddleware/gtk
Close an api gap in tooltips
svn path=/trunk/; revision=19175
This commit is contained in:
parent
22e102081a
commit
da057b5675
@ -1,3 +1,8 @@
|
||||
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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user