summaryrefslogtreecommitdiffstats
path: root/src/libnrtype
diff options
context:
space:
mode:
authorRalf Stephan <ralf@ark.in-berlin.de>2006-06-25 18:14:04 +0000
committerrwst <rwst@users.sourceforge.net>2006-06-25 18:14:04 +0000
commitaa061e92fffa5995df5e611dc45e7aae669d8c7e (patch)
treed8a304827d9e5bad49122e3ce6555db51c40985f /src/libnrtype
parentFix image transform when there is no rotate or scale (diff)
downloadinkscape-aa061e92fffa5995df5e611dc45e7aae669d8c7e.tar.gz
inkscape-aa061e92fffa5995df5e611dc45e7aae669d8c7e.zip
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
(bzr r1289)
Diffstat (limited to 'src/libnrtype')
-rwxr-xr-xsrc/libnrtype/Layout-TNG-Input.cpp4
-rwxr-xr-xsrc/libnrtype/Layout-TNG-Output.cpp3
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 <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},
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 <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";