[brasero] Improved displaying of free space in the medium selector (sometimes we had "Not enough free space" a
- From: Philippe Rouquier <philippr src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [brasero] Improved displaying of free space in the medium selector (sometimes we had "Not enough free space" a
- Date: Wed, 9 Sep 2009 20:44:31 +0000 (UTC)
commit 4f9e151972142723e27319a5b9f92ae1e2a3f2e8
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date: Wed Sep 9 22:37:56 2009 +0200
Improved displaying of free space in the medium selector (sometimes we had "Not enough free space" as long as it wasn't selected)
libbrasero-burn/brasero-dest-selection.c | 24 +++++-------------------
1 files changed, 5 insertions(+), 19 deletions(-)
---
diff --git a/libbrasero-burn/brasero-dest-selection.c b/libbrasero-burn/brasero-dest-selection.c
index bfe8333..f669ef3 100644
--- a/libbrasero-burn/brasero-dest-selection.c
+++ b/libbrasero-burn/brasero-dest-selection.c
@@ -582,26 +582,12 @@ brasero_dest_selection_format_medium_string (BraseroMediumSelection *selection,
&data_blocks,
&session_bytes);
- /* Determine the size available for burning */
- if (flags & (BRASERO_BURN_FLAG_MERGE|BRASERO_BURN_FLAG_APPEND)) {
- brasero_medium_get_free_space (medium,
- &size_bytes,
- &blocks);
- }
- else {
+ if (flags & (BRASERO_BURN_FLAG_MERGE|BRASERO_BURN_FLAG_APPEND))
+ brasero_medium_get_free_space (medium, &size_bytes, &blocks);
+ else if (brasero_burn_library_get_media_capabilities (media) & BRASERO_MEDIUM_REWRITABLE)
+ brasero_medium_get_capacity (medium, &size_bytes, &blocks);
+ else
brasero_medium_get_free_space (medium, &size_bytes, &blocks);
-
- /* if data would not fit, try to see if once blanked it would
- * work. This also covers the case where the media is closed as
- * its free space would be 0. This is the best way to do it
- * instead of checking for a CLOSED medium as it allows the
- * overwrite media to be appended or merged if need be. */
- if ((flags & BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE)
- && (brasero_burn_library_get_media_capabilities (media) & BRASERO_MEDIUM_REWRITABLE))
- brasero_medium_get_capacity (medium,
- &size_bytes,
- &blocks);
- }
if (blocks) {
used = data_blocks * 100 / blocks;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]