Mercurial > pidgin
changeset 29841:f3a573191e43
Disable thumbnails for XMPP (in si.c) by using an #define
This is a temporary measure until XEP 0264 gets draft status.
author | Marcus Lundblad <ml@update.uu.se> |
---|---|
date | Wed, 28 Apr 2010 19:26:58 +0000 |
parents | 2a1e4a000e87 |
children | 4eb6ac47f01f |
files | libpurple/protocols/jabber/si.c |
diffstat | 1 files changed, 12 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/si.c Tue Apr 27 20:37:15 2010 +0000 +++ b/libpurple/protocols/jabber/si.c Wed Apr 28 19:26:58 2010 +0000 @@ -40,6 +40,7 @@ #include "si.h" #define STREAMHOST_CONNECT_TIMEOUT 15 +#define ENABLE_FT_THUMBNAILS 0 typedef struct _JabberSIXfer { JabberStream *js; @@ -1247,11 +1248,13 @@ JabberIq *iq; xmlnode *si, *file, *feature, *x, *field, *option, *value; char buf[32]; +#if ENABLE_FT_THUMBNAILS gconstpointer thumb; gsize thumb_size; + purple_xfer_prepare_thumbnail(xfer, "jpeg,png"); +#endif xfer->filename = g_path_get_basename(xfer->local_filename); - purple_xfer_prepare_thumbnail(xfer, "jpeg,png"); iq = jabber_iq_new(jsx->js, JABBER_IQ_SET); xmlnode_set_attrib(iq->node, "to", xfer->who); @@ -1270,6 +1273,7 @@ xmlnode_set_attrib(file, "size", buf); /* maybe later we'll do hash and date attribs */ +#if ENABLE_FT_THUMBNAILS /* add thumbnail, if appropriate */ if ((thumb = purple_xfer_get_thumbnail(xfer, &thumb_size))) { const gchar *mimetype = purple_xfer_get_thumbnail_mimetype(xfer); @@ -1284,6 +1288,7 @@ /* cache data */ jabber_data_associate_local(thumbnail_data, NULL); } +#endif feature = xmlnode_new_child(si, "feature"); xmlnode_set_namespace(feature, "http://jabber.org/protocol/feature-neg"); @@ -1663,6 +1668,7 @@ purple_xfer_request(xfer); } +#if ENABLE_FT_THUMBNAILS static void jabber_si_thumbnail_cb(JabberData *data, gchar *alt, gpointer userdata) { @@ -1677,6 +1683,7 @@ purple_xfer_request(xfer); } +#endif void jabber_si_parse(JabberStream *js, const char *from, JabberIqType type, const char *id, xmlnode *si) @@ -1768,6 +1775,7 @@ js->file_transfers = g_list_append(js->file_transfers, xfer); +#if ENABLE_FT_THUMBNAILS /* if there is a thumbnail, we should request it... */ if ((thumbnail = xmlnode_get_child_with_namespace(file, "thumbnail", NS_THUMBS))) { @@ -1781,6 +1789,9 @@ } else { purple_xfer_request(xfer); } +#else + purple_xfer_request(xfer); +#endif } void