Mercurial > pidgin
changeset 17060: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 | 73556f13c3b5 |
children | 1ae4c1a45750 |
files | libpurple/server.c |
diffstat | 1 files changed, 13 insertions(+), 8 deletions(-) [+] |
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; } }