Mercurial > pidgin.yaz
diff src/server.c @ 5032:cb700c07ee07
[gaim-migrate @ 5375]
Rewrote the buddy pounce code. It's now core/UI split, and may allow for
more advanced stuff later. Pounce actions are now a UI thing, and the
backend logic for registering, unregistering, and activating pouncs is now
in core. Also, the buddy pounce dialog was redesigned.
Oh, and there are new pounce types. You can now choose from:
* Sign on
* Sign off
* Away
* Return from away
* Idle
* Return from idle
* Buddy starts typing
* Buddy stops typing
Should work. I've been using it for some time. If you find a bug, though,
let me know.
committer: Tailor Script <tailor@pidgin.im>
| author | Christian Hammond <chipx86@chipx86.com> |
|---|---|
| date | Sat, 05 Apr 2003 10:14:21 +0000 |
| parents | 8e55a4d362a3 |
| children | be31fb7a719e |
line wrap: on
line diff
--- a/src/server.c Sat Apr 05 08:03:10 2003 +0000 +++ b/src/server.c Sat Apr 05 10:14:21 2003 +0000 @@ -862,11 +862,12 @@ } if (!b->idle && idle) { + gaim_pounce_execute(gc->account, b->name, GAIM_POUNCE_IDLE); plugin_event(event_buddy_idle, gc, b->name); system_log(log_idle, gc, b, OPT_LOG_BUDDY_IDLE); } if (b->idle && !idle) { - do_pounce(gc, b->name, OPT_POUNCE_UNIDLE); + gaim_pounce_execute(gc->account, b->name, GAIM_POUNCE_IDLE_RETURN); plugin_event(event_buddy_unidle, gc, b->name); system_log(log_unidle, gc, b, OPT_LOG_BUDDY_IDLE); } @@ -875,10 +876,11 @@ gaim_blist_update_buddy_evil(b, evil); if ((b->uc & UC_UNAVAILABLE) && !(type & UC_UNAVAILABLE)) { - do_pounce(gc, b->name, OPT_POUNCE_UNAWAY); + gaim_pounce_execute(gc->account, b->name, GAIM_POUNCE_AWAY_RETURN); plugin_event(event_buddy_back, gc, b->name); system_log(log_back, gc, b, OPT_LOG_BUDDY_AWAY); } else if (!(b->uc & UC_UNAVAILABLE) && (type & UC_UNAVAILABLE)) { + gaim_pounce_execute(gc->account, b->name, GAIM_POUNCE_AWAY); plugin_event(event_buddy_away, gc, b->name); system_log(log_away, gc, b, OPT_LOG_BUDDY_AWAY); } @@ -906,7 +908,7 @@ message_queue = g_slist_append(message_queue, qm); } gaim_sound_play_event(GAIM_SOUND_BUDDY_ARRIVE); - do_pounce(gc, b->name, OPT_POUNCE_SIGNON); + gaim_pounce_execute(gc->account, b->name, GAIM_POUNCE_SIGNON); plugin_event(event_buddy_signon, gc, b->name); system_log(log_signon, gc, b, OPT_LOG_BUDDY_SIGNON); } @@ -930,6 +932,7 @@ message_queue = g_slist_append(message_queue, qm); } gaim_sound_play_event(GAIM_SOUND_BUDDY_LEAVE); + gaim_pounce_execute(gc->account, b->name, GAIM_POUNCE_SIGNOFF); plugin_event(event_buddy_signoff, gc, b->name); system_log(log_signoff, gc, b, OPT_LOG_BUDDY_SIGNON); } @@ -965,6 +968,7 @@ void serv_got_typing(struct gaim_connection *gc, char *name, int timeout, int state) { + struct buddy *b; struct gaim_conversation *cnv = gaim_find_conversation(name); struct gaim_im *im; @@ -977,8 +981,12 @@ gaim_im_set_typing_state(im, state); gaim_im_update_typing(im); + b = gaim_find_buddy(gc->account, name); + plugin_event(event_got_typing, gc, name); - do_pounce(gc, name, OPT_POUNCE_TYPING); + + if (b != NULL) + gaim_pounce_execute(gc->account, name, GAIM_POUNCE_TYPING); if (timeout > 0) gaim_im_start_typing_timeout(im, timeout); @@ -988,6 +996,7 @@ struct gaim_conversation *c = gaim_find_conversation(name); struct gaim_im *im; + struct buddy *b; if (!c) return; @@ -997,6 +1006,11 @@ gaim_im_stop_typing_timeout(im); gaim_im_set_typing_state(im, NOT_TYPING); gaim_im_update_typing(im); + + b = gaim_find_buddy(gc->account, name); + + if (b != NULL) + gaim_pounce_execute(gc->account, name, GAIM_POUNCE_TYPING_STOPPED); } struct chat_invite_data {
