summaryrefslogtreecommitdiff
path: root/gtk/gtktext.c
diff options
context:
space:
mode:
authorMartin Baulig <martin@home-of-linux.org>1998-10-18 13:10:08 +0000
committerMartin Baulig <martin@src.gnome.org>1998-10-18 13:10:08 +0000
commit7dbb5755a4cafc45108ec66ac89dfc1f11639494 (patch)
tree1473dff62db049cb85cb15a22f3b910a5657092b /gtk/gtktext.c
parenteff33964d753abf04786ce1f03a8cffff5a76cd2 (diff)
downloadgdk-pixbuf-7dbb5755a4cafc45108ec66ac89dfc1f11639494.tar.gz
new function to toggle line wrapping like gtk_text_set_word_wrap ()
1998-10-18 Martin Baulig <martin@home-of-linux.org> * gtk/gtktext.c (gtk_text_set_line_wrap): new function to toggle line wrapping like gtk_text_set_word_wrap () toggles word wrapping.
Diffstat (limited to 'gtk/gtktext.c')
-rw-r--r--gtk/gtktext.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gtk/gtktext.c b/gtk/gtktext.c
index 83088c7cf..b07e3b98a 100644
--- a/gtk/gtktext.c
+++ b/gtk/gtktext.c
@@ -626,6 +626,22 @@ gtk_text_set_word_wrap (GtkText *text,
}
void
+gtk_text_set_line_wrap (GtkText *text,
+ gint line_wrap)
+{
+ g_return_if_fail (text != NULL);
+ g_return_if_fail (GTK_IS_TEXT (text));
+
+ text->line_wrap = (line_wrap != FALSE);
+
+ if (GTK_WIDGET_REALIZED (text))
+ {
+ recompute_geometry (text);
+ gtk_widget_queue_draw (GTK_WIDGET (text));
+ }
+}
+
+void
gtk_text_set_editable (GtkText *text,
gboolean is_editable)
{