[brasero] Check flags _before_ trying to create a task
- From: Philippe Rouquier <philippr src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [brasero] Check flags _before_ trying to create a task
- Date: Mon, 12 Oct 2009 11:52:59 +0000 (UTC)
commit 55ff1e41f838ebac48ad4acf676a9fe46895c8d1
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date: Mon Oct 12 09:48:01 2009 +0200
Check flags _before_ trying to create a task
The other way round would do nothing helpful as flags are sometimes a reason why creating a task fails
libbrasero-burn/brasero-burn.c | 24 +++++++++++++-----------
1 files changed, 13 insertions(+), 11 deletions(-)
---
diff --git a/libbrasero-burn/brasero-burn.c b/libbrasero-burn/brasero-burn.c
index d699bf0..2c7523b 100644
--- a/libbrasero-burn/brasero-burn.c
+++ b/libbrasero-burn/brasero-burn.c
@@ -1918,17 +1918,6 @@ brasero_burn_run_tasks (BraseroBurn *burn,
GSList *tasks, *next, *iter;
BraseroBurnPrivate *priv = BRASERO_BURN_PRIVATE (burn);
- tasks = brasero_burn_caps_new_task (priv->caps,
- priv->session,
- temp_output,
- error);
- if (!tasks)
- return BRASERO_BURN_NOT_SUPPORTED;
-
- priv->tasks_done = 0;
- priv->task_nb = g_slist_length (tasks);
- BRASERO_BURN_LOG ("%i tasks to perform", priv->task_nb);
-
/* push the session settings to keep the original session untainted */
brasero_burn_session_push_settings (priv->session);
@@ -1939,6 +1928,19 @@ brasero_burn_run_tasks (BraseroBurn *burn,
return result;
}
+ tasks = brasero_burn_caps_new_task (priv->caps,
+ priv->session,
+ temp_output,
+ error);
+ if (!tasks) {
+ brasero_burn_session_pop_settings (priv->session);
+ return BRASERO_BURN_NOT_SUPPORTED;
+ }
+
+ priv->tasks_done = 0;
+ priv->task_nb = g_slist_length (tasks);
+ BRASERO_BURN_LOG ("%i tasks to perform", priv->task_nb);
+
/* run all imaging tasks first */
for (iter = tasks; iter; iter = next) {
goffset len = 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]