[anjuta] patch: Fixed bug 616740 - duplicated shortcuts nodes



commit 2dcfb656c77b84bdb1f5d924e89566f37f69fa63
Author: Naba Kumar <naba gnome org>
Date:   Sun Apr 25 13:32:49 2010 +0300

    patch: Fixed bug 616740 - duplicated shortcuts nodes

 plugins/patch/plugin.c |   14 ++++++++------
 plugins/patch/plugin.h |    1 +
 2 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/plugins/patch/plugin.c b/plugins/patch/plugin.c
index f16fdaf..559447e 100644
--- a/plugins/patch/plugin.c
+++ b/plugins/patch/plugin.c
@@ -88,11 +88,12 @@ patch_plugin_activate (AnjutaPlugin *plugin)
 
 
 	/* Add all our actions */
-	anjuta_ui_add_action_group_entries (ui, "ActionMenuTools",
-										_("Patch files/directories"),
-										actions_tools,
-										G_N_ELEMENTS (actions_tools),
-										GETTEXT_PACKAGE, TRUE, p_plugin);
+	p_plugin->action_group =
+		anjuta_ui_add_action_group_entries  (ui, "ActionMenuTools",
+											_("Patch files/directories"),
+											actions_tools,
+											G_N_ELEMENTS (actions_tools),
+											GETTEXT_PACKAGE, TRUE, p_plugin);
 
 	p_plugin->uiid = anjuta_ui_merge (ui, UI_FILE);
 	
@@ -107,7 +108,8 @@ patch_plugin_deactivate (AnjutaPlugin *plugin)
 	DEBUG_PRINT ("%s", "AnjutaPatchPlugin: Dectivating Patch plugin â?¦");
 
 	anjuta_ui_unmerge (ui, ANJUTA_PLUGIN_PATCH (plugin)->uiid);
-
+	anjuta_ui_remove_action_group (ui, ANJUTA_PLUGIN_PATCH (plugin)->action_group);
+	
 	/* FIXME: should launcher be unreferenced? */
 	
 	return TRUE;
diff --git a/plugins/patch/plugin.h b/plugins/patch/plugin.h
index 3f9c8d9..e0c88fe 100644
--- a/plugins/patch/plugin.h
+++ b/plugins/patch/plugin.h
@@ -52,6 +52,7 @@ struct _PatchPlugin {
 
 	gboolean executing;
 	gint uiid;
+	GtkActionGroup *action_group;
 };
 
 struct _PatchPluginClass {



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