From fb881018542b3b567177d0a1063d9169b17bab48 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 17 Jul 2004 04:58:02 +0000 Subject: Support text/plain selection target (#55117, Owen Taylor) Sat Jul 17 00:48:27 2004 Matthias Clasen Support text/plain selection target (#55117, Owen Taylor) * gtk/gtkselection.h: * gtk/gtkdnd.h: * gtk/gtkselection.c (gtk_target_list_add_text_targets): * gtk/gtkdnd.c (gtk_drag_dest_add_text_targets): * gtk/gtkdnd.c (gtk_drag_source_add_text_targets): New functions to facilitate handling of text targets. * gtk/gtkentry.c: * gtk/gtktextview.c: Use the new text target handling functions instead of hardwiring the list of supported text targets everywhere. * gtk/gtkselection.c (gtk_selection_data_get_text): (gtk_selection_data_set_text): Support the targets text/plain, text/plain?charset=utf-8 and text/plain?charset= as outlined in #55117: For text/plain send only ASCII, but accept 8-bit text and treat it as ISO-8859-1 as specified by the Xdnd spec. Always send CRLF terminators. Accept either and convert into the native terminator for the platform. --- gtk/gtkselection.h | 1 + 1 file changed, 1 insertion(+) (limited to 'gtk/gtkselection.h') diff --git a/gtk/gtkselection.h b/gtk/gtkselection.h index d7b0b4da4f..9e398a8e6d 100644 --- a/gtk/gtkselection.h +++ b/gtk/gtkselection.h @@ -95,6 +95,7 @@ void gtk_target_list_add (GtkTargetList *list, GdkAtom target, guint flags, guint info); +void gtk_target_list_add_text_targets (GtkTargetList *list); void gtk_target_list_add_table (GtkTargetList *list, const GtkTargetEntry *targets, guint ntargets); -- cgit v1.2.1