added accessor for the list of menu branches.

2007-12-20  Sven Neumann  <sven@gimp.org>

	* app/plug-in/gimppluginmanager-menu-branch.[ch]: added accessor
	for the list of menu branches.

	* app/actions/plug-in-actions.c (plug_in_actions_setup): use it.


svn path=/trunk/; revision=24417
This commit is contained in:
Sven Neumann
2007-12-20 21:48:18 +00:00
committed by Sven Neumann
parent a151d7e640
commit 7909c0bcbd
4 changed files with 24 additions and 7 deletions

View File

@ -1,3 +1,10 @@
2007-12-20 Sven Neumann <sven@gimp.org>
* app/plug-in/gimppluginmanager-menu-branch.[ch]: added accessor
for the list of menu branches.
* app/actions/plug-in-actions.c (plug_in_actions_setup): use it.
2007-12-20 Sven Neumann <sven@gimp.org>
* configure.in: readded some AC_SUBST() that were removed under

View File

@ -127,6 +127,7 @@ static const GimpEnumActionEntry plug_in_repeat_actions[] =
void
plug_in_actions_setup (GimpActionGroup *group)
{
GimpPlugInManager *manager = group->gimp->plug_in_manager;
GimpPlugInActionEntry *entries;
GSList *list;
gint n_entries;
@ -141,13 +142,13 @@ plug_in_actions_setup (GimpActionGroup *group)
G_N_ELEMENTS (plug_in_repeat_actions),
G_CALLBACK (plug_in_repeat_cmd_callback));
for (list = group->gimp->plug_in_manager->menu_branches;
for (list = gimp_plug_in_manager_get_menu_branches (manager);
list;
list = g_slist_next (list))
{
GimpPlugInMenuBranch *branch = list->data;
plug_in_actions_menu_branch_added (group->gimp->plug_in_manager,
plug_in_actions_menu_branch_added (manager,
branch->prog_name,
branch->menu_path,
branch->menu_label,

View File

@ -83,3 +83,11 @@ gimp_plug_in_manager_add_menu_branch (GimpPlugInManager *manager,
branch->menu_label, branch->menu_path);
#endif
}
GSList *
gimp_plug_in_manager_get_menu_branches (GimpPlugInManager *manager)
{
g_return_val_if_fail (GIMP_IS_PLUG_IN_MANAGER (manager), NULL);
return manager->menu_branches;
}

View File

@ -30,13 +30,14 @@ struct _GimpPlugInMenuBranch
};
void gimp_plug_in_manager_menu_branch_exit (GimpPlugInManager *manager);
void gimp_plug_in_manager_menu_branch_exit (GimpPlugInManager *manager);
/* Add a menu branch */
void gimp_plug_in_manager_add_menu_branch (GimpPlugInManager *manager,
const gchar *prog_name,
const gchar *menu_path,
const gchar *menu_label);
void gimp_plug_in_manager_add_menu_branch (GimpPlugInManager *manager,
const gchar *prog_name,
const gchar *menu_path,
const gchar *menu_label);
GSList * gimp_plug_in_manager_get_menu_branches (GimpPlugInManager *manager);
#endif /* __GIMP_PLUG_IN_MANAGER_MENU_BRANCH_H__ */