diff options
author | Christopher James Lahey <clahey@ximian.com> | 2002-01-21 09:57:23 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2002-01-21 09:57:23 +0800 |
commit | 994338982fc75978670f0a42cf361b51e2f6e0cc (patch) | |
tree | bd10fd99dd8ea13df4f061fabd7f2c1ef9ab92d6 | |
parent | 7a987fd4d3a3a860a34ef061d62f1ef780e1a0b4 (diff) | |
download | gsoc2013-evolution-994338982fc75978670f0a42cf361b51e2f6e0cc.tar.gz gsoc2013-evolution-994338982fc75978670f0a42cf361b51e2f6e0cc.tar.zst gsoc2013-evolution-994338982fc75978670f0a42cf361b51e2f6e0cc.zip |
Request a reflow and an update when the text model changes. Fixes Ximian
2002-01-20 Christopher James Lahey <clahey@ximian.com>
* gal/e-text/e-text.c (e_text_text_model_changed): Request a
reflow and an update when the text model changes. Fixes Ximian
bug #16459.
(e_text_set_arg): (ARG_TEXT) Don't set the number of lines to one
here.
svn path=/trunk/; revision=15411
-rw-r--r-- | widgets/text/e-text.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/widgets/text/e-text.c b/widgets/text/e-text.c index c4b5bb5cf6..4439a3e9bf 100644 --- a/widgets/text/e-text.c +++ b/widgets/text/e-text.c @@ -556,14 +556,16 @@ e_text_text_model_changed (ETextModel *model, EText *text) text->text = e_text_model_get_text(model); e_text_free_lines(text); - gtk_signal_emit (GTK_OBJECT (text), e_text_signals[E_TEXT_CHANGED]); - /* Make sure our selection doesn't extend past the bounds of our text. */ text->selection_start = CLAMP (text->selection_start, 0, model_len); text->selection_end = CLAMP (text->selection_end, 0, model_len); text->needs_split_into_lines = 1; + text->needs_redraw = 1; e_canvas_item_request_reflow (GNOME_CANVAS_ITEM(text)); + gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (text)); + + gtk_signal_emit (GTK_OBJECT (text), e_text_signals[E_TEXT_CHANGED]); } static void @@ -1185,7 +1187,6 @@ e_text_set_arg (GtkObject *object, GtkArg *arg, guint arg_id) break; case ARG_TEXT: - text->num_lines = 1; e_text_model_set_text(text->model, GTK_VALUE_STRING (*arg)); break; |