summaryrefslogtreecommitdiff
path: root/src/contacts-avatar-dialog.vala
diff options
context:
space:
mode:
authorPhilip Withnall <philip@tecnocode.co.uk>2013-08-04 10:57:25 +0200
committerPhilip Withnall <philip@tecnocode.co.uk>2013-08-09 20:47:13 +0200
commitdb219966e99a5c6416f53ff8fa005853c7195643 (patch)
tree15a340c3d45e1bf47eca91d7b0082931f3eadf44 /src/contacts-avatar-dialog.vala
parentab0bba0f2a6d7eeb1c125e6abb7c69ec5fca88df (diff)
downloadgnome-contacts-db219966e99a5c6416f53ff8fa005853c7195643.tar.gz
Bug 705431 — Replace MemoryIcon with GBytesIcon
This bumps the GLib dependency to 2.37.6. Closes: https://bugzilla.gnome.org/show_bug.cgi?id=705431
Diffstat (limited to 'src/contacts-avatar-dialog.vala')
-rw-r--r--src/contacts-avatar-dialog.vala9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/contacts-avatar-dialog.vala b/src/contacts-avatar-dialog.vala
index 70620a4..c80b7bb 100644
--- a/src/contacts-avatar-dialog.vala
+++ b/src/contacts-avatar-dialog.vala
@@ -439,8 +439,13 @@ public class Contacts.AvatarDialog : Dialog {
if (response_id == ResponseType.CLOSE) {
if (new_pixbuf != null) {
try {
- var icon = new MemoryIcon.from_pixbuf (new_pixbuf);
- set_avatar (icon);
+ uint8[] buffer;
+ if (new_pixbuf.save_to_buffer (out buffer, "png", null)) {
+ var icon = new BytesIcon (new Bytes (buffer));
+ set_avatar (icon);
+ } else {
+ /* Failure. Fall through. */
+ }
} catch {
}
}