Hello, everybody!
I'm developing cross-plartform GTK+ application with GtkTextView. TextView has its own rich text format and is created this way:
Code:
buffer = gtk_text_buffer_new(tag_table);
input_str = gtk_text_view_new_with_buffer(buffer);
#if GTK_CHECK_VERSION(2,10,0)
// called first
gtk_text_buffer_register_deserialize_format(buffer, "HTML Format",
htmlformat_deser, NULL, NULL);
// called second
gtk_text_buffer_register_deserialize_format(buffer, "text/html",
texthtml_deser, NULL, NULL);
#endif
g_object_unref(G_OBJECT(buffer));
#if GTK_CHECK_VERSION(2,6,0)
gtk_drag_dest_add_uri_targets(input_str);
gtk_drag_dest_add_text_targets(input_str);
g_signal_connect(G_OBJECT(input_str), "drag-data-received", G_CALLBACK(input_rec), NULL);
#endif
In Linux with GTK+ 2 and with GTK+ 3 all works fine - when I drag and drop rich text from another applications (browsers, Libre Office Writer etc.) it's inserted and input_rec get invoked. When I copy and paste rich text from other application deserialization function get invoked.
But in MS Windows drag-n-frop works with URIs only, text cannot be droped to my TextView. Why? What do I do wrong?
By the way WinWord can receive droped text from Google Chrome. It's for example.