Mercurial > pidgin
comparison 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 |
comparison
equal
deleted
inserted
replaced
1065:a761951579b9 | 1066:d6c70d58a4b2 |
---|---|
1493 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, | 1493 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, |
1494 NULL, (char **)login_icon_xpm); | 1494 NULL, (char **)login_icon_xpm); |
1495 gtk_widget_hide(bs->pix); | 1495 gtk_widget_hide(bs->pix); |
1496 gtk_pixmap_set(GTK_PIXMAP(bs->pix), pm, bm); | 1496 gtk_pixmap_set(GTK_PIXMAP(bs->pix), pm, bm); |
1497 gtk_widget_show(bs->pix); | 1497 gtk_widget_show(bs->pix); |
1498 if (ticker_prefs & OPT_DISP_SHOW_BUDDYTICKER) | 1498 if (ticker_prefs & OPT_DISP_SHOW_BUDDYTICKER) { |
1499 BuddyTickerSetPixmap(b->name, pm, bm); | 1499 BuddyTickerAddUser(b->name, pm, bm); |
1500 gtk_timeout_add(10000, (GtkFunction)BuddyTickerLogonTimeout, b->name); | |
1501 } | |
1500 gdk_pixmap_unref(pm); | 1502 gdk_pixmap_unref(pm); |
1501 gdk_bitmap_unref(bm); | 1503 gdk_bitmap_unref(bm); |
1502 b->present = 2; | 1504 b->present = 2; |
1503 if (bs->log_timer > 0) | 1505 if (bs->log_timer > 0) |
1504 gtk_timeout_remove(bs->log_timer); | 1506 gtk_timeout_remove(bs->log_timer); |
1505 if (!g_slist_find(bs->connlist, gc)) | 1507 if (!g_slist_find(bs->connlist, gc)) |
1506 bs->connlist = g_slist_append(bs->connlist, gc); | 1508 bs->connlist = g_slist_append(bs->connlist, gc); |
1507 bs->log_timer = gtk_timeout_add(10000, (GtkFunction)log_timeout, bs); | 1509 bs->log_timer = gtk_timeout_add(10000, (GtkFunction)log_timeout, bs); |
1510 if (display_options & OPT_DISP_SHOW_LOGON) { | |
1511 struct conversation *c = find_conversation(b->name); | |
1512 if (c) { | |
1513 char tmp[1024]; | |
1514 g_snprintf(tmp, sizeof(tmp), _("<HR><B>%s logged in%s%s.</B><BR><HR>"), b->name, | |
1515 ((display_options & OPT_DISP_SHOW_TIME) ? " @ " : ""), | |
1516 ((display_options & OPT_DISP_SHOW_TIME) ? date() : "")); | |
1517 write_to_conv(c, tmp, WFLAG_SYSTEM, NULL); | |
1518 } | |
1519 } | |
1508 } else { | 1520 } else { |
1509 if (gc->prpl->list_icon) | 1521 if (gc->prpl->list_icon) |
1510 xpm = (*gc->prpl->list_icon)(b->uc); | 1522 xpm = (*gc->prpl->list_icon)(b->uc); |
1511 if (xpm == NULL) | 1523 if (xpm == NULL) |
1512 xpm = (char **)no_icon_xpm; | 1524 xpm = (char **)no_icon_xpm; |
1532 bs->log_timer = gtk_timeout_add(10000, (GtkFunction)log_timeout, bs); | 1544 bs->log_timer = gtk_timeout_add(10000, (GtkFunction)log_timeout, bs); |
1533 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, NULL, logout_icon_xpm); | 1545 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, NULL, logout_icon_xpm); |
1534 gtk_widget_hide(bs->pix); | 1546 gtk_widget_hide(bs->pix); |
1535 gtk_pixmap_set(GTK_PIXMAP(bs->pix), pm, bm); | 1547 gtk_pixmap_set(GTK_PIXMAP(bs->pix), pm, bm); |
1536 gtk_widget_show(bs->pix); | 1548 gtk_widget_show(bs->pix); |
1537 if (ticker_prefs & OPT_DISP_SHOW_BUDDYTICKER) | 1549 if (ticker_prefs & OPT_DISP_SHOW_BUDDYTICKER) { |
1538 BuddyTickerSetPixmap(b->name, pm, bm); | 1550 BuddyTickerSetPixmap(b->name, pm, bm); |
1551 gtk_timeout_add(10000, (GtkFunction)BuddyTickerLogoutTimeout, b->name); | |
1552 } | |
1539 gdk_pixmap_unref(pm); | 1553 gdk_pixmap_unref(pm); |
1540 gdk_bitmap_unref(bm); | 1554 gdk_bitmap_unref(bm); |
1555 if (display_options & OPT_DISP_SHOW_LOGON) { | |
1556 struct conversation *c = find_conversation(b->name); | |
1557 if (c) { | |
1558 char tmp[1024]; | |
1559 g_snprintf(tmp, sizeof(tmp), _("<HR><B>%s logged out%s%s.</B><BR><HR>"), b->name, | |
1560 ((display_options & OPT_DISP_SHOW_TIME) ? " @ " : ""), | |
1561 ((display_options & OPT_DISP_SHOW_TIME) ? date() : "")); | |
1562 write_to_conv(c, tmp, WFLAG_SYSTEM, NULL); | |
1563 } | |
1564 } | |
1541 } | 1565 } |
1542 } | 1566 } |
1543 | 1567 |
1544 | 1568 |
1545 static void move_blist_window(GtkWidget *w, GdkEventConfigure *e, void *dummy) | 1569 static void move_blist_window(GtkWidget *w, GdkEventConfigure *e, void *dummy) |