# HG changeset patch # User Sean Egan # Date 1170020407 0 # Node ID 154b8d8643a2b25808d4371658186419dc6fdb15 # Parent 8721df7d419f7f29ec6b551fa070e6c0c921303b GNOME has a 'document font' setting that we should use when running on GNOME. This does the gconftool-2 spawning trick to get it diff -r 8721df7d419f -r 154b8d8643a2 pidgin/gtkutils.c --- a/pidgin/gtkutils.c Sun Jan 28 09:02:20 2007 +0000 +++ b/pidgin/gtkutils.c Sun Jan 28 21:40:07 2007 +0000 @@ -98,6 +98,27 @@ gaim_gtkthemes_smiley_themeize(imhtml); gtk_imhtml_set_funcs(GTK_IMHTML(imhtml), >kimhtml_cbs); + + /* Use the GNOME "document" font, if applicable */ + if (gaim_running_gnome()) { + char *path, *font; + PangoFontDescription *desc = NULL; + + if ((path = g_find_program_in_path("gconftool-2"))) { + g_free(path); + if (!g_spawn_command_line_sync( + "gconftool-2 -g /desktop/gnome/interface/document_font_name", + &font, NULL, NULL, NULL)) + return; + } + desc = pango_font_description_from_string(font); + g_free(font); + + if (desc) { + gtk_widget_modify_font(imhtml, desc); + pango_font_description_free(desc); + } + } } GtkWidget *