changeset 11519:0dfda214df89

[gaim-migrate @ 13764] A few fixes for transitioning to the new status stuff committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sun, 11 Sep 2005 17:46:01 +0000
parents 922782381027
children 2fdd2bd7755a
files src/protocols/bonjour/bonjour.c src/protocols/bonjour/buddy.c
diffstat 2 files changed, 11 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/bonjour/bonjour.c	Sun Sep 11 17:22:28 2005 +0000
+++ b/src/protocols/bonjour/bonjour.c	Sun Sep 11 17:46:01 2005 +0000
@@ -269,8 +269,9 @@
 		status_description = gaim_status_get_name(status);
 
 	ret = g_string_new("");
-	g_string_append_printf(ret, _("<b>Status:</b> %s"), status_description);
-	g_string_append_printf(ret, _("<b>Message:</b> %s"), message);
+	g_string_append_printf(ret, _("\n<b>Status:</b> %s"), status_description);
+	if (message != NULL)
+		g_string_append_printf(ret, _("\n<b>Message:</b> %s"), message);
 
 	return g_string_free(ret, FALSE);
 }
@@ -398,11 +399,6 @@
 	option = gaim_account_option_string_new(_("Email"), "email", "");
 	prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option);
 	
-	/*
-	option = gaim_account_option_string_new(_("Status Message"), "message", "Available");
-	prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option);
-	*/
-	
 	my_protocol = plugin;
 }
 
--- a/src/protocols/bonjour/buddy.c	Sun Sep 11 17:22:28 2005 +0000
+++ b/src/protocols/bonjour/buddy.c	Sun Sep 11 17:46:01 2005 +0000
@@ -123,12 +123,19 @@
 	if (buddy == NULL)
 	{
 		buddy = gaim_buddy_new(account, bonjour_buddy->name, alias);
+		buddy->proto_data = bonjour_buddy;
 		gaim_blist_node_set_flags((GaimBlistNode *)buddy, GAIM_BLIST_NODE_FLAG_NO_SAVE);
 		gaim_blist_add_buddy(buddy, NULL, group, NULL);
 	}
 
 	/* Set the user's status */
-	gaim_prpl_got_user_status(account, buddy->name, status_id, NULL);
+	if (bonjour_buddy->msg != NULL)
+		gaim_prpl_got_user_status(account, buddy->name, status_id,
+								  "message", bonjour_buddy->msg,
+								  NULL);
+	else
+		gaim_prpl_got_user_status(account, buddy->name, status_id,
+								  NULL);
 	gaim_prpl_got_user_idle(account, buddy->name, FALSE, 0);
 
 	g_free(alias);