diff options
author | nyamatongwe <unknown> | 2010-01-23 21:56:07 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2010-01-23 21:56:07 +0000 |
commit | 2f1b1166b960034cda4581cb76fcc89c800ded9a (patch) | |
tree | 32853e51a797ff13868d40cbe2d52529e8e34936 | |
parent | a090e722e12b070e6ae7ee338f1fcea5b7b86ea4 (diff) | |
download | scintilla-mirror-2f1b1166b960034cda4581cb76fcc89c800ded9a.tar.gz |
Should work on older versions of Pango that do not have
pango_layout_get_line_readonly.
-rw-r--r-- | gtk/PlatGTK.cxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx index 0924bb5a8..d01c89bbc 100644 --- a/gtk/PlatGTK.cxx +++ b/gtk/PlatGTK.cxx @@ -1287,7 +1287,11 @@ void SurfaceImpl::DrawTextBase(PRectangle rc, Font &font_, int ybase, const char pango_layout_set_text(layout, utfForm, len); } pango_layout_set_font_description(layout, PFont(font_)->pfd); +#ifdef PANGO_VERSION PangoLayoutLine *pll = pango_layout_get_line_readonly(layout,0); +#else + PangoLayoutLine *pll = pango_layout_get_line(layout,0); +#endif gdk_draw_layout_line(drawable, gc, xText, ybase, pll); if (useGFree) { g_free(utfForm); @@ -1594,7 +1598,11 @@ int SurfaceImpl::WidthText(Font &font_, const char *s, int len) { } pango_layout_set_text(layout, utfForm, len); } - PangoLayoutLine *pangoLine = pango_layout_get_line_readonly(layout, 0); +#ifdef PANGO_VERSION + PangoLayoutLine *pangoLine = pango_layout_get_line_readonly(layout,0); +#else + PangoLayoutLine *pangoLine = pango_layout_get_line(layout,0); +#endif pango_layout_line_get_extents(pangoLine, NULL, &pos); if (useGFree) { g_free(utfForm); |