| 914 |
914 |
| 915 gtk_box_set_spacing(GTK_BOX(toolbar), GAIM_HIG_BOX_SPACE); |
915 gtk_box_set_spacing(GTK_BOX(toolbar), GAIM_HIG_BOX_SPACE); |
| 916 sg = gtk_size_group_new(GTK_SIZE_GROUP_BOTH); |
916 sg = gtk_size_group_new(GTK_SIZE_GROUP_BOTH); |
| 917 |
917 |
| 918 /* Bold */ |
918 /* Bold */ |
| 919 button = gaim_pixbuf_toolbar_button_from_stock(GTK_STOCK_BOLD); |
919 button = pidgin_pixbuf_toolbar_button_from_stock(GTK_STOCK_BOLD); |
| 920 gtk_size_group_add_widget(sg, button); |
920 gtk_size_group_add_widget(sg, button); |
| 921 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
921 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
| 922 gtk_tooltips_set_tip(toolbar->tooltips, button, _("Bold"), NULL); |
922 gtk_tooltips_set_tip(toolbar->tooltips, button, _("Bold"), NULL); |
| 923 |
923 |
| 924 g_signal_connect(G_OBJECT(button), "clicked", |
924 g_signal_connect(G_OBJECT(button), "clicked", |
| 925 G_CALLBACK(do_bold), toolbar); |
925 G_CALLBACK(do_bold), toolbar); |
| 926 |
926 |
| 927 toolbar->bold = button; |
927 toolbar->bold = button; |
| 928 |
928 |
| 929 /* Italic */ |
929 /* Italic */ |
| 930 button = gaim_pixbuf_toolbar_button_from_stock(GTK_STOCK_ITALIC); |
930 button = pidgin_pixbuf_toolbar_button_from_stock(GTK_STOCK_ITALIC); |
| 931 gtk_size_group_add_widget(sg, button); |
931 gtk_size_group_add_widget(sg, button); |
| 932 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
932 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
| 933 gtk_tooltips_set_tip(toolbar->tooltips, button, _("Italic"), NULL); |
933 gtk_tooltips_set_tip(toolbar->tooltips, button, _("Italic"), NULL); |
| 934 |
934 |
| 935 g_signal_connect(G_OBJECT(button), "clicked", |
935 g_signal_connect(G_OBJECT(button), "clicked", |
| 936 G_CALLBACK(do_italic), toolbar); |
936 G_CALLBACK(do_italic), toolbar); |
| 937 |
937 |
| 938 toolbar->italic = button; |
938 toolbar->italic = button; |
| 939 |
939 |
| 940 /* Underline */ |
940 /* Underline */ |
| 941 button = gaim_pixbuf_toolbar_button_from_stock(GTK_STOCK_UNDERLINE); |
941 button = pidgin_pixbuf_toolbar_button_from_stock(GTK_STOCK_UNDERLINE); |
| 942 gtk_size_group_add_widget(sg, button); |
942 gtk_size_group_add_widget(sg, button); |
| 943 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
943 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
| 944 gtk_tooltips_set_tip(toolbar->tooltips, button, _("Underline"), NULL); |
944 gtk_tooltips_set_tip(toolbar->tooltips, button, _("Underline"), NULL); |
| 945 |
945 |
| 946 g_signal_connect(G_OBJECT(button), "clicked", |
946 g_signal_connect(G_OBJECT(button), "clicked", |
| 951 /* Sep */ |
951 /* Sep */ |
| 952 sep = gtk_vseparator_new(); |
952 sep = gtk_vseparator_new(); |
| 953 gtk_box_pack_start(GTK_BOX(hbox), sep, FALSE, FALSE, 0); |
953 gtk_box_pack_start(GTK_BOX(hbox), sep, FALSE, FALSE, 0); |
| 954 |
954 |
| 955 /* Increase font size */ |
955 /* Increase font size */ |
| 956 button = gaim_pixbuf_toolbar_button_from_stock(GAIM_STOCK_TEXT_BIGGER); |
956 button = pidgin_pixbuf_toolbar_button_from_stock(GAIM_STOCK_TEXT_BIGGER); |
| 957 gtk_size_group_add_widget(sg, button); |
957 gtk_size_group_add_widget(sg, button); |
| 958 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
958 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
| 959 gtk_tooltips_set_tip(toolbar->tooltips, button, |
959 gtk_tooltips_set_tip(toolbar->tooltips, button, |
| 960 _("Larger font size"), NULL); |
960 _("Larger font size"), NULL); |
| 961 |
961 |
| 963 G_CALLBACK(do_big), toolbar); |
963 G_CALLBACK(do_big), toolbar); |
| 964 |
964 |
| 965 toolbar->larger_size = button; |
965 toolbar->larger_size = button; |
| 966 |
966 |
| 967 /* Decrease font size */ |
967 /* Decrease font size */ |
| 968 button = gaim_pixbuf_toolbar_button_from_stock(GAIM_STOCK_TEXT_SMALLER); |
968 button = pidgin_pixbuf_toolbar_button_from_stock(GAIM_STOCK_TEXT_SMALLER); |
| 969 gtk_size_group_add_widget(sg, button); |
969 gtk_size_group_add_widget(sg, button); |
| 970 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
970 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
| 971 gtk_tooltips_set_tip(toolbar->tooltips, button, |
971 gtk_tooltips_set_tip(toolbar->tooltips, button, |
| 972 _("Smaller font size"), NULL); |
972 _("Smaller font size"), NULL); |
| 973 |
973 |
| 980 sep = gtk_vseparator_new(); |
980 sep = gtk_vseparator_new(); |
| 981 gtk_box_pack_start(GTK_BOX(hbox), sep, FALSE, FALSE, 0); |
981 gtk_box_pack_start(GTK_BOX(hbox), sep, FALSE, FALSE, 0); |
| 982 |
982 |
| 983 /* Font Face */ |
983 /* Font Face */ |
| 984 |
984 |
| 985 button = gaim_pixbuf_toolbar_button_from_stock(GTK_STOCK_SELECT_FONT); |
985 button = pidgin_pixbuf_toolbar_button_from_stock(GTK_STOCK_SELECT_FONT); |
| 986 gtk_size_group_add_widget(sg, button); |
986 gtk_size_group_add_widget(sg, button); |
| 987 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
987 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
| 988 gtk_tooltips_set_tip(toolbar->tooltips, button, |
988 gtk_tooltips_set_tip(toolbar->tooltips, button, |
| 989 _("Font face"), NULL); |
989 _("Font face"), NULL); |
| 990 |
990 |
| 992 G_CALLBACK(toggle_font), toolbar); |
992 G_CALLBACK(toggle_font), toolbar); |
| 993 |
993 |
| 994 toolbar->font = button; |
994 toolbar->font = button; |
| 995 |
995 |
| 996 /* Foreground Color */ |
996 /* Foreground Color */ |
| 997 button = gaim_pixbuf_toolbar_button_from_stock(GAIM_STOCK_FGCOLOR); |
997 button = pidgin_pixbuf_toolbar_button_from_stock(GAIM_STOCK_FGCOLOR); |
| 998 gtk_size_group_add_widget(sg, button); |
998 gtk_size_group_add_widget(sg, button); |
| 999 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
999 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
| 1000 gtk_tooltips_set_tip(toolbar->tooltips, button, |
1000 gtk_tooltips_set_tip(toolbar->tooltips, button, |
| 1001 _("Foreground font color"), NULL); |
1001 _("Foreground font color"), NULL); |
| 1002 |
1002 |
| 1004 G_CALLBACK(toggle_fg_color), toolbar); |
1004 G_CALLBACK(toggle_fg_color), toolbar); |
| 1005 |
1005 |
| 1006 toolbar->fgcolor = button; |
1006 toolbar->fgcolor = button; |
| 1007 |
1007 |
| 1008 /* Background Color */ |
1008 /* Background Color */ |
| 1009 button = gaim_pixbuf_toolbar_button_from_stock(GAIM_STOCK_BGCOLOR); |
1009 button = pidgin_pixbuf_toolbar_button_from_stock(GAIM_STOCK_BGCOLOR); |
| 1010 gtk_size_group_add_widget(sg, button); |
1010 gtk_size_group_add_widget(sg, button); |
| 1011 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
1011 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
| 1012 gtk_tooltips_set_tip(toolbar->tooltips, button, |
1012 gtk_tooltips_set_tip(toolbar->tooltips, button, |
| 1013 _("Background color"), NULL); |
1013 _("Background color"), NULL); |
| 1014 |
1014 |
| 1020 /* Sep */ |
1020 /* Sep */ |
| 1021 sep = gtk_vseparator_new(); |
1021 sep = gtk_vseparator_new(); |
| 1022 gtk_box_pack_start(GTK_BOX(hbox), sep, FALSE, FALSE, 0); |
1022 gtk_box_pack_start(GTK_BOX(hbox), sep, FALSE, FALSE, 0); |
| 1023 |
1023 |
| 1024 /* Reset Formatting */ |
1024 /* Reset Formatting */ |
| 1025 button = gaim_pixbuf_toolbar_button_from_stock(GAIM_STOCK_CLEAR); |
1025 button = pidgin_pixbuf_toolbar_button_from_stock(GAIM_STOCK_CLEAR); |
| 1026 gtk_size_group_add_widget(sg, button); |
1026 gtk_size_group_add_widget(sg, button); |
| 1027 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
1027 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
| 1028 gtk_tooltips_set_tip(toolbar->tooltips, button, |
1028 gtk_tooltips_set_tip(toolbar->tooltips, button, |
| 1029 _("Reset formatting"), NULL); |
1029 _("Reset formatting"), NULL); |
| 1030 |
1030 |
| 1036 /* Sep */ |
1036 /* Sep */ |
| 1037 sep = gtk_vseparator_new(); |
1037 sep = gtk_vseparator_new(); |
| 1038 gtk_box_pack_start(GTK_BOX(hbox), sep, FALSE, FALSE, 0); |
1038 gtk_box_pack_start(GTK_BOX(hbox), sep, FALSE, FALSE, 0); |
| 1039 |
1039 |
| 1040 /* Insert Link */ |
1040 /* Insert Link */ |
| 1041 button = gaim_pixbuf_toolbar_button_from_stock(GAIM_STOCK_LINK); |
1041 button = pidgin_pixbuf_toolbar_button_from_stock(GAIM_STOCK_LINK); |
| 1042 gtk_size_group_add_widget(sg, button); |
1042 gtk_size_group_add_widget(sg, button); |
| 1043 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
1043 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
| 1044 gtk_tooltips_set_tip(toolbar->tooltips, button, _("Insert link"), NULL); |
1044 gtk_tooltips_set_tip(toolbar->tooltips, button, _("Insert link"), NULL); |
| 1045 g_signal_connect(G_OBJECT(button), "clicked", |
1045 g_signal_connect(G_OBJECT(button), "clicked", |
| 1046 G_CALLBACK(insert_link_cb), toolbar); |
1046 G_CALLBACK(insert_link_cb), toolbar); |
| 1047 |
1047 |
| 1048 toolbar->link = button; |
1048 toolbar->link = button; |
| 1049 |
1049 |
| 1050 /* Insert IM Image */ |
1050 /* Insert IM Image */ |
| 1051 button = gaim_pixbuf_toolbar_button_from_stock(GAIM_STOCK_IMAGE); |
1051 button = pidgin_pixbuf_toolbar_button_from_stock(GAIM_STOCK_IMAGE); |
| 1052 gtk_size_group_add_widget(sg, button); |
1052 gtk_size_group_add_widget(sg, button); |
| 1053 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
1053 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
| 1054 gtk_tooltips_set_tip(toolbar->tooltips, button, _("Insert image"), NULL); |
1054 gtk_tooltips_set_tip(toolbar->tooltips, button, _("Insert image"), NULL); |
| 1055 |
1055 |
| 1056 g_signal_connect(G_OBJECT(button), "clicked", |
1056 g_signal_connect(G_OBJECT(button), "clicked", |
| 1057 G_CALLBACK(insert_image_cb), toolbar); |
1057 G_CALLBACK(insert_image_cb), toolbar); |
| 1058 |
1058 |
| 1059 toolbar->image = button; |
1059 toolbar->image = button; |
| 1060 |
1060 |
| 1061 /* Insert Smiley */ |
1061 /* Insert Smiley */ |
| 1062 button = gaim_pixbuf_toolbar_button_from_stock(GAIM_STOCK_SMILEY); |
1062 button = pidgin_pixbuf_toolbar_button_from_stock(GAIM_STOCK_SMILEY); |
| 1063 gtk_size_group_add_widget(sg, button); |
1063 gtk_size_group_add_widget(sg, button); |
| 1064 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
1064 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
| 1065 gtk_tooltips_set_tip(toolbar->tooltips, button, _("Insert smiley"), NULL); |
1065 gtk_tooltips_set_tip(toolbar->tooltips, button, _("Insert smiley"), NULL); |
| 1066 |
1066 |
| 1067 g_signal_connect(G_OBJECT(button), "clicked", |
1067 g_signal_connect(G_OBJECT(button), "clicked", |