app: invoke the right action when the quick mask button is clicked

instead of implementing the toggling in display/. One more bit
moved to actiona/.
This commit is contained in:
Michael Natterer
2016-10-01 01:06:02 +02:00
parent 41754669e6
commit aa0afe0d01
3 changed files with 32 additions and 2 deletions

View File

@ -522,6 +522,25 @@ gimp_ui_manager_activate_action (GimpUIManager *manager,
return (action != NULL);
}
gboolean
gimp_ui_manager_toggle_action (GimpUIManager *manager,
const gchar *group_name,
const gchar *action_name,
gboolean active)
{
GtkAction *action;
g_return_val_if_fail (GIMP_IS_UI_MANAGER (manager), FALSE);
g_return_val_if_fail (action_name != NULL, FALSE);
action = gimp_ui_manager_find_action (manager, group_name, action_name);
if (GTK_IS_TOGGLE_ACTION (action))
gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action),
active ? TRUE : FALSE);
return GTK_IS_TOGGLE_ACTION (action);
}
void
gimp_ui_manager_ui_register (GimpUIManager *manager,