brasero r1426 - in trunk: . src



Author: philippr
Date: Mon Oct 27 10:15:41 2008
New Revision: 1426
URL: http://svn.gnome.org/viewvc/brasero?rev=1426&view=rev

Log:
	Tell the user when we can\'t recognize the format of the image

	* src/brasero-data-project.c
	(brasero_data_project_graft_is_needed):
	* src/brasero-session-cfg.c (brasero_session_cfg_update):
	* src/brasero-src-image.c (brasero_src_image_set_track),
	(brasero_src_image_image_info_cb):
	* src/burn-track.c (brasero_track_set_image_source):


Modified:
   trunk/ChangeLog
   trunk/src/brasero-data-project.c
   trunk/src/brasero-session-cfg.c
   trunk/src/brasero-src-image.c
   trunk/src/burn-track.c

Modified: trunk/src/brasero-data-project.c
==============================================================================
--- trunk/src/brasero-data-project.c	(original)
+++ trunk/src/brasero-data-project.c	Mon Oct 27 10:15:41 2008
@@ -852,7 +852,6 @@
 brasero_data_project_graft_is_needed (BraseroDataProject *self,
 				      BraseroURINode *uri_node)
 {
-g_print ("Checking for %s\n", uri_node->uri);
 	if (uri_node->nodes)
 		return TRUE;
 
@@ -864,7 +863,7 @@
 		 * signal that URI is not in the tree. */
 		return TRUE;
 	}
-g_print ("REMOVVE\n");
+
 	brasero_data_project_uri_remove_graft (self, uri_node->uri);
 	return FALSE;
 }

Modified: trunk/src/brasero-session-cfg.c
==============================================================================
--- trunk/src/brasero-session-cfg.c	(original)
+++ trunk/src/brasero-session-cfg.c	Mon Oct 27 10:15:41 2008
@@ -511,7 +511,29 @@
 
 	if (source.type == BRASERO_TRACK_TYPE_IMAGE
 	&&  source.subtype.img_format == BRASERO_IMAGE_FORMAT_NONE) {
-		priv->is_valid = BRASERO_SESSION_NO_INPUT_IMAGE;
+		gchar *uri;
+		GSList *tracks;
+
+		tracks = brasero_burn_session_get_tracks (BRASERO_BURN_SESSION (self));
+
+		/* It can be two cases:
+		 * - no image set
+		 * - image format cannot be detected */
+		if (tracks) {
+			BraseroTrack *track;
+
+			track = tracks->data;
+			uri = brasero_track_get_image_source (track, TRUE);
+			if (uri) {
+				priv->is_valid = BRASERO_SESSION_UNKNOWN_IMAGE;
+				g_free (uri);
+			}
+			else
+				priv->is_valid = BRASERO_SESSION_NO_INPUT_IMAGE;
+		}
+		else
+			priv->is_valid = BRASERO_SESSION_NO_INPUT_IMAGE;
+
 		g_signal_emit (self,
 			       session_cfg_signals [IS_VALID_SIGNAL],
 			       0);

Modified: trunk/src/brasero-src-image.c
==============================================================================
--- trunk/src/brasero-src-image.c	(original)
+++ trunk/src/brasero-src-image.c	Mon Oct 27 10:15:41 2008
@@ -203,9 +203,9 @@
 	case BRASERO_IMAGE_FORMAT_CUE:
 	case BRASERO_IMAGE_FORMAT_CDRDAO:
 	case BRASERO_IMAGE_FORMAT_CLONE:
-		path = g_filename_from_uri (toc, NULL, NULL);
+		path = g_filename_from_uri (toc?toc:image, NULL, NULL);
 		if (!path)
-			path = g_uri_unescape_string (toc, NULL);
+			path = g_uri_unescape_string (toc?toc:image, NULL);
 		break;
 	default:
 		break;
@@ -378,8 +378,8 @@
 	else
 		brasero_src_image_set_track (dialog,
 					     BRASERO_IMAGE_FORMAT_NONE,
-					     NULL,
 					     uri,
+					     NULL,
 					     g_file_info_get_size (info));
 }
 

Modified: trunk/src/burn-track.c
==============================================================================
--- trunk/src/burn-track.c	(original)
+++ trunk/src/burn-track.c	Mon Oct 27 10:15:41 2008
@@ -612,9 +612,6 @@
 	if (track->type.type != BRASERO_TRACK_TYPE_IMAGE)
 		return BRASERO_BURN_NOT_SUPPORTED;
 
-	if (format == BRASERO_IMAGE_FORMAT_NONE)
-		return BRASERO_BURN_NOT_SUPPORTED;
-
 	track->type.subtype.img_format = format;
 
 	image = (BraseroTrackImage *) track;



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