# HG changeset patch # User Sean Egan # Date 1047629417 0 # Node ID f6d83e81d45a88ce84352d1f551daeed433f2407 # Parent 03aa36cb4e3843ed6af2e7835032e89de25eeeaf [gaim-migrate @ 5085] This brings back: - Sounds - "SeanEgn logged in." messages - Plugin and perl events - Raise Buddy list on events - I think that's all. committer: Tailor Script diff -r 03aa36cb4e38 -r f6d83e81d45a src/buddy.c --- a/src/buddy.c Fri Mar 14 07:04:46 2003 +0000 +++ b/src/buddy.c Fri Mar 14 08:10:17 2003 +0000 @@ -1120,12 +1120,15 @@ expand = TRUE; } - + oldersibling = node->prev; while (oldersibling && !get_iter_from_node(oldersibling, &oldersiblingiter)) oldersibling = oldersibling->prev; gtk_tree_store_insert_after(gtkblist->treemodel, &iter, &groupiter, oldersibling ? &oldersiblingiter : NULL); + + if (blist_options & OPT_BLIST_POPUP) + gtk_window_present(GTK_WINDOW(gtkblist->window)); if (expand) { /* expand was set to true if this is the first element added to a group. In such case * we expand the group node */ @@ -1204,6 +1207,8 @@ } else if (GAIM_BLIST_NODE_IS_BUDDY(node) && !new_entry) { gaim_gtk_blist_remove(list, node); + if (blist_options & OPT_BLIST_POPUP) + gtk_window_present(GTK_WINDOW(gtkblist->window)); } } diff -r 03aa36cb4e38 -r f6d83e81d45a src/server.c --- a/src/server.c Fri Mar 14 07:04:46 2003 +0000 +++ b/src/server.c Fri Mar 14 08:10:17 2003 +0000 @@ -35,6 +35,7 @@ #include "prpl.h" #include "multi.h" #include "gaim.h" +#include "sound.h" #include "pixmaps/cancel.xpm" #include "pixmaps/tb_search.xpm" @@ -899,22 +900,58 @@ gaim_blist_update_buddy_status(b, type); - gaim_blist_update_buddy_presence(b, loggedin); if (loggedin) { - if (!b->present) { - //b->present = 1; + if (!b->present == 1) { + struct gaim_conversation *c = gaim_find_conversation(b->name); + if (c) { + char *tmp = g_strdup_printf(_("%s logged in."), gaim_get_buddy_alias(b)); + gaim_conversation_write(c, NULL, tmp, -1, + WFLAG_SYSTEM, time(NULL)); + g_free(tmp); + } else if (awayqueue && find_queue_total_by_name(b->name)) { + struct queued_message *qm = g_new0(struct queued_message, 1); + g_snprintf(qm->name, sizeof(qm->name), "%s", b->name); + qm->message = g_strdup_printf(_("%s logged in."), + gaim_get_buddy_alias(b)); + qm->account = gc->account; + qm->tm = time(NULL); + qm->flags = WFLAG_SYSTEM; + qm->len = -1; + message_queue = g_slist_append(message_queue, qm); + } + gaim_sound_play_event(GAIM_SOUND_BUDDY_ARRIVE); do_pounce(gc, b->name, OPT_POUNCE_SIGNON); plugin_event(event_buddy_signon, gc, b->name); system_log(log_signon, gc, b, OPT_LOG_BUDDY_SIGNON); } } else { - if (b->present) { + if (b->present == 1) { + struct gaim_conversation *c = gaim_find_conversation(b->name); + if (c) { + char *tmp = g_strdup_printf(_("%s logged out."), gaim_get_buddy_alias(b)); + gaim_conversation_write(c, NULL, tmp, -1, + WFLAG_SYSTEM, time(NULL)); + g_free(tmp); + } else if (awayqueue && find_queue_total_by_name(b->name)) { + struct queued_message *qm = g_new0(struct queued_message, 1); + g_snprintf(qm->name, sizeof(qm->name), "%s", b->name); + qm->message = g_strdup_printf(_("%s logged out."), + gaim_get_buddy_alias(b)); + qm->account = gc->account; + qm->tm = time(NULL); + qm->flags = WFLAG_SYSTEM; + qm->len = -1; + message_queue = g_slist_append(message_queue, qm); + } + gaim_sound_play_event(GAIM_SOUND_BUDDY_LEAVE); plugin_event(event_buddy_signoff, gc, b->name); system_log(log_signoff, gc, b, OPT_LOG_BUDDY_SIGNON); } - b->present = 0; - } + } + + gaim_blist_update_buddy_presence(b, loggedin); + }