action muxer: Don't activate disabled actions

We really shouldn't.
This commit is contained in:
Matthias Clasen 2019-06-22 21:19:19 -04:00
parent 366e8da927
commit 8fd968e5bf

View File

@ -648,10 +648,13 @@ gtk_action_muxer_activate_action (GActionGroup *action_group,
GtkWidgetAction *action = g_ptr_array_index (muxer->widget_actions, i); GtkWidgetAction *action = g_ptr_array_index (muxer->widget_actions, i);
if (strcmp (action->name, action_name) == 0) if (strcmp (action->name, action_name) == 0)
{ {
if (action->activate) if (muxer->widget_actions_enabled[i])
action->activate (muxer->widget, action->name, parameter); {
else if (action->pspec) if (action->activate)
prop_action_activate (muxer->widget, action, parameter); action->activate (muxer->widget, action->name, parameter);
else if (action->pspec)
prop_action_activate (muxer->widget, action, parameter);
}
return; return;
} }