[maemo-commits] [maemo-commits] r17593 - in projects/haf/trunk/gtk+: . gtk
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Thu Mar 5 11:57:54 EET 2009
- Previous message: [maemo-commits] r17592 - projects/haf/tags/clipboard-manager
- Next message: [maemo-commits] r17594 - in projects/haf/trunk/gtk+: . debian
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: kris Date: 2009-03-05 11:57:49 +0200 (Thu, 05 Mar 2009) New Revision: 17593 Modified: projects/haf/trunk/gtk+/ChangeLog projects/haf/trunk/gtk+/gtk/gtktextview.c Log: 2009-03-05 Kristian Rietveld <kris at imendio.com> Fixes: NB#102487 - Crash when closing conversation view window. * gtk/gtktextview.c (gtk_text_view_set_buffer): when unsetting the old buffer always set the buffer on the layout to NULL and more importantly, clear the pending scroll. Unref the buffer after removing the selection from the clipboard. Modified: projects/haf/trunk/gtk+/ChangeLog =================================================================== --- projects/haf/trunk/gtk+/ChangeLog 2009-03-04 16:05:56 UTC (rev 17592) +++ projects/haf/trunk/gtk+/ChangeLog 2009-03-05 09:57:49 UTC (rev 17593) @@ -1,3 +1,12 @@ +2009-03-05 Kristian Rietveld <kris at imendio.com> + + Fixes: NB#102487 - Crash when closing conversation view window. + + * gtk/gtktextview.c (gtk_text_view_set_buffer): when unsetting the old + buffer always set the buffer on the layout to NULL and more + importantly, clear the pending scroll. Unref the buffer after + removing the selection from the clipboard. + 2009-02-25 Claudio Saavedra <csaavedra at igalia.com> * gtk/gtkdialog.c (gtk_dialog_add_button): Make sure that all Modified: projects/haf/trunk/gtk+/gtk/gtktextview.c =================================================================== --- projects/haf/trunk/gtk+/gtk/gtktextview.c 2009-03-04 16:05:56 UTC (rev 17592) +++ projects/haf/trunk/gtk+/gtk/gtktextview.c 2009-03-05 09:57:49 UTC (rev 17593) @@ -355,6 +355,7 @@ static void gtk_text_view_do_popup (GtkTextView *text_view, GdkEventButton *event); +static void cancel_pending_scroll (GtkTextView *text_view); static void gtk_text_view_queue_scroll (GtkTextView *text_view, GtkTextMark *mark, gdouble within_margin, @@ -1367,9 +1368,6 @@ g_signal_handlers_disconnect_by_func (text_view->buffer, gtk_text_view_target_list_notify, text_view); - g_object_unref (text_view->buffer); - text_view->dnd_mark = NULL; - text_view->first_para_mark = NULL; if (GTK_WIDGET_REALIZED (text_view)) { @@ -1377,6 +1375,14 @@ GDK_SELECTION_PRIMARY); gtk_text_buffer_remove_selection_clipboard (text_view->buffer, clipboard); } + + if (text_view->layout) + gtk_text_layout_set_buffer (text_view->layout, NULL); + + g_object_unref (text_view->buffer); + text_view->dnd_mark = NULL; + text_view->first_para_mark = NULL; + cancel_pending_scroll (text_view); } text_view->buffer = buffer;
- Previous message: [maemo-commits] r17592 - projects/haf/tags/clipboard-manager
- Next message: [maemo-commits] r17594 - in projects/haf/trunk/gtk+: . debian
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]