[brasero] Make sure a disc is supported by the drive when copying with the same drive and trying to determine
- From: Philippe Rouquier <philippr src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [brasero] Make sure a disc is supported by the drive when copying with the same drive and trying to determine
- Date: Sat, 1 Aug 2009 08:26:27 +0000 (UTC)
commit 501943af64f8f4629d2ab15194d0eba8eb4a8bb7
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date: Fri Jul 31 15:58:36 2009 +0200
Make sure a disc is supported by the drive when copying with the same drive and trying to determine if a temporary image type is supported
libbrasero-burn/brasero-caps-session.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/libbrasero-burn/brasero-caps-session.c b/libbrasero-burn/brasero-caps-session.c
index a734b44..099a399 100644
--- a/libbrasero-burn/brasero-caps-session.c
+++ b/libbrasero-burn/brasero-caps-session.c
@@ -718,6 +718,13 @@ brasero_burn_session_output_supported (BraseroBurnSession *session,
return BRASERO_BURN_OK;
}
+/* This function is not public API yet because it was too
+ * late; so use it internally for now. It's mainly for
+ * convenience.*/
+gboolean
+brasero_drive_can_write_media (BraseroDrive *drive,
+ BraseroMedia media);
+
/**
* This is only to be used in case one wants to copy using the same drive.
* It determines the possible middle image type.
@@ -730,6 +737,7 @@ brasero_burn_caps_is_session_supported_same_src_dest (BraseroBurnCaps *self,
gboolean use_flags)
{
GSList *iter;
+ BraseroDrive *burner;
BraseroTrackType input;
BraseroTrackType output;
BraseroImageFormat format;
@@ -760,6 +768,7 @@ brasero_burn_caps_is_session_supported_same_src_dest (BraseroBurnCaps *self,
/* Find one available output format */
format = BRASERO_IMAGE_FORMAT_CDRDAO;
output.type = BRASERO_TRACK_TYPE_IMAGE;
+ burner = brasero_burn_session_get_burner (session);
for (; format > BRASERO_IMAGE_FORMAT_NONE; format >>= 1) {
gboolean supported;
@@ -787,6 +796,10 @@ brasero_burn_caps_is_session_supported_same_src_dest (BraseroBurnCaps *self,
if (caps->type.type != BRASERO_TRACK_TYPE_DISC)
continue;
+ /* Make sure this is supported by the drive */
+ if (!brasero_drive_can_write_media (burner, caps->type.subtype.media))
+ continue;
+
result = brasero_caps_find_link (caps,
use_flags,
session_flags,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]