[brasero] Do not ask to download a missing application/lib for a plugin if we still can do the task with exist
- From: Philippe Rouquier <philippr src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [brasero] Do not ask to download a missing application/lib for a plugin if we still can do the task with exist
- Date: Wed, 2 Dec 2009 21:17:41 +0000 (UTC)
commit f96d3460634bf51846e63e2559968b2aa7eb7750
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date: Wed Dec 2 21:06:09 2009 +0100
Do not ask to download a missing application/lib for a plugin if we still can do the task with existing plugins
libbrasero-burn/brasero-burn.c | 64 ++++++++++++++++++++++-----------------
src/brasero-project.c | 11 +++++++
2 files changed, 47 insertions(+), 28 deletions(-)
---
diff --git a/libbrasero-burn/brasero-burn.c b/libbrasero-burn/brasero-burn.c
index e9f9577..68b197c 100644
--- a/libbrasero-burn/brasero-burn.c
+++ b/libbrasero-burn/brasero-burn.c
@@ -1751,34 +1751,6 @@ brasero_burn_check_session_consistency (BraseroBurn *burn,
return BRASERO_BURN_ERR;
}
- /* Check missing applications/GStreamer plugins.
- * This is the best place. */
- result = brasero_burn_session_can_burn (priv->session, FALSE);
- if (result != BRASERO_BURN_OK)
- return result;
-
- result = brasero_session_foreach_plugin_error (priv->session,
- brasero_burn_install_missing,
- burn);
- if (result != BRASERO_BURN_OK) {
- if (result != BRASERO_BURN_CANCEL) {
- GString *string;
-
- string = g_string_new (_("Please install the following required applications and libraries manually and try again:"));
- brasero_session_foreach_plugin_error (priv->session,
- brasero_burn_list_missing,
- string);
- g_set_error (error,
- BRASERO_BURN_ERROR,
- BRASERO_BURN_ERROR_MISSING_APP_AND_PLUGIN,
- string->str);
-
- g_string_free (string, TRUE);
- }
-
- return BRASERO_BURN_ERR;
- }
-
/* No need to check if a burner was set as this
* is done when locking. */
@@ -1861,6 +1833,42 @@ brasero_burn_check_session_consistency (BraseroBurn *burn,
brasero_burn_session_set_flags (priv->session, retval);
BRASERO_BURN_LOG_FLAGS (retval, "Flags after checking =");
+
+ /* Check missing applications/GStreamer plugins.
+ * This is the best place. */
+ brasero_burn_session_set_strict_support (BRASERO_BURN_SESSION (priv->session), TRUE);
+ result = brasero_burn_session_can_burn (priv->session, FALSE);
+ brasero_burn_session_set_strict_support (BRASERO_BURN_SESSION (priv->session), FALSE);
+
+ if (result == BRASERO_BURN_OK)
+ return result;
+
+ result = brasero_burn_session_can_burn (priv->session, FALSE);
+ if (result != BRASERO_BURN_OK)
+ return result;
+
+ result = brasero_session_foreach_plugin_error (priv->session,
+ brasero_burn_install_missing,
+ burn);
+ if (result != BRASERO_BURN_OK) {
+ if (result != BRASERO_BURN_CANCEL) {
+ GString *string;
+
+ string = g_string_new (_("Please install the following required applications and libraries manually and try again:"));
+ brasero_session_foreach_plugin_error (priv->session,
+ brasero_burn_list_missing,
+ string);
+ g_set_error (error,
+ BRASERO_BURN_ERROR,
+ BRASERO_BURN_ERROR_MISSING_APP_AND_PLUGIN,
+ string->str);
+
+ g_string_free (string, TRUE);
+ }
+
+ return BRASERO_BURN_ERR;
+ }
+
return BRASERO_BURN_OK;
}
diff --git a/src/brasero-project.c b/src/brasero-project.c
index ff62315..95dbfc8 100644
--- a/src/brasero-project.c
+++ b/src/brasero-project.c
@@ -1394,6 +1394,17 @@ brasero_project_check_plugins_not_ready (BraseroProject *project,
parent = gtk_widget_get_toplevel (GTK_WIDGET (project));
gtk_widget_set_sensitive (parent, FALSE);
+ brasero_burn_session_set_strict_support (BRASERO_BURN_SESSION (session), TRUE);
+ result = brasero_burn_session_can_burn (session, FALSE);
+ brasero_burn_session_set_strict_support (BRASERO_BURN_SESSION (session), FALSE);
+
+ if (result == BRASERO_BURN_OK)
+ return result;
+
+ result = brasero_burn_session_can_burn (session, FALSE);
+ if (result != BRASERO_BURN_OK)
+ return result;
+
result = brasero_session_foreach_plugin_error (session,
brasero_project_install_missing,
project);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]