static void overwrite_response_cb (GtkDialog *dialog, int response, RBTrackTransferQueue *queue) { gtk_widget_destroy (GTK_WIDGET (dialog)); switch (response) { case GTK_RESPONSE_YES: rb_debug ("replacing existing file"); _rb_track_transfer_batch_continue (queue->priv->current, TRUE); break; case GTK_RESPONSE_NO: rb_debug ("skipping existing file"); _rb_track_transfer_batch_continue (queue->priv->current, FALSE); break; case GTK_RESPONSE_REJECT: rb_debug ("skipping all existing files"); queue->priv->overwrite_decision = OVERWRITE_NONE; _rb_track_transfer_batch_continue (queue->priv->current, FALSE); break; case GTK_RESPONSE_ACCEPT: rb_debug ("replacing all existing files"); queue->priv->overwrite_decision = OVERWRITE_ALL; _rb_track_transfer_batch_continue (queue->priv->current, TRUE); break; case GTK_RESPONSE_CANCEL: case GTK_RESPONSE_DELETE_EVENT: /* not sure what the user really wants here */ rb_debug ("cancelling batch"); rb_track_transfer_queue_cancel_batch (queue, queue->priv->current); break; default: g_assert_not_reached (); break; } }
/** * rb_track_transfer_batch_cancel: * @batch: a #RBTrackTransferBatch * * Cancels the batch. */ void rb_track_transfer_batch_cancel (RBTrackTransferBatch *batch) { rb_track_transfer_queue_cancel_batch (batch->priv->queue, batch); }