actionmuxer: Add debug spew for action activation
authorMatthias Clasen <mclasen@redhat.com>
Mon, 10 Oct 2022 23:25:20 +0000 (19:25 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 21 Oct 2022 02:34:40 +0000 (22:34 -0400)
This helps tracking down whe activation goes wrong.

gtk/gtkactionmuxer.c

index d118fdae39a448dc903ac5a83666fe52bebcc8db..7af7bb413b5b2ce68eef099c976397be064ed5b1 100644 (file)
@@ -27,6 +27,8 @@
 #include "gtkmarshalers.h"
 #include "gtkwidgetprivate.h"
 #include "gsettings-mapping.h"
+#include "gtkdebug.h"
+#include "gtkprivate.h"
 
 #include <string.h>
 
@@ -846,9 +848,15 @@ gtk_action_muxer_activate_action (GtkActionMuxer *muxer,
               if (!_gtk_bitmask_get (muxer->widget_actions_disabled, position))
                 {
                   if (action->activate)
-                    action->activate (muxer->widget, action->name, parameter);
+                    {
+                      GTK_DEBUG (ACTIONS, "%s: activate action", action->name);
+                      action->activate (muxer->widget, action->name, parameter);
+                    }
                   else if (action->pspec)
-                    prop_action_activate (muxer->widget, action, parameter);
+                    {
+                      GTK_DEBUG (ACTIONS, "%s: activate prop action", action->pspec->name);
+                      prop_action_activate (muxer->widget, action, parameter);
+                    }
                 }
 
               return;