user-accounts: Always generate user avatars

Never fallback to default-user avatar icons.

See #859
This commit is contained in:
Felipe Borges 2020-02-11 14:14:38 +01:00
parent 1fbd342fc1
commit 61dc4489de

View file

@ -39,7 +39,6 @@ render_user_icon (ActUser *user,
{
g_autoptr(GdkPixbuf) source_pixbuf = NULL;
GdkPixbuf *pixbuf = NULL;
GError *error;
const gchar *icon_file;
cairo_surface_t *surface = NULL;
@ -61,17 +60,13 @@ render_user_icon (ActUser *user,
goto out;
}
error = NULL;
pixbuf = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (),
"avatar-default",
icon_size * scale,
GTK_ICON_LOOKUP_FORCE_SIZE,
&error);
if (error) {
g_warning ("%s", error->message);
g_error_free (error);
if (source_pixbuf != NULL) {
g_object_unref (source_pixbuf);
}
source_pixbuf = generate_default_avatar (user, icon_size * scale);
if (source_pixbuf)
pixbuf = round_image (source_pixbuf);
out:
if (pixbuf != NULL) {