diff options
author | Marco Barisione <marco.barisione@collabora.co.uk> | 2013-07-30 16:08:34 +0100 |
---|---|---|
committer | Marco Barisione <marco.barisione@collabora.co.uk> | 2013-08-20 11:03:06 +0100 |
commit | a56fa2a95e93ad68ca08f336178b26baf3b3f29d (patch) | |
tree | 547ac5a682a4fc8c4f8281d1f1bb4e7a39ff8daa /tp-account-widgets/tpaw-avatar-chooser.c | |
parent | 3abe4df5f32c37e968d0556c755b8387d9f1f771 (diff) | |
download | telepathy-account-widgets-a56fa2a95e93ad68ca08f336178b26baf3b3f29d.tar.gz |
pixbuf-utils: copy the generic pixbuf-related utily functions from Empathy
This commit also changes the licence of the moved code from GPL to LGPL.
See GOSSIP-RELICENSING.txt for details.
https://bugzilla.gnome.org/show_bug.cgi?id=699492
Diffstat (limited to 'tp-account-widgets/tpaw-avatar-chooser.c')
-rw-r--r-- | tp-account-widgets/tpaw-avatar-chooser.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tp-account-widgets/tpaw-avatar-chooser.c b/tp-account-widgets/tpaw-avatar-chooser.c index 6a5b83b4..77d4a0b7 100644 --- a/tp-account-widgets/tpaw-avatar-chooser.c +++ b/tp-account-widgets/tpaw-avatar-chooser.c @@ -27,6 +27,7 @@ #include <tp-account-widgets/tpaw-camera-monitor.h> #include <tp-account-widgets/tpaw-gsettings.h> #include <tp-account-widgets/tpaw-images.h> +#include <tp-account-widgets/tpaw-pixbuf-utils.h> #include <tp-account-widgets/tpaw-utils.h> #ifdef HAVE_CHEESE @@ -145,7 +146,7 @@ get_avatar_cb (GObject *source, goto out; } - pixbuf = empathy_pixbuf_from_data_and_mime ((gchar *) avatar->data, + pixbuf = tpaw_pixbuf_from_data_and_mime ((gchar *) avatar->data, avatar->len, &mime_type); if (pixbuf == NULL) { @@ -725,7 +726,7 @@ avatar_chooser_set_image (TpawAvatarChooser *self, self->priv->changed = TRUE; - pixbuf_view = empathy_pixbuf_scale_down_if_necessary (pixbuf, + pixbuf_view = tpaw_pixbuf_scale_down_if_necessary (pixbuf, AVATAR_SIZE_VIEW); image = gtk_image_new_from_pixbuf (pixbuf_view); @@ -751,7 +752,7 @@ avatar_chooser_set_image_from_data (TpawAvatarChooser *self, return; } - pixbuf = empathy_pixbuf_from_data_and_mime (data, size, &mime_type); + pixbuf = tpaw_pixbuf_from_data_and_mime (data, size, &mime_type); if (pixbuf == NULL) { g_free (data); @@ -844,7 +845,7 @@ avatar_chooser_update_preview_cb (GtkFileChooser *file_chooser, if (pixbuf != NULL) { - scaled_pixbuf = empathy_pixbuf_scale_down_if_necessary (pixbuf, + scaled_pixbuf = tpaw_pixbuf_scale_down_if_necessary (pixbuf, AVATAR_SIZE_SAVE); gtk_image_set_from_pixbuf (GTK_IMAGE (image), scaled_pixbuf); |