mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-03 17:21:11 +00:00
window: Inline function into only caller
This commit is contained in:
parent
9b91041025
commit
057144cfdd
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user