[brasero] Detach Video project from session (disconnect the signals handlers) when it's not the active project



commit 0d50da75d2d6b0a137a9c9e4eac8c3455623b049
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date:   Sun Jun 21 14:16:51 2009 +0200

    Detach Video project from session (disconnect the signals handlers) when it's not the active project in use

 src/brasero-video-disc.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/brasero-video-disc.c b/src/brasero-video-disc.c
index 35fdf93..b437962 100644
--- a/src/brasero-video-disc.c
+++ b/src/brasero-video-disc.c
@@ -1323,6 +1323,15 @@ brasero_video_disc_set_session_contents (BraseroDisc *self,
 	priv = BRASERO_VIDEO_DISC_PRIVATE (self);
 
 	if (!session) {
+		GtkTreeModel *model;
+		BraseroSessionCfg *session;
+
+		model = gtk_tree_view_get_model (GTK_TREE_VIEW (priv->tree));
+		session = brasero_video_tree_model_get_session (BRASERO_VIDEO_TREE_MODEL (model));
+		g_signal_handlers_disconnect_by_func (session,
+						      brasero_video_disc_session_changed,
+						      self);
+
 		gtk_tree_view_set_model (GTK_TREE_VIEW (priv->tree), NULL);
 		return BRASERO_DISC_OK;
 	}



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