[rhythmbox/v0.13.x] mpris: disconnect signal handlers when deactivated (bug #649224)
- From: Jonathan Matthew <jmatthew src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox/v0.13.x] mpris: disconnect signal handlers when deactivated (bug #649224)
- Date: Sat, 7 May 2011 02:41:48 +0000 (UTC)
commit 5e7d9d2e5ce4a3fa603a0194f6796ec580aec071
Author: Jonathan Matthew <jonathan d14n org>
Date: Sat May 7 12:40:42 2011 +1000
mpris: disconnect signal handlers when deactivated (bug #649224)
plugins/mpris/rb-mpris-plugin.c | 28 +++++++++++++++++++++++++++-
1 files changed, 27 insertions(+), 1 deletions(-)
---
diff --git a/plugins/mpris/rb-mpris-plugin.c b/plugins/mpris/rb-mpris-plugin.c
index 70186f4..d2b683b 100644
--- a/plugins/mpris/rb-mpris-plugin.c
+++ b/plugins/mpris/rb-mpris-plugin.c
@@ -1519,7 +1519,6 @@ impl_deactivate (RBPlugin *bplugin,
plugin->playlists_id = 0;
}
- /* probably remove signal handlers? */
if (plugin->property_emit_id != 0) {
g_source_remove (plugin->property_emit_id);
plugin->property_emit_id = 0;
@@ -1534,6 +1533,24 @@ impl_deactivate (RBPlugin *bplugin,
}
if (plugin->player != NULL) {
+ g_signal_handlers_disconnect_by_func (plugin->player,
+ G_CALLBACK (play_order_changed_cb),
+ plugin);
+ g_signal_handlers_disconnect_by_func (plugin->player,
+ G_CALLBACK (volume_changed_cb),
+ plugin);
+ g_signal_handlers_disconnect_by_func (plugin->player,
+ G_CALLBACK (playing_changed_cb),
+ plugin);
+ g_signal_handlers_disconnect_by_func (plugin->player,
+ G_CALLBACK (playing_entry_changed_cb),
+ plugin);
+ g_signal_handlers_disconnect_by_func (plugin->player,
+ G_CALLBACK (playing_source_changed_cb),
+ plugin);
+ g_signal_handlers_disconnect_by_func (plugin->player,
+ G_CALLBACK (elapsed_nano_changed_cb),
+ plugin);
g_object_unref (plugin->player);
plugin->player = NULL;
}
@@ -1542,10 +1559,19 @@ impl_deactivate (RBPlugin *bplugin,
plugin->shell = NULL;
}
if (plugin->db != NULL) {
+ g_signal_handlers_disconnect_by_func (plugin->db,
+ G_CALLBACK (entry_extra_metadata_notify_cb),
+ plugin);
+ g_signal_handlers_disconnect_by_func (plugin->db,
+ G_CALLBACK (entry_changed_cb),
+ plugin);
g_object_unref (plugin->db);
plugin->db = NULL;
}
if (plugin->page_model != NULL) {
+ g_signal_handlers_disconnect_by_func (plugin->page_model,
+ G_CALLBACK (display_page_inserted_cb),
+ plugin);
g_object_unref (plugin->page_model);
plugin->page_model = NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]