Commit 02308210 authored by Matthias Clasen's avatar Matthias Clasen

Add GTK_WRAP_WORD_CHAR. (#110086, David Brigada)

	* gtk/gtktextlayout.c (set_para_values):
	* gtk/gtkenums.h (GtkWrapMode): Add GTK_WRAP_WORD_CHAR.  (#110086,
	David Brigada)
parent c4dd1bd3
2003-04-07 Matthias Clasen <maclas@gmx.de>
* gtk/gtktextlayout.c (set_para_values):
* gtk/gtkenums.h (GtkWrapMode): Add GTK_WRAP_WORD_CHAR. (#110086,
David Brigada)
* gtk/gtkcelleditable.c, gtk/gtkfixed.c, gtk/gtktreemodel.c,
gtk/gtktreeselection.c, gtk/gtktreeview.c: Fix numerous
misspellings of possessive "its". (#110027, Doug Quale)
......
2003-04-07 Matthias Clasen <maclas@gmx.de>
* gtk/gtktextlayout.c (set_para_values):
* gtk/gtkenums.h (GtkWrapMode): Add GTK_WRAP_WORD_CHAR. (#110086,
David Brigada)
* gtk/gtkcelleditable.c, gtk/gtkfixed.c, gtk/gtktreemodel.c,
gtk/gtktreeselection.c, gtk/gtktreeview.c: Fix numerous
misspellings of possessive "its". (#110027, Doug Quale)
......
2003-04-07 Matthias Clasen <maclas@gmx.de>
* gtk/gtktextlayout.c (set_para_values):
* gtk/gtkenums.h (GtkWrapMode): Add GTK_WRAP_WORD_CHAR. (#110086,
David Brigada)
* gtk/gtkcelleditable.c, gtk/gtkfixed.c, gtk/gtktreemodel.c,
gtk/gtktreeselection.c, gtk/gtktreeview.c: Fix numerous
misspellings of possessive "its". (#110027, Doug Quale)
......
2003-04-07 Matthias Clasen <maclas@gmx.de>
* gtk/gtktextlayout.c (set_para_values):
* gtk/gtkenums.h (GtkWrapMode): Add GTK_WRAP_WORD_CHAR. (#110086,
David Brigada)
* gtk/gtkcelleditable.c, gtk/gtkfixed.c, gtk/gtktreemodel.c,
gtk/gtktreeselection.c, gtk/gtktreeview.c: Fix numerous
misspellings of possessive "its". (#110027, Doug Quale)
......
2003-04-07 Matthias Clasen <maclas@gmx.de>
* gtk/gtktextlayout.c (set_para_values):
* gtk/gtkenums.h (GtkWrapMode): Add GTK_WRAP_WORD_CHAR. (#110086,
David Brigada)
* gtk/gtkcelleditable.c, gtk/gtkfixed.c, gtk/gtktreemodel.c,
gtk/gtktreeselection.c, gtk/gtktreeview.c: Fix numerous
misspellings of possessive "its". (#110027, Doug Quale)
......
2003-04-07 Matthias Clasen <maclas@gmx.de>
* gtk/tmpl/gtktexttag.sgml: Document GTK_WRAP_WORD_CHAR. (#110086)
* gtk/tmpl/gtkenums.sgml, gtk/tmpl/gtkmain.sgml,
gtk/tmpl/gtkpaned.sgml, gtk/tmpl/gtkradiobutton.sgml,
gtk/tmpl/gtkspinbutton.sgml, gtk/tmpl/gtkstatusbar.sgml,
......
......@@ -49,6 +49,8 @@ Describes a type of line wrapping.
be technical, between graphemes, see
pango_get_log_attrs())
@GTK_WRAP_WORD: wrap text, breaking lines in between words
@GTK_WRAP_WORD_CHAR: wrap text, breaking lines in between words, or if
that is not enough, also between graphemes.
<!-- ##### STRUCT GtkTextAttributes ##### -->
<para>
......
......@@ -416,7 +416,8 @@ typedef enum
{
GTK_WRAP_NONE,
GTK_WRAP_CHAR,
GTK_WRAP_WORD
GTK_WRAP_WORD,
GTK_WRAP_WORD_CHAR
} GtkWrapMode;
/* How to sort */
......
......@@ -1156,6 +1156,12 @@ set_para_values (GtkTextLayout *layout,
pango_layout_set_wrap (display->layout, PANGO_WRAP_WORD);
break;
case GTK_WRAP_WORD_CHAR:
layout_width = layout->screen_width - display->left_margin - display->right_margin;
pango_layout_set_width (display->layout, layout_width * PANGO_SCALE);
pango_layout_set_wrap (display->layout, PANGO_WRAP_WORD_CHAR);
break;
case GTK_WRAP_NONE:
break;
}
......
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