diff src/protocols/toc/toc.c @ 9754:4a8bf81b82ae

[gaim-migrate @ 10621] " This will default the room/server fields to the proper values when an add chat is requested from a conversation window. It wasn't quite as trivial as the reporter suggested..." --Nathan (noif) Fredrickson committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Sun, 15 Aug 2004 19:34:20 +0000
parents db62420a53a2
children c28d5b45624e
line wrap: on
line diff
--- a/src/protocols/toc/toc.c	Sun Aug 15 17:05:51 2004 +0000
+++ b/src/protocols/toc/toc.c	Sun Aug 15 19:34:20 2004 +0000
@@ -1278,6 +1278,18 @@
 	return m;
 }
 
+GHashTable *toc_chat_info_defaults(GaimConnection *gc, const char *chat_name)
+{
+	GHashTable *defaults;
+
+	defaults = g_hash_table_new_full(g_str_hash, g_str_equal, NULL, g_free);
+
+	if (chat_name != NULL)
+		g_hash_table_insert(defaults, "room", g_strdup(chat_name));
+
+	return defaults;
+}
+
 static void toc_join_chat(GaimConnection *g, GHashTable *data)
 {
 	char buf[BUF_LONG];
@@ -2106,6 +2118,7 @@
 	toc_away_states,		/* away_states */
 	toc_blist_node_menu,	/* blist_node_menu */
 	toc_chat_info,			/* chat_info */
+	toc_chat_info_defaults,	/* chat_info_defaults */
 	toc_login,				/* login */
 	toc_close,				/* close */
 	toc_send_im,			/* send_im */