Sophie

Sophie

distrib > Mandriva > 2007.0 > x86_64 > media > contrib-release-src > by-pkgid > 7885698d6d6a9e0e56a485c3b33e2a78 > files > 3

ebview-0.3.6-2mdv2007.0.src.rpm

--- src/preference.c.orig	2005-10-05 09:41:23.000000000 +0900
+++ src/preference.c	2005-10-05 10:11:16.000000000 +0900
@@ -400,7 +400,7 @@ void  calculate_font_size(){
 	PangoFontDescription* desc;
 	PangoLanguage* lang;
 	PangoFontMap* fontmap;
-#ifndef __WIN32__
+#if !GTK_CHECK_VERSION(2,8,0) && !defined(__WIN32__)
 	Display *display;
 #endif
 	PangoContext *context;
@@ -420,6 +420,9 @@ void  calculate_font_size(){
 	desc = pango_font_description_from_string(fontset_normal);
 	lang =  pango_language_from_string("ja");
 
+#if GTK_CHECK_VERSION(2,8,0)
+	fontmap = pango_cairo_font_map_get_default();
+#else
 #ifdef __WIN32__
 	fontmap = pango_win32_font_map_for_display();
 #else
@@ -430,7 +433,8 @@ void  calculate_font_size(){
 	}
 
 	fontmap = pango_x_font_map_for_display(display);
-#endif
+#endif /* __WIN32__ */
+#endif /* GTK_CHECK_VERSION(2,8,0) */
 
 	if(fontmap == NULL){
 		LOG(LOG_INFO, "fontmap == NULL");