app: log actions upon activation before emitting "selected" signal

In GimpAction, instead of connecting the action-history log
function to the action's "activate" signal as a user-provided
handler, call it directly from the default handler.

In subclasses of GimpAction, chain to the parent's activate()
function before emitting the "selected" signal, so that we always
log the action in the history before responding to it.

This allows us to avoid the hack in commit
6544ce4301.

(cherry picked from commit 114d49510f)
This commit is contained in:
Ell
2018-07-06 00:00:16 -04:00
parent 7a63095582
commit 4f20255675
6 changed files with 22 additions and 29 deletions

View File

@ -160,6 +160,8 @@ gimp_procedure_action_activate (GtkAction *action)
{
GimpProcedureAction *procedure_action = GIMP_PROCEDURE_ACTION (action);
GTK_ACTION_CLASS (parent_class)->activate (action);
/* Not all actions have procedures associated with them, for example
* unused "filters-recent-[N]" actions, so check for NULL before we
* invoke the action