From: <bo...@us...> - 2006-12-19 00:09:38
|
Revision: 18022 http://svn.sourceforge.net/gaim/?rev=18022&view=rev Author: boler Date: 2006-12-18 16:09:38 -0800 (Mon, 18 Dec 2006) Log Message: ----------- gg: Include status message in "Get Info" output. Modified Paths: -------------- trunk/libgaim/protocols/gg/gg.c Modified: trunk/libgaim/protocols/gg/gg.c =================================================================== --- trunk/libgaim/protocols/gg/gg.c 2006-12-18 20:29:45 UTC (rev 18021) +++ trunk/libgaim/protocols/gg/gg.c 2006-12-19 00:09:38 UTC (rev 18022) @@ -1014,6 +1014,7 @@ GGPSearchForm *form) { GaimNotifyUserInfo *user_info; + GaimBuddy *buddy; char *val, *who; user_info = gaim_notify_user_info_new(); @@ -1044,13 +1045,29 @@ } g_free(val); - val = ggp_buddy_get_name(gc, ggp_str_to_uin(who)); - g_free(who); + /* + * Include a status message, if exists and buddy is in the blist. + */ + buddy = gaim_find_buddy(gaim_connection_get_account(gc), who); + if (NULL != buddy) { + GaimStatus *status; + const char *msg; + char *text; -/* val = gaim_strdup_withhtml(text->str); */ + status = gaim_presence_get_active_status(gaim_buddy_get_presence(buddy)); + msg = gaim_status_get_attr_string(status, "message"); + if (msg != NULL) { + text = g_markup_escape_text(msg, -1); + gaim_notify_user_info_add_pair(user_info, _("Message"), text); + g_free(text); + } + } + + val = ggp_buddy_get_name(gc, ggp_str_to_uin(who)); gaim_notify_userinfo(gc, val, user_info, ggp_sr_close_cb, form); g_free(val); + g_free(who); gaim_notify_user_info_destroy(user_info); } /* }}} */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |