Mercurial > pidgin
diff src/protocols/zephyr/zephyr.c @ 13842:a9ff4499d9ce
[gaim-migrate @ 16295]
Hopefully improve the typing notification code so it's a lot easier
to understand. This also creates a distinction between the signals
emitted when receiving GAIM_TYPED and GAIM_NOT_TYPING messages
(by adding a gaim-typed signal). And the gaim-not-typing signal
should work in all cases.
Most of this is stuff I changed last week during work, thanks to
Meebo
committer: Tailor Script <tailor@pidgin.im>
| author | Mark Doliner <mark@kingant.net> |
|---|---|
| date | Tue, 20 Jun 2006 08:17:49 +0000 |
| parents | 689228bcf920 |
| children |
line wrap: on
line diff
--- a/src/protocols/zephyr/zephyr.c Tue Jun 20 04:05:56 2006 +0000 +++ b/src/protocols/zephyr/zephyr.c Tue Jun 20 08:17:49 2006 +0000 @@ -2450,14 +2450,15 @@ return "zephyr"; } -static int zephyr_send_typing(GaimConnection *gc, const char *who, int typing) { +static unsigned int zephyr_send_typing(GaimConnection *gc, const char *who, GaimTypingState state) { gchar *recipient; zephyr_account *zephyr = gc->proto_data; if (use_tzc(zephyr)) return 0; - if (!typing) + if (state == GAIM_NOT_TYPING) return 0; + /* XXX We probably should care if this fails. Or maybe we don't want to */ if (!who) { gaim_debug_info("zephyr", "who is null\n"); @@ -2476,6 +2477,12 @@ gaim_debug_info("zephyr","about to send typing notification to %s\n",recipient); zephyr_send_message(zephyr,"MESSAGE","PERSONAL",recipient,"","","PING"); gaim_debug_info("zephyr","sent typing notification\n"); + + /* + * TODO: Is this correct? It means we will call + * serv_send_typing(gc, who, GAIM_TYPING) once every 15 seconds + * until the Gaim user stops typing. + */ return ZEPHYR_TYPING_SEND_TIMEOUT; }
