Mercurial > pidgin
comparison src/buddy.c @ 436:7d5f91c1ff20
[gaim-migrate @ 446]
Add preference for showing/hiding the ticker.
committer: Tailor Script <tailor@pidgin.im>
| author | Syd Logan <slogan> |
|---|---|
| date | Sun, 25 Jun 2000 02:42:11 +0000 |
| parents | 5741dca6cc8a |
| children | 881f5d538f15 |
comparison
equal
deleted
inserted
replaced
| 435:feff1ae9d8da | 436:7d5f91c1ff20 |
|---|---|
| 76 static GtkWidget *lagometer = NULL; | 76 static GtkWidget *lagometer = NULL; |
| 77 static GtkWidget *lagometer_box = NULL; | 77 static GtkWidget *lagometer_box = NULL; |
| 78 | 78 |
| 79 static int last_lag_us; | 79 static int last_lag_us; |
| 80 | 80 |
| 81 extern int ticker_prefs; | |
| 81 | 82 |
| 82 GtkWidget *blist = NULL; | 83 GtkWidget *blist = NULL; |
| 83 GtkWidget *bpmenu; | 84 GtkWidget *bpmenu; |
| 84 GtkWidget *buddies; | 85 GtkWidget *buddies; |
| 85 int permdeny; | 86 int permdeny; |
| 372 applet_do_signon, | 373 applet_do_signon, |
| 373 NULL); | 374 NULL); |
| 374 #else | 375 #else |
| 375 show_login(); | 376 show_login(); |
| 376 #endif /* USE_APPLET */ | 377 #endif /* USE_APPLET */ |
| 377 BuddyTickerSignoff(); | 378 if ( ticker_prefs & OPT_DISP_SHOW_BUDDYTICKER ) |
| 379 BuddyTickerSignoff(); | |
| 378 } | 380 } |
| 379 | 381 |
| 380 void handle_click_group(GtkWidget *widget, GdkEventButton *event, gpointer func_data) | 382 void handle_click_group(GtkWidget *widget, GdkEventButton *event, gpointer func_data) |
| 381 { | 383 { |
| 382 if (event->type == GDK_2BUTTON_PRESS) { | 384 if (event->type == GDK_2BUTTON_PRESS) { |
| 1511 gtk_widget_show(b->pix); | 1513 gtk_widget_show(b->pix); |
| 1512 | 1514 |
| 1513 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, | 1515 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, |
| 1514 NULL, (gchar **)login_icon_xpm); | 1516 NULL, (gchar **)login_icon_xpm); |
| 1515 | 1517 |
| 1516 BuddyTickerAddUser( b->name, pm, bm ); | 1518 if ( ticker_prefs & OPT_DISP_SHOW_BUDDYTICKER ) |
| 1519 BuddyTickerAddUser( b->name, pm, bm ); | |
| 1517 | 1520 |
| 1518 if (display_options & OPT_DISP_SHOW_LOGON) { | 1521 if (display_options & OPT_DISP_SHOW_LOGON) { |
| 1519 struct conversation *c = find_conversation(b->name); | 1522 struct conversation *c = find_conversation(b->name); |
| 1520 if (c) { | 1523 if (c) { |
| 1521 char tmp[1024]; | 1524 char tmp[1024]; |
| 1533 | 1536 |
| 1534 | 1537 |
| 1535 gtk_widget_show(b->item); | 1538 gtk_widget_show(b->item); |
| 1536 gtk_widget_show(b->label); | 1539 gtk_widget_show(b->label); |
| 1537 b->log_timer = gtk_timeout_add(10000, (GtkFunction) log_timeout, b->name); | 1540 b->log_timer = gtk_timeout_add(10000, (GtkFunction) log_timeout, b->name); |
| 1538 gtk_timeout_add(10000, (GtkFunction) BuddyTickerLogonTimeout, b->name); | 1541 if ( ticker_prefs & OPT_DISP_SHOW_BUDDYTICKER ) |
| 1542 gtk_timeout_add(10000, (GtkFunction) BuddyTickerLogonTimeout, b->name); | |
| 1539 update_num_groups(); | 1543 update_num_groups(); |
| 1540 update_show_idlepix(); | 1544 update_show_idlepix(); |
| 1541 setup_buddy_chats(); | 1545 setup_buddy_chats(); |
| 1542 return; | 1546 return; |
| 1543 } | 1547 } |
| 1562 } | 1566 } |
| 1563 #endif | 1567 #endif |
| 1564 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, | 1568 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, |
| 1565 NULL, (gchar **)away_icon_xpm); | 1569 NULL, (gchar **)away_icon_xpm); |
| 1566 gtk_pixmap_set(GTK_PIXMAP(b->pix), pm, bm); | 1570 gtk_pixmap_set(GTK_PIXMAP(b->pix), pm, bm); |
| 1567 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, | 1571 if ( ticker_prefs & OPT_DISP_SHOW_BUDDYTICKER ) |
| 1572 { | |
| 1573 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, | |
| 1568 NULL, (gchar **)away_icon_xpm); | 1574 NULL, (gchar **)away_icon_xpm); |
| 1569 BuddyTickerSetPixmap(b->name, pm, bm); | 1575 BuddyTickerSetPixmap(b->name, pm, bm); |
| 1576 } | |
| 1570 } else if (b->uc & UC_AOL) { | 1577 } else if (b->uc & UC_AOL) { |
| 1571 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, | 1578 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, |
| 1572 NULL, (gchar **)aol_icon_xpm); | 1579 NULL, (gchar **)aol_icon_xpm); |
| 1573 gtk_pixmap_set(GTK_PIXMAP(b->pix), pm, bm); | 1580 gtk_pixmap_set(GTK_PIXMAP(b->pix), pm, bm); |
| 1574 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, | 1581 if ( ticker_prefs & OPT_DISP_SHOW_BUDDYTICKER ) |
| 1582 { | |
| 1583 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, | |
| 1575 NULL, (gchar **)aol_icon_xpm); | 1584 NULL, (gchar **)aol_icon_xpm); |
| 1576 BuddyTickerSetPixmap(b->name, pm, bm); | 1585 BuddyTickerSetPixmap(b->name, pm, bm); |
| 1586 } | |
| 1577 } else if (b->uc & UC_NORMAL) { | 1587 } else if (b->uc & UC_NORMAL) { |
| 1578 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, | 1588 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, |
| 1579 NULL, (gchar **)free_icon_xpm); | 1589 NULL, (gchar **)free_icon_xpm); |
| 1580 gtk_pixmap_set(GTK_PIXMAP(b->pix), pm, bm); | 1590 gtk_pixmap_set(GTK_PIXMAP(b->pix), pm, bm); |
| 1581 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, | 1591 if ( ticker_prefs & OPT_DISP_SHOW_BUDDYTICKER ) |
| 1592 { | |
| 1593 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, | |
| 1582 NULL, (gchar **)free_icon_xpm); | 1594 NULL, (gchar **)free_icon_xpm); |
| 1583 BuddyTickerSetPixmap(b->name, pm, bm); | 1595 BuddyTickerSetPixmap(b->name, pm, bm); |
| 1596 } | |
| 1584 } else if (b->uc & UC_ADMIN) { | 1597 } else if (b->uc & UC_ADMIN) { |
| 1585 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, | 1598 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, |
| 1586 NULL, (gchar **)admin_icon_xpm); | 1599 NULL, (gchar **)admin_icon_xpm); |
| 1587 gtk_pixmap_set(GTK_PIXMAP(b->pix), pm, bm); | 1600 gtk_pixmap_set(GTK_PIXMAP(b->pix), pm, bm); |
| 1588 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, | 1601 if ( ticker_prefs & OPT_DISP_SHOW_BUDDYTICKER ) |
| 1602 { | |
| 1603 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, | |
| 1589 NULL, (gchar **)admin_icon_xpm); | 1604 NULL, (gchar **)admin_icon_xpm); |
| 1590 BuddyTickerSetPixmap(b->name, pm, bm); | 1605 BuddyTickerSetPixmap(b->name, pm, bm); |
| 1606 } | |
| 1591 } else if (b->uc & UC_UNCONFIRMED) { | 1607 } else if (b->uc & UC_UNCONFIRMED) { |
| 1592 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, | 1608 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, |
| 1593 NULL, (gchar **)dt_icon_xpm); | 1609 NULL, (gchar **)dt_icon_xpm); |
| 1594 gtk_pixmap_set(GTK_PIXMAP(b->pix), pm, bm); | 1610 gtk_pixmap_set(GTK_PIXMAP(b->pix), pm, bm); |
| 1595 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, | 1611 if ( ticker_prefs & OPT_DISP_SHOW_BUDDYTICKER ) |
| 1612 { | |
| 1613 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, | |
| 1596 NULL, (gchar **)dt_icon_xpm); | 1614 NULL, (gchar **)dt_icon_xpm); |
| 1597 BuddyTickerSetPixmap(b->name, pm, bm); | 1615 BuddyTickerSetPixmap(b->name, pm, bm); |
| 1616 } | |
| 1598 } else { | 1617 } else { |
| 1599 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, | 1618 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, |
| 1600 NULL, (gchar **)no_icon_xpm); | 1619 NULL, (gchar **)no_icon_xpm); |
| 1601 gtk_pixmap_set(GTK_PIXMAP(b->pix), pm, bm); | 1620 gtk_pixmap_set(GTK_PIXMAP(b->pix), pm, bm); |
| 1602 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, | 1621 if ( ticker_prefs & OPT_DISP_SHOW_BUDDYTICKER ) |
| 1622 { | |
| 1623 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, | |
| 1603 NULL, (gchar **)no_icon_xpm); | 1624 NULL, (gchar **)no_icon_xpm); |
| 1604 BuddyTickerSetPixmap(b->name, pm, bm); | 1625 BuddyTickerSetPixmap(b->name, pm, bm); |
| 1626 } | |
| 1605 } | 1627 } |
| 1606 if (display_options & OPT_DISP_SHOW_PIXMAPS) | 1628 if (display_options & OPT_DISP_SHOW_PIXMAPS) |
| 1607 gtk_widget_show(b->pix); | 1629 gtk_widget_show(b->pix); |
| 1608 } | 1630 } |
| 1609 | 1631 |
| 1630 NULL, (gchar **)logout_icon_xpm); | 1652 NULL, (gchar **)logout_icon_xpm); |
| 1631 gtk_widget_hide(b->pix); | 1653 gtk_widget_hide(b->pix); |
| 1632 gtk_pixmap_set(GTK_PIXMAP(b->pix), pm, bm); | 1654 gtk_pixmap_set(GTK_PIXMAP(b->pix), pm, bm); |
| 1633 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, | 1655 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, |
| 1634 NULL, (gchar **)logout_icon_xpm); | 1656 NULL, (gchar **)logout_icon_xpm); |
| 1635 BuddyTickerSetPixmap( b->name, pm, bm ); | 1657 if ( ticker_prefs & OPT_DISP_SHOW_BUDDYTICKER ) |
| 1658 BuddyTickerSetPixmap( b->name, pm, bm ); | |
| 1636 if (display_options & OPT_DISP_SHOW_PIXMAPS) | 1659 if (display_options & OPT_DISP_SHOW_PIXMAPS) |
| 1637 gtk_widget_show(b->pix); | 1660 gtk_widget_show(b->pix); |
| 1638 if (display_options & OPT_DISP_SHOW_LOGON) { | 1661 if (display_options & OPT_DISP_SHOW_LOGON) { |
| 1639 struct conversation *c = find_conversation(b->name); | 1662 struct conversation *c = find_conversation(b->name); |
| 1640 if (c) { | 1663 if (c) { |
| 1649 write_to_conv(c, tmp, WFLAG_SYSTEM); | 1672 write_to_conv(c, tmp, WFLAG_SYSTEM); |
| 1650 | 1673 |
| 1651 } | 1674 } |
| 1652 } | 1675 } |
| 1653 b->log_timer = gtk_timeout_add(10000, (GtkFunction)log_timeout, b->name); | 1676 b->log_timer = gtk_timeout_add(10000, (GtkFunction)log_timeout, b->name); |
| 1654 gtk_timeout_add(10000, (GtkFunction)BuddyTickerLogoutTimeout, b->name); | 1677 if ( ticker_prefs & OPT_DISP_SHOW_BUDDYTICKER ) |
| 1678 gtk_timeout_add(10000, (GtkFunction)BuddyTickerLogoutTimeout, b->name); | |
| 1655 update_num_groups(); | 1679 update_num_groups(); |
| 1656 update_show_idlepix(); | 1680 update_show_idlepix(); |
| 1657 } | 1681 } |
| 1658 } | 1682 } |
| 1659 setup_buddy_chats(); | 1683 setup_buddy_chats(); |
