Commit 518ab86b authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

create dynamic sub-menus using a separate, ui-manager-global merge_id

2004-11-23  Michael Natterer  <mitch@gimp.org>

	* app/menus/plug-in-menus.c (plug_in_menus_add_proc): create
	dynamic sub-menus using a separate, ui-manager-global merge_id
	instead of the procedure's merge_id. Has the effect that the ui
	manager keeps around these sub-menus forever, even if the
	procedure that initially registered them is unregistered.
	Fixes menu ordering after Script-Fu->Refresh.
parent bd577006
2004-11-23 Michael Natterer <mitch@gimp.org>
* app/menus/plug-in-menus.c (plug_in_menus_add_proc): create
dynamic sub-menus using a separate, ui-manager-global merge_id
instead of the procedure's merge_id. Has the effect that the ui
manager keeps around these sub-menus forever, even if the
procedure that initially registered them is unregistered.
Fixes menu ordering after Script-Fu->Refresh.
2004-11-23 Michael Natterer <mitch@gimp.org>
 
* app/core/gimpparasitelist.c: cosmetics, untabified.
......
......@@ -217,6 +217,7 @@ plug_in_menus_add_proc (GimpUIManager *manager,
gchar *merge_key;
gchar *action_path;
guint merge_id;
guint menu_merge_id;
g_return_if_fail (GIMP_IS_UI_MANAGER (manager));
g_return_if_fail (ui_path != NULL);
......@@ -251,7 +252,17 @@ plug_in_menus_add_proc (GimpUIManager *manager,
g_free (merge_key);
action_path = plug_in_menus_build_path (manager, ui_path, merge_id,
menu_merge_id = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (manager),
"plug-in-menu-merge-id"));
if (! menu_merge_id)
{
menu_merge_id = gtk_ui_manager_new_merge_id (GTK_UI_MANAGER (manager));
g_object_set_data (G_OBJECT (manager), "plug-in-menu-merge-id",
GUINT_TO_POINTER (menu_merge_id));
}
action_path = plug_in_menus_build_path (manager, ui_path, menu_merge_id,
path, FALSE);
if (! action_path)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment