[brasero] Allow again to add directories to audio and video projects



commit a4a4a54d34bba80685734058f544a99e5691b4d8
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date:   Sun Nov 29 21:31:43 2009 +0100

    Allow again to add directories to audio and video projects

 libbrasero-burn/brasero-track-stream-cfg.c |   34 ++++++++++++++--------------
 src/brasero-audio-disc.c                   |    3 ++
 2 files changed, 20 insertions(+), 17 deletions(-)
---
diff --git a/libbrasero-burn/brasero-track-stream-cfg.c b/libbrasero-burn/brasero-track-stream-cfg.c
index 376b4c5..28230ad 100644
--- a/libbrasero-burn/brasero-track-stream-cfg.c
+++ b/libbrasero-burn/brasero-track-stream-cfg.c
@@ -121,23 +121,6 @@ brasero_track_stream_cfg_results_cb (GObject *obj,
 		return;
 	}
 
-	/* Also make sure it's duration is appropriate (!= 0) */
-	len = g_file_info_get_attribute_uint64 (info, BRASERO_IO_LEN);
-	if (len <= 0) {
-		gchar *name;
-
-		BRASERO_GET_BASENAME_FOR_DISPLAY (uri, name);
-		priv->error = g_error_new (BRASERO_BURN_ERROR,
-					   BRASERO_BURN_ERROR_GENERAL,
-					   /* Translators: %s is the name of the file */
-					   _("\"%s\" is not suitable for audio or video media"),
-					   name);
-		g_free (name);
-
-		brasero_track_changed (BRASERO_TRACK (obj));
-		return;
-	}
-
 	/* FIXME: we don't know whether it's audio or video that is required */
 	if (g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY) {
 		/* This error is special as it can be recovered from */
@@ -179,6 +162,23 @@ brasero_track_stream_cfg_results_cb (GObject *obj,
 		return;
 	}
 
+	/* Also make sure it's duration is appropriate (!= 0) */
+	len = g_file_info_get_attribute_uint64 (info, BRASERO_IO_LEN);
+	if (len <= 0) {
+		gchar *name;
+
+		BRASERO_GET_BASENAME_FOR_DISPLAY (uri, name);
+		priv->error = g_error_new (BRASERO_BURN_ERROR,
+					   BRASERO_BURN_ERROR_GENERAL,
+					   /* Translators: %s is the name of the file */
+					   _("\"%s\" is not suitable for audio or video media"),
+					   name);
+		g_free (name);
+
+		brasero_track_changed (BRASERO_TRACK (obj));
+		return;
+	}
+
 	if (g_file_info_get_is_symlink (info)) {
 		gchar *sym_uri;
 
diff --git a/src/brasero-audio-disc.c b/src/brasero-audio-disc.c
index b6d07ab..3e8cbdc 100644
--- a/src/brasero-audio-disc.c
+++ b/src/brasero-audio-disc.c
@@ -1,3 +1,5 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+
 /***************************************************************************
  *            audio-disc.c
  *
@@ -924,6 +926,7 @@ brasero_audio_disc_session_changed (BraseroSessionCfg *session,
 							   BRASERO_TRACK (track));
 
 			error = brasero_status_get_error (status);
+			g_print ("ERR %i\n", error->code);
 			if (!error)
 				brasero_audio_disc_file_type_error_dialog (self, uri);
 			else if (error->code == BRASERO_BURN_ERROR_FILE_FOLDER) {



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