| 679 gtk_box_pack_start(GTK_BOX(vbox), toolbar, FALSE, FALSE, 0); |
681 gtk_box_pack_start(GTK_BOX(vbox), toolbar, FALSE, FALSE, 0); |
| 680 |
682 |
| 681 /* Save */ |
683 /* Save */ |
| 682 item = gtk_tool_button_new_from_stock(GTK_STOCK_SAVE); |
684 item = gtk_tool_button_new_from_stock(GTK_STOCK_SAVE); |
| 683 gtk_tool_item_set_is_important(item, TRUE); |
685 gtk_tool_item_set_is_important(item, TRUE); |
| 684 #if GTK_CHECK_VERSION(2,12,0) |
|
| 685 gtk_tool_item_set_tooltip_text(item, _("Save")); |
686 gtk_tool_item_set_tooltip_text(item, _("Save")); |
| 686 #else |
|
| 687 gtk_tool_item_set_tooltip(item, tooltips, _("Save"), NULL); |
|
| 688 #endif |
|
| 689 g_signal_connect(G_OBJECT(item), "clicked", G_CALLBACK(save_cb), win); |
687 g_signal_connect(G_OBJECT(item), "clicked", G_CALLBACK(save_cb), win); |
| 690 gtk_container_add(GTK_CONTAINER(toolbar), GTK_WIDGET(item)); |
688 gtk_container_add(GTK_CONTAINER(toolbar), GTK_WIDGET(item)); |
| 691 |
689 |
| 692 /* Clear button */ |
690 /* Clear button */ |
| 693 item = gtk_tool_button_new_from_stock(GTK_STOCK_CLEAR); |
691 item = gtk_tool_button_new_from_stock(GTK_STOCK_CLEAR); |
| 694 gtk_tool_item_set_is_important(item, TRUE); |
692 gtk_tool_item_set_is_important(item, TRUE); |
| 695 #if GTK_CHECK_VERSION(2,12,0) |
|
| 696 gtk_tool_item_set_tooltip_text(item, _("Clear")); |
693 gtk_tool_item_set_tooltip_text(item, _("Clear")); |
| 697 #else |
|
| 698 gtk_tool_item_set_tooltip(item, tooltips, _("Clear"), NULL); |
|
| 699 #endif |
|
| 700 g_signal_connect(G_OBJECT(item), "clicked", G_CALLBACK(clear_cb), win); |
694 g_signal_connect(G_OBJECT(item), "clicked", G_CALLBACK(clear_cb), win); |
| 701 gtk_container_add(GTK_CONTAINER(toolbar), GTK_WIDGET(item)); |
695 gtk_container_add(GTK_CONTAINER(toolbar), GTK_WIDGET(item)); |
| 702 |
696 |
| 703 item = gtk_separator_tool_item_new(); |
697 item = gtk_separator_tool_item_new(); |
| 704 gtk_container_add(GTK_CONTAINER(toolbar), GTK_WIDGET(item)); |
698 gtk_container_add(GTK_CONTAINER(toolbar), GTK_WIDGET(item)); |
| 705 |
699 |
| 706 /* Pause */ |
700 /* Pause */ |
| 707 item = gtk_toggle_tool_button_new_from_stock(PIDGIN_STOCK_PAUSE); |
701 item = gtk_toggle_tool_button_new_from_stock(PIDGIN_STOCK_PAUSE); |
| 708 gtk_tool_item_set_is_important(item, TRUE); |
702 gtk_tool_item_set_is_important(item, TRUE); |
| 709 #if GTK_CHECK_VERSION(2,12,0) |
|
| 710 gtk_tool_item_set_tooltip_text(item, _("Pause")); |
703 gtk_tool_item_set_tooltip_text(item, _("Pause")); |
| 711 #else |
|
| 712 gtk_tool_item_set_tooltip(item, tooltips, _("Pause"), NULL); |
|
| 713 #endif |
|
| 714 g_signal_connect(G_OBJECT(item), "clicked", G_CALLBACK(pause_cb), win); |
704 g_signal_connect(G_OBJECT(item), "clicked", G_CALLBACK(pause_cb), win); |
| 715 gtk_container_add(GTK_CONTAINER(toolbar), GTK_WIDGET(item)); |
705 gtk_container_add(GTK_CONTAINER(toolbar), GTK_WIDGET(item)); |
| 716 |
706 |
| 717 /* regex stuff */ |
707 /* regex stuff */ |
| 718 item = gtk_separator_tool_item_new(); |
708 item = gtk_separator_tool_item_new(); |
| 721 /* regex toggle button */ |
711 /* regex toggle button */ |
| 722 item = gtk_toggle_tool_button_new_from_stock(GTK_STOCK_FIND); |
712 item = gtk_toggle_tool_button_new_from_stock(GTK_STOCK_FIND); |
| 723 gtk_tool_item_set_is_important(item, TRUE); |
713 gtk_tool_item_set_is_important(item, TRUE); |
| 724 win->filter = GTK_WIDGET(item); |
714 win->filter = GTK_WIDGET(item); |
| 725 gtk_tool_button_set_label(GTK_TOOL_BUTTON(win->filter), _("Filter")); |
715 gtk_tool_button_set_label(GTK_TOOL_BUTTON(win->filter), _("Filter")); |
| 726 #if GTK_CHECK_VERSION(2,12,0) |
|
| 727 gtk_tool_item_set_tooltip_text(GTK_TOOL_ITEM(win->filter), _("Filter")); |
716 gtk_tool_item_set_tooltip_text(GTK_TOOL_ITEM(win->filter), _("Filter")); |
| 728 #else |
|
| 729 gtk_tooltips_set_tip(tooltips, win->filter, _("Filter"), NULL); |
|
| 730 #endif |
|
| 731 g_signal_connect(G_OBJECT(win->filter), "clicked", G_CALLBACK(regex_filter_toggled_cb), win); |
717 g_signal_connect(G_OBJECT(win->filter), "clicked", G_CALLBACK(regex_filter_toggled_cb), win); |
| 732 gtk_container_add(GTK_CONTAINER(toolbar), GTK_WIDGET(win->filter)); |
718 gtk_container_add(GTK_CONTAINER(toolbar), GTK_WIDGET(win->filter)); |
| 733 |
719 |
| 734 /* we purposely disable the toggle button here in case |
720 /* we purposely disable the toggle button here in case |
| 735 * /purple/gtk/debug/expression has an empty string. If it does not have |
721 * /purple/gtk/debug/expression has an empty string. If it does not have |
| 743 regex_pref_filter_cb, win); |
729 regex_pref_filter_cb, win); |
| 744 |
730 |
| 745 /* regex entry */ |
731 /* regex entry */ |
| 746 win->expression = gtk_entry_new(); |
732 win->expression = gtk_entry_new(); |
| 747 item = gtk_tool_item_new(); |
733 item = gtk_tool_item_new(); |
| 748 #if GTK_CHECK_VERSION(2,12,0) |
|
| 749 gtk_widget_set_tooltip_text(win->expression, _("Right click for more options.")); |
734 gtk_widget_set_tooltip_text(win->expression, _("Right click for more options.")); |
| 750 #else |
|
| 751 gtk_tooltips_set_tip(tooltips, win->expression, _("Right click for more options."), NULL); |
|
| 752 #endif |
|
| 753 gtk_container_add(GTK_CONTAINER(item), GTK_WIDGET(win->expression)); |
735 gtk_container_add(GTK_CONTAINER(item), GTK_WIDGET(win->expression)); |
| 754 gtk_container_add(GTK_CONTAINER(toolbar), GTK_WIDGET(item)); |
736 gtk_container_add(GTK_CONTAINER(toolbar), GTK_WIDGET(item)); |
| 755 |
737 |
| 756 /* this needs to be before the text is set from the pref if we want it |
738 /* this needs to be before the text is set from the pref if we want it |
| 757 * to colorize a stored expression. |
739 * to colorize a stored expression. |