Mercurial > pidgin
diff src/buddy.c @ 1066:d6c70d58a4b2
[gaim-migrate @ 1076]
login/logout reporting to convo window and ticker working again
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Sat, 04 Nov 2000 11:18:59 +0000 |
parents | e1408fb04c36 |
children | ed28707debdc |
line wrap: on
line diff
--- a/src/buddy.c Sat Nov 04 11:05:17 2000 +0000 +++ b/src/buddy.c Sat Nov 04 11:18:59 2000 +0000 @@ -1495,8 +1495,10 @@ gtk_widget_hide(bs->pix); gtk_pixmap_set(GTK_PIXMAP(bs->pix), pm, bm); gtk_widget_show(bs->pix); - if (ticker_prefs & OPT_DISP_SHOW_BUDDYTICKER) - BuddyTickerSetPixmap(b->name, pm, bm); + if (ticker_prefs & OPT_DISP_SHOW_BUDDYTICKER) { + BuddyTickerAddUser(b->name, pm, bm); + gtk_timeout_add(10000, (GtkFunction)BuddyTickerLogonTimeout, b->name); + } gdk_pixmap_unref(pm); gdk_bitmap_unref(bm); b->present = 2; @@ -1505,6 +1507,16 @@ if (!g_slist_find(bs->connlist, gc)) bs->connlist = g_slist_append(bs->connlist, gc); bs->log_timer = gtk_timeout_add(10000, (GtkFunction)log_timeout, bs); + if (display_options & OPT_DISP_SHOW_LOGON) { + struct conversation *c = find_conversation(b->name); + if (c) { + char tmp[1024]; + g_snprintf(tmp, sizeof(tmp), _("<HR><B>%s logged in%s%s.</B><BR><HR>"), b->name, + ((display_options & OPT_DISP_SHOW_TIME) ? " @ " : ""), + ((display_options & OPT_DISP_SHOW_TIME) ? date() : "")); + write_to_conv(c, tmp, WFLAG_SYSTEM, NULL); + } + } } else { if (gc->prpl->list_icon) xpm = (*gc->prpl->list_icon)(b->uc); @@ -1534,10 +1546,22 @@ gtk_widget_hide(bs->pix); gtk_pixmap_set(GTK_PIXMAP(bs->pix), pm, bm); gtk_widget_show(bs->pix); - if (ticker_prefs & OPT_DISP_SHOW_BUDDYTICKER) + if (ticker_prefs & OPT_DISP_SHOW_BUDDYTICKER) { BuddyTickerSetPixmap(b->name, pm, bm); + gtk_timeout_add(10000, (GtkFunction)BuddyTickerLogoutTimeout, b->name); + } gdk_pixmap_unref(pm); gdk_bitmap_unref(bm); + if (display_options & OPT_DISP_SHOW_LOGON) { + struct conversation *c = find_conversation(b->name); + if (c) { + char tmp[1024]; + g_snprintf(tmp, sizeof(tmp), _("<HR><B>%s logged out%s%s.</B><BR><HR>"), b->name, + ((display_options & OPT_DISP_SHOW_TIME) ? " @ " : ""), + ((display_options & OPT_DISP_SHOW_TIME) ? date() : "")); + write_to_conv(c, tmp, WFLAG_SYSTEM, NULL); + } + } } }