brasero r1225 - in trunk: . src



Author: philippr
Date: Sun Aug 31 19:31:45 2008
New Revision: 1225
URL: http://svn.gnome.org/viewvc/brasero?rev=1225&view=rev

Log:
	Improved toc file type detection (between CDRDAO and CLONE types)

	* src/brasero-image-option-dialog.c
	(brasero_image_option_dialog_image_info_cb):


Modified:
   trunk/ChangeLog
   trunk/src/brasero-image-option-dialog.c

Modified: trunk/src/brasero-image-option-dialog.c
==============================================================================
--- trunk/src/brasero-image-option-dialog.c	(original)
+++ trunk/src/brasero-image-option-dialog.c	Sun Aug 31 19:31:45 2008
@@ -122,12 +122,27 @@
 		return;
 	}
 
-    	/* Add it to recent file manager */
-	if (!strcmp (g_file_info_get_content_type (info), "application/x-toc"))
-		brasero_image_option_dialog_set_track (dialog,
-						       BRASERO_IMAGE_FORMAT_CLONE,
-						       NULL,
-						       uri);
+	if (!strcmp (g_file_info_get_content_type (info), "application/x-toc")
+	||  !strcmp (g_file_info_get_content_type (info), "application/x-cdrdao-toc")
+	||  !strcmp (g_file_info_get_content_type (info), "application/x-cue")) {
+		BraseroImageFormat format;
+		gchar *path;
+
+		path = g_filename_from_uri (uri, NULL, NULL);
+		format = brasero_image_format_identify_cuesheet (path);
+		g_free (path);
+
+		if (format != BRASERO_IMAGE_FORMAT_NONE)
+			brasero_image_option_dialog_set_track (dialog,
+							       format,
+							       NULL,
+							       uri);
+		else
+			brasero_image_option_dialog_set_track (dialog,
+							       BRASERO_IMAGE_FORMAT_CLONE,
+							       NULL,
+							       uri);
+	}
 	else if (!strcmp (g_file_info_get_content_type (info), "application/octet-stream")) {
 		/* that could be an image, so here is the deal:
 		 * if we can find the type through the extension, fine.
@@ -153,25 +168,6 @@
 						       BRASERO_IMAGE_FORMAT_BIN,
 						       uri,
 						       NULL);
-	else if (!strcmp (g_file_info_get_content_type (info), "application/x-cdrdao-toc"))
-		/* This image type is installed by brasero */
-		brasero_image_option_dialog_set_track (dialog,
-						       BRASERO_IMAGE_FORMAT_CDRDAO,
-						       NULL,
-						       uri);
-	else if (!strcmp (g_file_info_get_content_type (info), "application/x-cue")) {
-		BraseroImageFormat format;
-		gchar *path;
-
-		path = g_filename_from_uri (uri, NULL, NULL);
-		format = brasero_image_format_identify_cuesheet (path);
-		g_free (path);
-
-		brasero_image_option_dialog_set_track (dialog,
-						       BRASERO_IMAGE_FORMAT_CUE,
-						       NULL,
-						       uri);
-	}
 	else
 		brasero_image_option_dialog_set_track (dialog,
 						       BRASERO_IMAGE_FORMAT_NONE,



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