brasero r739 - in trunk: . src



Author: philippr
Date: Mon Apr 21 07:45:48 2008
New Revision: 739
URL: http://svn.gnome.org/viewvc/brasero?rev=739&view=rev

Log:
	Make sure there is always a default path set when we\'re creating an image

	* src/brasero-dest-selection.c
	(brasero_dest_selection_source_changed):
	* src/brasero-disc-copy-dialog.c (brasero_disc_copy_dialog_init):

Modified:
   trunk/ChangeLog
   trunk/src/brasero-dest-selection.c
   trunk/src/brasero-disc-copy-dialog.c

Modified: trunk/src/brasero-dest-selection.c
==============================================================================
--- trunk/src/brasero-dest-selection.c	(original)
+++ trunk/src/brasero-dest-selection.c	Mon Apr 21 07:45:48 2008
@@ -1187,6 +1187,20 @@
 brasero_dest_selection_source_changed (BraseroBurnSession *session,
 				       BraseroDestSelection *self)
 {
+	BraseroDestSelectionPrivate *priv;
+
+	priv = BRASERO_DEST_SELECTION_PRIVATE (self);
+
+	if (brasero_burn_session_is_dest_file (priv->session)) {
+		/* check that if a path was set there may be none if there was
+		 * no disc inserted when the dialog was created. */
+
+		if (brasero_burn_session_get_output (priv->session, NULL, NULL, NULL) != BRASERO_BURN_OK)
+			brasero_dest_selection_set_image_properties (self);
+
+		return;
+	}
+
 	/* NOTE: that can't happen if we are going to write to an image since
 	 * that would mean we are changing the image format (something we don't
 	 * do. So it has to be when we write to a drive */

Modified: trunk/src/brasero-disc-copy-dialog.c
==============================================================================
--- trunk/src/brasero-disc-copy-dialog.c	(original)
+++ trunk/src/brasero-disc-copy-dialog.c	Mon Apr 21 07:45:48 2008
@@ -183,7 +183,6 @@
 			valid = FALSE;
 		else
 			valid = TRUE;
-	
 	}
 	else if (brasero_burn_session_is_dest_file (priv->session)) {
 	  	valid = TRUE;
@@ -199,8 +198,11 @@
 		g_object_unref (caps);
 	}
 
-	g_object_unref (src_drive);
-	g_object_unref (drive);
+	if (src_drive)
+		g_object_unref (src_drive);
+
+	if (drive)
+		g_object_unref (drive);
 
 	brasero_disc_copy_dialog_set_burn_button_state (obj, valid);
 }



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