From: <rl...@us...> - 2006-08-26 06:26:44
|
Revision: 17038 Author: rlaager Date: 2006-08-25 23:26:39 -0700 (Fri, 25 Aug 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=17038&view=rev Log Message: ----------- Fixes GtR* Bug #1 Contactify "View User Log" in the Buddies menu. This has been on my TODO list forever. Yay for long trips with the laptop. * Gary to Richard, via IM ;) Modified Paths: -------------- trunk/gtk/gtkdialogs.c Modified: trunk/gtk/gtkdialogs.c =================================================================== --- trunk/gtk/gtkdialogs.c 2006-08-26 06:26:25 UTC (rev 17037) +++ trunk/gtk/gtkdialogs.c 2006-08-26 06:26:39 UTC (rev 17038) @@ -809,6 +809,7 @@ { char *username; GaimAccount *account; + GSList *cur; account = gaim_request_fields_get_account(fields, "account"); @@ -818,9 +819,25 @@ if (username != NULL && *username != '\0' && account != NULL) { GaimGtkBuddyList *gtkblist = gaim_gtk_blist_get_default_gtk_blist(); + GSList *buddies; gaim_gtk_set_cursor(gtkblist->window, GDK_WATCH); + buddies = gaim_find_buddies(account, username); + for (cur = buddies; cur != NULL; cur = cur->next) + { + GaimBlistNode *node = cur->data; + if ((node != NULL) && ((node->prev != NULL) || (node->next != NULL))) + { + gaim_gtk_log_show_contact((GaimContact *)node->parent); + g_slist_free(buddies); + gaim_gtk_clear_cursor(gtkblist->window); + g_free(username); + return; + } + } + g_slist_free(buddies); + gaim_gtk_log_show(GAIM_LOG_IM, username, account); gaim_gtk_clear_cursor(gtkblist->window); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |