comparison pidgin-twitter.c @ 63:760006015519

added that to show follower's icons through http://twitter.g.hatena.ne.jp/ikko615/20080107/1199703400
author mikanbako <maoutwo@gmail.com>
date Sun, 22 Jun 2008 01:44:48 +0900
parents 6843c3e6477f
children da37857f3033
comparison
equal deleted inserted replaced
62:6843c3e6477f 63:760006015519
897 request_icon(const char *buffer) 897 request_icon(const char *buffer)
898 { 898 {
899 GMatchInfo *match_info = NULL; 899 GMatchInfo *match_info = NULL;
900 gchar *user_name = NULL; 900 gchar *user_name = NULL;
901 gchar *message = NULL; 901 gchar *message = NULL;
902 gchar *url = NULL;
902 PurpleUtilFetchUrlData *fetch_data = NULL; 903 PurpleUtilFetchUrlData *fetch_data = NULL;
903 904
904 /* get user's name */ 905 /* get user's name */
905 906
906 g_regex_match(regp[MESSAGE], buffer, 0, &match_info); 907 g_regex_match(regp[MESSAGE], buffer, 0, &match_info);
934 return; 935 return;
935 } 936 }
936 937
937 /* The string object are owned by the list. */ 938 /* The string object are owned by the list. */
938 requested_users = g_list_append(requested_users, user_name); 939 requested_users = g_list_append(requested_users, user_name);
939 940 /* Create the URL of the user's icon.
940 fetch_data = purple_util_fetch_url( 941 * See http://twitter.g.hatena.ne.jp/ikko615/20080107/1199703400
941 "http://static.twitter.com/images/default_profile_normal.png", 942 */
942 TRUE, NULL, TRUE, downloaded_icon_cb, user_name); 943 url = g_strdup_printf("http://img.twitty.jp/twitter/user/%s/m.gif",
944 user_name);
945
946 fetch_data = purple_util_fetch_url(url, TRUE, NULL, TRUE,
947 downloaded_icon_cb, user_name);
948 g_free(url);
943 requestings = g_list_append(requestings, fetch_data); 949 requestings = g_list_append(requestings, fetch_data);
944 950
945 twitter_debug("request %s's icon\n", user_name); 951 twitter_debug("request %s's icon\n", user_name);
946 } 952 }
947 953