Mercurial > pidgin
comparison src/conversation.c @ 854:9e2dcad06d3c
[gaim-migrate @ 864]
I am the original pimp. :-p
This isn't finished yet I just wanted to get it commited. We will see
some gaim hacking today :)
committer: Tailor Script <tailor@pidgin.im>
author | Rob Flynn <gaim@robflynn.com> |
---|---|
date | Thu, 07 Sep 2000 17:26:09 +0000 |
parents | be8211f068c4 |
children | b389c4221c89 |
comparison
equal
deleted
inserted
replaced
853:050f244b6829 | 854:9e2dcad06d3c |
---|---|
43 #include "pixmaps/big.xpm" | 43 #include "pixmaps/big.xpm" |
44 #include "pixmaps/fontface.xpm" | 44 #include "pixmaps/fontface.xpm" |
45 #include "pixmaps/speaker.xpm" | 45 #include "pixmaps/speaker.xpm" |
46 #include "pixmaps/smile_icon.xpm" | 46 #include "pixmaps/smile_icon.xpm" |
47 #include "pixmaps/wood.xpm" | 47 #include "pixmaps/wood.xpm" |
48 #include "pixmaps/palette.xpm" | |
49 #include "pixmaps/link.xpm" | 48 #include "pixmaps/link.xpm" |
50 #include "pixmaps/strike.xpm" | 49 #include "pixmaps/strike.xpm" |
51 | 50 |
52 #include "pixmaps/angel.xpm" | 51 #include "pixmaps/angel.xpm" |
53 #include "pixmaps/bigsmile.xpm" | 52 #include "pixmaps/bigsmile.xpm" |
69 #include "pixmaps/oneeye.xpm" | 68 #include "pixmaps/oneeye.xpm" |
70 | 69 |
71 #include "pixmaps/tmp_send.xpm" | 70 #include "pixmaps/tmp_send.xpm" |
72 #include "pixmaps/gnome_remove.xpm" | 71 #include "pixmaps/gnome_remove.xpm" |
73 #include "pixmaps/gnome_add.xpm" | 72 #include "pixmaps/gnome_add.xpm" |
73 #include "pixmaps/fgcolor.xpm" | |
74 #include "pixmaps/bgcolor.xpm" | |
74 #include "pixmaps/cancel.xpm" | 75 #include "pixmaps/cancel.xpm" |
75 #include "pixmaps/warn.xpm" | 76 #include "pixmaps/warn.xpm" |
76 #include "pixmaps/tb_search.xpm" | 77 #include "pixmaps/tb_search.xpm" |
77 #include "pixmaps/block.xpm" | 78 #include "pixmaps/block.xpm" |
78 | 79 |
701 quiet_set(c->bold, FALSE); | 702 quiet_set(c->bold, FALSE); |
702 quiet_set(c->strike, FALSE); | 703 quiet_set(c->strike, FALSE); |
703 quiet_set(c->italic, FALSE); | 704 quiet_set(c->italic, FALSE); |
704 quiet_set(c->underline, FALSE); | 705 quiet_set(c->underline, FALSE); |
705 quiet_set(c->font, FALSE); | 706 quiet_set(c->font, FALSE); |
706 quiet_set(c->palette, FALSE); | 707 quiet_set(c->fgcolorbtn, FALSE); |
708 quiet_set(c->bgcolorbtn, FALSE); | |
707 quiet_set(c->link, FALSE); | 709 quiet_set(c->link, FALSE); |
708 | 710 |
709 if ((general_options & OPT_GEN_BACK_ON_IM) && awaymessage != NULL) { | 711 if ((general_options & OPT_GEN_BACK_ON_IM) && awaymessage != NULL) { |
710 do_im_back(); | 712 do_im_back(); |
711 } | 713 } |
1006 quiet_set(c->italic, TRUE); | 1008 quiet_set(c->italic, TRUE); |
1007 else | 1009 else |
1008 quiet_set(c->italic, FALSE); | 1010 quiet_set(c->italic, FALSE); |
1009 | 1011 |
1010 if (invert_tags(entry, "<FONT COLOR", "</FONT>", 0)) | 1012 if (invert_tags(entry, "<FONT COLOR", "</FONT>", 0)) |
1011 quiet_set(c->palette, TRUE); | 1013 quiet_set(c->fgcolorbtn, TRUE); |
1012 else if (count_tag(entry, "<FONT COLOR", "</FONT>")) | 1014 else if (count_tag(entry, "<FONT COLOR", "</FONT>")) |
1013 quiet_set(c->palette, TRUE); | 1015 quiet_set(c->fgcolorbtn, TRUE); |
1014 else | 1016 else |
1015 quiet_set(c->palette, FALSE); | 1017 quiet_set(c->fgcolorbtn, FALSE); |
1016 | 1018 |
1017 if (invert_tags(entry, "<FONT FACE", "</FONT>", 0)) | 1019 if (invert_tags(entry, "<FONT FACE", "</FONT>", 0)) |
1018 quiet_set(c->font, TRUE); | 1020 quiet_set(c->font, TRUE); |
1019 else if (count_tag(entry, "<FONT FACE", "</FONT>")) | 1021 else if (count_tag(entry, "<FONT FACE", "</FONT>")) |
1020 quiet_set(c->font, TRUE); | 1022 quiet_set(c->font, TRUE); |
1368 } | 1370 } |
1369 } | 1371 } |
1370 | 1372 |
1371 | 1373 |
1372 GtkWidget *build_conv_toolbar(struct conversation *c) { | 1374 GtkWidget *build_conv_toolbar(struct conversation *c) { |
1373 GdkPixmap *strike_i, *small_i, *normal_i, *big_i, *bold_i, *italic_i, *underline_i, *speaker_i, *wood_i, *palette_i, *link_i, *font_i, *smiley_i; | 1375 GdkPixmap *strike_i, *small_i, *normal_i, *big_i, *bold_i, *italic_i, *underline_i, *speaker_i, *wood_i, *fgcolor_i, *bgcolor_i, *link_i, *font_i, *smiley_i; |
1374 GtkWidget *strike_p, *small_p, *normal_p, *big_p, *bold_p, *italic_p, *underline_p, *speaker_p, *wood_p, *palette_p, *link_p, *font_p, *smiley_p; | 1376 GtkWidget *strike_p, *small_p, *normal_p, *big_p, *bold_p, *italic_p, *underline_p, *speaker_p, *wood_p, *fgcolor_p, *bgcolor_p, *link_p, *font_p, *smiley_p; |
1375 GtkWidget *strike, *small, *normal, *big, *bold, *italic, *underline, *speaker, *wood, *palette, *link, *font, *smiley; | 1377 GtkWidget *strike, *small, *normal, *big, *bold, *italic, *underline, *speaker, *wood, *fgcolorbtn, *bgcolorbtn, *link, *font, *smiley; |
1376 GdkBitmap *mask; | 1378 GdkBitmap *mask; |
1377 GtkWidget *toolbar; | 1379 GtkWidget *toolbar; |
1378 GtkWidget *win; | 1380 GtkWidget *win; |
1379 GtkWidget *entry; | 1381 GtkWidget *entry; |
1380 | 1382 |
1381 toolbar = gtk_toolbar_new(GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_ICONS); | 1383 toolbar = gtk_toolbar_new(GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_ICONS); |
1382 win = c->window; | 1384 win = c->window; |
1383 entry = c->entry; | 1385 entry = c->entry; |
1384 | 1386 |
1385 link_i = gdk_pixmap_create_from_xpm_d(win->window, &mask, | 1387 link_i = gdk_pixmap_create_from_xpm_d(win->window, &mask, |
1386 &win->style->white, bold_xpm ); | 1388 &win->style->white, link_xpm ); |
1387 link_p = gtk_pixmap_new(link_i, mask); | 1389 link_p = gtk_pixmap_new(link_i, mask); |
1388 gtk_widget_show(link_p); | 1390 gtk_widget_show(link_p); |
1389 gdk_bitmap_unref(mask); | 1391 gdk_bitmap_unref(mask); |
1390 | 1392 |
1391 palette_i = gdk_pixmap_create_from_xpm_d (win->window, &mask, | 1393 fgcolor_i = gdk_pixmap_create_from_xpm_d (win->window, &mask, |
1392 &win->style->white, bold_xpm ); | 1394 &win->style->white, fgcolor_xpm ); |
1393 palette_p = gtk_pixmap_new(palette_i, mask); | 1395 fgcolor_p = gtk_pixmap_new(fgcolor_i, mask); |
1394 gtk_widget_show(palette_p); | 1396 gtk_widget_show(fgcolor_p); |
1397 gdk_bitmap_unref(mask); | |
1398 | |
1399 bgcolor_i = gdk_pixmap_create_from_xpm_d (win->window, &mask, | |
1400 &win->style->white, bgcolor_xpm ); | |
1401 bgcolor_p = gtk_pixmap_new(bgcolor_i, mask); | |
1402 gtk_widget_show(bgcolor_p); | |
1395 gdk_bitmap_unref(mask); | 1403 gdk_bitmap_unref(mask); |
1396 | 1404 |
1397 wood_i = gdk_pixmap_create_from_xpm_d ( win->window, &mask, | 1405 wood_i = gdk_pixmap_create_from_xpm_d ( win->window, &mask, |
1398 &win->style->white, wood_xpm ); | 1406 &win->style->white, wood_xpm ); |
1399 wood_p = gtk_pixmap_new(wood_i, mask); | 1407 wood_p = gtk_pixmap_new(wood_i, mask); |
1483 gtk_toolbar_append_space(GTK_TOOLBAR(toolbar)); | 1491 gtk_toolbar_append_space(GTK_TOOLBAR(toolbar)); |
1484 link = gtk_toolbar_append_element(GTK_TOOLBAR(toolbar), | 1492 link = gtk_toolbar_append_element(GTK_TOOLBAR(toolbar), |
1485 GTK_TOOLBAR_CHILD_TOGGLEBUTTON, | 1493 GTK_TOOLBAR_CHILD_TOGGLEBUTTON, |
1486 NULL, _("Link"), _("Insert Link"), | 1494 NULL, _("Link"), _("Insert Link"), |
1487 _("Link"), link_p, GTK_SIGNAL_FUNC(toggle_link), c); | 1495 _("Link"), link_p, GTK_SIGNAL_FUNC(toggle_link), c); |
1488 palette = gtk_toolbar_append_element(GTK_TOOLBAR(toolbar), | 1496 fgcolorbtn = gtk_toolbar_append_element(GTK_TOOLBAR(toolbar), |
1489 GTK_TOOLBAR_CHILD_TOGGLEBUTTON, | 1497 GTK_TOOLBAR_CHILD_TOGGLEBUTTON, |
1490 NULL, _("Color"), _("Text Color"), | 1498 NULL, _("Color"), _("Text Color"), |
1491 _("Color"), palette_p, GTK_SIGNAL_FUNC(toggle_color), c); | 1499 _("Color"), fgcolor_p, GTK_SIGNAL_FUNC(toggle_color), c); |
1500 bgcolorbtn = gtk_toolbar_append_element(GTK_TOOLBAR(toolbar), | |
1501 GTK_TOOLBAR_CHILD_TOGGLEBUTTON, | |
1502 NULL, _("Color"), _("Background Color"), | |
1503 _("Color"), bgcolor_p, GTK_SIGNAL_FUNC(toggle_color), c); | |
1492 wood = gtk_toolbar_append_element(GTK_TOOLBAR(toolbar), | 1504 wood = gtk_toolbar_append_element(GTK_TOOLBAR(toolbar), |
1493 GTK_TOOLBAR_CHILD_TOGGLEBUTTON, | 1505 GTK_TOOLBAR_CHILD_TOGGLEBUTTON, |
1494 NULL, _("Logging"), _("Enable logging"), | 1506 NULL, _("Logging"), _("Enable logging"), |
1495 _("Logging"), wood_p, GTK_SIGNAL_FUNC(toggle_loggle), c); | 1507 _("Logging"), wood_p, GTK_SIGNAL_FUNC(toggle_loggle), c); |
1496 smiley = gtk_toolbar_append_element(GTK_TOOLBAR(toolbar), | 1508 smiley = gtk_toolbar_append_element(GTK_TOOLBAR(toolbar), |
1520 gtk_button_set_relief(GTK_BUTTON(bold), GTK_RELIEF_NONE); | 1532 gtk_button_set_relief(GTK_BUTTON(bold), GTK_RELIEF_NONE); |
1521 gtk_button_set_relief(GTK_BUTTON(italic), GTK_RELIEF_NONE); | 1533 gtk_button_set_relief(GTK_BUTTON(italic), GTK_RELIEF_NONE); |
1522 gtk_button_set_relief(GTK_BUTTON(underline), GTK_RELIEF_NONE); | 1534 gtk_button_set_relief(GTK_BUTTON(underline), GTK_RELIEF_NONE); |
1523 gtk_button_set_relief(GTK_BUTTON(speaker), GTK_RELIEF_NONE); | 1535 gtk_button_set_relief(GTK_BUTTON(speaker), GTK_RELIEF_NONE); |
1524 gtk_button_set_relief(GTK_BUTTON(wood), GTK_RELIEF_NONE); | 1536 gtk_button_set_relief(GTK_BUTTON(wood), GTK_RELIEF_NONE); |
1525 gtk_button_set_relief(GTK_BUTTON(palette), GTK_RELIEF_NONE); | 1537 gtk_button_set_relief(GTK_BUTTON(fgcolorbtn), GTK_RELIEF_NONE); |
1538 gtk_button_set_relief(GTK_BUTTON(bgcolorbtn), GTK_RELIEF_NONE); | |
1526 gtk_button_set_relief(GTK_BUTTON(link), GTK_RELIEF_NONE); | 1539 gtk_button_set_relief(GTK_BUTTON(link), GTK_RELIEF_NONE); |
1527 gtk_button_set_relief(GTK_BUTTON(font), GTK_RELIEF_NONE); | 1540 gtk_button_set_relief(GTK_BUTTON(font), GTK_RELIEF_NONE); |
1528 gtk_button_set_relief(GTK_BUTTON(small), GTK_RELIEF_NONE); | 1541 gtk_button_set_relief(GTK_BUTTON(small), GTK_RELIEF_NONE); |
1529 gtk_button_set_relief(GTK_BUTTON(smiley), GTK_RELIEF_NONE); | 1542 gtk_button_set_relief(GTK_BUTTON(smiley), GTK_RELIEF_NONE); |
1530 } | 1543 } |
1531 | 1544 |
1532 gtk_widget_show(toolbar); | 1545 gtk_widget_show(toolbar); |
1533 | 1546 |
1534 gdk_pixmap_unref(link_i); | 1547 gdk_pixmap_unref(link_i); |
1535 gdk_pixmap_unref(palette_i); | 1548 gdk_pixmap_unref(fgcolor_i); |
1549 gdk_pixmap_unref(bgcolor_i); | |
1536 gdk_pixmap_unref(wood_i); | 1550 gdk_pixmap_unref(wood_i); |
1537 gdk_pixmap_unref(speaker_i); | 1551 gdk_pixmap_unref(speaker_i); |
1538 gdk_pixmap_unref(strike_i); | 1552 gdk_pixmap_unref(strike_i); |
1539 gdk_pixmap_unref(bold_i); | 1553 gdk_pixmap_unref(bold_i); |
1540 gdk_pixmap_unref(italic_i); | 1554 gdk_pixmap_unref(italic_i); |
1548 c->bold = bold; | 1562 c->bold = bold; |
1549 c->strike = strike; | 1563 c->strike = strike; |
1550 c->italic = italic; | 1564 c->italic = italic; |
1551 c->underline = underline; | 1565 c->underline = underline; |
1552 c->log_button = wood; | 1566 c->log_button = wood; |
1553 c->palette = palette; | 1567 c->fgcolorbtn = fgcolorbtn; |
1568 c->bgcolorbtn = bgcolorbtn; | |
1554 c->link = link; | 1569 c->link = link; |
1555 c->wood = wood; | 1570 c->wood = wood; |
1556 c->font = font; | 1571 c->font = font; |
1557 c->smiley = smiley; | 1572 c->smiley = smiley; |
1558 | 1573 |