empathy r1706 - trunk/libempathy-gtk
- From: xclaesse svn gnome org
- To: svn-commits-list gnome org
- Subject: empathy r1706 - trunk/libempathy-gtk
- Date: Tue, 11 Nov 2008 15:27:59 +0000 (UTC)
Author: xclaesse
Date: Tue Nov 11 15:27:58 2008
New Revision: 1706
URL: http://svn.gnome.org/viewvc/empathy?rev=1706&view=rev
Log:
Add empathy_pixbuf_from_data_and_mime instead of breaking API.
Modified:
trunk/libempathy-gtk/empathy-avatar-chooser.c
trunk/libempathy-gtk/empathy-avatar-image.c
trunk/libempathy-gtk/empathy-ui-utils.c
trunk/libempathy-gtk/empathy-ui-utils.h
Modified: trunk/libempathy-gtk/empathy-avatar-chooser.c
==============================================================================
--- trunk/libempathy-gtk/empathy-avatar-chooser.c (original)
+++ trunk/libempathy-gtk/empathy-avatar-chooser.c Tue Nov 11 15:27:58 2008
@@ -521,7 +521,7 @@
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 @@
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;
Modified: trunk/libempathy-gtk/empathy-avatar-image.c
==============================================================================
--- trunk/libempathy-gtk/empathy-avatar-image.c (original)
+++ trunk/libempathy-gtk/empathy-avatar-image.c Tue Nov 11 15:27:58 2008
@@ -276,7 +276,7 @@
}
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) {
Modified: trunk/libempathy-gtk/empathy-ui-utils.c
==============================================================================
--- trunk/libempathy-gtk/empathy-ui-utils.c (original)
+++ trunk/libempathy-gtk/empathy-ui-utils.c Tue Nov 11 15:27:58 2008
@@ -245,9 +245,16 @@
}
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;
Modified: trunk/libempathy-gtk/empathy-ui-utils.h
==============================================================================
--- trunk/libempathy-gtk/empathy-ui-utils.h (original)
+++ trunk/libempathy-gtk/empathy-ui-utils.h Tue Nov 11 15:27:58 2008
@@ -69,6 +69,8 @@
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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]