window: Inline function into only caller

This commit is contained in:
Timm Bäder 2018-12-30 07:22:44 +01:00 committed by Matthias Clasen
parent 9b91041025
commit 057144cfdd

View File

@ -4562,16 +4562,22 @@ gtk_window_realize_icon (GtkWindow *window)
}
}
static GdkTexture *
icon_from_name (const gchar *name,
gint size)
GdkTexture *
gtk_window_get_icon_for_size (GtkWindow *window,
int size)
{
const char *name;
GtkIconInfo *info;
GdkTexture *texture;
name = gtk_window_get_icon_name (window);
if (!name)
name = default_icon_name;
info = gtk_icon_theme_lookup_icon (gtk_icon_theme_get_default (),
name, size,
GTK_ICON_LOOKUP_FORCE_SIZE);
name, size,
GTK_ICON_LOOKUP_FORCE_SIZE);
if (info == NULL)
return NULL;
@ -4581,22 +4587,6 @@ icon_from_name (const gchar *name,
return texture;
}
GdkTexture *
gtk_window_get_icon_for_size (GtkWindow *window,
int size)
{
const gchar *name;
name = gtk_window_get_icon_name (window);
if (name != NULL)
return icon_from_name (name, size);
if (default_icon_name != NULL)
return icon_from_name (default_icon_name, size);
return NULL;
}
static void
gtk_window_unrealize_icon (GtkWindow *window)
{