summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2019-06-22 21:19:19 -0400
committerMatthias Clasen <mclasen@redhat.com>2019-06-23 01:39:26 +0000
commit8fd968e5bf1e7c4cd0e61a50bb80cc854c112b3f (patch)
treecb14838e151e099ec4e2f3d13700ac0b93cf96b6
parent366e8da9277d0dfcb8a11321afe76e19133dc4f2 (diff)
downloadgtk+-8fd968e5bf1e7c4cd0e61a50bb80cc854c112b3f.tar.gz
action muxer: Don't activate disabled actions
We really shouldn't.
-rw-r--r--gtk/gtkactionmuxer.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gtk/gtkactionmuxer.c b/gtk/gtkactionmuxer.c
index b752ea08e7..23c4f56a5a 100644
--- a/gtk/gtkactionmuxer.c
+++ b/gtk/gtkactionmuxer.c
@@ -648,10 +648,13 @@ gtk_action_muxer_activate_action (GActionGroup *action_group,
GtkWidgetAction *action = g_ptr_array_index (muxer->widget_actions, i);
if (strcmp (action->name, action_name) == 0)
{
- if (action->activate)
- action->activate (muxer->widget, action->name, parameter);
- else if (action->pspec)
- prop_action_activate (muxer->widget, action, parameter);
+ if (muxer->widget_actions_enabled[i])
+ {
+ if (action->activate)
+ action->activate (muxer->widget, action->name, parameter);
+ else if (action->pspec)
+ prop_action_activate (muxer->widget, action, parameter);
+ }
return;
}