[gedit] Disconnect doc loaded/saved signals when spell plugin deactivated
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] Disconnect doc loaded/saved signals when spell plugin deactivated
- Date: Sun, 18 Apr 2010 11:23:06 +0000 (UTC)
commit 579279ea3e5ed593643744f76d9d39a9bd77d5f7
Author: Jesse van den Kieboom <jessevdk gnome org>
Date: Sun Apr 18 13:15:42 2010 +0200
Disconnect doc loaded/saved signals when spell plugin deactivated
plugins/spell/gedit-spell-plugin.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/plugins/spell/gedit-spell-plugin.c b/plugins/spell/gedit-spell-plugin.c
index af05541..a055ec1 100644
--- a/plugins/spell/gedit-spell-plugin.c
+++ b/plugins/spell/gedit-spell-plugin.c
@@ -1138,8 +1138,18 @@ impl_activate (GeditPlugin *plugin,
docs = gedit_window_get_documents (window);
for (l = docs; l != NULL; l = g_list_next (l))
{
- set_auto_spell_from_metadata (window, GEDIT_DOCUMENT (l->data),
+ GeditDocument *doc = GEDIT_DOCUMENT (l->data);
+
+ set_auto_spell_from_metadata (window, doc,
data->action_group);
+
+ g_signal_handlers_disconnect_by_func (doc,
+ on_document_loaded,
+ window);
+
+ g_signal_handlers_disconnect_by_func (doc,
+ on_document_saved,
+ window);
}
data->tab_added_id =
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]