From 5b51c7dbfec69474a8c70429bae97140b871022b Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Tue, 18 Jan 2000 23:12:26 +0000 Subject: [PATCH] Add Win32 workaround for yasuhiro's "i18n fix" change that introduced an 2000-01-18 Tor Lillqvist * app/text_tool.c: Add Win32 workaround for yasuhiro's "i18n fix" change that introduced an X11 dependency. --- ChangeLog | 3 +++ app/text_tool.c | 12 ++++++++++++ app/tools/gimptexttool.c | 12 ++++++++++++ app/tools/text_tool.c | 12 ++++++++++++ 4 files changed, 39 insertions(+) diff --git a/ChangeLog b/ChangeLog index 969d71b19c..18a1806574 100644 --- a/ChangeLog +++ b/ChangeLog @@ -55,6 +55,9 @@ Tue Jan 18 21:46:25 CET 2000 Sven Neumann * plug-ins/winsnap/winsnap.c * po-plug-ins/POTFILES.in: i18n. + * app/text_tool.c: Add Win32 workaround for yasuhiro's "i18n fix" + change that introduced an X11 dependency. + 2000-01-18 David Monniaux * app/tools.c: clearer tool-tip for transform tool. diff --git a/app/text_tool.c b/app/text_tool.c index 10492c995f..ee4cc2718e 100644 --- a/app/text_tool.c +++ b/app/text_tool.c @@ -20,7 +20,10 @@ #include #include + +#ifndef GDK_WINDOWING_WIN32 #include +#endif #include @@ -568,7 +571,9 @@ text_render (GimpImage *gimage, gint width, height; gint x, y, k; void * pr; +#ifndef GDK_WINDOWING_WIN32 XFontStruct *xfs; +#endif char *fname; /* determine the layer type */ @@ -590,6 +595,7 @@ text_render (GimpImage *gimage, /* load the font in */ gdk_error_warnings = 0; gdk_error_code = 0; +#ifndef GDK_WINDOWING_WIN32 font = gdk_font_load (fontname); xfs = GDK_FONT_XFONT(font); if (xfs->min_byte1 != 0 || xfs->max_byte1 != 0) { @@ -598,6 +604,12 @@ text_render (GimpImage *gimage, font = gdk_fontset_load (fname); g_free(fname); } +#else + /* Just use gdk_fontset_load all the time. IMHO it could be like + * this on all platforms? + */ + font = gdk_fontset_load (fontname); +#endif gdk_error_warnings = 1; if (!font || (gdk_error_code == -1)) { diff --git a/app/tools/gimptexttool.c b/app/tools/gimptexttool.c index 10492c995f..ee4cc2718e 100644 --- a/app/tools/gimptexttool.c +++ b/app/tools/gimptexttool.c @@ -20,7 +20,10 @@ #include #include + +#ifndef GDK_WINDOWING_WIN32 #include +#endif #include @@ -568,7 +571,9 @@ text_render (GimpImage *gimage, gint width, height; gint x, y, k; void * pr; +#ifndef GDK_WINDOWING_WIN32 XFontStruct *xfs; +#endif char *fname; /* determine the layer type */ @@ -590,6 +595,7 @@ text_render (GimpImage *gimage, /* load the font in */ gdk_error_warnings = 0; gdk_error_code = 0; +#ifndef GDK_WINDOWING_WIN32 font = gdk_font_load (fontname); xfs = GDK_FONT_XFONT(font); if (xfs->min_byte1 != 0 || xfs->max_byte1 != 0) { @@ -598,6 +604,12 @@ text_render (GimpImage *gimage, font = gdk_fontset_load (fname); g_free(fname); } +#else + /* Just use gdk_fontset_load all the time. IMHO it could be like + * this on all platforms? + */ + font = gdk_fontset_load (fontname); +#endif gdk_error_warnings = 1; if (!font || (gdk_error_code == -1)) { diff --git a/app/tools/text_tool.c b/app/tools/text_tool.c index 10492c995f..ee4cc2718e 100644 --- a/app/tools/text_tool.c +++ b/app/tools/text_tool.c @@ -20,7 +20,10 @@ #include #include + +#ifndef GDK_WINDOWING_WIN32 #include +#endif #include @@ -568,7 +571,9 @@ text_render (GimpImage *gimage, gint width, height; gint x, y, k; void * pr; +#ifndef GDK_WINDOWING_WIN32 XFontStruct *xfs; +#endif char *fname; /* determine the layer type */ @@ -590,6 +595,7 @@ text_render (GimpImage *gimage, /* load the font in */ gdk_error_warnings = 0; gdk_error_code = 0; +#ifndef GDK_WINDOWING_WIN32 font = gdk_font_load (fontname); xfs = GDK_FONT_XFONT(font); if (xfs->min_byte1 != 0 || xfs->max_byte1 != 0) { @@ -598,6 +604,12 @@ text_render (GimpImage *gimage, font = gdk_fontset_load (fname); g_free(fname); } +#else + /* Just use gdk_fontset_load all the time. IMHO it could be like + * this on all platforms? + */ + font = gdk_fontset_load (fontname); +#endif gdk_error_warnings = 1; if (!font || (gdk_error_code == -1)) {