Mercurial > pidgin.yaz
comparison src/conversation.c @ 909:9f2afe5faed5
[gaim-migrate @ 919]
yay, change IM windows automagically
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Thu, 14 Sep 2000 22:11:28 +0000 |
parents | 08d5037c9296 |
children | 378c862a2381 |
comparison
equal
deleted
inserted
replaced
908:d0527e1d2050 | 909:9f2afe5faed5 |
---|---|
65 #include "pixmaps/wink.xpm" | 65 #include "pixmaps/wink.xpm" |
66 #include "pixmaps/yell.xpm" | 66 #include "pixmaps/yell.xpm" |
67 #include "pixmaps/luke03.xpm" | 67 #include "pixmaps/luke03.xpm" |
68 #include "pixmaps/oneeye.xpm" | 68 #include "pixmaps/oneeye.xpm" |
69 | 69 |
70 #include "pixmaps/tmp_send.xpm" | |
71 #include "pixmaps/gnome_remove.xpm" | |
72 #include "pixmaps/gnome_add.xpm" | |
73 #include "pixmaps/fgcolor.xpm" | |
74 #include "pixmaps/bgcolor.xpm" | |
75 #include "pixmaps/cancel.xpm" | |
76 #include "pixmaps/warn.xpm" | |
77 #include "pixmaps/tb_search.xpm" | |
78 #include "pixmaps/block.xpm" | |
79 | |
80 int state_lock=0; | 70 int state_lock=0; |
81 | 71 |
82 GdkPixmap *dark_icon_pm = NULL; | 72 GdkPixmap *dark_icon_pm = NULL; |
83 GdkBitmap *dark_icon_bm = NULL; | 73 GdkBitmap *dark_icon_bm = NULL; |
84 | 74 |
436 | 426 |
437 void add_callback(GtkWidget *widget, struct conversation *c) | 427 void add_callback(GtkWidget *widget, struct conversation *c) |
438 { | 428 { |
439 if (find_buddy(c->name) != NULL) { | 429 if (find_buddy(c->name) != NULL) { |
440 gboolean dispstyle = (display_options & OPT_DISP_CONV_SHOW_TEXT) ? TRUE : FALSE; | 430 gboolean dispstyle = (display_options & OPT_DISP_CONV_SHOW_TEXT) ? TRUE : FALSE; |
441 GtkWidget *parent = c->add_button->parent; | 431 GtkWidget *parent = c->add->parent; |
442 sprintf(debug_buff,_("Removing '%s' from buddylist.\n"), c->name); | 432 sprintf(debug_buff,_("Removing '%s' from buddylist.\n"), c->name); |
443 debug_print(debug_buff); | 433 debug_print(debug_buff); |
444 remove_buddy(find_group_by_buddy(c->name), find_buddy(c->name)); | 434 remove_buddy(find_group_by_buddy(c->name), find_buddy(c->name)); |
445 build_edit_tree(); | 435 build_edit_tree(); |
446 gtk_widget_destroy(c->add_button); | 436 gtk_widget_destroy(c->add); |
447 c->add_button = picture_button2(c->window, _("Add"), gnome_add_xpm, dispstyle); | 437 c->add = picture_button2(c->window, _("Add"), gnome_add_xpm, dispstyle); |
448 gtk_signal_connect(GTK_OBJECT(c->add_button), "clicked", GTK_SIGNAL_FUNC(add_callback), c); | 438 gtk_signal_connect(GTK_OBJECT(c->add), "clicked", GTK_SIGNAL_FUNC(add_callback), c); |
449 gtk_box_pack_end(GTK_BOX(parent), c->add_button, dispstyle, dispstyle, 0); | 439 gtk_box_pack_end(GTK_BOX(parent), c->add, dispstyle, dispstyle, 0); |
450 gtk_box_reorder_child(GTK_BOX(parent), c->add_button, 1); | 440 gtk_box_reorder_child(GTK_BOX(parent), c->add, 2); |
451 gtk_widget_show(c->add_button); | 441 gtk_widget_show(c->add); |
452 } | 442 } |
453 else | 443 else |
454 { | 444 { |
455 show_add_buddy(c->name, NULL); | 445 show_add_buddy(c->name, NULL); |
456 } | 446 } |
1689 gtk_text_set_editable(GTK_TEXT(entry), TRUE); | 1679 gtk_text_set_editable(GTK_TEXT(entry), TRUE); |
1690 gtk_text_set_word_wrap(GTK_TEXT(entry), TRUE); | 1680 gtk_text_set_word_wrap(GTK_TEXT(entry), TRUE); |
1691 gtk_object_set_user_data(GTK_OBJECT(entry), c); | 1681 gtk_object_set_user_data(GTK_OBJECT(entry), c); |
1692 c->entry = entry; | 1682 c->entry = entry; |
1693 gtk_signal_connect(GTK_OBJECT(entry), "activate", GTK_SIGNAL_FUNC(send_callback),c); | 1683 gtk_signal_connect(GTK_OBJECT(entry), "activate", GTK_SIGNAL_FUNC(send_callback),c); |
1694 c->add_button = add; | |
1695 | 1684 |
1696 /* Toolbar */ | 1685 /* Toolbar */ |
1697 toolbar = build_conv_toolbar(c); | 1686 toolbar = build_conv_toolbar(c); |
1698 | 1687 |
1699 /* Text box */ | 1688 /* Text box */ |
1718 gtk_widget_set_usize(sw, 320, 150); | 1707 gtk_widget_set_usize(sw, 320, 150); |
1719 | 1708 |
1720 /* Ready and pack buttons */ | 1709 /* Ready and pack buttons */ |
1721 gtk_object_set_user_data(GTK_OBJECT(win), c); | 1710 gtk_object_set_user_data(GTK_OBJECT(win), c); |
1722 gtk_object_set_user_data(GTK_OBJECT(close), c); | 1711 gtk_object_set_user_data(GTK_OBJECT(close), c); |
1712 c->close = close; | |
1723 gtk_signal_connect(GTK_OBJECT(close), "clicked", GTK_SIGNAL_FUNC(close_callback), c); | 1713 gtk_signal_connect(GTK_OBJECT(close), "clicked", GTK_SIGNAL_FUNC(close_callback), c); |
1714 c->send = send; | |
1724 gtk_signal_connect(GTK_OBJECT(send), "clicked", GTK_SIGNAL_FUNC(send_callback), c); | 1715 gtk_signal_connect(GTK_OBJECT(send), "clicked", GTK_SIGNAL_FUNC(send_callback), c); |
1716 c->add = add; | |
1725 gtk_signal_connect(GTK_OBJECT(add), "clicked", GTK_SIGNAL_FUNC(add_callback), c); | 1717 gtk_signal_connect(GTK_OBJECT(add), "clicked", GTK_SIGNAL_FUNC(add_callback), c); |
1718 c->info = info; | |
1726 gtk_signal_connect(GTK_OBJECT(info), "clicked", GTK_SIGNAL_FUNC(info_callback), c); | 1719 gtk_signal_connect(GTK_OBJECT(info), "clicked", GTK_SIGNAL_FUNC(info_callback), c); |
1720 c->warn = warn; | |
1727 gtk_signal_connect(GTK_OBJECT(warn), "clicked", GTK_SIGNAL_FUNC(warn_callback), c); | 1721 gtk_signal_connect(GTK_OBJECT(warn), "clicked", GTK_SIGNAL_FUNC(warn_callback), c); |
1722 c->block = block; | |
1728 gtk_signal_connect(GTK_OBJECT(block), "clicked", GTK_SIGNAL_FUNC(block_callback), c); | 1723 gtk_signal_connect(GTK_OBJECT(block), "clicked", GTK_SIGNAL_FUNC(block_callback), c); |
1729 | 1724 |
1730 gtk_signal_connect(GTK_OBJECT(entry), "key_press_event", GTK_SIGNAL_FUNC(keypress_callback), c); | 1725 gtk_signal_connect(GTK_OBJECT(entry), "key_press_event", GTK_SIGNAL_FUNC(keypress_callback), c); |
1731 | 1726 |
1732 if (display_options & OPT_DISP_CONV_BIG_ENTRY) | 1727 if (display_options & OPT_DISP_CONV_BIG_ENTRY) |
1733 gtk_widget_set_usize(entry, 300, 50); | 1728 gtk_widget_set_usize(entry, 300, 50); |
1734 else | 1729 else |
1735 gtk_widget_set_usize(entry, 300, 25); | 1730 gtk_widget_set_usize(entry, 300, 25); |
1736 | 1731 |
1737 gtk_box_pack_end(GTK_BOX(bbox), close, dispstyle, dispstyle, 0); | 1732 gtk_box_pack_end(GTK_BOX(bbox), close, dispstyle, dispstyle, 0); |
1738 sep = gtk_vseparator_new(); | 1733 c->sep1 = gtk_vseparator_new(); |
1739 gtk_widget_show(sep); | 1734 gtk_widget_show(c->sep1); |
1740 gtk_box_pack_end(GTK_BOX(bbox), sep, dispstyle, dispstyle, 0); | 1735 gtk_box_pack_end(GTK_BOX(bbox), c->sep1, dispstyle, dispstyle, 0); |
1741 gtk_box_pack_end(GTK_BOX(bbox), add, dispstyle, dispstyle, 0); | 1736 gtk_box_pack_end(GTK_BOX(bbox), add, dispstyle, dispstyle, 0); |
1742 gtk_box_pack_end(GTK_BOX(bbox), block, dispstyle, dispstyle, 0); | 1737 gtk_box_pack_end(GTK_BOX(bbox), block, dispstyle, dispstyle, 0); |
1743 gtk_box_pack_end(GTK_BOX(bbox), warn, dispstyle, dispstyle, 0); | 1738 gtk_box_pack_end(GTK_BOX(bbox), warn, dispstyle, dispstyle, 0); |
1744 gtk_box_pack_end(GTK_BOX(bbox), info, dispstyle, dispstyle, 0); | 1739 gtk_box_pack_end(GTK_BOX(bbox), info, dispstyle, dispstyle, 0); |
1745 sep = gtk_vseparator_new(); | 1740 c->sep2 = gtk_vseparator_new(); |
1746 gtk_widget_show(sep); | 1741 gtk_widget_show(c->sep2); |
1747 gtk_box_pack_end(GTK_BOX(bbox), sep, dispstyle, dispstyle, 0); | 1742 gtk_box_pack_end(GTK_BOX(bbox), c->sep2, dispstyle, dispstyle, 0); |
1748 gtk_box_pack_end(GTK_BOX(bbox), send, dispstyle, dispstyle, 0); | 1743 gtk_box_pack_end(GTK_BOX(bbox), send, dispstyle, dispstyle, 0); |
1749 | 1744 |
1750 /* pack and fill the rest */ | 1745 /* pack and fill the rest */ |
1751 gtk_box_pack_start(GTK_BOX(vbox), sw, TRUE, TRUE, 5); | 1746 gtk_box_pack_start(GTK_BOX(vbox), sw, TRUE, TRUE, 5); |
1752 gtk_box_pack_start(GTK_BOX(vbox2), toolbar, FALSE, FALSE, 5); | 1747 gtk_box_pack_start(GTK_BOX(vbox2), toolbar, FALSE, FALSE, 5); |