This is an automated email from the git hooks/post-receive script. squisher pushed a commit to branch master in repository apps/xfburn.
commit 148a80e839d527e0f2cd407c83d2c64bddde0e78 Author: David Mohr <[email protected]> Date: Sun Mar 30 12:23:13 2014 -0600 Allow aborting the autoformat --- xfburn/xfburn-perform-burn.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/xfburn/xfburn-perform-burn.c b/xfburn/xfburn-perform-burn.c index 6a01765..59a7bd3 100644 --- a/xfburn/xfburn-perform-burn.c +++ b/xfburn/xfburn-perform-burn.c @@ -48,6 +48,8 @@ xfburn_auto_format(GtkWidget *dialog_progress, struct burn_drive *drive) struct burn_progress p; double percent; int format_flag = 64 | (3 << 1); /* Fast formatting with default size */ + gboolean stop; + gboolean stopping = FALSE; /* Test mock-up for non-BD burners with DVD+RW #de fine XFBURN_DVD_PLUS_RW_FOR_BD_RE 1 @@ -109,10 +111,22 @@ xfburn_auto_format(GtkWidget *dialog_progress, struct burn_drive *drive) percent = 0.0; burn_disc_format (drive, 0, format_flag); while (burn_drive_get_status (drive, &p) != BURN_DRIVE_IDLE) { - if (p.sectors > 0 && p.sector >= 0) /* display 1 to 99 percent */ + if (p.sectors > 0 && p.sector >= 0) { + /* display 1 to 99 percent */ percent = 1.0 + ((double) p.sector + 1.0) / ((double) p.sectors) * 98.0; xfburn_progress_dialog_set_progress_bar_fraction (XFBURN_PROGRESS_DIALOG (dialog_progress), percent); + } + + g_object_get (G_OBJECT (dialog_progress), "stop", &stop, NULL); + + if (stop && !stopping) { + DBG ("cancelling..."); + burn_drive_cancel (drive); + stopping = TRUE; + xfburn_progress_dialog_set_status (XFBURN_PROGRESS_DIALOG (dialog_progress), XFBURN_PROGRESS_DIALOG_STATUS_STOPPING); + } + //DBG ("Formatting (%.f%%)", percent); -- To stop receiving notification emails like this one, please contact the administrator of this repository. _______________________________________________ Xfce4-commits mailing list [email protected] https://mail.xfce.org/mailman/listinfo/xfce4-commits
