aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-11-11 23:27:58 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-11-11 23:27:58 +0800
commitb3909bd20099b02b3f9d4a3ba0cc4cfd477152e5 (patch)
treebc2b3bd1a21645c33c1a800df1552d1af6be1e40 /libempathy-gtk
parentc6b2c7532181d69001c97edeb6e0b39d76298f76 (diff)
downloadgsoc2013-empathy-b3909bd20099b02b3f9d4a3ba0cc4cfd477152e5.tar
gsoc2013-empathy-b3909bd20099b02b3f9d4a3ba0cc4cfd477152e5.tar.gz
gsoc2013-empathy-b3909bd20099b02b3f9d4a3ba0cc4cfd477152e5.tar.bz2
gsoc2013-empathy-b3909bd20099b02b3f9d4a3ba0cc4cfd477152e5.tar.lz
gsoc2013-empathy-b3909bd20099b02b3f9d4a3ba0cc4cfd477152e5.tar.xz
gsoc2013-empathy-b3909bd20099b02b3f9d4a3ba0cc4cfd477152e5.tar.zst
gsoc2013-empathy-b3909bd20099b02b3f9d4a3ba0cc4cfd477152e5.zip
Add empathy_pixbuf_from_data_and_mime instead of breaking API.
svn path=/trunk/; revision=1706
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-avatar-chooser.c6
-rw-r--r--libempathy-gtk/empathy-avatar-image.c2
-rw-r--r--libempathy-gtk/empathy-ui-utils.c13
-rw-r--r--libempathy-gtk/empathy-ui-utils.h2
4 files changed, 17 insertions, 6 deletions
diff --git a/libempathy-gtk/empathy-avatar-chooser.c b/libempathy-gtk/empathy-avatar-chooser.c
index e016f1d13..8a81c3d8b 100644
--- a/libempathy-gtk/empathy-avatar-chooser.c
+++ b/libempathy-gtk/empathy-avatar-chooser.c
@@ -521,7 +521,7 @@ avatar_chooser_set_image_from_data (EmpathyAvatarChooser *chooser,
return;
}
- pixbuf = empathy_pixbuf_from_data (data, size, &mime_type);
+ pixbuf = empathy_pixbuf_from_data_and_mime (data, size, &mime_type);
if (pixbuf == NULL) {
g_free (data);
return;
@@ -543,7 +543,9 @@ avatar_chooser_set_image_from_avatar (EmpathyAvatarChooser *chooser,
g_assert (avatar != NULL);
- pixbuf = empathy_pixbuf_from_data (avatar->data, avatar->len, &mime_type);
+ pixbuf = empathy_pixbuf_from_data_and_mime (avatar->data,
+ avatar->len,
+ &mime_type);
if (pixbuf == NULL) {
DEBUG ("couldn't make a pixbuf from avatar; giving up");
return;
diff --git a/libempathy-gtk/empathy-avatar-image.c b/libempathy-gtk/empathy-avatar-image.c
index 6b378b606..7dd93aad9 100644
--- a/libempathy-gtk/empathy-avatar-image.c
+++ b/libempathy-gtk/empathy-avatar-image.c
@@ -276,7 +276,7 @@ empathy_avatar_image_set (EmpathyAvatarImage *avatar_image,
}
if (avatar) {
- priv->pixbuf = empathy_pixbuf_from_data (avatar->data, avatar->len, NULL);
+ priv->pixbuf = empathy_pixbuf_from_data (avatar->data, avatar->len);
}
if (!priv->pixbuf) {
diff --git a/libempathy-gtk/empathy-ui-utils.c b/libempathy-gtk/empathy-ui-utils.c
index 533c39171..c7e70da34 100644
--- a/libempathy-gtk/empathy-ui-utils.c
+++ b/libempathy-gtk/empathy-ui-utils.c
@@ -245,9 +245,16 @@ empathy_icon_name_for_contact (EmpathyContact *contact)
}
GdkPixbuf *
-empathy_pixbuf_from_data (gchar *data,
- gsize data_size,
- gchar **mime_type)
+empathy_pixbuf_from_data (gchar *data,
+ gsize data_size)
+{
+ return empathy_pixbuf_from_data_and_mime (data, data_size, NULL);
+}
+
+GdkPixbuf *
+empathy_pixbuf_from_data_and_mime (gchar *data,
+ gsize data_size,
+ gchar **mime_type)
{
GdkPixbufLoader *loader;
GdkPixbufFormat *format;
diff --git a/libempathy-gtk/empathy-ui-utils.h b/libempathy-gtk/empathy-ui-utils.h
index be87b94c7..524d8eb9d 100644
--- a/libempathy-gtk/empathy-ui-utils.h
+++ b/libempathy-gtk/empathy-ui-utils.h
@@ -69,6 +69,8 @@ const gchar * empathy_icon_name_from_account (McAccount *accou
const gchar * empathy_icon_name_for_presence (McPresence presence);
const gchar * empathy_icon_name_for_contact (EmpathyContact *contact);
GdkPixbuf * empathy_pixbuf_from_data (gchar *data,
+ gsize data_size);
+GdkPixbuf * empathy_pixbuf_from_data_and_mime (gchar *data,
gsize data_size,
gchar **mime_type);
GdkPixbuf * empathy_pixbuf_from_avatar_scaled (EmpathyAvatar *avatar,