changeset 27115:2ab648c328cc

Consistently emit conversation-updated for typing state changes. Also reformatted ChangeLog.API a bit (I noticed there's a Changed section) and added a comment to the psychic plugin (since I had to look up why it was doing that). Patch from Florian Quze. Closes #7605. committer: Paul Aurich <paul@darkrain42.org>
author Florian Quèze <florian@instantbird.org>
date Fri, 05 Jun 2009 02:30:31 +0000
parents 4c3b1bb3ba91
children b58672890b3f
files ChangeLog.API libpurple/conversation.c libpurple/plugins/psychic.c libpurple/server.c
diffstat 4 files changed, 10 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog.API	Fri Jun 05 01:58:22 2009 +0000
+++ b/ChangeLog.API	Fri Jun 05 02:30:31 2009 +0000
@@ -16,9 +16,6 @@
 		* blist-node-added and blist-node-removed signals (see
 		  blist-signals.dox)
 		* Jabber plugin signals (see jabber-signals.dox)
-		* Plugins may now emit the jabber-sending-xmlnode signal in order
-		  to send stanzas; this method is preferred to the prpl send_raw
-		  function as other plugins listening to the signal see them.
 		* purple_buddy_destroy
 		* purple_buddy_get_protocol_data
 		* purple_buddy_set_protocol_data
@@ -61,6 +58,13 @@
 		  which was completely non-deterministic.  If you want to remove
 		  the attribute with no namespace, then use NULL with
 		  xmlnode_remove_with_namespace.
+		* Plugins may now emit the jabber-sending-xmlnode signal in order
+		  to send stanzas; this method is preferred to the prpl send_raw
+		  function as other plugins listening to the signal see them.
+		* The conversation-updated signal with a PURPLE_CONV_UPDATE_TYPING
+		  update type is emitted when receiving an IM.  Previously, the
+		  typing state was modified (and the buddy-typing-stopped signal
+		  emitted), but this signal was not emitted.
 
 		Deprecated:
 		* buddy-added and buddy-removed blist signals
--- a/libpurple/conversation.c	Fri Jun 05 01:58:22 2009 +0000
+++ b/libpurple/conversation.c	Fri Jun 05 02:30:31 2009 +0000
@@ -55,7 +55,6 @@
 	im = PURPLE_CONV_IM(c);
 
 	purple_conv_im_set_typing_state(im, PURPLE_NOT_TYPING);
-	purple_conv_im_update_typing(im);
 	purple_conv_im_stop_typing_timeout(im);
 
 	return FALSE;
@@ -1050,6 +1049,8 @@
 								   "buddy-typing-stopped", im->conv->account, im->conv->name);
 				break;
 		}
+
+		purple_conv_im_update_typing(im);
 	}
 }
 
--- a/libpurple/plugins/psychic.c	Fri Jun 05 01:58:22 2009 +0000
+++ b/libpurple/plugins/psychic.c	Fri Jun 05 02:30:31 2009 +0000
@@ -74,6 +74,7 @@
 			      time(NULL));
     }
 
+    /* Necessary because we may be creating a new conversation window. */
     purple_conv_im_set_typing_state(PURPLE_CONV_IM(gconv), PURPLE_TYPING);
   }
 }
--- a/libpurple/server.c	Fri Jun 05 01:58:22 2009 +0000
+++ b/libpurple/server.c	Fri Jun 05 02:30:31 2009 +0000
@@ -728,7 +728,6 @@
 		im = PURPLE_CONV_IM(conv);
 
 		purple_conv_im_set_typing_state(im, state);
-		purple_conv_im_update_typing(im);
 	} else {
 		switch (state)
 		{
@@ -766,7 +765,6 @@
 
 		purple_conv_im_stop_typing_timeout(im);
 		purple_conv_im_set_typing_state(im, PURPLE_NOT_TYPING);
-		purple_conv_im_update_typing(im);
 	}
 	else
 	{