diff finch/gntblist.c @ 17275:319bcb73eb4e

Use utility functions to get user info. Closes #964.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Thu, 24 May 2007 21:15:16 +0000
parents 0d9fba04fc85
children 995f31f5432a
line wrap: on
line diff
--- a/finch/gntblist.c	Thu May 24 20:35:07 2007 +0000
+++ b/finch/gntblist.c	Thu May 24 21:15:16 2007 +0000
@@ -824,17 +824,20 @@
 			PURPLE_CALLBACK(finch_add_group), group);
 }
 
+void finch_retrieve_user_info(PurpleConnection *conn, const char *name)
+{
+	PurpleNotifyUserInfo *info = purple_notify_user_info_new();
+	purple_notify_user_info_add_pair(info, _("Information"), _("Retrieving..."));
+	purple_notify_userinfo(conn, name, info, NULL, NULL);
+	purple_notify_user_info_destroy(info);
+
+	serv_get_info(conn, name);
+}
+
 static void
 finch_blist_get_buddy_info_cb(PurpleBuddy *buddy, PurpleBlistNode *selected)
 {
-	/* Add a userinfo with a "Retrieving information", which will later be updated
-	 * when the server finally returns the information. */
-	PurpleNotifyUserInfo *info = purple_notify_user_info_new();
-	purple_notify_user_info_add_pair(info, _("Information"), _("Retrieving..."));
-	purple_notify_userinfo(buddy->account->gc, purple_buddy_get_name(buddy), info, NULL, NULL);
-	purple_notify_user_info_destroy(info);
-
-	serv_get_info(buddy->account->gc, purple_buddy_get_name(buddy));
+	finch_retrieve_user_info(buddy->account->gc, purple_buddy_get_name(buddy));
 }
 
 static void