aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/notifications.vala
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2018-01-16 16:17:42 +0100
committerfiaxh <git@mx.ax.lt>2018-01-28 00:38:47 +0100
commitca331e85efe2a74a6b9b5a5ff0fbcd10a36758ce (patch)
tree9c8f9487904b8f59fc7edfc658e64914e4eac579 /main/src/ui/notifications.vala
parent03a349bfafe7e65abdbb692707e3361a9fdc57f4 (diff)
downloaddino-ca331e85efe2a74a6b9b5a5ff0fbcd10a36758ce.tar.gz
dino-ca331e85efe2a74a6b9b5a5ff0fbcd10a36758ce.zip
Render avatar on demand
Diffstat (limited to 'main/src/ui/notifications.vala')
-rw-r--r--main/src/ui/notifications.vala3
1 files changed, 2 insertions, 1 deletions
diff --git a/main/src/ui/notifications.vala b/main/src/ui/notifications.vala
index d9f70668..246452ea 100644
--- a/main/src/ui/notifications.vala
+++ b/main/src/ui/notifications.vala
@@ -96,7 +96,8 @@ public class Notifications : Object {
return true;
}
- private Icon get_pixbuf_icon(Gdk.Pixbuf avatar) throws Error {
+ private Icon get_pixbuf_icon(Cairo.ImageSurface surface) throws Error {
+ Gdk.Pixbuf avatar = Gdk.pixbuf_get_from_surface(surface, 0, 0, surface.get_width(), surface.get_height());
uint8[] buffer;
avatar.save_to_buffer(out buffer, "png");
return new BytesIcon(new Bytes(buffer));