# HG changeset patch # User Sadrul Habib Chowdhury # Date 1245631645 0 # Node ID 2967cea30d8b1acac6487cdbc4741a44d64e5243 # Parent 01f1929d0936ef0543b871feb3caf8dfbd5645bb# Parent 54de7746e14897fa1e84ebb106f2a7cb73a708fe merge of '796290d1402d75f50e27f51683443b86707c9c26' and '8740eeac007708126ac1672fb005bea399aa7f33' diff -r 01f1929d0936 -r 2967cea30d8b COPYRIGHT --- a/COPYRIGHT Sun Jun 21 16:40:15 2009 +0000 +++ b/COPYRIGHT Mon Jun 22 00:47:25 2009 +0000 @@ -332,6 +332,7 @@ Luke Petre Diego Petten Nathan Peterson +Dmitry Petroff Sebastián E. Peyrott Andrea Piccinelli Celso Pinto diff -r 01f1929d0936 -r 2967cea30d8b ChangeLog --- a/ChangeLog Sun Jun 21 16:40:15 2009 +0000 +++ b/ChangeLog Mon Jun 22 00:47:25 2009 +0000 @@ -94,6 +94,8 @@ * Support saving animated custom smileys as animated images or animated custom smileys. (Andrea Piccinelli) * Support for keyboard navigation on the status icon. (Li Yuan) + * IMG tags without 'id' attributes are turned into links to the image URL. + (Dmitry Petroff) Finch: * The hardware cursor is updated correctly. This will be useful diff -r 01f1929d0936 -r 2967cea30d8b libpurple/protocols/jabber/useravatar.c --- a/libpurple/protocols/jabber/useravatar.c Sun Jun 21 16:40:15 2009 +0000 +++ b/libpurple/protocols/jabber/useravatar.c Mon Jun 22 00:47:25 2009 +0000 @@ -257,6 +257,8 @@ gsize len, const gchar *error_message) { JabberBuddyAvatarUpdateURLInfo *info = user_data; + gpointer icon_data; + if(!url_text) { purple_debug(PURPLE_DEBUG_ERROR, "jabber", "do_buddy_avatar_update_fromurl got error \"%s\"", @@ -264,7 +266,8 @@ goto out; } - purple_buddy_icons_set_for_user(purple_connection_get_account(info->js->gc), info->from, (void*)url_text, len, info->id); + icon_data = g_memdup(url_text, len); + purple_buddy_icons_set_for_user(purple_connection_get_account(info->js->gc), info->from, icon_data, len, info->id); out: g_free(info->from); diff -r 01f1929d0936 -r 2967cea30d8b libpurple/protocols/yahoo/yahoo.c --- a/libpurple/protocols/yahoo/yahoo.c Sun Jun 21 16:40:15 2009 +0000 +++ b/libpurple/protocols/yahoo/yahoo.c Mon Jun 22 00:47:25 2009 +0000 @@ -1656,11 +1656,16 @@ } else if (len > 0 && ret_data && *ret_data) { gchar **split_data = g_strsplit(ret_data, "\r\n", -1); - int totalelements = g_strv_length(split_data); + int totalelements = 0; int response_no = -1; char *crumb = NULL; char *crypt = NULL; +#if GLIB_CHECK_VERSION(2,6,0) + totalelements = g_strv_length(split_data); +#else + while (split_data[++totalelements] != NULL); +#endif if (totalelements >= 5) { response_no = strtol(split_data[1], NULL, 10); crumb = g_strdup(split_data[2] + strlen("crumb=")); @@ -1738,10 +1743,15 @@ } else if (len > 0 && ret_data && *ret_data) { gchar **split_data = g_strsplit(ret_data, "\r\n", -1); - int totalelements = g_strv_length(split_data); + int totalelements = 0; int response_no = -1; char *token = NULL; +#if GLIB_CHECK_VERSION(2,6,0) + totalelements = g_strv_length(split_data); +#else + while (split_data[++totalelements] != NULL); +#endif if(totalelements >= 5) { response_no = strtol(split_data[1], NULL, 10); token = g_strdup(split_data[2] + strlen("ymsgr=")); diff -r 01f1929d0936 -r 2967cea30d8b pidgin/gtkimhtml.c --- a/pidgin/gtkimhtml.c Sun Jun 21 16:40:15 2009 +0000 +++ b/pidgin/gtkimhtml.c Mon Jun 22 00:47:25 2009 +0000 @@ -2996,10 +2996,21 @@ break; id = gtk_imhtml_get_html_opt(tag, "ID="); - if (!id) - break; - gtk_imhtml_insert_image_at_iter(imhtml, atoi(id), iter); - g_free(id); + if (id) { + gtk_imhtml_insert_image_at_iter(imhtml, atoi(id), iter); + g_free(id); + } else { + char *src, *alt; + src = gtk_imhtml_get_html_opt(tag, "SRC="); + alt = gtk_imhtml_get_html_opt(tag, "ALT="); + if (src) { + gtk_imhtml_toggle_link(imhtml, src); + gtk_text_buffer_insert(imhtml->text_buffer, iter, alt ? alt : src, -1); + gtk_imhtml_toggle_link(imhtml, NULL); + } + g_free (src); + g_free (alt); + } break; } case 47: /* P (opt) */