[gedit-cossa] Remove the ui on deactivate.



commit 4a110e65a0a0ef36d5657a4801dd95aaa78bca4f
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Sat May 28 15:08:34 2011 +0200

    Remove the ui on deactivate.

 src/gedit-cossa-plugin.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/gedit-cossa-plugin.c b/src/gedit-cossa-plugin.c
index 72565ad..31b19c3 100644
--- a/src/gedit-cossa-plugin.c
+++ b/src/gedit-cossa-plugin.c
@@ -187,7 +187,16 @@ cossa_plugin_activate (GeditWindowActivatable *activatable)
 static void
 cossa_plugin_deactivate (GeditWindowActivatable *activatable)
 {
+  CossaPluginPrivate *priv;
+  GtkUIManager *manager;
+
   gedit_debug (DEBUG_PLUGINS);
+
+  priv = COSSA_PLUGIN (activatable)->priv;
+  manager = gedit_window_get_ui_manager (priv->window);
+
+  gtk_ui_manager_remove_ui (manager, priv->ui_id);
+  gtk_ui_manager_remove_action_group (manager, priv->ui_action_group);
 }
 
 static void



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