diff libpurple/server.c @ 17071:bfdd46b72027

Emit the buddy-typing-stopped signal even if we don't have a conversation, and use swtich rather than if
author Evan Schoenberg <evan.s@dreskin.net>
date Sat, 12 May 2007 20:34:01 +0000
parents 10f175539cfe
children f2d8658b3a86
line wrap: on
line diff
--- a/libpurple/server.c	Sat May 12 20:33:26 2007 +0000
+++ b/libpurple/server.c	Sat May 12 20:34:01 2007 +0000
@@ -576,15 +576,20 @@
 		purple_conv_im_set_typing_state(im, state);
 		purple_conv_im_update_typing(im);
 	} else {
-		if (state == PURPLE_TYPING)
+		switch (state)
 		{
-			purple_signal_emit(purple_conversations_get_handle(),
-							 "buddy-typing", gc->account, name);
-		}
-		else
-		{
-			purple_signal_emit(purple_conversations_get_handle(),
-							 "buddy-typed", gc->account, name);
+			case PURPLE_TYPING:
+				purple_signal_emit(purple_conversations_get_handle(),
+								   "buddy-typing", gc->account, name);
+				break;
+			case PURPLE_TYPED:
+				purple_signal_emit(purple_conversations_get_handle(),
+								   "buddy-typed", gc->account, name);
+				break;
+			case PURPLE_NOT_TYPING:
+				purple_signal_emit(purple_conversations_get_handle(),
+								   "buddy-typing-stopped", gc->account, name);
+				break;
 		}
 	}