From f6eb9d426931d751488f5c62c488bc89843d91f8 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Fri, 27 Feb 2009 16:21:40 +0000 Subject: [PATCH] =?UTF-8?q?Bug=20573383=20=E2=80=93=20Setting=20a=20textvi?= =?UTF-8?q?ew's=20buffer=20to=20NULL=20doesn't=20do=20a=20complete?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2009-02-27 Michael Natterer Bug 573383 – Setting a textview's buffer to NULL doesn't do a complete job * gtk/gtktextview.c (gtk_text_view_set_buffer): always set text_view->layout's buffer, also if it's NULL. svn path=/trunk/; revision=22414 --- ChangeLog | 8 ++++++++ gtk/gtktextview.c | 6 +++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index a5214087f0..21233cc117 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-02-27 Michael Natterer + + Bug 573383 – Setting a textview's buffer to NULL doesn't do a + complete job + + * gtk/gtktextview.c (gtk_text_view_set_buffer): always set + text_view->layout's buffer, also if it's NULL. + 2009-02-25 Tristan Van Berkom Bug 572904 – GtkRadioAction broken in trunk diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index bab4155bf7..da4f562730 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -1426,15 +1426,15 @@ gtk_text_view_set_buffer (GtkTextView *text_view, text_view->buffer = buffer; + if (text_view->layout) + gtk_text_layout_set_buffer (text_view->layout, buffer); + if (buffer != NULL) { GtkTextIter start; g_object_ref (buffer); - if (text_view->layout) - gtk_text_layout_set_buffer (text_view->layout, buffer); - gtk_text_buffer_get_iter_at_offset (text_view->buffer, &start, 0); text_view->dnd_mark = gtk_text_buffer_create_mark (text_view->buffer,