forked from AuroraMiddleware/gtk
tooltips: Remove GtkIconSize usage
This commit is contained in:
parent
129dc7d73b
commit
8df61992d7
@ -296,7 +296,6 @@ gtk_tooltip_set_icon (GtkTooltip *tooltip,
|
|||||||
* gtk_tooltip_set_icon_from_icon_name:
|
* gtk_tooltip_set_icon_from_icon_name:
|
||||||
* @tooltip: a #GtkTooltip
|
* @tooltip: a #GtkTooltip
|
||||||
* @icon_name: (allow-none): an icon name, or %NULL
|
* @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
|
* 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
|
* the icon indicated by @icon_name with the size indicated
|
||||||
@ -306,21 +305,18 @@ gtk_tooltip_set_icon (GtkTooltip *tooltip,
|
|||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_tooltip_set_icon_from_icon_name (GtkTooltip *tooltip,
|
gtk_tooltip_set_icon_from_icon_name (GtkTooltip *tooltip,
|
||||||
const gchar *icon_name,
|
const gchar *icon_name)
|
||||||
GtkIconSize size)
|
|
||||||
{
|
{
|
||||||
g_return_if_fail (GTK_IS_TOOLTIP (tooltip));
|
g_return_if_fail (GTK_IS_TOOLTIP (tooltip));
|
||||||
|
|
||||||
gtk_tooltip_window_set_image_icon_from_name (GTK_TOOLTIP_WINDOW (tooltip->window),
|
gtk_tooltip_window_set_image_icon_from_name (GTK_TOOLTIP_WINDOW (tooltip->window),
|
||||||
icon_name,
|
icon_name);
|
||||||
size);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_tooltip_set_icon_from_gicon:
|
* gtk_tooltip_set_icon_from_gicon:
|
||||||
* @tooltip: a #GtkTooltip
|
* @tooltip: a #GtkTooltip
|
||||||
* @gicon: (allow-none): a #GIcon representing the icon, or %NULL
|
* @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)
|
* Sets the icon of the tooltip (which is in front of the text)
|
||||||
* to be the icon indicated by @gicon with the size indicated
|
* 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
|
void
|
||||||
gtk_tooltip_set_icon_from_gicon (GtkTooltip *tooltip,
|
gtk_tooltip_set_icon_from_gicon (GtkTooltip *tooltip,
|
||||||
GIcon *gicon,
|
GIcon *gicon)
|
||||||
GtkIconSize size)
|
|
||||||
{
|
{
|
||||||
g_return_if_fail (GTK_IS_TOOLTIP (tooltip));
|
g_return_if_fail (GTK_IS_TOOLTIP (tooltip));
|
||||||
|
|
||||||
gtk_tooltip_window_set_image_icon_from_gicon (GTK_TOOLTIP_WINDOW (tooltip->window),
|
gtk_tooltip_window_set_image_icon_from_gicon (GTK_TOOLTIP_WINDOW (tooltip->window),
|
||||||
gicon,
|
gicon);
|
||||||
size);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -46,12 +46,10 @@ void gtk_tooltip_set_icon (GtkTooltip *tooltip,
|
|||||||
GdkPixbuf *pixbuf);
|
GdkPixbuf *pixbuf);
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
void gtk_tooltip_set_icon_from_icon_name (GtkTooltip *tooltip,
|
void gtk_tooltip_set_icon_from_icon_name (GtkTooltip *tooltip,
|
||||||
const gchar *icon_name,
|
const gchar *icon_name);
|
||||||
GtkIconSize size);
|
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
void gtk_tooltip_set_icon_from_gicon (GtkTooltip *tooltip,
|
void gtk_tooltip_set_icon_from_gicon (GtkTooltip *tooltip,
|
||||||
GIcon *gicon,
|
GIcon *gicon);
|
||||||
GtkIconSize size);
|
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
void gtk_tooltip_set_custom (GtkTooltip *tooltip,
|
void gtk_tooltip_set_custom (GtkTooltip *tooltip,
|
||||||
GtkWidget *custom_widget);
|
GtkWidget *custom_widget);
|
||||||
|
@ -137,12 +137,11 @@ gtk_tooltip_window_set_image_icon (GtkTooltipWindow *window,
|
|||||||
|
|
||||||
void
|
void
|
||||||
gtk_tooltip_window_set_image_icon_from_name (GtkTooltipWindow *window,
|
gtk_tooltip_window_set_image_icon_from_name (GtkTooltipWindow *window,
|
||||||
const char *icon_name,
|
const char *icon_name)
|
||||||
GtkIconSize icon_size)
|
|
||||||
{
|
{
|
||||||
if (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);
|
gtk_widget_show (window->image);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -153,12 +152,11 @@ gtk_tooltip_window_set_image_icon_from_name (GtkTooltipWindow *window,
|
|||||||
|
|
||||||
void
|
void
|
||||||
gtk_tooltip_window_set_image_icon_from_gicon (GtkTooltipWindow *window,
|
gtk_tooltip_window_set_image_icon_from_gicon (GtkTooltipWindow *window,
|
||||||
GIcon *gicon,
|
GIcon *gicon)
|
||||||
GtkIconSize icon_size)
|
|
||||||
{
|
{
|
||||||
if (gicon != NULL)
|
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);
|
gtk_widget_show (window->image);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -44,11 +44,9 @@ void gtk_tooltip_window_set_label_text (GtkTooltipWindo
|
|||||||
void gtk_tooltip_window_set_image_icon (GtkTooltipWindow *window,
|
void gtk_tooltip_window_set_image_icon (GtkTooltipWindow *window,
|
||||||
GdkPixbuf *pixbuf);
|
GdkPixbuf *pixbuf);
|
||||||
void gtk_tooltip_window_set_image_icon_from_name (GtkTooltipWindow *window,
|
void gtk_tooltip_window_set_image_icon_from_name (GtkTooltipWindow *window,
|
||||||
const char *icon_name,
|
const char *icon_name);
|
||||||
GtkIconSize icon_size);
|
|
||||||
void gtk_tooltip_window_set_image_icon_from_gicon (GtkTooltipWindow *window,
|
void gtk_tooltip_window_set_image_icon_from_gicon (GtkTooltipWindow *window,
|
||||||
GIcon *gicon,
|
GIcon *gicon);
|
||||||
GtkIconSize icon_size);
|
|
||||||
void gtk_tooltip_window_set_custom_widget (GtkTooltipWindow *window,
|
void gtk_tooltip_window_set_custom_widget (GtkTooltipWindow *window,
|
||||||
GtkWidget *custom_widget);
|
GtkWidget *custom_widget);
|
||||||
|
|
||||||
|
@ -64,8 +64,7 @@ query_tooltip_cb (GtkWidget *widget,
|
|||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
gtk_tooltip_set_markup (tooltip, gtk_button_get_label (GTK_BUTTON (widget)));
|
gtk_tooltip_set_markup (tooltip, gtk_button_get_label (GTK_BUTTON (widget)));
|
||||||
gtk_tooltip_set_icon_from_icon_name (tooltip, "edit-delete",
|
gtk_tooltip_set_icon_from_icon_name (tooltip, "edit-delete");
|
||||||
GTK_ICON_SIZE_MENU);
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user