changeset 266:d3e2b2e58828

adapted for laconica 0.6.4 in identi.ca service.
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Fri, 12 Dec 2008 17:43:56 +0900
parents c2944685ac8e
children 18e71951ff27
files icon.c pidgin-twitter.h util.c
diffstat 3 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/icon.c	Wed Dec 10 15:46:30 2008 +0900
+++ b/icon.c	Fri Dec 12 17:43:56 2008 +0900
@@ -611,8 +611,8 @@
     case wassr_service:
         url = g_strdup_printf("http://wassr.jp/user/%s", user_name);
         break;
-    case identica_service:
-        url = g_strdup_printf("http://identi.ca/%s", user_name);
+    case identica_service: /* make use of Version0 API */
+        url = g_strdup_printf("http://identi.ca/%s/avatar/96", user_name);
         break;
     case jisko_service:
         url = g_strdup_printf("http://jisko.net/%s", user_name);
@@ -630,13 +630,12 @@
         /* gotdata will be released in got_icon_cb */
         if(service == twitter_service ||
            service == wassr_service ||
-           service == identica_service ||
            service == jisko_service) {
             data->fetch_data =
                 purple_util_fetch_url_request(url, TRUE, NULL, TRUE, NULL,
                                               TRUE, got_page_cb, gotdata);
         }
-        else { /* unused */
+        else { /* typically, identica_service */
             data->fetch_data =
                 purple_util_fetch_url_request(url, TRUE, NULL, TRUE, NULL,
                                               FALSE, got_icon_cb, gotdata);
--- a/pidgin-twitter.h	Wed Dec 10 15:46:30 2008 +0900
+++ b/pidgin-twitter.h	Fri Dec 12 17:43:56 2008 +0900
@@ -173,7 +173,7 @@
 #define P_TAG_IDENTICA      "#([-A-Za-z0-9_]+)"
 #define P_IMAGE_TWITTER   "<img .*=\"profile-(?:image|img)\".*src=\"(http://.+?)\".*/>"
 #define P_IMAGE_WASSR       "<div class=\"image\"><a href=\".+\"><img src=\"(.+)\" width=\".+?\" /></a></div>"
-#define P_IMAGE_IDENTICA    "<img src=\"(http://.+.identi.ca/.+)\" class=\"avatar profile\" width=\"96\" height=\"96\" alt=\"[A-Za-z0-9_]+\"/>"
+#define P_IMAGE_IDENTICA    "<img src=\"(http://.+.identi.ca/.+)\" class=\"avatar profile photo\" width=\"96\" height=\"96\" alt=\"[A-Za-z0-9_]+\"/>"
 #define P_IMAGE_JISKO       "<img src=\"(http://jisko.net/users/.+/img/avatar/thumb_side\\..+)\" alt=\"Avatar\" />"
 #define P_SIZE_128_WASSR    "\\.128\\."
 #define P_EXCESS_LF         "([\\r|\\n]{2,})"
--- a/util.c	Wed Dec 10 15:46:30 2008 +0900
+++ b/util.c	Fri Dec 12 17:43:56 2008 +0900
@@ -37,6 +37,7 @@
 
 static gchar *html_tags[] = {
     "<a href=",
+    "<a class=",
     "</a>",
     "<b>",
     "</b>",