GtkWidget *
caja_file_conflict_dialog_new (GtkWindow *parent,
                               GFile *source,
                               GFile *destination,
                               GFile *dest_dir)
{
    GtkWidget *dialog;
    CajaFile *src, *dest;
    gboolean source_is_dir, dest_is_dir;

    src = caja_file_get (source);
    dest = caja_file_get (destination);

    source_is_dir = caja_file_is_directory (src);
    dest_is_dir = caja_file_is_directory (dest);

    if (source_is_dir) {
        dialog = GTK_WIDGET (g_object_new (CAJA_TYPE_FILE_CONFLICT_DIALOG,
                                           "title", dest_is_dir ? _("Merge Folder") : _("File and Folder conflict"),
                                           NULL));
    }
    else {
        dialog = GTK_WIDGET (g_object_new (CAJA_TYPE_FILE_CONFLICT_DIALOG,
                                           "title", dest_is_dir ? _("File and Folder conflict") : _("File conflict"),
                                           NULL));
    }

    set_source_and_destination (dialog,
                                source,
                                destination,
                                dest_dir);
    gtk_window_set_transient_for (GTK_WINDOW (dialog),
                                  parent);
    return dialog;
}
GtkWidget *
marlin_file_conflict_dialog_new (GtkWindow *parent,
                                 GFile *source,
                                 GFile *destination,
                                 GFile *dest_dir)
{
    GtkWidget *dialog;

    dialog = GTK_WIDGET (g_object_new (MARLIN_TYPE_FILE_CONFLICT_DIALOG,
                                       "title", _("File conflict"),
                                       NULL));
    set_source_and_destination (dialog, source, destination, dest_dir);
    gtk_window_set_transient_for (GTK_WINDOW (dialog), parent);
    return dialog;
}