[brasero] Fix #623484 - No estimated drive speed shown



commit fb8fe2e836443f9e1bf14a6e87696f78cc593a65
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date:   Mon Jul 5 20:01:30 2010 +0200

    Fix #623484  - No estimated drive speed shown

 libbrasero-burn/burn-task-ctx.c    |   21 ++++++++++-----------
 plugins/growisofs/burn-growisofs.c |    5 ++---
 2 files changed, 12 insertions(+), 14 deletions(-)
---
diff --git a/libbrasero-burn/burn-task-ctx.c b/libbrasero-burn/burn-task-ctx.c
index 3579368..e905397 100644
--- a/libbrasero-burn/burn-task-ctx.c
+++ b/libbrasero-burn/burn-task-ctx.c
@@ -682,20 +682,19 @@ brasero_task_ctx_set_progress (BraseroTaskCtx *self,
 		return BRASERO_BURN_OK;
 	}
 
-	if (priv->progress < progress)
-		priv->progress = progress;
-
-	if (!priv->timer)
-		return BRASERO_BURN_OK;
-
-	elapsed = g_timer_elapsed (priv->timer, NULL);
+	if (priv->timer) {
+		elapsed = g_timer_elapsed (priv->timer, NULL);
 
-	if ((elapsed - priv->last_elapsed) > 0.5) {
-		priv->last_progress = priv->progress;
-		priv->last_elapsed = priv->current_elapsed;
-		priv->current_elapsed = elapsed;
+		if ((elapsed - priv->last_elapsed) > 0.5) {
+			priv->last_progress = priv->progress;
+			priv->last_elapsed = priv->current_elapsed;
+			priv->current_elapsed = elapsed;
+		}
 	}
 
+	if (priv->progress < progress)
+		priv->progress = progress;
+
 	return BRASERO_BURN_OK;
 }
 
diff --git a/plugins/growisofs/burn-growisofs.c b/plugins/growisofs/burn-growisofs.c
index 664567a..3d00a77 100644
--- a/plugins/growisofs/burn-growisofs.c
+++ b/plugins/growisofs/burn-growisofs.c
@@ -137,10 +137,9 @@ brasero_growisofs_read_stderr (BraseroProcess *process, const gchar *line)
 			   (gdouble) 100.0;
 
 		brasero_job_set_progress (BRASERO_JOB (process), fraction);
-
 		brasero_job_get_current_action (BRASERO_JOB (process), &action);
-		if (action == BRASERO_BURN_ACTION_BLANKING
-		&&  fraction >= 0.01) {
+
+		if (action == BRASERO_BURN_ACTION_BLANKING && fraction >= 0.01) {
 			/* we nullified 1% of the medium (more than 65536)
 			 * that's enough to make the filesystem unusable and
 			 * looking blank. A signal SIGTERM will be sent to stop



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]