From: <bo...@us...> - 2006-04-16 10:49:43
|
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. |
From: <bo...@us...> - 2006-04-16 20:18:25
|
Revision: 16042 Author: boler Date: 2006-04-16 13:18:17 -0700 (Sun, 16 Apr 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16042&view=rev Log Message: ----------- GG PRPL: Display a more meaningful status of a buddy is User Info. Modified Paths: -------------- trunk/src/protocols/gg/gg.c Modified: trunk/src/protocols/gg/gg.c =================================================================== --- trunk/src/protocols/gg/gg.c 2006-04-16 18:28:53 UTC (rev 16041) +++ trunk/src/protocols/gg/gg.c 2006-04-16 20:18:17 UTC (rev 16042) @@ -975,6 +975,38 @@ } /* }}} */ +/** + * Translate a status' ID to a more user-friendly name. + * + * @param id The ID of the status. + * + * @return The user-friendly name of the status. + */ +/* static const char *ggp_status_by_id(unsigned int id) {{{ */ +static const char *ggp_status_by_id(unsigned int id) +{ + const char *st; + + gaim_debug_info("gg", "ggp_status_by_id: %d\n", id); + switch (id) { + case GG_STATUS_NOT_AVAIL: + st = _("Offline"); + break; + case GG_STATUS_AVAIL: + st = _("Available"); + break; + case GG_STATUS_BUSY: + st = _("Away"); + break; + default: + st = _("Unknown"); + break; + } + + return st; +} +/* }}} */ + /* */ /* static void ggp_pubdir_handle_info(GaimConnection *gc, gg_pubdir50_t req, GGPSearchForm *form) {{{ */ @@ -987,8 +1019,9 @@ text = g_string_new(""); val = ggp_search_get_result(req, 0, GG_PUBDIR50_STATUS); + /* XXX: Use of ggp_str_to_uin() is an ugly hack! */ g_string_append_printf(text, "<b>%s:</b> %s<br/>", - _("Status"), val); + _("Status"), ggp_status_by_id(ggp_str_to_uin(val))); g_free(val); who = ggp_search_get_result(req, 0, GG_PUBDIR50_UIN); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ev...@us...> - 2006-07-27 17:37:46
|
Revision: 16583 Author: evands Date: 2006-07-27 10:37:42 -0700 (Thu, 27 Jul 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16583&view=rev Log Message: ----------- Fix a crash when gadu-gadu signs off while a search is still open. It destroys its search HashTable in its close() function, and that table is accessed when gaim_notify_close_with_handle() is called. An alternative fix would be for the close_with_handle() functions to be called before prpl_info->close() in connection.c, but I'm not positive that this wouldn't cause problems with other prpls, so I went for a smaller-impact change. I'll merge this back to the 2.0.0 branch if there are no objections. Modified Paths: -------------- trunk/src/protocols/gg/gg.c Modified: trunk/src/protocols/gg/gg.c =================================================================== --- trunk/src/protocols/gg/gg.c 2006-07-27 02:20:33 UTC (rev 16582) +++ trunk/src/protocols/gg/gg.c 2006-07-27 17:37:42 UTC (rev 16583) @@ -1737,6 +1737,11 @@ gg_free_session(info->session); } + /* Immediately close any notifications on this handle since that process depends + * upon the contents of info->searches, which we are about to destroy. + */ + gaim_notify_close_with_handle(gc); + ggp_search_destroy(info->searches); g_free(info); gc->proto_data = NULL; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ev...@us...> - 2006-07-27 20:12:04
|
Revision: 16588 Author: evands Date: 2006-07-27 13:11:55 -0700 (Thu, 27 Jul 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16588&view=rev Log Message: ----------- This ggp_sr_close_cb() is no longer needed because the core handle calling the close callback as appropriate. Modified Paths: -------------- trunk/src/protocols/gg/gg.c Modified: trunk/src/protocols/gg/gg.c =================================================================== --- trunk/src/protocols/gg/gg.c 2006-07-27 20:10:57 UTC (rev 16587) +++ trunk/src/protocols/gg/gg.c 2006-07-27 20:11:55 UTC (rev 16588) @@ -1160,7 +1160,6 @@ gaim_notify_error(gc, NULL, _("Unable to display the search results."), NULL); - ggp_sr_close_cb(form); return; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |