[anjuta] document-manager: Remove autosave timeout when the plugin is deactivated.



commit ea1777dcd6bef6e359668e3b4c64bc907deb800c
Author: Carl-Anton Ingmarsson <ca ingmarsson gmail com>
Date:   Fri Nov 23 15:39:04 2012 +0100

    document-manager: Remove autosave timeout when the plugin is deactivated.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=689054

 plugins/document-manager/plugin.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/plugins/document-manager/plugin.c b/plugins/document-manager/plugin.c
index cfc5922..4d9dbb2 100644
--- a/plugins/document-manager/plugin.c
+++ b/plugins/document-manager/plugin.c
@@ -1743,6 +1743,13 @@ deactivate_plugin (AnjutaPlugin *plugin)
 										  G_CALLBACK (on_window_key_press_event),
 										  plugin);
 
+	/* Remove autosave timeout if one is scheduled. */
+	if (eplugin->autosave_on)
+	{
+		g_source_remove (eplugin->autosave_id);
+		eplugin->autosave_on = FALSE;
+	}
+
 	on_document_changed (ANJUTA_DOCMAN (eplugin->docman), NULL, plugin);
 
 	/* Widget is removed from the container when destroyed */



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