diff pidgin/gtkutils.c @ 29430:f6cc97902049

Make the conversation text preview section dynamically update as the win32-only font override changes. Fixes #11168
author Daniel Atallah <daniel.atallah@gmail.com>
date Sun, 14 Feb 2010 05:55:46 +0000
parents 4931a24576bd
children d77ecfe2b2c9 2ad2e3490b23
line wrap: on
line diff
--- a/pidgin/gtkutils.c	Sat Feb 13 18:51:00 2010 +0000
+++ b/pidgin/gtkutils.c	Sun Feb 14 05:55:46 2010 +0000
@@ -105,7 +105,6 @@
 void
 pidgin_setup_imhtml(GtkWidget *imhtml)
 {
-	PangoFontDescription *desc = NULL;
 	g_return_if_fail(imhtml != NULL);
 	g_return_if_fail(GTK_IS_IMHTML(imhtml));
 
@@ -115,15 +114,16 @@
 
 #ifdef _WIN32
 	if (!purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/use_theme_font")) {
+		PangoFontDescription *desc;
 		const char *font = purple_prefs_get_string(PIDGIN_PREFS_ROOT "/conversations/custom_font");
 		desc = pango_font_description_from_string(font);
+		if (desc) {
+			gtk_widget_modify_font(imhtml, desc);
+			pango_font_description_free(desc);
+		}
 	}
 #endif
 
-	if (desc) {
-		gtk_widget_modify_font(imhtml, desc);
-		pango_font_description_free(desc);
-	}
 }
 
 static