Philipp Hörist pushed to branch master at gajim / gajim
Commits:
c9dc7133 by lovetox at 2022-04-04T18:06:17+02:00
fix: Notifications: Convert avatar correctly
Fixes #10813
- - - - -
1 changed file:
- gajim/gtk/notification.py
Changes:
=====================================
gajim/gtk/notification.py
=====================================
@@ -372,11 +372,13 @@ def _make_notification_id(self,
def _get_avatar_for_notification(account: str,
jid: Union[JID, str]) -> GdkPixbuf.Pixbuf:
scale = get_monitor_scale_factor()
+ size = AvatarSize.NOTIFICATION
client = app.get_client(account)
contact = client.get_module('Contacts').get_contact(jid)
- return contact.get_avatar(AvatarSize.NOTIFICATION,
- scale,
- pixbuf=True)
+ avatar_surface = contact.get_avatar(size, scale)
+ pixbuf = Gdk.pixbuf_get_from_surface(avatar_surface, 0, 0, size, size)
+ assert pixbuf is not None
+ return pixbuf
def _make_icon(self, event: events.Notification) -> Gio.Icon:
if (event.type == 'incoming-message' and app.desktop_env == 'gnome'):
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/c9dc71334b29277fc59f568ffd27ad9fb4f43998
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/c9dc71334b29277fc59f568ffd27ad9fb4f43998
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits