Mercurial > pidgin-twitter
diff pidgin-twitter.c @ 205:bc1448e72b1b
workaround for that wassr sometimes provides 128 pixel icon with broad white borders.
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Thu, 14 Aug 2008 16:20:22 +0900 |
parents | d66ad3343119 |
children | 0eac0abcc0aa |
line wrap: on
line diff
--- a/pidgin-twitter.c Wed Aug 13 15:51:23 2008 +0900 +++ b/pidgin-twitter.c Thu Aug 14 16:20:22 2008 +0900 @@ -24,7 +24,7 @@ /***********/ /* globals */ /***********/ -#define NUM_REGPS 12 +#define NUM_REGPS 13 #define NUM_SERVICES 3 /* twitter, wassr, identica. */ static GRegex *regp[NUM_REGPS]; static gboolean suppress_oops = FALSE; @@ -1807,7 +1807,12 @@ tmp = g_strdup_printf("%s/%s", url, purple_url_encode(slash+1)); else if(service == wassr_service) { - tmp = g_strdup_printf("http://wassr.jp%s/%s", url, slash+1); + gchar *tmp0 = NULL; + tmp0 = g_regex_replace(regp[SIZE_128_WASSR], slash+1, + -1, 0, ".64.", 0, NULL); + tmp = g_strdup_printf("http://wassr.jp%s/%s", url, + tmp0 ? tmp0 : slash+1); + g_free(tmp0); } else { tmp = g_strdup_printf("%s/%s", url, slash+1); @@ -2425,6 +2430,7 @@ regp[IMAGE_WASSR] = g_regex_new(P_IMAGE_WASSR, 0, 0, NULL); regp[IMAGE_IDENTICA] = g_regex_new(P_IMAGE_IDENTICA, 0, 0, NULL); regp[TAG_IDENTICA] = g_regex_new(P_TAG_IDENTICA, 0, 0, NULL); + regp[SIZE_128_WASSR] = g_regex_new(P_SIZE_128_WASSR, 0, 0, NULL); for(i = twitter_service; i < NUM_SERVICES; i++) { icon_hash[i] = g_hash_table_new_full(g_str_hash, g_str_equal,