brasero r1342 - in trunk: . src



Author: philippr
Date: Fri Oct  3 16:20:53 2008
New Revision: 1342
URL: http://svn.gnome.org/viewvc/brasero?rev=1342&view=rev

Log:
	Make sure the session auto configuration object is off when starting burn dialog

	* src/brasero-burn-dialog.c (brasero_burn_dialog_run):
	* src/brasero-session-cfg.c (brasero_session_cfg_disable),
	(brasero_session_cfg_input_changed),
	(brasero_session_cfg_output_changed),
	(brasero_session_cfg_caps_changed):
	* src/brasero-session-cfg.h:


Modified:
   trunk/ChangeLog
   trunk/src/brasero-burn-dialog.c
   trunk/src/brasero-session-cfg.c
   trunk/src/brasero-session-cfg.h

Modified: trunk/src/brasero-burn-dialog.c
==============================================================================
--- trunk/src/brasero-burn-dialog.c	(original)
+++ trunk/src/brasero-burn-dialog.c	Fri Oct  3 16:20:53 2008
@@ -52,6 +52,7 @@
 #include "brasero-tray.h"
 #include "brasero-burn-dialog.h"
 #include "brasero-jacket-edit.h"
+#include "brasero-session-cfg.h"
 
 #include "burn-basics.h"
 #include "burn-debug.h"
@@ -1841,6 +1842,11 @@
 	BraseroBurnResult result;
 
 	dialog->priv->session = session;
+
+	/* disable autoconfiguration */
+	if (BRASERO_IS_SESSION_CFG (dialog->priv->session))
+		brasero_session_cfg_disable (BRASERO_SESSION_CFG (dialog->priv->session));
+
 	g_object_ref (session);
 
 	/* update what we should display */

Modified: trunk/src/brasero-session-cfg.c
==============================================================================
--- trunk/src/brasero-session-cfg.c	(original)
+++ trunk/src/brasero-session-cfg.c	Fri Oct  3 16:20:53 2008
@@ -52,6 +52,7 @@
 	glong caps_sig;
 
 	guint configuring:1;
+	guint disabled:1;
 };
 
 #define BRASERO_SESSION_CFG_PRIVATE(o)  (G_TYPE_INSTANCE_GET_PRIVATE ((o), BRASERO_TYPE_SESSION_CFG, BraseroSessionCfgPrivate))
@@ -69,6 +70,15 @@
 
 #define BRASERO_DEST_SAVED_FLAGS	(BRASERO_DRIVE_PROPERTIES_FLAGS|BRASERO_BURN_FLAG_MULTI)
 
+void
+brasero_session_cfg_disable (BraseroSessionCfg *self)
+{
+	BraseroSessionCfgPrivate *priv;
+
+	priv = BRASERO_SESSION_CFG_PRIVATE (self);
+	priv->disabled = TRUE;
+}
+
 static void
 brasero_session_cfg_save_drive_properties (BraseroSessionCfg *self)
 {
@@ -527,6 +537,12 @@
 static void
 brasero_session_cfg_input_changed (BraseroBurnSession *session)
 {
+	BraseroSessionCfgPrivate *priv;
+
+	priv = BRASERO_SESSION_CFG_PRIVATE (session);
+	if (priv->disabled)
+		return;
+
 	/* when that happens it's mostly because a medium source changed, or
 	 * a new image was set. 
 	 * - reload saved flags
@@ -540,6 +556,12 @@
 static void
 brasero_session_cfg_output_changed (BraseroBurnSession *session)
 {
+	BraseroSessionCfgPrivate *priv;
+
+	priv = BRASERO_SESSION_CFG_PRIVATE (session);
+	if (priv->disabled)
+		return;
+
 	/* In this case need to :
 	 * - load flags 
 	 * - check if all flags are thereafter supported
@@ -649,6 +671,12 @@
 brasero_session_cfg_caps_changed (BraseroPluginManager *manager,
 				  BraseroSessionCfg *self)
 {
+	BraseroSessionCfgPrivate *priv;
+
+	priv = BRASERO_SESSION_CFG_PRIVATE (self);
+	if (priv->disabled)
+		return;
+
 	/* In this case we need to check if:
 	 * - new flags are supported or not supported anymore
 	 * - new image types as input/output are supported

Modified: trunk/src/brasero-session-cfg.h
==============================================================================
--- trunk/src/brasero-session-cfg.h	(original)
+++ trunk/src/brasero-session-cfg.h	Fri Oct  3 16:20:53 2008
@@ -61,6 +61,9 @@
 brasero_session_cfg_add_flags (BraseroSessionCfg *cfg,
 			       BraseroBurnFlag flags);
 
+void
+brasero_session_cfg_disable (BraseroSessionCfg *self);
+
 /**
  * This is for the signal sent to tell whether or not session is valid
  */



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