diff options
author | nyamatongwe <devnull@localhost> | 2010-01-23 21:56:07 +0000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2010-01-23 21:56:07 +0000 |
commit | be776f713976bb51dc082bb29c5fc95828cb5bd5 (patch) | |
tree | 32853e51a797ff13868d40cbe2d52529e8e34936 | |
parent | a9a28c0b5bd01271a914dc99b1dcda9b47df0885 (diff) | |
download | scintilla-mirror-be776f713976bb51dc082bb29c5fc95828cb5bd5.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); |