Commit 55a700a3 authored by OlivierDuchateau's avatar OlivierDuchateau Committed by Alexander Schwinn

Thunar 1.8.10 crashing on startup in FreeBSD and Fedora, caused by

nonfunctional pango version check (Bug #16136, Bug #16138)
Co-authored-by: Guido Falsi's avatarGuido Falsi <madpilot@FreeBSD.org>
Co-authored-by: Alexander Schwinn's avatarAlexander Schwinn <alexxcons@xfce.org>
parent 88dfd33b
......@@ -156,6 +156,7 @@ XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.12.0])
XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-2], [4.12.0])
XDT_CHECK_PACKAGE([LIBXFCE4KBD_PRIVATE], [libxfce4kbd-private-3], [4.12.0])
XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.12.0])
XDT_CHECK_PACKAGE([PANGO], [pango], [1.42.0])
dnl ******************************
dnl *** GObject Instrospection ***
......
......@@ -229,6 +229,7 @@ thunar_CFLAGS = \
$(LIBSM_CFLAGS) \
$(LIBXFCE4UI_CFLAGS) \
$(XFCONF_CFLAGS) \
$(PANGO_CFLAGS) \
$(PLATFORM_CFLAGS)
thunar_LDFLAGS = \
......@@ -245,7 +246,8 @@ thunar_LDADD = \
$(LIBNOTIFY_LIBS) \
$(LIBSM_LIBS) \
$(LIBXFCE4UI_LIBS) \
$(XFCONF_LIBS)
$(XFCONF_LIBS) \
$(PANGO_LIBS)
thunar_DEPENDENCIES = \
$(top_builddir)/thunarx/libthunarx-$(THUNARX_VERSION_API).la
......
......@@ -128,18 +128,18 @@ thunar_pango_attr_list_bold (void)
* Return value: a #PangoAttrList for not inserting hyphens at intra-word line
* breaks.
**/
#if PANGO_VERSION_CHECK (1, 44, 0)
PangoAttrList*
thunar_pango_attr_disable_hyphens (void)
{
static PangoAttrList *attr_list = NULL;
#ifdef PANGO_VERSION_1_44
if (G_UNLIKELY (attr_list == NULL))
attr_list = thunar_pango_attr_list_wrap (pango_attr_insert_hyphens_new (FALSE), NULL);
#endif
return attr_list;
}
#endif
......
......@@ -27,7 +27,9 @@ G_BEGIN_DECLS;
PangoAttrList *thunar_pango_attr_list_big (void) G_GNUC_CONST;
PangoAttrList *thunar_pango_attr_list_big_bold (void) G_GNUC_CONST;
PangoAttrList *thunar_pango_attr_list_bold (void) G_GNUC_CONST;
#if PANGO_VERSION_CHECK (1, 44, 0)
PangoAttrList *thunar_pango_attr_disable_hyphens (void) G_GNUC_CONST;
#endif
PangoAttrList *thunar_pango_attr_list_italic (void) G_GNUC_CONST;
PangoAttrList *thunar_pango_attr_list_small_italic (void) G_GNUC_CONST;
PangoAttrList *thunar_pango_attr_list_small (void) G_GNUC_CONST;
......
......@@ -714,7 +714,9 @@ G_GNUC_END_IGNORE_DEPRECATIONS
/* setup the name renderer */
standard_view->name_renderer = g_object_new (GTK_TYPE_CELL_RENDERER_TEXT,
#if PANGO_VERSION_CHECK (1, 44, 0)
"attributes", thunar_pango_attr_disable_hyphens (),
#endif
"alignment", PANGO_ALIGN_CENTER,
"xalign", 0.5,
FALSE);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment