Mercurial > pidgin
comparison src/buddy.c @ 804:17def2bb9720
[gaim-migrate @ 814]
17:24:37 RobFlynn: Reformatted?
17:24:59 EWarmenhoven: well, "preferences" "plugins" and "perl". one of these things is not like the others
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Thu, 31 Aug 2000 00:25:25 +0000 |
parents | 7f75b17d4e14 |
children | d06bed40a86b |
comparison
equal
deleted
inserted
replaced
803:7f75b17d4e14 | 804:17def2bb9720 |
---|---|
218 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, | 218 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, |
219 NULL, xpm); | 219 NULL, xpm); |
220 pic = gtk_pixmap_new(pm, bm); | 220 pic = gtk_pixmap_new(pm, bm); |
221 gtk_widget_show(pic); | 221 gtk_widget_show(pic); |
222 gdk_pixmap_unref(pm); | 222 gdk_pixmap_unref(pm); |
223 gdk_bitmap_unref(bm); | |
223 label = GTK_BIN(button)->child; | 224 label = GTK_BIN(button)->child; |
224 gtk_container_remove(GTK_CONTAINER(button), label); | 225 gtk_container_remove(GTK_CONTAINER(button), label); |
225 gtk_container_add(GTK_CONTAINER(button), pic); | 226 gtk_container_add(GTK_CONTAINER(button), pic); |
226 } else { | 227 } else { |
227 label = gtk_label_new(c); | 228 label = gtk_label_new(c); |
823 b->idle = 0; | 824 b->idle = 0; |
824 b->caps = 0; | 825 b->caps = 0; |
825 | 826 |
826 gtk_widget_show(b->pix); | 827 gtk_widget_show(b->pix); |
827 gdk_pixmap_unref(pm); | 828 gdk_pixmap_unref(pm); |
829 gdk_bitmap_unref(bm); | |
828 | 830 |
829 b->label = gtk_label_new(buddy); | 831 b->label = gtk_label_new(buddy); |
830 gtk_misc_set_alignment(GTK_MISC(b->label), 0.0, 0.5); | 832 gtk_misc_set_alignment(GTK_MISC(b->label), 0.0, 0.5); |
831 | 833 |
832 b->idletime = gtk_label_new(""); | 834 b->idletime = gtk_label_new(""); |
1404 gtk_widget_hide(b->pix); | 1406 gtk_widget_hide(b->pix); |
1405 gtk_pixmap_set(GTK_PIXMAP(b->pix), pm, bm); | 1407 gtk_pixmap_set(GTK_PIXMAP(b->pix), pm, bm); |
1406 if (display_options & OPT_DISP_SHOW_PIXMAPS) | 1408 if (display_options & OPT_DISP_SHOW_PIXMAPS) |
1407 gtk_widget_show(b->pix); | 1409 gtk_widget_show(b->pix); |
1408 gdk_pixmap_unref(pm); | 1410 gdk_pixmap_unref(pm); |
1411 gdk_bitmap_unref(bm); | |
1409 | 1412 |
1410 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, | 1413 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, |
1411 NULL, (gchar **)login_icon_xpm); | 1414 NULL, (gchar **)login_icon_xpm); |
1412 | 1415 |
1413 if ( ticker_prefs & OPT_DISP_SHOW_BUDDYTICKER ) | 1416 if ( ticker_prefs & OPT_DISP_SHOW_BUDDYTICKER ) |
1414 BuddyTickerAddUser( b->name, pm, bm ); | 1417 BuddyTickerAddUser( b->name, pm, bm ); |
1415 gdk_pixmap_unref(pm); | 1418 gdk_pixmap_unref(pm); |
1419 gdk_bitmap_unref(bm); | |
1416 | 1420 |
1417 if (display_options & OPT_DISP_SHOW_LOGON) { | 1421 if (display_options & OPT_DISP_SHOW_LOGON) { |
1418 struct conversation *c = find_conversation(b->name); | 1422 struct conversation *c = find_conversation(b->name); |
1419 if (c) { | 1423 if (c) { |
1420 char tmp[1024]; | 1424 char tmp[1024]; |
1449 if (b->uc & UC_UNAVAILABLE) { | 1453 if (b->uc & UC_UNAVAILABLE) { |
1450 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, | 1454 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, |
1451 NULL, (gchar **)away_icon_xpm); | 1455 NULL, (gchar **)away_icon_xpm); |
1452 gtk_pixmap_set(GTK_PIXMAP(b->pix), pm, bm); | 1456 gtk_pixmap_set(GTK_PIXMAP(b->pix), pm, bm); |
1453 gdk_pixmap_unref(pm); | 1457 gdk_pixmap_unref(pm); |
1458 gdk_bitmap_unref(bm); | |
1454 if ( ticker_prefs & OPT_DISP_SHOW_BUDDYTICKER ) | 1459 if ( ticker_prefs & OPT_DISP_SHOW_BUDDYTICKER ) |
1455 { | 1460 { |
1456 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, | 1461 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, |
1457 NULL, (gchar **)away_icon_xpm); | 1462 NULL, (gchar **)away_icon_xpm); |
1458 BuddyTickerSetPixmap(b->name, pm, bm); | 1463 BuddyTickerSetPixmap(b->name, pm, bm); |
1459 gdk_pixmap_unref(pm); | 1464 gdk_pixmap_unref(pm); |
1465 gdk_bitmap_unref(bm); | |
1460 } | 1466 } |
1461 } else if (b->uc & UC_AOL) { | 1467 } else if (b->uc & UC_AOL) { |
1462 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, | 1468 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, |
1463 NULL, (gchar **)aol_icon_xpm); | 1469 NULL, (gchar **)aol_icon_xpm); |
1464 gtk_pixmap_set(GTK_PIXMAP(b->pix), pm, bm); | 1470 gtk_pixmap_set(GTK_PIXMAP(b->pix), pm, bm); |
1465 gdk_pixmap_unref(pm); | 1471 gdk_pixmap_unref(pm); |
1472 gdk_bitmap_unref(bm); | |
1466 if ( ticker_prefs & OPT_DISP_SHOW_BUDDYTICKER ) | 1473 if ( ticker_prefs & OPT_DISP_SHOW_BUDDYTICKER ) |
1467 { | 1474 { |
1468 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, | 1475 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, |
1469 NULL, (gchar **)aol_icon_xpm); | 1476 NULL, (gchar **)aol_icon_xpm); |
1470 BuddyTickerSetPixmap(b->name, pm, bm); | 1477 BuddyTickerSetPixmap(b->name, pm, bm); |
1471 gdk_pixmap_unref(pm); | 1478 gdk_pixmap_unref(pm); |
1479 gdk_bitmap_unref(bm); | |
1472 } | 1480 } |
1473 } else if (b->uc & UC_NORMAL) { | 1481 } else if (b->uc & UC_NORMAL) { |
1474 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, | 1482 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, |
1475 NULL, (gchar **)free_icon_xpm); | 1483 NULL, (gchar **)free_icon_xpm); |
1476 gtk_pixmap_set(GTK_PIXMAP(b->pix), pm, bm); | 1484 gtk_pixmap_set(GTK_PIXMAP(b->pix), pm, bm); |
1477 gdk_pixmap_unref(pm); | 1485 gdk_pixmap_unref(pm); |
1486 gdk_bitmap_unref(bm); | |
1478 if ( ticker_prefs & OPT_DISP_SHOW_BUDDYTICKER ) | 1487 if ( ticker_prefs & OPT_DISP_SHOW_BUDDYTICKER ) |
1479 { | 1488 { |
1480 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, | 1489 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, |
1481 NULL, (gchar **)free_icon_xpm); | 1490 NULL, (gchar **)free_icon_xpm); |
1482 BuddyTickerSetPixmap(b->name, pm, bm); | 1491 BuddyTickerSetPixmap(b->name, pm, bm); |
1483 gdk_pixmap_unref(pm); | 1492 gdk_pixmap_unref(pm); |
1493 gdk_bitmap_unref(bm); | |
1484 } | 1494 } |
1485 } else if (b->uc & UC_ADMIN) { | 1495 } else if (b->uc & UC_ADMIN) { |
1486 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, | 1496 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, |
1487 NULL, (gchar **)admin_icon_xpm); | 1497 NULL, (gchar **)admin_icon_xpm); |
1488 gtk_pixmap_set(GTK_PIXMAP(b->pix), pm, bm); | 1498 gtk_pixmap_set(GTK_PIXMAP(b->pix), pm, bm); |
1489 gdk_pixmap_unref(pm); | 1499 gdk_pixmap_unref(pm); |
1500 gdk_bitmap_unref(bm); | |
1490 if ( ticker_prefs & OPT_DISP_SHOW_BUDDYTICKER ) | 1501 if ( ticker_prefs & OPT_DISP_SHOW_BUDDYTICKER ) |
1491 { | 1502 { |
1492 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, | 1503 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, |
1493 NULL, (gchar **)admin_icon_xpm); | 1504 NULL, (gchar **)admin_icon_xpm); |
1494 BuddyTickerSetPixmap(b->name, pm, bm); | 1505 BuddyTickerSetPixmap(b->name, pm, bm); |
1495 gdk_pixmap_unref(pm); | 1506 gdk_pixmap_unref(pm); |
1507 gdk_bitmap_unref(bm); | |
1496 } | 1508 } |
1497 } else if (b->uc & UC_UNCONFIRMED) { | 1509 } else if (b->uc & UC_UNCONFIRMED) { |
1498 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, | 1510 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, |
1499 NULL, (gchar **)dt_icon_xpm); | 1511 NULL, (gchar **)dt_icon_xpm); |
1500 gtk_pixmap_set(GTK_PIXMAP(b->pix), pm, bm); | 1512 gtk_pixmap_set(GTK_PIXMAP(b->pix), pm, bm); |
1501 gdk_pixmap_unref(pm); | 1513 gdk_pixmap_unref(pm); |
1514 gdk_bitmap_unref(bm); | |
1502 if ( ticker_prefs & OPT_DISP_SHOW_BUDDYTICKER ) | 1515 if ( ticker_prefs & OPT_DISP_SHOW_BUDDYTICKER ) |
1503 { | 1516 { |
1504 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, | 1517 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, |
1505 NULL, (gchar **)dt_icon_xpm); | 1518 NULL, (gchar **)dt_icon_xpm); |
1506 BuddyTickerSetPixmap(b->name, pm, bm); | 1519 BuddyTickerSetPixmap(b->name, pm, bm); |
1507 gdk_pixmap_unref(pm); | 1520 gdk_pixmap_unref(pm); |
1521 gdk_bitmap_unref(bm); | |
1508 } | 1522 } |
1509 } else { | 1523 } else { |
1510 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, | 1524 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, |
1511 NULL, (gchar **)no_icon_xpm); | 1525 NULL, (gchar **)no_icon_xpm); |
1512 gtk_pixmap_set(GTK_PIXMAP(b->pix), pm, bm); | 1526 gtk_pixmap_set(GTK_PIXMAP(b->pix), pm, bm); |
1513 gdk_pixmap_unref(pm); | 1527 gdk_pixmap_unref(pm); |
1528 gdk_bitmap_unref(bm); | |
1514 if ( ticker_prefs & OPT_DISP_SHOW_BUDDYTICKER ) | 1529 if ( ticker_prefs & OPT_DISP_SHOW_BUDDYTICKER ) |
1515 { | 1530 { |
1516 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, | 1531 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, |
1517 NULL, (gchar **)no_icon_xpm); | 1532 NULL, (gchar **)no_icon_xpm); |
1518 BuddyTickerSetPixmap(b->name, pm, bm); | 1533 BuddyTickerSetPixmap(b->name, pm, bm); |
1519 gdk_pixmap_unref(pm); | 1534 gdk_pixmap_unref(pm); |
1535 gdk_bitmap_unref(bm); | |
1520 } | 1536 } |
1521 } | 1537 } |
1522 if (display_options & OPT_DISP_SHOW_PIXMAPS) | 1538 if (display_options & OPT_DISP_SHOW_PIXMAPS) |
1523 gtk_widget_show(b->pix); | 1539 gtk_widget_show(b->pix); |
1524 } | 1540 } |
1534 gtk_widget_hide(b->pix); | 1550 gtk_widget_hide(b->pix); |
1535 gtk_pixmap_set(GTK_PIXMAP(b->pix), pm, bm); | 1551 gtk_pixmap_set(GTK_PIXMAP(b->pix), pm, bm); |
1536 if (display_options & OPT_DISP_SHOW_PIXMAPS) | 1552 if (display_options & OPT_DISP_SHOW_PIXMAPS) |
1537 gtk_widget_show(b->pix); | 1553 gtk_widget_show(b->pix); |
1538 gdk_pixmap_unref(pm); | 1554 gdk_pixmap_unref(pm); |
1555 gdk_bitmap_unref(bm); | |
1539 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, | 1556 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, |
1540 NULL, (gchar **)logout_icon_xpm); | 1557 NULL, (gchar **)logout_icon_xpm); |
1541 if ( ticker_prefs & OPT_DISP_SHOW_BUDDYTICKER ) | 1558 if ( ticker_prefs & OPT_DISP_SHOW_BUDDYTICKER ) |
1542 BuddyTickerSetPixmap( b->name, pm, bm ); | 1559 BuddyTickerSetPixmap( b->name, pm, bm ); |
1543 gdk_pixmap_unref(pm); | 1560 gdk_pixmap_unref(pm); |
1561 gdk_bitmap_unref(bm); | |
1544 if (display_options & OPT_DISP_SHOW_LOGON) { | 1562 if (display_options & OPT_DISP_SHOW_LOGON) { |
1545 struct conversation *c = find_conversation(b->name); | 1563 struct conversation *c = find_conversation(b->name); |
1546 if (c) { | 1564 if (c) { |
1547 char tmp[1024]; | 1565 char tmp[1024]; |
1548 | 1566 |
1646 pm = gdk_pixmap_create_from_xpm_d(menu->parent->window, &mask, NULL, xpm); | 1664 pm = gdk_pixmap_create_from_xpm_d(menu->parent->window, &mask, NULL, xpm); |
1647 | 1665 |
1648 pixmap = gtk_pixmap_new(pm, mask); | 1666 pixmap = gtk_pixmap_new(pm, mask); |
1649 gtk_widget_show(pixmap); | 1667 gtk_widget_show(pixmap); |
1650 gdk_pixmap_unref(pm); | 1668 gdk_pixmap_unref(pm); |
1669 gdk_bitmap_unref(mask); | |
1651 | 1670 |
1652 gtk_box_pack_start(GTK_BOX(hbox), pixmap, FALSE, FALSE, 2); | 1671 gtk_box_pack_start(GTK_BOX(hbox), pixmap, FALSE, FALSE, 2); |
1653 | 1672 |
1654 /* Create our label and pack it */ | 1673 /* Create our label and pack it */ |
1655 | 1674 |