# HG changeset patch # User Bartoz Oler # Date 1145184575 0 # Node ID 87d41308a0eb267fff54c6206cc80a06be96ed3b # Parent d12bbe6da7059de4ca6876b4e09ac27ccde66962 [gaim-migrate @ 16039] Fixes #1448164 (Add IM button to the search results window). committer: Tailor Script diff -r d12bbe6da705 -r 87d41308a0eb src/protocols/gg/gg.c --- a/src/protocols/gg/gg.c Sun Apr 16 10:10:55 2006 +0000 +++ b/src/protocols/gg/gg.c Sun Apr 16 10:49:35 2006 +0000 @@ -504,8 +504,8 @@ /* */ -/* static void ggp_callback_show_next(GaimConnection *gc, GList *row, void *user_data) {{{ */ -static void ggp_callback_show_next(GaimConnection *gc, GList *row, void *user_data) +/* static void ggp_callback_show_next(GaimConnection *gc, GList *row, gpointer user_data) {{{ */ +static void ggp_callback_show_next(GaimConnection *gc, GList *row, gpointer user_data) { GGPInfo *info = gc->proto_data; GGPSearchForm *form = user_data; @@ -523,8 +523,8 @@ /* */ -/* static void ggp_callback_add_buddy(GaimConnection *gc, GList *row, void *user_data) {{{ */ -static void ggp_callback_add_buddy(GaimConnection *gc, GList *row, void *user_data) +/* static void ggp_callback_add_buddy(GaimConnection *gc, GList *row, gpointer user_data) {{{ */ +static void ggp_callback_add_buddy(GaimConnection *gc, GList *row, gpointer user_data) { gaim_blist_request_add_buddy(gaim_connection_get_account(gc), g_list_nth_data(row, 0), NULL, NULL); @@ -533,6 +533,23 @@ /* */ +/* static void ggp_callback_im(GaimConnection *gc, GList *row, gpointer user_data) {{{ */ +static void ggp_callback_im(GaimConnection *gc, GList *row, gpointer user_data) +{ + GaimAccount *account; + GaimConversation *conv; + char *name; + + account = gaim_connection_get_account(gc); + + name = g_list_nth_data(row, 0); + conv = gaim_conversation_new(GAIM_CONV_TYPE_IM, account, name); + gaim_conversation_present(conv); +} +/* }}} */ + +/* + */ /* static void ggp_callback_find_buddies(GaimConnection *gc, GaimRequestFields *fields) {{{ */ static void ggp_callback_find_buddies(GaimConnection *gc, GaimRequestFields *fields) { @@ -1055,6 +1072,8 @@ ggp_callback_show_next); gaim_notify_searchresults_button_add(results, GAIM_NOTIFY_BUTTON_ADD, ggp_callback_add_buddy); + gaim_notify_searchresults_button_add(results, GAIM_NOTIFY_BUTTON_IM, + ggp_callback_im); if (form->window == NULL) { void *h = gaim_notify_searchresults(gc, _("Gadu-Gadu Public Directory"),