renamed from set_action_important(). Set the "hide-if-empty" property so

2005-09-24  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpactiongroup.c
	(gimp_action_group_set_action_hide_empty): renamed from
	set_action_important(). Set the "hide-if-empty" property so
	showing an insensitive "Empty" item instead of hiding the submenu
	works again (did this ever work?).

	* app/actions/tool-options-actions.c (tool_options_actions_setup):
	changed accordingly. Keeps the tool options submenus from
	disappearing.
This commit is contained in:
Michael Natterer 2005-09-23 23:41:43 +00:00 committed by Michael Natterer
parent c65f6907bd
commit 4d77057c68
4 changed files with 24 additions and 12 deletions

View File

@ -1,3 +1,15 @@
2005-09-24 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpactiongroup.c
(gimp_action_group_set_action_hide_empty): renamed from
set_action_important(). Set the "hide-if-empty" property so
showing an insensitive "Empty" item instead of hiding the submenu
works again (did this ever work?).
* app/actions/tool-options-actions.c (tool_options_actions_setup):
changed accordingly. Keeps the tool options submenus from
disappearing.
2005-09-23 Michael Natterer <mitch@gimp.org>
* menus/image-menu.xml.in: reordered submenus and placeholders

View File

@ -95,8 +95,8 @@ static GimpActionEntry tool_options_actions[] =
#define SET_VISIBLE(action,condition) \
gimp_action_group_set_action_visible (group, action, (condition) != 0)
#define SET_IMPORTANT(action,condition) \
gimp_action_group_set_action_important (group, action, (condition) != 0)
#define SET_HIDE_EMPTY(action,condition) \
gimp_action_group_set_action_hide_empty (group, action, (condition) != 0)
void
tool_options_actions_setup (GimpActionGroup *group)
@ -105,9 +105,9 @@ tool_options_actions_setup (GimpActionGroup *group)
tool_options_actions,
G_N_ELEMENTS (tool_options_actions));
SET_IMPORTANT ("tool-options-restore-menu", TRUE);
SET_IMPORTANT ("tool-options-rename-menu", TRUE);
SET_IMPORTANT ("tool-options-delete-menu", TRUE);
SET_HIDE_EMPTY ("tool-options-restore-menu", FALSE);
SET_HIDE_EMPTY ("tool-options-rename-menu", FALSE);
SET_HIDE_EMPTY ("tool-options-delete-menu", FALSE);
}
void
@ -212,4 +212,4 @@ tool_options_actions_update_presets (GimpActionGroup *group,
}
#undef SET_VISIBLE
#undef SET_IMPORTANT
#undef SET_HIDE_EMPTY

View File

@ -850,9 +850,9 @@ gimp_action_group_set_action_viewable (GimpActionGroup *group,
}
void
gimp_action_group_set_action_important (GimpActionGroup *group,
const gchar *action_name,
gboolean is_important)
gimp_action_group_set_action_hide_empty (GimpActionGroup *group,
const gchar *action_name,
gboolean hide_empty)
{
GtkAction *action;
@ -863,11 +863,11 @@ gimp_action_group_set_action_important (GimpActionGroup *group,
if (! action)
{
g_warning ("%s: Unable to set \"is-important\" of action "
g_warning ("%s: Unable to set \"hide-if-empty\" of action "
"which doesn't exist: %s",
G_STRFUNC, action_name);
return;
}
g_object_set (action, "is-important", is_important ? TRUE : FALSE, NULL);
g_object_set (action, "hide-if-empty", hide_empty ? TRUE : FALSE, NULL);
}

View File

@ -190,7 +190,7 @@ void gimp_action_group_set_action_color (GimpActionGroup *group,
void gimp_action_group_set_action_viewable (GimpActionGroup *group,
const gchar *action_name,
GimpViewable *viewable);
void gimp_action_group_set_action_important (GimpActionGroup *group,
void gimp_action_group_set_action_hide_empty(GimpActionGroup *group,
const gchar *action_name,
gboolean is_important);