changeset 9109:9f21659ecf11

[gaim-migrate @ 9886] Added a buddy-idle-updated signal, for when the idle time changes. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Fri, 28 May 2004 06:06:43 +0000
parents 6a17b7e2e3b2
children 78189aad1457
files plugins/ChangeLog.API src/blist.c src/server.c
diffstat 3 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/ChangeLog.API	Fri May 28 05:53:34 2004 +0000
+++ b/plugins/ChangeLog.API	Fri May 28 06:06:43 2004 +0000
@@ -21,6 +21,7 @@
     * Added: "gtkblist-created"
     * Added: "receiving-im-msg" and "receiving-chat-msg" (these behave
               exactly like received-*-msg used to)
+    * Added: "buddy-idle-updated" signal, for when the idle time changes.
     * Changed: "received-im-msg" and "received-chat-msg" no longer pass
                pointers to who, message and flags, and are now void.
     * Removed: "drawing-menu" - it was UI sepecific and
--- a/src/blist.c	Fri May 28 05:53:34 2004 +0000
+++ b/src/blist.c	Fri May 28 06:06:43 2004 +0000
@@ -2803,6 +2803,10 @@
 						 gaim_marshal_VOID__POINTER, NULL, 1,
 						 gaim_value_new(GAIM_TYPE_SUBTYPE,
 										GAIM_SUBTYPE_BLIST_BUDDY));
+	gaim_signal_register(handle, "buddy-idle-updated",
+						 gaim_marshal_VOID__POINTER, NULL, 1,
+						 gaim_value_new(GAIM_TYPE_SUBTYPE,
+										GAIM_SUBTYPE_BLIST_BUDDY));
 
 	gaim_signal_register(handle, "buddy-signed-on",
 						 gaim_marshal_VOID__POINTER, NULL, 1,
--- a/src/server.c	Fri May 28 05:53:34 2004 +0000
+++ b/src/server.c	Fri May 28 06:06:43 2004 +0000
@@ -1209,6 +1209,10 @@
 	{
 		gaim_signal_emit(gaim_blist_get_handle(), "buddy-unidle", b);
 	}
+	else if (old_idle != idle)
+	{
+		gaim_signal_emit(gaim_blist_get_handle(), "buddy-idle-updated", b);
+	}
 
 	if (c != NULL)
 		gaim_conversation_update(c, GAIM_CONV_UPDATE_AWAY);