Commit 7e15674c authored by Michael Natterer's avatar Michael Natterer Committed by Michael Natterer
Browse files

keep a reference to the source buffer while the clipboard contents buffer

2006-04-28  Michael Natterer  <mitch@imendio.com>

	* gtk/gtktextbuffer.c (create_clipboard_contents_buffer): keep a
	reference to the source buffer while the clipboard contents buffer
	exists, because it is needed for serializing the contents buffer.
	Makes copying from the contents buffer possible even after the
	resp. text view is destroyed (for example when there is a
	clipboard manager running on app exit) (bug #339195).
parent 543f6cbb
2006-04-28 Michael Natterer <mitch@imendio.com>
* gtk/gtktextbuffer.c (create_clipboard_contents_buffer): keep a
reference to the source buffer while the clipboard contents buffer
exists, because it is needed for serializing the contents buffer.
Makes copying from the contents buffer possible even after the
resp. text view is destroyed (for example when there is a
clipboard manager running on app exit) (bug #339195).
2006-04-27 Behdad Esfahbod <behdad@gnome.org>
* gdk/gdkpango.c (gdk_pango_renderer_draw_glyphs): Cast to double
......
2006-04-28 Michael Natterer <mitch@imendio.com>
* gtk/gtktextbuffer.c (create_clipboard_contents_buffer): keep a
reference to the source buffer while the clipboard contents buffer
exists, because it is needed for serializing the contents buffer.
Makes copying from the contents buffer possible even after the
resp. text view is destroyed (for example when there is a
clipboard manager running on app exit) (bug #339195).
2006-04-27 Behdad Esfahbod <behdad@gnome.org>
* gdk/gdkpango.c (gdk_pango_renderer_draw_glyphs): Cast to double
......
......@@ -2967,6 +2967,13 @@ create_clipboard_contents_buffer (GtkTextBuffer *buffer)
g_object_set_data (G_OBJECT (contents), I_("gtk-text-buffer-clipboard"),
GINT_TO_POINTER (1));
/* Ref the source buffer as long as the clipboard contents buffer
* exists, because it's needed for serializing the contents buffer.
* See http://bugzilla.gnome.org/show_bug.cgi?id=339195
*/
g_object_ref (buffer);
g_object_weak_ref (G_OBJECT (contents), (GWeakNotify) g_object_unref, buffer);
return contents;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment