Commit 3eb6e78c authored by Andre Miranda's avatar Andre Miranda

Do not insert hyphens at intra-word line breaks (Bug #15856)

parent 5a680233
......@@ -118,6 +118,31 @@ thunar_pango_attr_list_bold (void)
/**
* thunar_pango_attr_disable_hyphens:
*
* Returns a #PangoAttrList for not inserting hyphens at intra-word line breaks.
* The returned list is owned by the callee and must
* not be freed or modified by the caller.
*
* Return value: a #PangoAttrList for not inserting hyphens at intra-word line
* breaks.
**/
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;
}
/**
* thunar_pango_attr_list_italic:
*
......
......@@ -27,6 +27,7 @@ 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;
PangoAttrList *thunar_pango_attr_disable_hyphens (void) G_GNUC_CONST;
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;
......
......@@ -44,6 +44,7 @@
#include <thunar/thunar-icon-renderer.h>
#include <thunar/thunar-marshal.h>
#include <thunar/thunar-menu-util.h>
#include <thunar/thunar-pango-extensions.h>
#include <thunar/thunar-private.h>
#include <thunar/thunar-properties-dialog.h>
#include <thunar/thunar-renamer-dialog.h>
......@@ -714,6 +715,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
/* setup the name renderer */
standard_view->name_renderer = g_object_new (GTK_TYPE_CELL_RENDERER_TEXT,
"attributes", thunar_pango_attr_disable_hyphens (),
"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