[Xfce4-commits] [xfce/xfdesktop] 01/01: Do not insert hyphens at intra-word line breaks (Bug #16339)

noreply at xfce.org noreply at xfce.org
Wed Feb 12 16:36:15 CET 2020


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

a   n   d   r   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository xfce/xfdesktop.

commit eec0c9b2ca7227b65184e2840f2c3e99aa8678b3
Author: Andre Miranda <andreldm at xfce.org>
Date:   Wed Feb 12 12:35:29 2020 -0300

    Do not insert hyphens at intra-word line breaks (Bug #16339)
---
 src/xfdesktop-icon-view.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/src/xfdesktop-icon-view.c b/src/xfdesktop-icon-view.c
index 6e2566b..b665cc1 100644
--- a/src/xfdesktop-icon-view.c
+++ b/src/xfdesktop-icon-view.c
@@ -2887,6 +2887,10 @@ xfdesktop_icon_view_setup_pango_layout(XfdesktopIconView *icon_view,
                                        XfdesktopIcon *icon,
                                        PangoLayout *playout)
 {
+#if PANGO_VERSION_CHECK (1, 44, 0)
+    PangoAttrList *attr_list;
+    PangoAttribute *attr;
+#endif
     const gchar *label = xfdesktop_icon_peek_label(icon);
 
     g_return_if_fail(XFDESKTOP_IS_ICON_VIEW(icon_view)
@@ -2907,6 +2911,17 @@ xfdesktop_icon_view_setup_pango_layout(XfdesktopIconView *icon_view,
         pango_layout_set_height(playout, TEXT_HEIGHT * PANGO_SCALE);
         pango_layout_set_ellipsize(playout, PANGO_ELLIPSIZE_END);
     }
+
+#if PANGO_VERSION_CHECK (1, 44, 0)
+    /* Do not add hyphens on line breaks */
+    attr_list = pango_attr_list_new ();
+    attr = pango_attr_insert_hyphens_new (FALSE);
+    attr->start_index = 0;
+    attr->end_index = -1;
+    pango_attr_list_insert (attr_list, attr);
+    pango_layout_set_attributes (playout, attr_list);
+    pango_attr_list_unref (attr_list);
+#endif
 }
 
 static gboolean

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


More information about the Xfce4-commits mailing list