Mercurial > pidgin
comparison src/protocols/yahoo/yahoo_profile.c @ 9281:adde46ad65e9
[gaim-migrate @ 10084]
This keeps track of IP addresses that other clients send us, and displays
them in the Get Info dialog. Eventually we'll want to do other stuff with
them, probably.
committer: Tailor Script <tailor@pidgin.im>
author | Tim Ringenbach <marv@pidgin.im> |
---|---|
date | Mon, 14 Jun 2004 07:05:10 +0000 |
parents | fb517adf4972 |
children | 2aed8d5cda1b |
comparison
equal
deleted
inserted
replaced
9280:2104c1039626 | 9281:adde46ad65e9 |
---|---|
30 #if PHOTO_SUPPORT | 30 #if PHOTO_SUPPORT |
31 #include "imgstore.h" | 31 #include "imgstore.h" |
32 #endif | 32 #endif |
33 | 33 |
34 #include "yahoo.h" | 34 #include "yahoo.h" |
35 #include "yahoo_friend.h" | |
35 | 36 |
36 typedef struct { | 37 typedef struct { |
37 GaimConnection *gc; | 38 GaimConnection *gc; |
38 char *name; | 39 char *name; |
39 } YahooGetInfoData; | 40 } YahooGetInfoData; |
632 } | 633 } |
633 | 634 |
634 static char *yahoo_tooltip_info_text(YahooGetInfoData *info_data) { | 635 static char *yahoo_tooltip_info_text(YahooGetInfoData *info_data) { |
635 GString *s = g_string_sized_new(80); /* wild guess */ | 636 GString *s = g_string_sized_new(80); /* wild guess */ |
636 GaimBuddy *b; | 637 GaimBuddy *b; |
638 YahooFriend *f; | |
637 | 639 |
638 g_string_printf(s, _("<b>%s:</b> %s<br>"), _("Yahoo! ID"), info_data->name); | 640 g_string_printf(s, _("<b>%s:</b> %s<br>"), _("Yahoo! ID"), info_data->name); |
639 b = gaim_find_buddy(gaim_connection_get_account(info_data->gc), | 641 b = gaim_find_buddy(gaim_connection_get_account(info_data->gc), |
640 info_data->name); | 642 info_data->name); |
641 | 643 |
654 } | 656 } |
655 if (statustext) { | 657 if (statustext) { |
656 g_string_append_printf(s, "%s<br>", statustext); | 658 g_string_append_printf(s, "%s<br>", statustext); |
657 g_free(statustext); | 659 g_free(statustext); |
658 } | 660 } |
661 if ((f = yahoo_friend_find(info_data->gc, b->name))) { | |
662 const char *ip; | |
663 if ((ip = yahoo_friend_get_ip(f))) | |
664 g_string_append_printf(s, _("<b>IP Address:</b> %s<br>"), ip); | |
665 } | |
666 | |
659 } | 667 } |
660 | 668 |
661 return g_string_free(s, FALSE); | 669 return g_string_free(s, FALSE); |
662 } | 670 } |
663 | 671 |