summaryrefslogtreecommitdiff
path: root/gtk/gtkfilechooserbutton.c
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/gtkfilechooserbutton.c')
-rw-r--r--gtk/gtkfilechooserbutton.c6
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);
}