Mercurial > vim
changeset 9630:0c098fb3994c v7.4.2092
commit https://github.com/vim/vim/commit/870b749ce1db1cec80f0f3766064a031688e6a46
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Jul 22 22:26:52 2016 +0200
patch 7.4.2092
Problem: GTK 3 build fails with older GTK version.
Solution: Check the pango version. (Kazunobu Kuriyama)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 22 Jul 2016 22:30:05 +0200 |
parents | ea0c9f0a8519 |
children | dd74e943e3c4 |
files | src/gui_beval.c src/version.c |
diffstat | 2 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gui_beval.c +++ b/src/gui_beval.c @@ -1046,7 +1046,9 @@ set_printable_label_text(GtkLabel *label guicolor_T pixel; #if GTK_CHECK_VERSION(3,0,0) GdkRGBA color = { 0.0, 0.0, 0.0, 1.0 }; +# if PANGO_VERSION_CHECK(1,38,0) PangoAttribute *attr_alpha; +# endif #else GdkColor color = { 0, 0, 0, 0 }; #endif @@ -1115,8 +1117,10 @@ set_printable_label_text(GtkLabel *label DOUBLE2UINT16(color.red), DOUBLE2UINT16(color.green), DOUBLE2UINT16(color.blue)); +# if PANGO_VERSION_CHECK(1,38,0) attr_alpha = pango_attr_foreground_alpha_new( DOUBLE2UINT16(color.alpha)); +# endif # undef DOUBLE2UINT16 #else attr = pango_attr_foreground_new( @@ -1126,9 +1130,11 @@ set_printable_label_text(GtkLabel *label attr->end_index = pdest - buf + outlen; pango_attr_list_insert(attr_list, attr); #if GTK_CHECK_VERSION(3,0,0) +# if PANGO_VERSION_CHECK(1,38,0) attr_alpha->start_index = pdest - buf; attr_alpha->end_index = pdest - buf + outlen; pango_attr_list_insert(attr_list, attr_alpha); +# endif #endif } pdest += outlen;