update to upstream 2.25.1
Merge commit '49cc773eb4801fb0ee3cddeeb1d27042f4a46e2e' into clutter
This commit is contained in:
54
src/ui/ui.c
54
src/ui/ui.c
@ -591,20 +591,27 @@ meta_ui_get_default_window_icon (MetaUI *ui)
|
||||
|
||||
if (default_icon == NULL)
|
||||
{
|
||||
GdkPixbuf *base;
|
||||
GtkIconTheme *theme;
|
||||
gboolean icon_exists;
|
||||
|
||||
base = gdk_pixbuf_new_from_inline (-1, default_icon_data,
|
||||
FALSE,
|
||||
NULL);
|
||||
theme = gtk_icon_theme_get_default ();
|
||||
|
||||
g_assert (base);
|
||||
icon_exists = gtk_icon_theme_has_icon (theme, META_DEFAULT_ICON_NAME);
|
||||
|
||||
default_icon = gdk_pixbuf_scale_simple (base,
|
||||
META_ICON_WIDTH,
|
||||
META_ICON_HEIGHT,
|
||||
GDK_INTERP_BILINEAR);
|
||||
if (icon_exists)
|
||||
default_icon = gtk_icon_theme_load_icon (theme,
|
||||
META_DEFAULT_ICON_NAME,
|
||||
META_ICON_WIDTH,
|
||||
0,
|
||||
NULL);
|
||||
else
|
||||
default_icon = gtk_icon_theme_load_icon (theme,
|
||||
"gtk-missing-image",
|
||||
META_ICON_WIDTH,
|
||||
0,
|
||||
NULL);
|
||||
|
||||
g_object_unref (G_OBJECT (base));
|
||||
g_assert (default_icon);
|
||||
}
|
||||
|
||||
g_object_ref (G_OBJECT (default_icon));
|
||||
@ -619,20 +626,27 @@ meta_ui_get_default_mini_icon (MetaUI *ui)
|
||||
|
||||
if (default_icon == NULL)
|
||||
{
|
||||
GdkPixbuf *base;
|
||||
GtkIconTheme *theme;
|
||||
gboolean icon_exists;
|
||||
|
||||
base = gdk_pixbuf_new_from_inline (-1, default_icon_data,
|
||||
FALSE,
|
||||
NULL);
|
||||
theme = gtk_icon_theme_get_default ();
|
||||
|
||||
g_assert (base);
|
||||
icon_exists = gtk_icon_theme_has_icon (theme, META_DEFAULT_ICON_NAME);
|
||||
|
||||
default_icon = gdk_pixbuf_scale_simple (base,
|
||||
META_MINI_ICON_WIDTH,
|
||||
META_MINI_ICON_HEIGHT,
|
||||
GDK_INTERP_BILINEAR);
|
||||
if (icon_exists)
|
||||
default_icon = gtk_icon_theme_load_icon (theme,
|
||||
META_DEFAULT_ICON_NAME,
|
||||
META_MINI_ICON_WIDTH,
|
||||
0,
|
||||
NULL);
|
||||
else
|
||||
default_icon = gtk_icon_theme_load_icon (theme,
|
||||
"gtk-missing-image",
|
||||
META_MINI_ICON_WIDTH,
|
||||
0,
|
||||
NULL);
|
||||
|
||||
g_object_unref (G_OBJECT (base));
|
||||
g_assert (default_icon);
|
||||
}
|
||||
|
||||
g_object_ref (G_OBJECT (default_icon));
|
||||
|
Reference in New Issue
Block a user