brasero r1442 - in trunk: . src src/plugins/checksum
- From: philippr svn gnome org
- To: svn-commits-list gnome org
- Subject: brasero r1442 - in trunk: . src src/plugins/checksum
- Date: Wed, 29 Oct 2008 17:17:09 +0000 (UTC)
Author: philippr
Date: Wed Oct 29 17:17:09 2008
New Revision: 1442
URL: http://svn.gnome.org/viewvc/brasero?rev=1442&view=rev
Log:
Make (and fix) ChecksumImage by not using it when that\'s a
simulation and/or when there is already a checksum set
* src/burn-task.c (brasero_task_start_items):
* src/plugins/checksum/burn-checksum-files.c
(brasero_checksum_files_activate):
* src/plugins/checksum/burn-checksum-image.c
(brasero_checksum_image_start), (brasero_checksum_image_activate),
(brasero_checksum_image_class_init):
Modified:
trunk/ChangeLog
trunk/src/burn-task.c
trunk/src/plugins/checksum/burn-checksum-files.c
trunk/src/plugins/checksum/burn-checksum-image.c
Modified: trunk/src/burn-task.c
==============================================================================
--- trunk/src/burn-task.c (original)
+++ trunk/src/burn-task.c Wed Oct 29 17:17:09 2008
@@ -483,8 +483,7 @@
/* "fake mode" to get size. Forgive the jobs that cannot
* retrieve the size for one track. Just deactivate and
* go on with the next.
- * NOTE: after this result the job is no longer active
- */
+ * NOTE: after this result the job is no longer active */
continue;
}
Modified: trunk/src/plugins/checksum/burn-checksum-files.c
==============================================================================
--- trunk/src/plugins/checksum/burn-checksum-files.c (original)
+++ trunk/src/plugins/checksum/burn-checksum-files.c Wed Oct 29 17:17:09 2008
@@ -1100,7 +1100,8 @@
return BRASERO_BURN_OK;
/* see that a file with graft "/BRASERO_CHECKSUM_FILE" doesn't already
- * exists (possible when doing several copies) */
+ * exists (possible when doing several copies) or when a simulation
+ * already took place before. */
brasero_job_get_current_track (job, &track);
grafts = brasero_track_get_data_grafts_source (track);
for (; grafts; grafts = grafts->next) {
Modified: trunk/src/plugins/checksum/burn-checksum-image.c
==============================================================================
--- trunk/src/plugins/checksum/burn-checksum-image.c (original)
+++ trunk/src/plugins/checksum/burn-checksum-image.c Wed Oct 29 17:17:09 2008
@@ -563,7 +563,6 @@
GError **error)
{
BraseroChecksumImagePrivate *priv;
- BraseroTrack *track = NULL;
BraseroJobAction action;
brasero_job_get_action (job, &action);
@@ -579,7 +578,28 @@
return BRASERO_BURN_NOT_RUNNING;
}
+ /* we start a thread for the exploration of the graft points */
+ priv = BRASERO_CHECKSUM_IMAGE_PRIVATE (job);
+ priv->thread = g_thread_create (brasero_checksum_image_thread,
+ BRASERO_CHECKSUM_IMAGE (job),
+ TRUE,
+ error);
+ if (!priv->thread)
+ return BRASERO_BURN_ERR;
+
+ return BRASERO_BURN_OK;
+}
+
+static BraseroBurnResult
+brasero_checksum_image_activate (BraseroJob *job,
+ GError **error)
+{
+ BraseroBurnFlag flags = BRASERO_BURN_FLAG_NONE;
+ BraseroTrack *track = NULL;
+ BraseroJobAction action;
+
brasero_job_get_current_track (job, &track);
+ brasero_job_get_action (job, &action);
if (action == BRASERO_JOB_ACTION_IMAGE
&& brasero_track_get_checksum_type (track) != BRASERO_CHECKSUM_NONE) {
@@ -588,14 +608,12 @@
return BRASERO_BURN_NOT_RUNNING;
}
- /* we start a thread for the exploration of the graft points */
- priv = BRASERO_CHECKSUM_IMAGE_PRIVATE (job);
- priv->thread = g_thread_create (brasero_checksum_image_thread,
- BRASERO_CHECKSUM_IMAGE (job),
- TRUE,
- error);
- if (!priv->thread)
- return BRASERO_BURN_ERR;
+ flags = BRASERO_BURN_FLAG_NONE;
+ brasero_job_get_flags (job, &flags);
+ if (flags & BRASERO_BURN_FLAG_DUMMY) {
+ BRASERO_JOB_LOG (job, "Dummy operation, skipping");
+ return BRASERO_BURN_NOT_RUNNING;
+ }
return BRASERO_BURN_OK;
}
@@ -689,6 +707,7 @@
parent_class = g_type_class_peek_parent (klass);
object_class->finalize = brasero_checksum_image_finalize;
+ job_class->activate = brasero_checksum_image_activate;
job_class->start = brasero_checksum_image_start;
job_class->stop = brasero_checksum_image_stop;
job_class->clock_tick = brasero_checksum_image_clock_tick;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]