Code

replace #ifdef PANGO_WEIGHT_SEMIBOLD with #if GTK_CHECK_VERSION(2,6,0), fixes compile...
authorrwst <rwst@users.sourceforge.net>
Sun, 25 Jun 2006 18:14:04 +0000 (18:14 +0000)
committerrwst <rwst@users.sourceforge.net>
Sun, 25 Jun 2006 18:14:04 +0000 (18:14 +0000)
src/libnrtype/Layout-TNG-Input.cpp
src/libnrtype/Layout-TNG-Output.cpp

index 49fc03607f530c2874ab9f669860dde591512430..b99107885321c47cb6530016c01922a47c381749 100755 (executable)
@@ -8,6 +8,8 @@
  *
  * Released under GNU GPL, read the file 'COPYING' for more information
  */
+
+#include <gtk/gtkversion.h>
 #include "Layout-TNG.h"
 #include "style.h"
 #include "svg/svg-length.h"
@@ -229,7 +231,7 @@ static const Layout::EnumConversionItem enum_convert_spstyle_weight_to_pango_wei
     {SP_CSS_FONT_WEIGHT_200, PANGO_WEIGHT_ULTRALIGHT},
     {SP_CSS_FONT_WEIGHT_300, PANGO_WEIGHT_LIGHT},
     {SP_CSS_FONT_WEIGHT_400, PANGO_WEIGHT_NORMAL},
-#ifdef PANGO_WEIGHT_SEMIBOLD    
+#if GTK_CHECK_VERSION(2,6,0)
     {SP_CSS_FONT_WEIGHT_500, PANGO_WEIGHT_SEMIBOLD},
 #else 
     {SP_CSS_FONT_WEIGHT_500, PANGO_WEIGHT_NORMAL},
index ca25a24ff740e22f8bd9d3bef601e41d1a880400..97d98d3c4a94f5acd4029ebe838b001fc1c6ac40 100755 (executable)
@@ -9,6 +9,7 @@
  * Released under GNU GPL, read the file 'COPYING' for more information
  */
 #include <glib/gmem.h>
+#include <gtk/gtkversion.h>
 #include "Layout-TNG.h"
 #include "display/nr-arena-glyphs.h"
 #include "style.h"
@@ -219,7 +220,7 @@ static char const *weight_to_text(PangoWeight w)
     switch (w) {
         case PANGO_WEIGHT_ULTRALIGHT: return "ultralight";
         case PANGO_WEIGHT_LIGHT     : return "light";
-#ifdef PANGO_WEIGHT_SEMIBOLD                                      
+#if GTK_CHECK_VERSION(2,6,0)                                      
         case PANGO_WEIGHT_SEMIBOLD  : return "semibold";
 #endif                                      
         case PANGO_WEIGHT_NORMAL    : return "normalweight";