[gtk+/wip/matthiasc/icon-size: 2/15] tooltips: Remove GtkIconSize usage
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/matthiasc/icon-size: 2/15] tooltips: Remove GtkIconSize usage
- Date: Wed, 15 Nov 2017 04:34:03 +0000 (UTC)
commit 5f5edb78e5d8be4d4a1bab81ca685ed3dd312518
Author: Benjamin Otte <otte redhat com>
Date: Fri Jan 20 02:02:44 2017 +0100
tooltips: Remove GtkIconSize usage
gtk/gtktooltip.c | 14 ++++----------
gtk/gtktooltip.h | 6 ++----
gtk/gtktooltipwindow.c | 10 ++++------
gtk/gtktooltipwindowprivate.h | 6 ++----
tests/testtooltips.c | 3 +--
5 files changed, 13 insertions(+), 26 deletions(-)
---
diff --git a/gtk/gtktooltip.c b/gtk/gtktooltip.c
index 6112ef0..81cba1d 100644
--- a/gtk/gtktooltip.c
+++ b/gtk/gtktooltip.c
@@ -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);
}
/**
diff --git a/gtk/gtktooltip.h b/gtk/gtktooltip.h
index 3c4140d..c6a129f 100644
--- a/gtk/gtktooltip.h
+++ b/gtk/gtktooltip.h
@@ -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);
diff --git a/gtk/gtktooltipwindow.c b/gtk/gtktooltipwindow.c
index 6aeb31c..6a8aa52 100644
--- a/gtk/gtktooltipwindow.c
+++ b/gtk/gtktooltipwindow.c
@@ -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
diff --git a/gtk/gtktooltipwindowprivate.h b/gtk/gtktooltipwindowprivate.h
index 5389bfd..35e9f6e 100644
--- a/gtk/gtktooltipwindowprivate.h
+++ b/gtk/gtktooltipwindowprivate.h
@@ -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);
diff --git a/tests/testtooltips.c b/tests/testtooltips.c
index 5034553..25485ac 100644
--- a/tests/testtooltips.c
+++ b/tests/testtooltips.c
@@ -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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]