| 2172 |
2170 |
| 2173 /* We only want to worry about a few fields here. */ |
2171 /* We only want to worry about a few fields here. */ |
| 2174 if (!strcmp(field, "FN")) |
2172 if (!strcmp(field, "FN")) |
| 2175 alias = g_strdup(value); |
2173 alias = g_strdup(value); |
| 2176 else if (!strcmp(field, "X-AIM") || !strcmp(field, "X-ICQ") || |
2174 else if (!strcmp(field, "X-AIM") || !strcmp(field, "X-ICQ") || |
| 2177 !strcmp(field, "X-YAHOO") || !strcmp(field, "X-MSN") || |
|
| 2178 !strcmp(field, "X-JABBER")) |
2175 !strcmp(field, "X-JABBER")) |
| 2179 { |
2176 { |
| 2180 char **values = g_strsplit(value, ":", 0); |
2177 char **values = g_strsplit(value, ":", 0); |
| 2181 char **im; |
2178 char **im; |
| 2182 |
2179 |
| 2184 { |
2181 { |
| 2185 if (!strcmp(field, "X-AIM")) |
2182 if (!strcmp(field, "X-AIM")) |
| 2186 aims = g_list_append(aims, g_strdup(*im)); |
2183 aims = g_list_append(aims, g_strdup(*im)); |
| 2187 else if (!strcmp(field, "X-ICQ")) |
2184 else if (!strcmp(field, "X-ICQ")) |
| 2188 icqs = g_list_append(icqs, g_strdup(*im)); |
2185 icqs = g_list_append(icqs, g_strdup(*im)); |
| 2189 else if (!strcmp(field, "X-YAHOO")) |
|
| 2190 yahoos = g_list_append(yahoos, g_strdup(*im)); |
|
| 2191 else if (!strcmp(field, "X-MSN")) |
|
| 2192 msns = g_list_append(msns, g_strdup(*im)); |
|
| 2193 else if (!strcmp(field, "X-JABBER")) |
2186 else if (!strcmp(field, "X-JABBER")) |
| 2194 jabbers = g_list_append(jabbers, g_strdup(*im)); |
2187 jabbers = g_list_append(jabbers, g_strdup(*im)); |
| 2195 } |
2188 } |
| 2196 |
2189 |
| 2197 g_strfreev(values); |
2190 g_strfreev(values); |
| 2198 } |
2191 } |
| 2199 } |
2192 } |
| 2200 |
2193 |
| 2201 g_free(temp_vcard); |
2194 g_free(temp_vcard); |
| 2202 |
2195 |
| 2203 if (aims == NULL && icqs == NULL && yahoos == NULL && |
2196 if (aims == NULL && icqs == NULL && jabbers == NULL) |
| 2204 msns == NULL && jabbers == NULL) |
|
| 2205 { |
2197 { |
| 2206 g_free(alias); |
2198 g_free(alias); |
| 2207 |
2199 |
| 2208 return FALSE; |
2200 return FALSE; |
| 2209 } |
2201 } |
| 2210 |
2202 |
| 2211 add_buddies_from_vcard("prpl-aim", group, aims, alias); |
2203 add_buddies_from_vcard("prpl-aim", group, aims, alias); |
| 2212 add_buddies_from_vcard("prpl-icq", group, icqs, alias); |
2204 add_buddies_from_vcard("prpl-icq", group, icqs, alias); |
| 2213 add_buddies_from_vcard("prpl-yahoo", group, yahoos, alias); |
|
| 2214 add_buddies_from_vcard("prpl-msn", group, msns, alias); |
|
| 2215 add_buddies_from_vcard("prpl-jabber", group, jabbers, alias); |
2205 add_buddies_from_vcard("prpl-jabber", group, jabbers, alias); |
| 2216 |
2206 |
| 2217 g_free(alias); |
2207 g_free(alias); |
| 2218 |
2208 |
| 2219 return TRUE; |
2209 return TRUE; |
| 3862 _("Buddy Alias"), purple_buddy_get_local_alias(b)); |
3852 _("Buddy Alias"), purple_buddy_get_local_alias(b)); |
| 3863 } |
3853 } |
| 3864 |
3854 |
| 3865 /* Nickname/Server Alias */ |
3855 /* Nickname/Server Alias */ |
| 3866 /* I'd like to only show this if there's a contact or buddy |
3856 /* I'd like to only show this if there's a contact or buddy |
| 3867 * alias, but many people on MSN set long nicknames, which |
3857 * alias, but people often set long nicknames, which |
| 3868 * get ellipsized, so the only way to see the whole thing is |
3858 * get ellipsized, so the only way to see the whole thing is |
| 3869 * to look at the tooltip. */ |
3859 * to look at the tooltip. */ |
| 3870 if (full && purple_buddy_get_server_alias(b)) |
3860 if (full && purple_buddy_get_server_alias(b)) |
| 3871 { |
3861 { |
| 3872 purple_notify_user_info_add_pair_plaintext(user_info, |
3862 purple_notify_user_info_add_pair_plaintext(user_info, |
| 4086 return _pidgin_blist_get_cached_emblem(path); |
4076 return _pidgin_blist_get_cached_emblem(path); |
| 4087 } |
4077 } |
| 4088 |
4078 |
| 4089 tune = purple_presence_get_status(p, "tune"); |
4079 tune = purple_presence_get_status(p, "tune"); |
| 4090 if (tune && purple_status_is_active(tune)) { |
4080 if (tune && purple_status_is_active(tune)) { |
| 4091 /* Only in MSN. |
4081 /* TODO: Replace "Tune" with generalized "Media" in 3.0. */ |
| 4092 * TODO: Replace "Tune" with generalized "Media" in 3.0. */ |
|
| 4093 if (purple_status_get_attr_string(tune, "game") != NULL) { |
4082 if (purple_status_get_attr_string(tune, "game") != NULL) { |
| 4094 path = g_build_filename(PURPLE_DATADIR, "pixmaps", |
4083 path = g_build_filename(PURPLE_DATADIR, "pixmaps", |
| 4095 "pidgin", "emblems", "16", "game.png", NULL); |
4084 "pidgin", "emblems", "16", "game.png", NULL); |
| 4096 return _pidgin_blist_get_cached_emblem(path); |
4085 return _pidgin_blist_get_cached_emblem(path); |
| 4097 } |
4086 } |
| 4098 /* Only in MSN. |
4087 /* TODO: Replace "Tune" with generalized "Media" in 3.0. */ |
| 4099 * TODO: Replace "Tune" with generalized "Media" in 3.0. */ |
|
| 4100 if (purple_status_get_attr_string(tune, "office") != NULL) { |
4088 if (purple_status_get_attr_string(tune, "office") != NULL) { |
| 4101 path = g_build_filename(PURPLE_DATADIR, "pixmaps", |
4089 path = g_build_filename(PURPLE_DATADIR, "pixmaps", |
| 4102 "pidgin", "emblems", "16", "office.png", NULL); |
4090 "pidgin", "emblems", "16", "office.png", NULL); |
| 4103 return _pidgin_blist_get_cached_emblem(path); |
4091 return _pidgin_blist_get_cached_emblem(path); |
| 4104 } |
4092 } |