Revision: 16039
Author: boler
Date: 2006-04-16 03:49:35 -0700 (Sun, 16 Apr 2006)
ViewCVS: http://svn.sourceforge.net/gaim/?rev=16039&view=rev
Log Message:
-----------
Fixes #1448164 (Add IM button to the search results window).
Modified Paths:
--------------
trunk/src/protocols/gg/gg.c
Modified: trunk/src/protocols/gg/gg.c
===================================================================
--- trunk/src/protocols/gg/gg.c 2006-04-16 10:10:55 UTC (rev 16038)
+++ trunk/src/protocols/gg/gg.c 2006-04-16 10:49:35 UTC (rev 16039)
@@ -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"),
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|