diff src/protocols/msn/msn.c @ 13842:a9ff4499d9ce

[gaim-migrate @ 16295] Hopefully improve the typing notification code so it's a lot easier to understand. This also creates a distinction between the signals emitted when receiving GAIM_TYPED and GAIM_NOT_TYPING messages (by adding a gaim-typed signal). And the gaim-not-typing signal should work in all cases. Most of this is stuff I changed last week during work, thanks to Meebo committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Tue, 20 Jun 2006 08:17:49 +0000
parents 967ef719cb62
children 3ae8a3935406 995aea35b05c
line wrap: on
line diff
--- a/src/protocols/msn/msn.c	Tue Jun 20 04:05:56 2006 +0000
+++ b/src/protocols/msn/msn.c	Tue Jun 20 08:17:49 2006 +0000
@@ -836,8 +836,8 @@
 	return 1;
 }
 
-static int
-msn_send_typing(GaimConnection *gc, const char *who, int typing)
+static unsigned int
+msn_send_typing(GaimConnection *gc, const char *who, GaimTypingState state)
 {
 	GaimAccount *account;
 	MsnSession *session;
@@ -847,7 +847,12 @@
 	account = gaim_connection_get_account(gc);
 	session = gc->proto_data;
 
-	if (!typing)
+	/*
+	 * TODO: I feel like this should be "if (state != GAIM_TYPING)"
+	 *       but this is how it was before, and I don't want to break
+	 *       anything. --KingAnt
+	 */
+	if (state == GAIM_NOT_TYPING)
 		return 0;
 
 	if (!g_ascii_strcasecmp(who, gaim_account_get_username(account)))