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
This commit is contained in:

committed by
Chris Lahey

parent
7a987fd4d3
commit
994338982f
@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user