pidgin/pidgin

[gaim-migrate @ 16039]

2006-04-16, Bartosz Oler
43cc4f6ca8e1
Parents 1173f8ca3fbf
Children 1a69e962e3b4
[gaim-migrate @ 16039]
Fixes #1448164 (Add IM button to the search results window).
--- 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"),