From c42b517cbf2c7e85b3f0528fc130a349f391f888 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Thu, 25 Mar 2010 23:49:46 +0000 Subject: Removed support for GTK+ 1.x. --- gtk/Converter.h | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) (limited to 'gtk/Converter.h') diff --git a/gtk/Converter.h b/gtk/Converter.h index d3038a2f2..8e7e3e9ef 100644 --- a/gtk/Converter.h +++ b/gtk/Converter.h @@ -3,12 +3,7 @@ // Copyright 2004 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. -#include -#if GTK_MAJOR_VERSION >= 2 - typedef GIConv ConverterHandle; -#else - typedef iconv_t ConverterHandle; -#endif +typedef GIConv ConverterHandle; const ConverterHandle iconvhBad = (ConverterHandle)(-1); // Since various versions of iconv can not agree on whether the src argument // is char ** or const char ** provide a templatised adaptor. @@ -24,11 +19,7 @@ size_t iconv_adaptor(size_t(*f_iconv)(ConverterHandle, T, size_t *, char **, siz class Converter { ConverterHandle iconvh; void OpenHandle(const char *fullDestination, const char *charSetSource) { -#if GTK_MAJOR_VERSION >= 2 iconvh = g_iconv_open(fullDestination, charSetSource); -#else - iconvh = iconv_open(fullDestination, charSetSource); -#endif } bool Succeeded() const { return iconvh != iconvhBad; @@ -65,11 +56,7 @@ public: } void Close() { if (Succeeded()) { -#if GTK_MAJOR_VERSION >= 2 g_iconv_close(iconvh); -#else - iconv_close(iconvh); -#endif iconvh = iconvhBad; } } @@ -77,11 +64,7 @@ public: if (!Succeeded()) { return (size_t)(-1); } else { -#if GTK_MAJOR_VERSION >= 2 return iconv_adaptor(g_iconv, iconvh, src, srcleft, dst, dstleft); -#else - return iconv_adaptor(iconv, iconvh, src, srcleft, dst, dstleft); -#endif } } }; -- cgit v1.2.3