[brasero] Add some more checks for the output type



commit 7b3531383523950d132708c0e8d6328b6a831b36
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date:   Wed Aug 19 15:08:27 2009 +0200

    Add some more checks for the output type

 libbrasero-burn/brasero-video-options.c |   24 ++++++++++++++++++++----
 1 files changed, 20 insertions(+), 4 deletions(-)
---
diff --git a/libbrasero-burn/brasero-video-options.c b/libbrasero-burn/brasero-video-options.c
index d90f68f..1222441 100644
--- a/libbrasero-burn/brasero-video-options.c
+++ b/libbrasero-burn/brasero-video-options.c
@@ -82,8 +82,27 @@ brasero_video_options_update_from_tag (BraseroVideoOptions *options,
 	priv = BRASERO_VIDEO_OPTIONS_PRIVATE (options);
 	
 	if (!strcmp (tag, BRASERO_VCD_TYPE)) {
-		gint svcd_type = brasero_burn_session_tag_lookup_int (priv->session, tag);
+		BraseroImageFormat format;
+		gint svcd_type;
+
+		media = brasero_burn_session_get_dest_media (priv->session);
+		if (media & BRASERO_MEDIUM_DVD) {
+			/* Don't change anything in this case
+			 * as the tag has no influence over 
+			 * this type of image */
+			return;
+		}
+		else if (media & BRASERO_MEDIUM_FILE) {
+			BraseroImageFormat format;
+
+			format = brasero_burn_session_get_output_format (priv->session);
+
+			/* Same as above for the following case */
+			if (format == BRASERO_IMAGE_FORMAT_BIN)
+				return;
+		}
 
+		svcd_type = brasero_burn_session_tag_lookup_int (priv->session, tag);
 		if (svcd_type == BRASERO_SVCD) {
 			if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->svcd_button)))
 				gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->svcd_button), TRUE);
@@ -95,9 +114,6 @@ brasero_video_options_update_from_tag (BraseroVideoOptions *options,
 			if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->vcd_button)))
 				gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->vcd_button), TRUE);
 
-			if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->button_4_3)))
-				gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->button_4_3), TRUE);
-
 			gtk_widget_set_sensitive (priv->button_4_3, FALSE);
 			gtk_widget_set_sensitive (priv->button_16_9, FALSE);
 		}



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