changeset 17421:c8891ebd48db

Only change the size when the imhtmltoolbar button has been activated, not again when deactivated. Fixes #1143
author Kevin Stange <kevin@simguy.net>
date Sun, 27 May 2007 01:41:02 +0000
parents 28682df9686a
children 59e09ff3490d 4d53be63a558
files pidgin/gtkimhtmltoolbar.c
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkimhtmltoolbar.c	Sun May 27 00:15:41 2007 +0000
+++ b/pidgin/gtkimhtmltoolbar.c	Sun May 27 01:41:02 2007 +0000
@@ -71,7 +71,9 @@
 do_small(GtkWidget *smalltb, GtkIMHtmlToolbar *toolbar)
 {
 	g_return_if_fail(toolbar != NULL);
-	gtk_imhtml_font_shrink(GTK_IMHTML(toolbar->imhtml));
+	/* Only shrink the font on activation, not deactivation as well */
+	if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(smalltb)))
+		gtk_imhtml_font_shrink(GTK_IMHTML(toolbar->imhtml));
 	gtk_widget_grab_focus(toolbar->imhtml);
 }
 
@@ -79,7 +81,9 @@
 do_big(GtkWidget *large, GtkIMHtmlToolbar *toolbar)
 {
 	g_return_if_fail(toolbar);
-	gtk_imhtml_font_grow(GTK_IMHTML(toolbar->imhtml));
+	/* Only grow the font on activation, not deactivation as well */
+	if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(large)))
+		gtk_imhtml_font_grow(GTK_IMHTML(toolbar->imhtml));
 	gtk_widget_grab_focus(toolbar->imhtml);
 }