# HG changeset patch # User Evan Schoenberg # Date 1179002041 0 # Node ID bfdd46b72027d085dacdf3c35bd0d0a1e6e51b94 # Parent 73556f13c3b5487ff03e2b744192b295e827083d Emit the buddy-typing-stopped signal even if we don't have a conversation, and use swtich rather than if diff -r 73556f13c3b5 -r bfdd46b72027 libpurple/server.c --- 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; } }