brasero r789 - in trunk: . src



Author: philippr
Date: Sat May  3 18:50:23 2008
New Revision: 789
URL: http://svn.gnome.org/viewvc/brasero?rev=789&view=rev

Log:
	Fix #526533 â Brasero displays a \"frightening\" warning in disc to disc copy.

	* src/brasero-burn-dialog.c (brasero_burn_dialog_insert_disc_cb):
	* src/burn-basics.h:
	* src/burn.c (brasero_burn_ask_for_dest_media),
	(brasero_burn_record):

Modified:
   trunk/ChangeLog
   trunk/src/brasero-burn-dialog.c
   trunk/src/burn-basics.h
   trunk/src/burn.c

Modified: trunk/src/brasero-burn-dialog.c
==============================================================================
--- trunk/src/brasero-burn-dialog.c	(original)
+++ trunk/src/brasero-burn-dialog.c	Sat May  3 18:50:23 2008
@@ -455,7 +455,11 @@
 	else
 		drive_name = NULL;
 
-	if (error == BRASERO_BURN_WARNING_CHECKSUM) {
+	if (error == BRASERO_BURN_WARNING_INSERT_AFTER_COPY) {
+		main_message = g_strdup (_("An image of the disc has been created on your hard drive. Burning is about to begin:"));
+		secondary_message = brasero_burn_dialog_get_media_type_string (burn, type, FALSE);
+	}
+	else if (error == BRASERO_BURN_WARNING_CHECKSUM) {
 		main_message = g_strdup (_("A data integrity test is about to begin:"));
 		secondary_message = g_strdup_printf (_("please, insert the disc to check in \"%s\"."),
 						     drive_name);

Modified: trunk/src/burn-basics.h
==============================================================================
--- trunk/src/burn-basics.h	(original)
+++ trunk/src/burn-basics.h	Sat May  3 18:50:23 2008
@@ -80,7 +80,8 @@
 
 	/* these are not necessarily error */
 	BRASERO_BURN_WARNING_NEXT_COPY,
-	BRASERO_BURN_WARNING_CHECKSUM
+	BRASERO_BURN_WARNING_CHECKSUM,
+	BRASERO_BURN_WARNING_INSERT_AFTER_COPY
 } BraseroBurnError;
 
 typedef enum {

Modified: trunk/src/burn.c
==============================================================================
--- trunk/src/burn.c	(original)
+++ trunk/src/burn.c	Sat May  3 18:50:23 2008
@@ -421,7 +421,7 @@
 	BraseroMedium *medium;
 	BraseroBurnPrivate *priv = BRASERO_BURN_PRIVATE (burn);
 
-	medium = brasero_drive_get_medium (priv->src);
+	medium = brasero_drive_get_medium (priv->dest);
 	media = brasero_medium_get_status (medium);
 	if (media != BRASERO_MEDIUM_NONE) {
 		BraseroBurnResult result;
@@ -431,6 +431,17 @@
 			return result;
 	}
 
+	if (!priv->dest) {
+		priv->dest = brasero_burn_session_get_burner (priv->session);
+		if (!priv->dest) {
+			g_set_error (error,
+				     BRASERO_BURN_ERROR,
+				     BRASERO_BURN_ERROR_GENERAL,
+				     _("no drive specified"));
+			return BRASERO_BURN_ERR;
+		}
+	}
+
 	return brasero_burn_ask_for_media (burn,
 					   priv->dest,
 					   error_type,
@@ -2224,11 +2235,18 @@
 		result = brasero_burn_same_src_dest (burn, error);
 		if (result != BRASERO_BURN_OK)
 			goto end;
-	}
 
-	/* do some drive locking quite early to make sure we have a media
-	 * in the drive so that we'll have all the necessary information */
-	if (!brasero_burn_session_is_dest_file (session)) {
+		/* lock the dest drive do it this way for the message */
+		result = brasero_burn_reload_dest_media (burn,
+							 BRASERO_BURN_WARNING_INSERT_AFTER_COPY,
+							 error);
+		if (result != BRASERO_BURN_OK)
+			goto end;
+	}
+	else if (!brasero_burn_session_is_dest_file (session)) {
+		/* do some drive locking quite early to make sure we have a
+		 * media in the drive so that we'll have all the necessary
+		 * information */
 		result = brasero_burn_lock_dest_media (burn, error);
 		if (result != BRASERO_BURN_OK)
 			goto end;



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