# HG changeset patch # User Richard Laager # Date 1156573599 0 # Node ID 1c104df05a38044beb6457adf7ea0c2b71ae3d62 # Parent 2aaadbd919c4e7d7b21a69bca06de921c62b0163 [gaim-migrate @ 17038] 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 ;) committer: Tailor Script diff -r 2aaadbd919c4 -r 1c104df05a38 gtk/gtkdialogs.c --- a/gtk/gtkdialogs.c Sat Aug 26 06:26:25 2006 +0000 +++ b/gtk/gtkdialogs.c Sat Aug 26 06:26:39 2006 +0000 @@ -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);