mirror of
https://github.com/vim/vim.git
synced 2025-09-27 04:14:06 -04:00
patch 7.4.2092
Problem: GTK 3 build fails with older GTK version. Solution: Check the pango version. (Kazunobu Kuriyama)
This commit is contained in:
@@ -1046,7 +1046,9 @@ set_printable_label_text(GtkLabel *label, char_u *text)
|
|||||||
guicolor_T pixel;
|
guicolor_T pixel;
|
||||||
#if GTK_CHECK_VERSION(3,0,0)
|
#if GTK_CHECK_VERSION(3,0,0)
|
||||||
GdkRGBA color = { 0.0, 0.0, 0.0, 1.0 };
|
GdkRGBA color = { 0.0, 0.0, 0.0, 1.0 };
|
||||||
|
# if PANGO_VERSION_CHECK(1,38,0)
|
||||||
PangoAttribute *attr_alpha;
|
PangoAttribute *attr_alpha;
|
||||||
|
# endif
|
||||||
#else
|
#else
|
||||||
GdkColor color = { 0, 0, 0, 0 };
|
GdkColor color = { 0, 0, 0, 0 };
|
||||||
#endif
|
#endif
|
||||||
@@ -1115,8 +1117,10 @@ set_printable_label_text(GtkLabel *label, char_u *text)
|
|||||||
DOUBLE2UINT16(color.red),
|
DOUBLE2UINT16(color.red),
|
||||||
DOUBLE2UINT16(color.green),
|
DOUBLE2UINT16(color.green),
|
||||||
DOUBLE2UINT16(color.blue));
|
DOUBLE2UINT16(color.blue));
|
||||||
|
# if PANGO_VERSION_CHECK(1,38,0)
|
||||||
attr_alpha = pango_attr_foreground_alpha_new(
|
attr_alpha = pango_attr_foreground_alpha_new(
|
||||||
DOUBLE2UINT16(color.alpha));
|
DOUBLE2UINT16(color.alpha));
|
||||||
|
# endif
|
||||||
# undef DOUBLE2UINT16
|
# undef DOUBLE2UINT16
|
||||||
#else
|
#else
|
||||||
attr = pango_attr_foreground_new(
|
attr = pango_attr_foreground_new(
|
||||||
@@ -1126,9 +1130,11 @@ set_printable_label_text(GtkLabel *label, char_u *text)
|
|||||||
attr->end_index = pdest - buf + outlen;
|
attr->end_index = pdest - buf + outlen;
|
||||||
pango_attr_list_insert(attr_list, attr);
|
pango_attr_list_insert(attr_list, attr);
|
||||||
#if GTK_CHECK_VERSION(3,0,0)
|
#if GTK_CHECK_VERSION(3,0,0)
|
||||||
|
# if PANGO_VERSION_CHECK(1,38,0)
|
||||||
attr_alpha->start_index = pdest - buf;
|
attr_alpha->start_index = pdest - buf;
|
||||||
attr_alpha->end_index = pdest - buf + outlen;
|
attr_alpha->end_index = pdest - buf + outlen;
|
||||||
pango_attr_list_insert(attr_list, attr_alpha);
|
pango_attr_list_insert(attr_list, attr_alpha);
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
pdest += outlen;
|
pdest += outlen;
|
||||||
|
@@ -758,6 +758,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
2092,
|
||||||
/**/
|
/**/
|
||||||
2091,
|
2091,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user