tooltips: Remove GtkIconSize usage

This commit is contained in:
Benjamin Otte 2017-01-20 02:02:44 +01:00 committed by Matthias Clasen
parent 129dc7d73b
commit 8df61992d7
5 changed files with 13 additions and 26 deletions

View File

@ -296,7 +296,6 @@ gtk_tooltip_set_icon (GtkTooltip *tooltip,
* gtk_tooltip_set_icon_from_icon_name:
* @tooltip: a #GtkTooltip
* @icon_name: (allow-none): an icon name, or %NULL
* @size: (type int): a stock icon size (#GtkIconSize)
*
* 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
@ -306,21 +305,18 @@ gtk_tooltip_set_icon (GtkTooltip *tooltip,
*/
void
gtk_tooltip_set_icon_from_icon_name (GtkTooltip *tooltip,
const gchar *icon_name,
GtkIconSize size)
const gchar *icon_name)
{
g_return_if_fail (GTK_IS_TOOLTIP (tooltip));
gtk_tooltip_window_set_image_icon_from_name (GTK_TOOLTIP_WINDOW (tooltip->window),
icon_name,
size);
icon_name);
}
/**
* gtk_tooltip_set_icon_from_gicon:
* @tooltip: a #GtkTooltip
* @gicon: (allow-none): a #GIcon representing the icon, or %NULL
* @size: (type int): a stock icon size (#GtkIconSize)
*
* Sets the icon of the tooltip (which is in front of the text)
* to be the icon indicated by @gicon with the size indicated
@ -330,14 +326,12 @@ gtk_tooltip_set_icon_from_icon_name (GtkTooltip *tooltip,
*/
void
gtk_tooltip_set_icon_from_gicon (GtkTooltip *tooltip,
GIcon *gicon,
GtkIconSize size)
GIcon *gicon)
{
g_return_if_fail (GTK_IS_TOOLTIP (tooltip));
gtk_tooltip_window_set_image_icon_from_gicon (GTK_TOOLTIP_WINDOW (tooltip->window),
gicon,
size);
gicon);
}
/**

View File

@ -46,12 +46,10 @@ void gtk_tooltip_set_icon (GtkTooltip *tooltip,
GdkPixbuf *pixbuf);
GDK_AVAILABLE_IN_ALL
void gtk_tooltip_set_icon_from_icon_name (GtkTooltip *tooltip,
const gchar *icon_name,
GtkIconSize size);
const gchar *icon_name);
GDK_AVAILABLE_IN_ALL
void gtk_tooltip_set_icon_from_gicon (GtkTooltip *tooltip,
GIcon *gicon,
GtkIconSize size);
GIcon *gicon);
GDK_AVAILABLE_IN_ALL
void gtk_tooltip_set_custom (GtkTooltip *tooltip,
GtkWidget *custom_widget);

View File

@ -137,12 +137,11 @@ gtk_tooltip_window_set_image_icon (GtkTooltipWindow *window,
void
gtk_tooltip_window_set_image_icon_from_name (GtkTooltipWindow *window,
const char *icon_name,
GtkIconSize icon_size)
const char *icon_name)
{
if (icon_name)
{
gtk_image_set_from_icon_name (GTK_IMAGE (window->image), icon_name, icon_size);
gtk_image_set_from_icon_name (GTK_IMAGE (window->image), icon_name, GTK_ICON_SIZE_MENU);
gtk_widget_show (window->image);
}
else
@ -153,12 +152,11 @@ gtk_tooltip_window_set_image_icon_from_name (GtkTooltipWindow *window,
void
gtk_tooltip_window_set_image_icon_from_gicon (GtkTooltipWindow *window,
GIcon *gicon,
GtkIconSize icon_size)
GIcon *gicon)
{
if (gicon != NULL)
{
gtk_image_set_from_gicon (GTK_IMAGE (window->image), gicon, icon_size);
gtk_image_set_from_gicon (GTK_IMAGE (window->image), gicon, GTK_ICON_SIZE_MENU);
gtk_widget_show (window->image);
}
else

View File

@ -44,11 +44,9 @@ void gtk_tooltip_window_set_label_text (GtkTooltipWindo
void gtk_tooltip_window_set_image_icon (GtkTooltipWindow *window,
GdkPixbuf *pixbuf);
void gtk_tooltip_window_set_image_icon_from_name (GtkTooltipWindow *window,
const char *icon_name,
GtkIconSize icon_size);
const char *icon_name);
void gtk_tooltip_window_set_image_icon_from_gicon (GtkTooltipWindow *window,
GIcon *gicon,
GtkIconSize icon_size);
GIcon *gicon);
void gtk_tooltip_window_set_custom_widget (GtkTooltipWindow *window,
GtkWidget *custom_widget);

View File

@ -64,8 +64,7 @@ query_tooltip_cb (GtkWidget *widget,
gpointer data)
{
gtk_tooltip_set_markup (tooltip, gtk_button_get_label (GTK_BUTTON (widget)));
gtk_tooltip_set_icon_from_icon_name (tooltip, "edit-delete",
GTK_ICON_SIZE_MENU);
gtk_tooltip_set_icon_from_icon_name (tooltip, "edit-delete");
return TRUE;
}