diff options
Diffstat (limited to 'gtk/gtkdnd.c')
-rw-r--r-- | gtk/gtkdnd.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c index 8e8fa7b7fb..786de4c972 100644 --- a/gtk/gtkdnd.c +++ b/gtk/gtkdnd.c @@ -1024,6 +1024,24 @@ gtk_drag_dest_set_target_list (GtkWidget *widget, site->target_list = target_list; } +/** + * gtk_drag_dest_add_text_targets: + * @widget: a #GtkWidget that's a drag destination + * + * Add the text targets supported by #GtkSelection to + * the target list of the drag destination. + * + * Since: 2.6 + **/ +void +gtk_drag_dest_add_text_targets (GtkWidget *widget) +{ + GtkTargetList *target_list; + + target_list = gtk_drag_dest_get_target_list (widget); + gtk_target_list_add_text_targets (target_list); + gtk_drag_dest_set_target_list (widget, target_list); +} /************************************************************* * _gtk_drag_dest_handle_event: @@ -2172,6 +2190,25 @@ gtk_drag_source_set_target_list (GtkWidget *widget, site->target_list = target_list; } +/** + * gtk_drag_source_add_text_targets: + * @widget: a #GtkWidget that's is a drag source + * + * Add the text targets supported by #GtkSelection to + * the target list of the drag source. + * + * Since: 2.6 + **/ +void +gtk_drag_source_add_text_targets (GtkWidget *widget) +{ + GtkTargetList *target_list; + + target_list = gtk_drag_source_get_target_list (widget); + gtk_target_list_add_text_targets (target_list); + gtk_drag_source_set_target_list (widget, target_list); +} + static void gtk_drag_source_unset_icon (GtkDragSourceSite *site) { |