Mercurial > pidgin.yaz
comparison src/gtkconv.c @ 5049:24d0da9c56f2
[gaim-migrate @ 5397]
(18:16:24) xOr: LSchiere: makes them work like the bold etc buttons
(18:16:39) xOr: LSchiere: click a font size button twice, and compare to bold
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Sun, 06 Apr 2003 22:18:30 +0000 |
parents | 44945824ba60 |
children | b37d7d09ec83 |
comparison
equal
deleted
inserted
replaced
5048:cb320b74a0dd | 5049:24d0da9c56f2 |
---|---|
355 &start_iter, &end_iter, FALSE); | 355 &start_iter, &end_iter, FALSE); |
356 | 356 |
357 set_toggle(gtkconv->toolbar.bold, FALSE); | 357 set_toggle(gtkconv->toolbar.bold, FALSE); |
358 set_toggle(gtkconv->toolbar.italic, FALSE); | 358 set_toggle(gtkconv->toolbar.italic, FALSE); |
359 set_toggle(gtkconv->toolbar.underline, FALSE); | 359 set_toggle(gtkconv->toolbar.underline, FALSE); |
360 set_toggle(gtkconv->toolbar.larger_size, FALSE); | |
360 set_toggle(gtkconv->toolbar.normal_size, FALSE); | 361 set_toggle(gtkconv->toolbar.normal_size, FALSE); |
362 set_toggle(gtkconv->toolbar.smaller_size,FALSE); | |
361 set_toggle(gtkconv->toolbar.font, FALSE); | 363 set_toggle(gtkconv->toolbar.font, FALSE); |
362 set_toggle(gtkconv->toolbar.fgcolor, FALSE); | 364 set_toggle(gtkconv->toolbar.fgcolor, FALSE); |
363 set_toggle(gtkconv->toolbar.bgcolor, FALSE); | 365 set_toggle(gtkconv->toolbar.bgcolor, FALSE); |
364 set_toggle(gtkconv->toolbar.link, FALSE); | 366 set_toggle(gtkconv->toolbar.link, FALSE); |
365 | 367 |
1784 } | 1786 } |
1785 | 1787 |
1786 static void | 1788 static void |
1787 do_small(GtkWidget *small, struct gaim_gtk_conversation *gtkconv) | 1789 do_small(GtkWidget *small, struct gaim_gtk_conversation *gtkconv) |
1788 { | 1790 { |
1789 gaim_gtk_surround(gtkconv, "<FONT SIZE=\"1\">", "</FONT>"); | 1791 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(small))) |
1792 gaim_gtk_surround(gtkconv, "<FONT SIZE=\"1\">", "</FONT>"); | |
1793 else | |
1794 gaim_gtk_advance_past(gtkconv, "<FONT SIZE=\"1\">", "</FONT>"); | |
1790 | 1795 |
1791 gtk_widget_grab_focus(gtkconv->entry); | 1796 gtk_widget_grab_focus(gtkconv->entry); |
1792 } | 1797 } |
1793 | 1798 |
1794 static void | 1799 static void |
1795 do_normal(GtkWidget *small, struct gaim_gtk_conversation *gtkconv) | 1800 do_normal(GtkWidget *normal, struct gaim_gtk_conversation *gtkconv) |
1796 { | 1801 { |
1797 gaim_gtk_surround(gtkconv, "<FONT SIZE=\"3\">", "</FONT>"); | 1802 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(normal))) |
1803 gaim_gtk_surround(gtkconv, "<FONT SIZE=\"3\">", "</FONT>"); | |
1804 else | |
1805 gaim_gtk_advance_past(gtkconv, "<FONT SIZE=\"3\">", "</FONT>"); | |
1798 | 1806 |
1799 gtk_widget_grab_focus(gtkconv->entry); | 1807 gtk_widget_grab_focus(gtkconv->entry); |
1800 } | 1808 } |
1801 | 1809 |
1802 static void | 1810 static void |
1803 do_big(GtkWidget *small, struct gaim_gtk_conversation *gtkconv) | 1811 do_big(GtkWidget *large, struct gaim_gtk_conversation *gtkconv) |
1804 { | 1812 { |
1805 gaim_gtk_surround(gtkconv, "<FONT SIZE=\"5\">", "</FONT>"); | 1813 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(large))) |
1814 gaim_gtk_surround(gtkconv, "<FONT SIZE=\"5\">", "</FONT>"); | |
1815 else | |
1816 gaim_gtk_advance_past(gtkconv, "<FONT SIZE=\"5\">", "</FONT>"); | |
1806 | 1817 |
1807 gtk_widget_grab_focus(gtkconv->entry); | 1818 gtk_widget_grab_focus(gtkconv->entry); |
1808 } | 1819 } |
1809 | 1820 |
1810 static void | 1821 static void |
2768 _("Larger font size"), NULL); | 2779 _("Larger font size"), NULL); |
2769 | 2780 |
2770 g_signal_connect(G_OBJECT(button), "clicked", | 2781 g_signal_connect(G_OBJECT(button), "clicked", |
2771 G_CALLBACK(do_big), gtkconv); | 2782 G_CALLBACK(do_big), gtkconv); |
2772 | 2783 |
2784 gtkconv->toolbar.larger_size = button; | |
2785 | |
2773 /* Normal font size */ | 2786 /* Normal font size */ |
2774 button = gaim_pixbuf_toolbar_button_from_stock(GAIM_STOCK_TEXT_NORMAL); | 2787 button = gaim_pixbuf_toolbar_button_from_stock(GAIM_STOCK_TEXT_NORMAL); |
2775 gtk_size_group_add_widget(sg, button); | 2788 gtk_size_group_add_widget(sg, button); |
2776 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); | 2789 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
2777 gtk_tooltips_set_tip(gtkconv->tooltips, button, | 2790 gtk_tooltips_set_tip(gtkconv->tooltips, button, |
2789 gtk_tooltips_set_tip(gtkconv->tooltips, button, | 2802 gtk_tooltips_set_tip(gtkconv->tooltips, button, |
2790 _("Smaller font size"), NULL); | 2803 _("Smaller font size"), NULL); |
2791 | 2804 |
2792 g_signal_connect(G_OBJECT(button), "clicked", | 2805 g_signal_connect(G_OBJECT(button), "clicked", |
2793 G_CALLBACK(do_small), gtkconv); | 2806 G_CALLBACK(do_small), gtkconv); |
2807 | |
2808 gtkconv->toolbar.smaller_size = button; | |
2794 | 2809 |
2795 /* Sep */ | 2810 /* Sep */ |
2796 sep = gtk_vseparator_new(); | 2811 sep = gtk_vseparator_new(); |
2797 gtk_box_pack_start(GTK_BOX(hbox), sep, FALSE, FALSE, 0); | 2812 gtk_box_pack_start(GTK_BOX(hbox), sep, FALSE, FALSE, 0); |
2798 | 2813 |