diff options
author | Benjamin Otte <otte@redhat.com> | 2020-02-16 19:52:17 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2020-02-17 04:04:21 +0100 |
commit | 80ba7fd6823b34d8c6153f341e103ad6ea146ffd (patch) | |
tree | 8b8babfeb2545990ee2a8eb1b356db21ea927f80 /gtk/gtkfilechooserbutton.c | |
parent | 91d91a29e834a3802a8bdefe417f277f8ef57737 (diff) | |
download | gtk+-80ba7fd6823b34d8c6153f341e103ad6ea146ffd.tar.gz |
dragdest: Make gtk_drop_target_new() args be transfer full
Saves tons of code.
Diffstat (limited to 'gtk/gtkfilechooserbutton.c')
-rw-r--r-- | gtk/gtkfilechooserbutton.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gtk/gtkfilechooserbutton.c b/gtk/gtkfilechooserbutton.c index 95b366753f..ff6dd9bbf3 100644 --- a/gtk/gtkfilechooserbutton.c +++ b/gtk/gtkfilechooserbutton.c @@ -446,7 +446,6 @@ gtk_file_chooser_button_init (GtkFileChooserButton *button) GtkWidget *box; GtkWidget *icon; GdkContentFormatsBuilder *builder; - GdkContentFormats *target_list; GtkDropTarget *dest; priv->button = gtk_button_new (); @@ -502,11 +501,10 @@ gtk_file_chooser_button_init (GtkFileChooserButton *button) builder = gdk_content_formats_builder_new (); gdk_content_formats_builder_add_gtype (builder, G_TYPE_STRING); gdk_content_formats_builder_add_gtype (builder, GDK_TYPE_FILE_LIST); - target_list = gdk_content_formats_builder_free_to_formats (builder); - dest = gtk_drop_target_new (target_list, GDK_ACTION_COPY); + dest = gtk_drop_target_new (gdk_content_formats_builder_free_to_formats (builder), + GDK_ACTION_COPY); g_signal_connect (dest, "drag-drop", G_CALLBACK (gtk_file_chooser_button_drag_drop), button); gtk_widget_add_controller (GTK_WIDGET (button), GTK_EVENT_CONTROLLER (dest)); - gdk_content_formats_unref (target_list); } |