[Xfce4-commits] [xfce/thunar] 01/01: Thunar 1.8.10 crashing on startup in FreeBSD and Fedora, caused by nonfunctional pango version check (Bug #16136, Bug #16138)

noreply at xfce.org noreply at xfce.org
Thu Nov 14 11:22:04 CET 2019


This is an automated email from the git hooks/post-receive script.

a   l   e   x       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       x   f   c   e   -   4   .   1   4   
   in repository xfce/thunar.

commit 55a700a33eb7d0a28b587cc33dd0c0768f6e2764
Author: Olivier Duchateau <duchateau.olivier at gmail.com>
Date:   Tue Nov 12 09:51:26 2019 +0100

    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 <madpilot at FreeBSD.org>
    Co-authored-by:  Alexander Schwinn <alexxcons at xfce.org>
---
 configure.ac.in                  | 1 +
 thunar/Makefile.am               | 4 +++-
 thunar/thunar-pango-extensions.c | 4 ++--
 thunar/thunar-pango-extensions.h | 2 ++
 thunar/thunar-standard-view.c    | 2 ++
 5 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/configure.ac.in b/configure.ac.in
index 2728ff7..01fb7f2 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -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 ***
diff --git a/thunar/Makefile.am b/thunar/Makefile.am
index 3ee90a2..cff7b49 100644
--- a/thunar/Makefile.am
+++ b/thunar/Makefile.am
@@ -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
diff --git a/thunar/thunar-pango-extensions.c b/thunar/thunar-pango-extensions.c
index 3ff6262..d42f83b 100644
--- a/thunar/thunar-pango-extensions.c
+++ b/thunar/thunar-pango-extensions.c
@@ -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
 
 
 
diff --git a/thunar/thunar-pango-extensions.h b/thunar/thunar-pango-extensions.h
index aa0e515..c86966e 100644
--- a/thunar/thunar-pango-extensions.h
+++ b/thunar/thunar-pango-extensions.h
@@ -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;
diff --git a/thunar/thunar-standard-view.c b/thunar/thunar-standard-view.c
index cdcb0e0..c99a940 100644
--- a/thunar/thunar-standard-view.c
+++ b/thunar/thunar-standard-view.c
@@ -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);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list