# HG changeset patch # User Luke Schierer # Date 1049667510 0 # Node ID 24d0da9c56f22f89fc74b07b5397a24f26c5ebc7 # Parent cb320b74a0dd44c8b9293f578b263eb577ef666c [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 diff -r cb320b74a0dd -r 24d0da9c56f2 src/gtkconv.c --- a/src/gtkconv.c Sun Apr 06 18:49:04 2003 +0000 +++ b/src/gtkconv.c Sun Apr 06 22:18:30 2003 +0000 @@ -357,7 +357,9 @@ set_toggle(gtkconv->toolbar.bold, FALSE); set_toggle(gtkconv->toolbar.italic, FALSE); set_toggle(gtkconv->toolbar.underline, FALSE); + set_toggle(gtkconv->toolbar.larger_size, FALSE); set_toggle(gtkconv->toolbar.normal_size, FALSE); + set_toggle(gtkconv->toolbar.smaller_size,FALSE); set_toggle(gtkconv->toolbar.font, FALSE); set_toggle(gtkconv->toolbar.fgcolor, FALSE); set_toggle(gtkconv->toolbar.bgcolor, FALSE); @@ -1786,23 +1788,32 @@ static void do_small(GtkWidget *small, struct gaim_gtk_conversation *gtkconv) { - gaim_gtk_surround(gtkconv, "", ""); + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(small))) + gaim_gtk_surround(gtkconv, "", ""); + else + gaim_gtk_advance_past(gtkconv, "", ""); gtk_widget_grab_focus(gtkconv->entry); } static void -do_normal(GtkWidget *small, struct gaim_gtk_conversation *gtkconv) +do_normal(GtkWidget *normal, struct gaim_gtk_conversation *gtkconv) { - gaim_gtk_surround(gtkconv, "", ""); + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(normal))) + gaim_gtk_surround(gtkconv, "", ""); + else + gaim_gtk_advance_past(gtkconv, "", ""); gtk_widget_grab_focus(gtkconv->entry); } static void -do_big(GtkWidget *small, struct gaim_gtk_conversation *gtkconv) +do_big(GtkWidget *large, struct gaim_gtk_conversation *gtkconv) { - gaim_gtk_surround(gtkconv, "", ""); + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(large))) + gaim_gtk_surround(gtkconv, "", ""); + else + gaim_gtk_advance_past(gtkconv, "", ""); gtk_widget_grab_focus(gtkconv->entry); } @@ -2770,6 +2781,8 @@ g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(do_big), gtkconv); + gtkconv->toolbar.larger_size = button; + /* Normal font size */ button = gaim_pixbuf_toolbar_button_from_stock(GAIM_STOCK_TEXT_NORMAL); gtk_size_group_add_widget(sg, button); @@ -2792,6 +2805,8 @@ g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(do_small), gtkconv); + gtkconv->toolbar.smaller_size = button; + /* Sep */ sep = gtk_vseparator_new(); gtk_box_pack_start(GTK_BOX(hbox), sep, FALSE, FALSE, 0); diff -r cb320b74a0dd -r 24d0da9c56f2 src/gtkconv.h --- a/src/gtkconv.h Sun Apr 06 18:49:04 2003 +0000 +++ b/src/gtkconv.h Sun Apr 06 22:18:30 2003 +0000 @@ -140,7 +140,9 @@ GtkWidget *italic; GtkWidget *underline; + GtkWidget *larger_size; GtkWidget *normal_size; + GtkWidget *smaller_size; GtkWidget *font; GtkWidget *fgcolor;