diff src/blist.c @ 6744:a781689ca455

[gaim-migrate @ 7276] alphabetical sort now works again, status and log sorting still need plenty of work committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Thu, 04 Sep 2003 21:48:15 +0000
parents d93c6a1fadf2
children ea289c6f2382
line wrap: on
line diff
--- a/src/blist.c	Thu Sep 04 21:33:28 2003 +0000
+++ b/src/blist.c	Thu Sep 04 21:48:15 2003 +0000
@@ -1037,6 +1037,26 @@
 	return ret;
 }
 
+const char *gaim_blist_chat_get_name(GaimBlistChat *chat)
+{
+	if(chat->alias && *chat->alias) {
+		return chat->alias;
+	} else {
+		struct proto_chat_entry *pce;
+		GList *parts, *tmp;
+		char *ret;
+
+		parts = GAIM_PLUGIN_PROTOCOL_INFO(chat->account->gc->prpl)->chat_info(chat->account->gc);
+		pce = parts->data;
+		ret = g_hash_table_lookup(chat->components, pce->identifier);
+		for(tmp = parts; tmp; tmp = tmp->next)
+			g_free(tmp->data);
+		g_list_free(parts);
+
+		return ret;
+	}
+}
+
 GaimBuddy *gaim_find_buddy(GaimAccount *account, const char *name)
 {
 	GaimBuddy *buddy;