[brasero] Disconnect signals from a BraseroDrive just before we signal its removal
- From: Philippe Rouquier <philippr src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [brasero] Disconnect signals from a BraseroDrive just before we signal its removal
- Date: Thu, 30 Jul 2009 07:34:30 +0000 (UTC)
commit a8ee4f61bd06c6ce0d2b2061f0cd781de1b73ccf
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date: Tue Jul 28 14:33:01 2009 +0200
Disconnect signals from a BraseroDrive just before we signal its removal
libbrasero-media/brasero-medium-monitor.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/libbrasero-media/brasero-medium-monitor.c b/libbrasero-media/brasero-medium-monitor.c
index 8ab6793..64e42ee 100644
--- a/libbrasero-media/brasero-medium-monitor.c
+++ b/libbrasero-media/brasero-medium-monitor.c
@@ -411,6 +411,15 @@ brasero_medium_monitor_disconnected_cb (GVolumeMonitor *monitor,
BRASERO_MEDIA_LOG ("Drive removed");
medium = brasero_drive_get_medium (drive);
+
+ /* disconnect the signal handlers to avoid having the "medium-removed" fired twice */
+ g_signal_handlers_disconnect_by_func (drive,
+ brasero_medium_monitor_medium_added_cb,
+ self);
+ g_signal_handlers_disconnect_by_func (drive,
+ brasero_medium_monitor_medium_removed_cb,
+ self);
+
if (medium)
g_signal_emit (self,
medium_monitor_signals [MEDIUM_REMOVED],
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]