]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkclipboard.c
Replace a lot of idle and timeout calls by the new gdk_threads api.
[~andy/gtk] / gtk / gtkclipboard.c
index 51b42a4f2185f410816c85f0037113e52fc1f2da..a2f0fcb765d40d07d37712cc26661b37c422b60d 100644 (file)
@@ -1337,6 +1337,7 @@ clipboard_rich_text_received_func (GtkClipboard *clipboard,
  * gtk_clipboard_wait_for_rich_text:
  * @clipboard: a #GtkClipboard
  * @buffer: a #GtkTextBuffer
+ * @format: return location for the format of the returned data
  * @length: return location for the length of the returned data
  *
  * Requests the contents of the clipboard as rich text.  This function
@@ -1861,6 +1862,8 @@ gtk_clipboard_store (GtkClipboard *clipboard)
   if (!gdk_display_supports_clipboard_persistence (clipboard->display))
     return;
 
+  g_object_ref (clipboard);
+
   clipboard_widget = get_clipboard_widget (clipboard->display);
   clipboard->notify_signal_id = g_signal_connect (clipboard_widget, "selection_notify_event",
                                                  G_CALLBACK (gtk_clipboard_selection_notify), clipboard);
@@ -1892,6 +1895,8 @@ gtk_clipboard_store (GtkClipboard *clipboard)
   clipboard->notify_signal_id = 0;
   
   clipboard->storing_selection = FALSE;
+
+  g_object_unref (clipboard);
 }
 
 /* Stores all clipboard selections on all displays, called from