Mercurial > pidgin
changeset 17063:1ae4c1a45750
merge of '3ac5981b26be545a8c546e09b6689c2359fad1bb'
and 'fb7cfe3a2656a5b9be388e3bba6923561a454ca7'
author | Evan Schoenberg <evan.s@dreskin.net> |
---|---|
date | Sat, 12 May 2007 20:34:56 +0000 |
parents | 2649c2ffc0d4 (current diff) bfdd46b72027 (diff) |
children | c3add818a46c 4d4a396a478c |
files | |
diffstat | 2 files changed, 26 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/conversation.c Sat May 12 19:14:14 2007 +0000 +++ b/libpurple/conversation.c Sat May 12 20:34:56 2007 +0000 @@ -970,20 +970,20 @@ { im->typing_state = state; - if (state == PURPLE_TYPING) - { - purple_signal_emit(purple_conversations_get_handle(), - "buddy-typing", im->conv->account, im->conv->name); - } - else if (state == PURPLE_TYPED) + switch (state) { - purple_signal_emit(purple_conversations_get_handle(), - "buddy-typed", im->conv->account, im->conv->name); - } - else if (state == PURPLE_NOT_TYPING) - { - purple_signal_emit(purple_conversations_get_handle(), - "buddy-typing-stopped", im->conv->account, im->conv->name); + case PURPLE_TYPING: + purple_signal_emit(purple_conversations_get_handle(), + "buddy-typing", im->conv->account, im->conv->name); + break; + case PURPLE_TYPED: + purple_signal_emit(purple_conversations_get_handle(), + "buddy-typed", im->conv->account, im->conv->name); + break; + case PURPLE_NOT_TYPING: + purple_signal_emit(purple_conversations_get_handle(), + "buddy-typing-stopped", im->conv->account, im->conv->name); + break; } } }
--- a/libpurple/server.c Sat May 12 19:14:14 2007 +0000 +++ b/libpurple/server.c Sat May 12 20:34:56 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; } }