From b933d92c647ae6e533aa4713abfb532bbb2ac2b7 Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Thu, 10 Oct 2019 11:29:02 -0300 Subject: [PATCH] Testing if the action is enabled before activation. --- src/actions/testprogram/testprogram.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/actions/testprogram/testprogram.c b/src/actions/testprogram/testprogram.c index 506df65..e3ce2e8 100644 --- a/src/actions/testprogram/testprogram.c +++ b/src/actions/testprogram/testprogram.c @@ -52,9 +52,11 @@ if(!action) { g_message("Invalid action name: \"%s\"",args); - } else { + } else if(g_action_get_enabled(action)) { g_message("Activating action \"%s\"",args); g_action_activate(action,NULL); + } else { + g_message("Action \"%s\" is disabled",args); } return TRUE; -- libgit2 0.21.2