From 077a96a2caf396b77c44d2746903e01049f7777e Mon Sep 17 00:00:00 2001 From: rwst Date: Sun, 25 Jun 2006 18:14:04 +0000 Subject: [PATCH] replace #ifdef PANGO_WEIGHT_SEMIBOLD with #if GTK_CHECK_VERSION(2,6,0), fixes compiler warnings and is the correct way to check for glib-2.4 --- src/libnrtype/Layout-TNG-Input.cpp | 4 +++- src/libnrtype/Layout-TNG-Output.cpp | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/libnrtype/Layout-TNG-Input.cpp b/src/libnrtype/Layout-TNG-Input.cpp index 49fc03607..b99107885 100755 --- a/src/libnrtype/Layout-TNG-Input.cpp +++ b/src/libnrtype/Layout-TNG-Input.cpp @@ -8,6 +8,8 @@ * * Released under GNU GPL, read the file 'COPYING' for more information */ + +#include #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}, diff --git a/src/libnrtype/Layout-TNG-Output.cpp b/src/libnrtype/Layout-TNG-Output.cpp index ca25a24ff..97d98d3c4 100755 --- a/src/libnrtype/Layout-TNG-Output.cpp +++ b/src/libnrtype/Layout-TNG-Output.cpp @@ -9,6 +9,7 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ #include +#include #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"; -- 2.30.2